Page 1 of 1

Recording streams suddenly stop (Tested on multiple OSes)

Posted: 13 May 2013 21:48
by GvH
Hello, I'm trying to record a live stream, but after a couple of seconds it stops. Sometimes I can view the recorded file, sometimes it doesn't open. Just watching the stream is okay, but recording fails. Any ideas? (Here's the log: http://pastebin.com/A564j3eT)

Command I use:

Code: Select all

/Applications/VLC\ 2.app/Contents/MacOS/VLC -I dummy "http://esioslive2-i.akamaihd.net/hls/live/201150/AL_ESP2_INT_ENG/playlist_1800.m3u8" --sout "#transcode{vcodec=h264,acodec=mp3,ab=256,channels=2,samplerate=44100}:std{access=file,mux=mp4,dst=/Users/xxx/Desktop/output.mp4}"
Result:

Code: Select all

VLC media player 2.0.6 Twoflower (revision 2.0.6-9-gda489c1) [0x1002808b0] main interface error: no suitable interface module [0x102100680] dummy interface: using the dummy interface module... [0x100283f40] stream_filter_httplive stream: HTTP Live Streaming (esioslive2-i.akamaihd.net/hls/live/201150/AL_ESP2_INT_ENG/playlist_1800.m3u8) [0x100283f40] stream_filter_httplive stream: Live Playlist HLS protocol version: 2 [0x100283f40] stream_filter_httplive stream: Choose segment 0/3 (sequence=1213) [0x100283f40] stream_filter_httplive stream: downloaded segment 1213 from stream 0 [0x100283f40] stream_filter_httplive stream: downloaded segment 1214 from stream 0 [0x100283f40] stream_filter_httplive stream: playing segment 1213 from stream 0 libdvbpsi error (PSI decoder): TS discontinuity (received 13, expected 0) for PID 0 libdvbpsi error (PSI decoder): TS discontinuity (received 13, expected 0) for PID 480 [0x102307b70] ts demux error: MPEG-4 descriptor not found [0x10086eaf0] packetizer_mpeg4audio decoder: AAC channels: 2 samplerate: 44100 [libmp3lame @ 0x104011020] channel_layout not specified x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 x264 [info]: profile High, level 3.0 x264 [info]: using SAR=1/1 x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 x264 [info]: profile High, level 3.1 [0x100283f40] stream_filter_httplive stream: downloaded segment 1215 from stream 0 [0x100283f40] stream_filter_httplive stream: playing segment 1214 from stream 0 [0x100283f40] stream_filter_httplive stream: playing segment 1215 from stream 0 [0x100283f40] stream_filter_httplive stream: Reloading HLS live meta playlist [0x100283f40] stream_filter_httplive stream: Live Playlist HLS protocol version: 2 [0x100283f40] stream_filter_httplive stream: updating hls stream (program-id=0, bandwidth=1996860) has 0 segments [0x100283f40] stream_filter_httplive stream: updating hls stream (program-id=0, bandwidth=0) has 3 segments [0x100283f40] stream_filter_httplive stream: - segment 1216 appended x264 [info]: frame I:10 Avg QP:21,10 size: 5538 x264 [info]: frame P:326 Avg QP:25,81 size: 1875 x264 [info]: frame B:409 Avg QP:31,33 size: 323 x264 [info]: consecutive B-frames: 23,6% 6,7% 8,5% 61,2% x264 [info]: mb I I16..4: 68,6% 18,6% 12,8% x264 [info]: mb P I16..4: 9,7% 3,2% 1,4% P16..4: 13,2% 3,5% 1,8% 0,0% 0,0% skip:67,1% x264 [info]: mb B I16..4: 0,3% 0,3% 0,1% B16..8: 10,3% 0,0% 0,0% direct: 0,2% skip:88,8% L0:36,2% L1:59,0% BI: 4,8% x264 [info]: 8x8 transform intra:22,2% inter:68,8% x264 [info]: coded y,uvDC,uvAC intra: 18,0% 30,2% 8,9% inter: 2,5% 3,2% 0,4% x264 [info]: i16 v,h,dc,p: 22% 47% 5% 26% x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 31% 29% 4% 3% 3% 4% 4% 4% x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 34% 18% 3% 3% 3% 3% 5% 3% x264 [info]: i8c dc,h,v,p: 62% 25% 12% 2% x264 [info]: Weighted P-Frames: Y:5,5% UV:5,5% x264 [info]: ref P L0: 72,4% 10,6% 12,9% 4,1% 0,1% x264 [info]: ref B L0: 82,4% 13,6% 4,0% x264 [info]: ref B L1: 94,0% 6,0% x264 [info]: kb/s:429,00 [libmp3lame @ 0x104011020] 3 frames left in que on closing
I am using Mac OS X Mountain Lion, but I also tested it on my home server running Ubuntu with the same result. Used multiple live streams to test, same result.

Thanks!

Re: Recording streams suddenly stop (Tested on multiple OSes

Posted: 13 May 2013 22:29
by GvH
Thanks to the wonderful help by TypX on IRC, we've managed to get some results.

It isn't perfect though. The resulting file doesn't have any time indication and it's jumpy when the discontinuities occurred.

The final command became:

Code: Select all

/Applications/VLC\ 2.app/Contents/MacOS/VLC -I dummy "http://esioslive2-i.akamaihd.net/hls/live/201150/AL_ESP2_INT_ENG/playlist_1800.m3u8" --sout "#gather:std{access=file,mux=ts,dst=/Users/xxx/Desktop/output.ts}" --sout-keep --sout-all
So leave the #transcode{...}, add #gather and add --sout-keep --sout-all

That should do the trick!

If anyone could improve this so it removes the side effects, that would be awesome.