Jump to content

Stream copy


Luke

Recommended Posts

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.

Link to comment
Share on other sites

gcw07

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

gcw07

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.

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

Redshirt

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

Link to comment
Share on other sites

Redshirt

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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