Page 1 of 1

Multiple instances of VLC prepping h.264 for httplivestream

Posted: 25 Apr 2013 11:53
by Enver
Greetings. So I'm using VLC to convert my input (a livestream) into chunks to make them ready for HLS (Http LiveStreaming) for IOS.
Now this all works, even on a Raspberry Pi.(Which is my main goal)

However: one stream works, two aswel. But when I try a third instance of VLC to convert for a third stream (I am in fact using the same input per instance right now) it sort of stops working. Different things happen when I add the third: Sometimes all of the VLC's stop working. Sometimes, the first two keep going and the third just does nothing. Just now: the first stopped, second seemed slow and the third worked.

The command I use, replacing <> tags with my own folders and such. (I use a different folder per stream)

Code: Select all

VLC -I dummy rtsp://<INPUTSTREAM> vlc://quit --sout="#std{access=livehttp{seglen=10,delsegs=true,numsegs=5,index=<MY_FOLDER>/mystream.m3u8,index-url=<MY_IP>/mystream-########.ts},mux=ts{use-key-frames},dst=<MY_FOLDER>/mystream-########.ts}"
Tested with several settings:
Raspberry Pi: Output on 16GB MicroSD card (Write speed up to 6 MB/s)
Raspberry Pi: Output on 16GB USB 3.0 stick (Write speed up to 25 MB/s tested)
MacBook: Output on 16GB USB 3.0 stick (Same as above)
MacBook: Output on 128GB SSD (Write speed up to 243MB/s)
Macbook: Output on 128GB SSD and 16GB USB stick combined.

The average output of my files seems to be about 2.5-3 MB/s, and as each file is 10seconds that equals about 0.3 MB/s. So it cant be the write speed that is the limit here. Nor the i/o given it doesnt work on a mac with an ssd.

CPU-usage during 2 instances and more on the raspberry is ok about 16% per instance (so up to 30%)
RAM usage remains below per VLC, seems to be ± 2.2%

By the way, I am using VLC 2.0.3 Twoflower on the Raspberry Pi and 2.0.6 Twoflower 64bit on my Mac.
To my knowledge these are the latest versions, tho I do find it a bit strange that Raspberry Pi is older.

Im wondering what the issue could be here. Did I overlook anything ?

Re: Multiple instances of VLC prepping h.264 for httplivestr

Posted: 25 Apr 2013 15:48
by Jean-Baptiste Kempf
What are the logs?

Re: Multiple instances of VLC prepping h.264 for httplivestr

Posted: 25 Apr 2013 19:06
by Enver
Are there any more advanced logs then running from the terminal ? All Im simply getting is the following prints:

Code: Select all

[0x14cc820] access_output_livehttp access out: LiveHttpSegmentComplete: /home/pi/Desktop/WebServer/stream/mystream-0000003.ts (3) [0x14cc820] access_output_livehttp access out: LiveHttpIndexComplete: /home/pi/Desktop/WebServer/stream/mystream.m3u8
Oh and I just tried verbose mode: Sometimes I get this in between segments. (Seems to be only at the beginning, cant tell relieable atm)

Code: Select all

[0xdbfee0] mux_ts mux warning: packet with too strange dts (dts=12862573337,old=12862626820,pcr=12862626820)
But really on activating a third VLC, that one just hangs after these prints: (And that error is always there)

Code: Select all

[0x1002216a0] dummy interface: using the dummy interface module... [0x1023008a0] main input error: ES_OUT_RESET_PCR called

Re: Multiple instances of VLC prepping h.264 for httplivestr

Posted: 27 May 2013 12:57
by Enver
It turns out (yes, really stupid of me) that the problem wasnt in VLC or in the computer, but instead in the upload speed of the camera's their connection, that I used as input in VLC.