Jump to content

Transcoding "Decision"


arrmo

Recommended Posts

Hi,

 

I am using two clients to my server - one Android based, the other one a Windows Phone. I have (offline) transcoded my video files, so I can try to play them back to the client without real-time transcoding (limit load on the server). This sort of works ... ;). It works for my Android client, but the Windows Phone client is forcing some codec that causes transcoding. Just trying to figure out what codec(s) the client is requiring, so I can pre-transcode the file(s).

 

I have been looking at the logs, and not an expert by any means (not even close!). Is there a way to see what codec(s) the client is forcing (or options it is providing)? Again, just trying to be able to pre-convert my video files (using MCEBuddy).

 

Thanks!

 

Link to comment
Share on other sites

I think I read that h264 video and aac audio in mp4 container will direct play on almost every platform

 

Not to be nitpicky but it is important people understand the difference - that should direct stream on just about all platforms.

 

Direct play is when the item is accessed directly via the file system.

Link to comment
Share on other sites

Hi,

 

This is what I have - H264 video, AAC audio, in an mp4 container ... but Windows Phone 8.1 forces transcoding (it seems at least, based on CPU load).

 

Thoughts?

 

Thanks!

Link to comment
Share on other sites

TolkienBard

Hi,

 

This is what I have - H264 video, AAC audio, in an mp4 container ... but Windows Phone 8.1 forces transcoding (it seems at least, based on CPU load).

 

Thoughts?

 

Thanks!

 

You should be able to see for certain if it is transcoding or not simply b checking out the dashboard. You should also be able to pull up the info screen on the app while the movie is playing and it will tell you if it is transcoding or not.

Link to comment
Share on other sites

That makes sense - though I can't seem to find either of those ... :(. I do see from the log though that transcoding is ongoing.

 

Let me try changing audio (AAC -> AC3).

 

Thanks!

Link to comment
Share on other sites

Koleckai Silvestri

Hi,

 

This is what I have - H264 video, AAC audio, in an mp4 container ... but Windows Phone 8.1 forces transcoding (it seems at least, based on CPU load).

 

Thoughts?

 

Thanks!

 

There are other factors that determine whether something is transcoded or not. For instance, an MP4 container cannot contain SRT or text subtitles. If you have subtitles on, it will transcode. If audio is more than 2 channels, it will transcode. If your bitrate is higher than the setting on the phone, it will transcode. If your outside your home network, it will probably transcode.

 

In future versions you'll be able to sync video to your phone. If you keep those files, then you only need to transcode once.

Edited by Koleckai Silvestri
  • Like 1
Link to comment
Share on other sites

That makes sense - thanks for the explanation! Still trying to get to the bottom of this, as avoiding transcoding would be nice of course.

 

To put the phone codecs aside for just a minute (debugging), I connected remotely from a Windows machine (trying both Chrome and IE), hopefully more codecs and flexibility available. I checked the transcoding logs (as it does transcode, but I'm starting to figure the logs out ... :)), and here is what I see,

 

  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))

 

Perhaps a dumb question, but why transcode from h264 to h264, at the same bit rate (1.5 Mbps)?

 

Thanks again.

Link to comment
Share on other sites

There are other factors that determine whether something is transcoded or not. For instance, an MP4 container cannot contain SRT or text subtitles.

Why not?  I have some MP4s with subtitles in them and they play and use the subtitles in many programs.

Link to comment
Share on other sites

Koleckai Silvestri

Why not?  I have some MP4s with subtitles in them and they play and use the subtitles in many programs.

 

It only supports burnt in subtitles though. SRT subtitles are separate files. They can be turned on and off, edited, translated, etc... You can also put them into MKV containers to control timing. If the timing is off with MP4, you can be screwed.

Edited by Koleckai Silvestri
Link to comment
Share on other sites

Ahh, well that's a limitation in MB3 but not MP4 container itself.  I thought you were saying MP4 in general can't have embedded subtitles and that's what I was commenting on.

Link to comment
Share on other sites

Well no that isn't true. We support subtitles contained in video containers and also external files.

Link to comment
Share on other sites

Koleckai Silvestri

Ahh, well that's a limitation in MB3 but not MP4 container itself.  I thought you were saying MP4 in general can't have embedded subtitles and that's what I was commenting on.

I said it couldn't have a specific type of subtitle. The type that actually happens to be the most common.

Link to comment
Share on other sites

Hi,

 

OK, I have an interesting finding. If I connect from my PC to the server, on the same subnet - no transcoding, direct play works (as expected). The file I am "streaming" (yes, I know - direct file access) is ~ 1.5 Mbps, and obviously the codecs all work. But then, from the same PC to the same server, I access MB over the web (i.e. to to my internet address, port forwarding) ... transcoding kicks in. It transcodes from aac to aac audio (both native), and from h264 to h264 (native to libx264), all at the same bit rate. It seems to me that transcoding is not needed ... how can I avoid this happening?

 

Thanks!

Link to comment
Share on other sites

I think a lot of this confusion is just the terminology we sometimes use in the program.  If it reports a "transcode" from aac -> aac then that isn't really a transcode, it is a direct copy.

 

You cannot do direct file access over the web so the only option is to stream it to you as a direct copy stream.

Link to comment
Share on other sites

Yep, makes sense - but why is it transcoding from h.264 to h.264, at the same bit rate? Just trying to figure out how to direct copy stream, as you say (i.e. stream the file without transcoding, it's already h.264 at the right bit rate).

 

Thanks!

Link to comment
Share on other sites

dark_slayer

I think a lot of this confusion is just the terminology we sometimes use in the program.  If it reports a "transcode" from aac -> aac then that isn't really a transcode, it is a direct copy.

 

You cannot do direct file access over the web so the only option is to stream it to you as a direct copy stream.

 

The transcode log is pretty transparent I think. Not sure where you guys were talking about it reporting "transcode" (Edit: I see now - the server dashboard. I've never really looked there to check :) )

 

That makes sense - thanks for the explanation! Still trying to get to the bottom of this, as avoiding transcoding would be nice of course.

 

To put the phone codecs aside for just a minute (debugging), I connected remotely from a Windows machine (trying both Chrome and IE), hopefully more codecs and flexibility available. I checked the transcoding logs (as it does transcode, but I'm starting to figure the logs out ... :)), and here is what I see,

 

  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))

  Stream #0:1 -> #0:1 (aac (native) -> aac (native))

 

Perhaps a dumb question, but why transcode from h264 to h264, at the same bit rate (1.5 Mbps)?

 

Thanks again.

 

You are correct it is transcoding the video. If it were direct copy streaming either audio or video one of the streams would look like

Stream #0:0 -> #0:0 (h264 (native) -> h264 (copy))

 

Are you sure the native file's bitrate is 1.5 Mbps? That is very low. Could it be 1.5 MBps instead? That would force a transcode unless you modify your client settings to increase the bitrate limit to something higher than 12 Mbps. Perhaps post more of your transcode log, and someone may be able to identify what's happening

Edited by dark_slayer
Link to comment
Share on other sites

Hi,

 

Yep, the native file is ~ 1.5 Mbps (info attached below). It's because I already (offline) transcoded it, to avoid real-time transcoding (offline done using MCEBuddy). Do you have a typo above, perhaps the second one you meant 15 Mbps? In any case, here is the file info.

 

Video

CodecH264
ProfileHigh
Level40
Resolution720x388
Aspect ratio1.85:1
AnamorphicNo
InterlacedNo
Framerate29.96939
Bitrate1378 kbps
Bit depth8 bit
Pixel formatyuv420p
Ref frames3
CABACYes

 

 

 

 

 

 

Link to comment
Share on other sites

Koleckai Silvestri

Hi,

 

Yep, the native file is ~ 1.5 Mbps (info attached below). It's because I already (offline) transcoded it, to avoid real-time transcoding (offline done using MCEBuddy). Do you have a typo above, perhaps the second one you meant 15 Mbps? In any case, here is the file info.

 

Video

CodecH264

ProfileHigh

Level40

Resolution720x388

Aspect ratio1.85:1

AnamorphicNo

InterlacedNo

Framerate29.96939

Bitrate1378 kbps

Bit depth8 bit

Pixel formatyuv420p

Ref frames3

CABACYes

 

The bitrate set on the client is for all streams in the media. Video + Audio + Subtitles. It is not 1.5 Mbps per stream.

 

So the above video leaves 122 kbps for the audio. If it is more than that then there is going to be transcoding. It is a better experience to drop a bits from video by tossing out frames and having that go unnoticed than chunking audio.

Edited by Koleckai Silvestri
  • Like 1
Link to comment
Share on other sites

This makes sense - thanks so much! OK, a bit more digging here, and I see that MCEBuddy is adding in 250 kb/s audio (OK, that's a bit crazy, but no biggie) ... and if I check the total in the log file, it's 1675 kb/s ... so over 1.5 Mbps. Thanks for the lead!

 

So here is what is happening ... if the total is greater than the set bit rate, then it transcodes (and not if it is below). Sorry if this is a revelation only for me, but as I said - I was trying to figure out the logic here ... :). But your tip helps, and now it makes complete sense. If I set the target / maximum bit rate above what the source file has, then it doesn't transcode, rather doesn't use this bit rate - it's a maximum value (a "transcoding threshold", so to speak). I thought this was a target output rate, but it's not - it's a threshold (i.e. it doesn't try to up-convert to a higher rate ... correct?).

 

After all this, a few observations - captured here to hopefully help out,

- this all works for a Windows client (IE or Chrome), and Android

- if there is no transoding, then the "Direct" option becomes visible (though it doesn't really do anything, from what I can tell at least)

- while the source file is noted as 720p, even though I select 480p as the output, it doesn't convert (it just plays back the file at 720p). Seems odd, no? And 720p is not even available?

- I did find how to show the info in the Dashboard ... mouse over the client info. BTW, this info is not up to date sometimes (if you change the bit rate in the client, you have to close and reopen the client to get it to refresh in the Dashboard ... even with a web browser refresh on the server)

- Resume is not reliably working - very often takes me back to the start

- the Android (tablet) does show DirectStream, but I can't see this on the Windows Phone client

- I do see a non-zero count of "drop" in the log file in some cases ... what is this indicating?

- the Windows Phone client is not working the same it seems. Even if I change the setting to 720p (or 480p), and set the bit rate greater than the source file rate ... it still transcodes. Thoughts?

 

By all means comment, tell me where I'm off base - and if any of these items should be flagged / reported somehow to help resolve open issues.

 

Thanks again!!!

Link to comment
Share on other sites

Koleckai Silvestri

1080p, 720p, 480p actually refers to the line height of the display. It isn't necessarily the same as to the aspect ration of the video. Your video is actually at 388 height with a width of 720. So it is smaller than 420p. You basically have a 1.85 aspect ratio on the video. If the aspect ratio of the video doesn't fit the display, you'll see black bars unless you zoom or stretch it.

Link to comment
Share on other sites

dark_slayer

Hi,

 

Yep, the native file is ~ 1.5 Mbps (info attached below). It's because I already (offline) transcoded it, to avoid real-time transcoding (offline done using MCEBuddy). Do you have a typo above, perhaps the second one you meant 15 Mbps? In any case, here is the file info.

 

No typo, I just didn't anyone would convert their video to below SD. However, since you must find it acceptable (letting MCEbuddy do that much quality loss on your encodes) then 1.5 Mbps is understandable. I didn't mean 15 but specifically 12. I was thinking you may have been misreading your native file's bitrate as 1.5 MB/s and of course . . . 1.5 MBps = 12 Mbps

 

You've already figured out the total vs video only bitrate was forcing a transcode

Edited by dark_slayer
  • Like 1
Link to comment
Share on other sites

ammo,

 

Do you encode all your files that low or was this file sort of an exception as maybe it started out low res/bitrate?

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