Recording slow web stream

Posted by Budric on Ask Ubuntu See other posts from Ask Ubuntu or by Budric
Published on 2012-09-12T20:21:17Z Indexed on 2012/09/12 21:50 UTC
Read the original article Hit count: 294

Filed under:
|

I'm trying to record an mpeg2 video stream from a website that doesn't have the greatest bandwidth. The video often buffers. I want to download the stream and watch it offline. The extract stream format received is:

Stream #0.0[0x44]: Audio: mp2, 48000 Hz, stereo, s16, 192 kb/s
Stream #0.1[0x45]: Video: mpeg2video (Main), yuv420p, 704x576 [PAR 16:11 DAR 16:9], 15000 kb/s, 27.19 fps, 25 tbr, 90k tbn, 50 tbc

I use the following tool to transocde the stream:

ffmpeg -i "http://url" -y -vcodec libx264 -b 3000k -acodec copy  /tmp/stream.mp4

Unfortunately after a few seconds ffmpeg stops recording with an error

[mpegts @ 0x1f0b9c0] PES packet size mismatch
[mp2 @ 0x1f14640] incomplete frame
Error while decoding stream #0.0
[mpeg2video @ 0x1f16860] ac-tex damaged at 0 26
[mpeg2video @ 0x1f16860] Warning MVs not available

I've tried encoding with vlc as well with similar issues. Although vlc doesn't stop encoding, the output video has regions where it hangs.

vlc -I dummy "http://url" --network-caching="1000" --sout="#transcode{vcodec=h264,vb=3000,acodec=mp3,ab=192}:std{access=file,mux=mp4,dst=/tmp/stream.mp4}"

[mpeg2video @ 0x7f2d4c001e20] ac-tex damaged at 9 33
[mpeg2video @ 0x7f2d4c001e20] Warning MVs not available
[mpeg2video @ 0x7f2d4c001e20] concealing 132 DC, 132 AC, 132 MV errors
[mpeg2video @ 0x7f2d4c001e20] ac-tex damaged at 16 17
[mpeg2video @ 0x7f2d4c001e20] Warning MVs not available
[mpeg2video @ 0x7f2d4c001e20] concealing 836 DC, 836 AC, 836 MV errors
libdvbpsi error (PSI decoder): TS discontinuity (received 4, expected 3) for PID 0

I also tried flv transcoding and it shows up with its own set of issues, like output flv file hangs in certain parts.

Anyone know what's wrong or how to fix this?

© Ask Ubuntu or respective owner

Related posts about streaming

Related posts about ffmpeg

  • how to install ffmpeg in cpanel

    as seen on Super User - Search for 'Super User'
    i'm using dedicated server(linux) so i need to install ffmpeg in cpanel so here ffmpeg i found in Main Software Install a Perl Module but i writing script in php so how can i install ffmpeg phpperl when i'am trying to install ffmpeg in perl module i get this response Checking C compiler… >>> More

  • FFMpeg-PHP Installation Error

    as seen on Server Fault - Search for 'Server Fault'
    While installing FFmpeg-PHP, I got this interesting error: /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function 'zim_ffmpeg_movie_getAudioStreamId': /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1051: error: 'CODEC_TYPE_AUDIO' undeclared (first use in this function) /usr/downloads/ffmpeg-php-0… >>> More

  • git problems installing stuff [closed]

    as seen on Super User - Search for 'Super User'
    root@Frenzen:~# cd root@Frenzen:~# git clone --depth 1 git://source.ffmpeg.org/ffmpeg Initialized empty Git repository in /root/ffmpeg/.git/ root@Frenzen:~# cd root@Frenzen:~# git clone --depth 1 git://source.ffmpeg.org/ffmpeg Initialized empty Git repository in /root/ffmpeg/.git/ root@Frenzen:~#… >>> More

  • Unable to install ffmpeg-php

    as seen on Server Fault - Search for 'Server Fault'
    I followed the instructions on http://www.mysql-apache-php.com/ffmpeg-install.htm but ffmpeg-php does not show up in my phpinfo() The commands I ran (in order) #yum install ffmpeg ffmpeg-devel ... Public key for faac-1.26-1.el5.rf.x86_64.rpm is not installed #rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0… >>> More

  • Unable to install ffmpeg-php

    as seen on Server Fault - Search for 'Server Fault'
    Hi, I followed the instructions on http://www.mysql-apache-php.com/ffmpeg-install.htm but ffmpeg-php does not show up in my phpinfo() The commands I ran (in order) #yum install ffmpeg ffmpeg-devel ... Public key for faac-1.26-1.el5.rf.x86_64.rpm is not installed #rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0… >>> More