Jump to content

Recommended Posts

Posted

I've added this as a streaming param. "copy" is now an available option for video codec and/or audio codec.

 

When direct play and direct stream are not possible, this is next best option because it avoids encoding by keeping the same video/audio stream and just swapping containers.

 

It's discussed here:

 

https://github.com/MediaBrowser/MediaBr ... Guidelines

 

So now the order of preference for playback is:

 

Direct play -> Direct stream -> Stream copy -> Transcode

 

Tikuf - can you reach out to the ui developers that you think ought to incorporate this and help them? Thanks.

Posted

Looks good. Should be able to use this on the Roku. Though with them recently adding mkv as a direct stream option, hopefully users won't need to even use this. Thanks for adding it.

Posted

Yea, the one thing I think you might want to watch out for is assuming you can play just by looking at the container. For instance, right now you're direct playing all mp4's right? Since mp4 and mkv can hold just about any combination of formats, you probably also need to look at the audio and video codecs, and also make sure the bitrates and profiles aren't too high.

Posted

Yeah, I'm about ready to rewrite the entire section that deals with selecting the streams. Right now it basically just does it off of video type and format, but the plan is to make it check the actual video/audio codecs that are in there to determine if they are too high, etc. and then would need to kick off transcoding instead.

Posted

Yup will do we will also need to look at the profile on some devices with h264.

  • 1 month later...
Posted

Do you still need to provide a video bitrate for stream copy?

 

So is it just:

 

/stream.m3u8?VideoCodec=copy&AudioCodec=aac&AudioBitRate=128000&AudioChannels=2&AudioSampleRate=44100&TimeStampOffsetMs=0

 

 

 

or do you need to do:

 

/stream.m3u8?VideoCodec=copy&VideoBitRate=3200000&MaxWidth=1920&MaxHeight=1080&Profile=high&Level=4.0&AudioCodec=aac&AudioBitRate=128000&AudioChannels=2&AudioSampleRate=44100&TimeStampOffsetMs=0

Posted

Yes. if your using HLS then your first URL is correct.

Posted

First URL or 2nd one? First one didn't have the video bitrate field, so just making sure.

Posted

first. You don't need to specify video info if your asking the server to copy what's there.

Posted

OK, yeah that is what I thought too. But testing it, the server errors without the bitrate.

Posted

Sorry my bad. I was thinking direct stream. In which case you don't need the bitrate info.

Posted

Yeah direct stream you shouldn't, but I would think stream copy shouldn't either. I mean you are just supposed to be copying the video as is, so it wouldn't need to set anything on the bitrate of the video.

Posted

Makes sense. Looks like a bug actually.

Posted

Makes sense. Looks like a bug actually.

Yeah it probably is. Luke will see this tomorrow and can answer if it is a bug or supposed to be required.

Posted

you don't need it but it's possible there' s a bug. can you post the error?

Posted

Ok, right. The hls changes we made for hls now require bitrates to be supplied. But this needs to be fixed for stream copy when it isn't needed. It will be in the next dev build.

Posted

Ok, right. The hls changes we made for hls now require bitrates to be supplied. But this needs to be fixed for stream copy when it isn't needed. It will be in the next dev build.

Sounds great. Thanks.

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...