Jump to content

GetHLSVideoSteam API question


Recommended Posts

Posted (edited)

I wanted to tcpdump to see the header, so I ran:

http://192.168.1.125:8096/mediabrowser/Videos/3baab1ff3848725de8ef68e7f227e524/stream.m3u8?static=true

And got this unexpected response. According to API docs if static=true i don't need to supply any more arguments. What's the problem?

Response Status Error Code ArgumentException Message A video bitrate is required Stack Trace [GetHlsVideoStream: 1/9/2014 9:19:28 AM]: [REQUEST: {AppendBaselineStream:False,TimeStampOffsetMs:0,VideoCodec:H264,Id:3baab1ff3848725de8ef68e7f227e524,Static:True,AlbumArt:False}] System.ArgumentException: A video bitrate is required at MediaBrowser.Api.Playback.Hls.BaseHlsService.<ProcessRequestAsync>d__1f.MoveNext() Errors    

Edited by Redshirt
Redshirt
Posted

I'm not sure the specific reason, but I found direct streaming (static=true) video worked better if I used the standard streaming rather than hls. Can the ATV do that?

http://192.168.1.125:8096/mediabrowser/Videos/3baab1ff3848725de8ef68e7f227e524/stream.mp4?static=true
Posted

I lose a lot of features if i don't use HLS. the ATV isn't aware of subtitle streams in the mp4 container afaik.

 

You recommend using /stream.mp4?static=true even if source is .mkv and not .mp4?

Redshirt
Posted

I just used that as an example. I didn't know what formats atv supports. If you lose features then hls is the way to go.

 

@@Tikuf can you look at the hls stream ffmpeg request and make sure the bitrate requirement isn't a bug.

Posted (edited)

It was a bug but i was sure it was fixed.  Oh wait that was for static. 

Edited by Tikuf
Posted

The ATV supports h264 codec, AAC and apparently can bitstream some audio codecs, AC3 i've tested but haven't tested much else and might not have the ability to test much else at this time.

It likes m4v and mp4 containers, doesn't support mkv afaik.

I'm on Version 3.0.5115.35703 (official release Automatic update level)

Posted

We do need a bitrate for hls because we have to report the expected bitrate.

 

have you tried .ts ? I think we have spoken about it before and the answer was yes and didnt work. Is that correct?

Posted

You cant static and m3u8 as that is direct play.

 

you can do a codec copy> m3u8

Posted (edited)

Correct it can't load a .ts without a.m3u8 playlist file
Ah that makes sense, i thought static=true meant audiocodec=copy,videocodec=copy.

Didn't know there's a distinction

Edited by BC101
Posted

but you cannot codec copy and burn in subs.

Posted

No not the same (as you have found ) :)

 

static=true will just stream the file though the webserver (direct play)

copy copy will run it through ffmpeg so it can be segmented but the codec param bitrate etc will remain the same

Posted

Hi Tikuf,

 

Thanks.

 

I need a few processes here to support ATV subtitles (non-burned in):

1. Convert .srt (or whatever) to .webvtt - the output will be a single .webvtt file

2. segment the webvtt to match the 10second segments that ffmpeg outputs. The only concern here is matching up with the MPEG timestamps... Not sure how big of a deal that will be.

3. create a sub playlist of the webvtt segments.

4. insert a subs playlist file name into the .m3u8 playlist that ffmpeg outputs.

5. allow webserver to serve the subs playlist and segmented webvtt files to the ATV when it requests them.

Posted

thats' going to have to wait until we can schedule that kind of work but for now just continue on without subs

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...