Jump to content

Can I do direct stream with HLS enabled?


Recommended Posts

ivoidwarranties
Posted

Is there a way to directly stream the video file (no transcoding on the server) through the Android client? I can disable HLS and it will directly stream the video, but it brings up a web browser....

Redshirt
Posted

Regardless of the hls setting, the video will only direct stream if it's of a compatible format mp4/H264/aac. If it brings up a web browser, then you have the external player enabled. That's the only way the system would be receiving a url. 

ivoidwarranties
Posted

Sorry, meant to say it will steam directly if I have external player enabled. What's a compatible format? All my videos are encoded using h264/aac and they are streamed directly when using media browser classic and windows media center extender.

ivoidwarranties
Posted

OK... So I noticed that some video files will stream directly and some will get transcoded. The ones that stream directly have a profile of "Main" and a level of "4.0". The ones that are being transcoded have a profile of "High" and a level of "4.1"....

 

Can you provide some details as to what h264 settings the video should be encoded in? Or did I answer my own question above?

Redshirt
Posted (edited)

The client-side logic doesn't take into account the profile/level of the source video. Which is actually something I should remedy as the Android documentation only confirms baseline support for H264.

 

So the following is what happens if your using the internal player for the android client.

 

If the video is MP4/H264/AAC or the video is MKV/VPX/Vorbis and the bitrate is below the current bitrate setting for your connection then the video will direct stream.

 

If the video is a H264 and using any container other than mp4 then the video will be stream copied and the audio likely transcoded.

 

If the video is any other combination the whole thing will be transcoded. if the video stream is transcoded I transcode it as H264/AAC Baseline profile level 3.

 

 

If your using an external player. I provide a direct stream url and the player handles it as it sees fit.

Edited by Redshirt
  • 4 weeks later...
ivoidwarranties
Posted (edited)

OK... After some more tinkering... It looks like the Android Media Browser will direct stream videos with 16:9 aspect ratio. The app will transcoded videos with any other aspect ratio....

All my videos are are encoded as MP4/H264/AAC... Using a profile of High and a level of 4.1. The ones that have a native aspect ratio of 16:9 will direct stream... Videos with any other aspect ratio will transcode.

Is there a way to disable transcoding all together?

 

--------------------

EDIT: I take that whole statement back..........

 

I just noticed this: the files that I can direct stream, there's only one video properties in the "Media Info" tab:

537e5b05626a8_20140522_131358.png

 

However, the videos that are being transcoded have two video properties:

537e5af465c3c_20140522_131235.png

 

I encode all of my video files the same way... Any idea where the second set of "Video" properties came from?

 

Edited by ivoidwarranties
Posted

It appears that the second video has an embedded jpeg image (most likely cover art) in the movie container, hence the second video property for the videos that are being transcoded.  I'm not sure if the is the reason, but I think you may have found the problem in that having that image is what is making it incompatible with direct play.

Redshirt
Posted

Yeah. I noticed that too.

Posted

Red, in the dev server, soon to be released, there is a new stream type called EmbeddedImage. This will put those streams in a separate place so that they don't interfere with your algorithms. Unfortunately it won't clean up existing user data, so in the meantime, you should ignore video streams where Codec.Name = mjpeg. The core library I'm working on for you handles this.

Posted

Red, in the dev server, soon to be released, there is a new stream type called EmbeddedImage. This will put those streams in a separate place so that they don't interfere with your algorithms. Unfortunately it won't clean up existing user data, so in the meantime, you should ignore video streams where Codec.Name = mjpeg. The core library I'm working on for you handles this.

 

Are you leaving that there for this release?  It potentially breaks MBC.

Posted

well that's a tough one because it raises questions about about any other enum in the model project, this just being the only one we know about now. i know newtonsoft allows you to write a custom type converter. so you could write one that parses the string to enum, and if fails, returns a default.

Posted

well that's a tough one because it raises questions about about any other enum in the model project, this just being the only one we know about now. i know newtonsoft allows you to write a custom type converter. so you could write one that parses the string to enum, and if fails, returns a default.

 

That could help in the future but won't help code that is already out there.  All I have to do to correct this is re-compile a version with the new model but I need time for that new version to go out and filter out to a majority of people or we're gonna potentially have a lot of broken MBC installs with this server release.

 

Is this functionality critical to some other client?

ivoidwarranties
Posted

I just noticed that.... MJPEG next to the codec =\

  • 2 weeks later...
buddyweiser
Posted

Red, in the dev server, soon to be released, there is a new stream type called EmbeddedImage. This will put those streams in a separate place so that they don't interfere with your algorithms. Unfortunately it won't clean up existing user data, so in the meantime, you should ignore video streams where Codec.Name = mjpeg. The core library I'm working on for you handles this.

So is this coming soon? I too am having the issue where transcoding with embedded images in the files...

Redshirt
Posted

That part is an android issue that I've fixed. I'm just trying to get the build out the door.

  • Like 1
buddyweiser
Posted

Sweet :-D

 

Sent from my DROID RAZR HD using Tapatalk

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