HLS stream doesnt play

About encoding, codec settings, muxers and filter usage
nosy79
New Cone
New Cone
Posts: 3
Joined: 15 Nov 2014 21:53

HLS stream doesnt play

Postby nosy79 » 15 Nov 2014 22:10

Hello,

I tried to stream a rtsp stream to multiple devices.
This is the command line I use:

vlc -I dummy 'rtsp://camera' --sout '#transcode{vcodec=h264,fps=15,vb=512,scale=1,acodec=none,venc=x264{aud,profile=baseline,level=60,keyint=15,bframes=0,ref=1,nocabac}}:duplicate{dst=std{access=livehttp{seglen=10,delsegs=true,numsegs=10,index=/var/www/html/live/mystream.m3u8,index-url=http://myip/live/mystream-########.ts}, ... /video.mp4}}'

It brings working flv and mp4 so Android and desktop browsers are fine.
The HLS stream plays on an old Android 4.1, too.
But it doesnt play on iphone or ipad.
The web log says the devices receive the m3u8 and the corresponding ts files correctly but it does not play.

Now I found a way to use ffmpeg to only output a HLS stream and it works only on iphone and ipad, not on my old Android.

ffmpeg -i http://myhost:8080/video.mp4 -map 0 -codec:v libx264 -profile:v baseline -codec:a libfaac -f ssegment -segment_list playlist.m3u8 -segment_list_flags +live -segment_time 10 out%03d.ts

I dont know how I could make vlc do the same but I would like to since it would be not so CPU intense.

mundu
Blank Cone
Blank Cone
Posts: 53
Joined: 25 May 2011 19:56
VLC version: 2.1.5
Operating System: Linux

Re: HLS stream doesnt play

Postby mundu » 26 Nov 2014 12:54

Hi,

You're missing the audio codec in the VLC command line.
I'm using this and its working both for iOS and Android devices.

Code: Select all

... --sout '#transcode{...acodec=mp4a,aenc=ffmpeg{strict=-2,profile=aac_he_v2},ab=96,channels=2,samplerate=44100}...
Hope it helps.

nosy79
New Cone
New Cone
Posts: 3
Joined: 15 Nov 2014 21:53

Re: HLS stream doesnt play

Postby nosy79 » 28 Nov 2014 10:43

Hey thanks for the hint. I tried it and put the options into the HLS part:

duplicate{dst=std{access=livehttp{seglen=10,delsegs=true,numsegs=10,index=/var/www/html/live/mystream.m3u8,index-url=http://myip/live/mystream-########.ts,a ... rate=44100

Still no luck with iPad though.
I guess I could have problems because the cam does not send audio. I also tried to add a /dev/zero input to the stream put as far as I read it is not possible.
Does your cam support audio?

nosy79
New Cone
New Cone
Posts: 3
Joined: 15 Nov 2014 21:53

Re: HLS stream doesnt play

Postby nosy79 » 28 Nov 2014 10:45

Hey thanks for the hint. I tried it and put the options into the HLS part:

duplicate{dst=std{access=livehttp{seglen=10,delsegs=true,numsegs=10,index=/var/www/html/live/mystream.m3u8,index-url=http://213.73.99.54/live/mystream-##### ... rate=44100

Seems thats not the right idea - just tried to put it into the h264 options part.

Still no luck with iPad though.
I guess I could have problems because the cam does not send audio. I also tried to add a /dev/zero input to the stream put as far as I read it is not possible.
Does your cam support audio?

mundu
Blank Cone
Blank Cone
Posts: 53
Joined: 25 May 2011 19:56
VLC version: 2.1.5
Operating System: Linux

Re: HLS stream doesnt play

Postby mundu » 28 Nov 2014 16:23

I'm sorry but I never used cam :). All of my iOS problems in the past have been related to the missing AAC codec. I normally use a live transport stream feed.

I've been checking the HLS draft and haven't found anything related to video-only playlists, which is probably the problem with iPad, I guess.

You should try stackoverflow. You'll probably get you answer there.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: Google [Bot] and 6 guests