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: 297
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