Jump to content

Interlaced MPEG-2 videos are getting transcoded


Richard Branches

Recommended Posts

Richard Branches

I have MPEG-2 videos in MKV container, they are 480i, when I play them on Emby they won't direct play but transcode, the Xiaomi Mi Box supports MPEG-2 natively, although it's not advertised on the package nor the website.

 

The transcoding information won't inform the video codec is transcoded but the audio, so at first I thought the issue was with the audio codecs (PCM, Dolby Digital 2.0, Dolby Digital 5.1), but I knew they are supported by the device:

 

5a78e897b9bfe_Audiocodecnotsupported.jpg

 

Then I remuxed one video, removing the audio codec and leaving only the video codec, this is what appears:

 

5a78e8c7026ad_Interlacedvideonotsupporte

 

Since emby app is not supporting MPEG-2 hardware decoding provided by the device, the app is transcoding the video and the audio at the same time:

 

5a78e93ba1658_TranscodingMPEG21.jpg

Edited by delacosta78
Link to comment
Share on other sites

Richard Branches

Update:

 

I noticed something different when the subtitles are on or off:

The video container (mkv) has one vobsub subtitle, when it's on, the video switches between transcoding and direct streaming and then stays transcoding, when it's off, it switches between transcoding and direct streaming and then stays direct streaming.

 

the Mi Box supports MKV container and Emby app supports vobsub subtitles because I have another video with h.264 codec and vobsub subtitle inside an mkv container that doesn't get transcoded when the subs are on.

 

In conclusion, emby shouldn't transcode or direct streaming the video because they (the device and app) support the container and what's inside, however, the transcoder seems to have issues with the mpeg-2 codec.

Edited by delacosta78
Link to comment
Share on other sites

Richard Branches

As for the audio codec - it looks like this item has raw PCM stereo.  The beta of the app recently added support for that so that should direct stream with the next app release.

Link to comment
Share on other sites

The other transcodes look like they are due to failures attempting to direct stream the items.  I can not find your app log.  Can you give me an exact time you sent it and the Emby Server user name?

 

Thanks.

Link to comment
Share on other sites

Richard Branches

As for the audio codec - it looks like this item has raw PCM stereo.  The beta of the app recently added support for that so that should direct stream with the next app release.

 

I understand, but it's doing the same with dolby digital streams, I ignore if the same happens with DTS so I'm gonna try to download something from the internet and I'll send you the logs from dolby digital and DTS.

Edited by delacosta78
Link to comment
Share on other sites

Richard Branches

As for the audio codec - it looks like this item has raw PCM stereo.  The beta of the app recently added support for that so that should direct stream with the next app release.

 

Here is the log with Dolby Digital, the video was transcoded.

ffmpeg-transcode-c2ba54db-14ab-4ab6-a313-10230433567c.txt

Edited by delacosta78
Link to comment
Share on other sites

Richard Branches

The other transcodes look like they are due to failures attempting to direct stream the items.  I can not find your app log.  Can you give me an exact time you sent it and the Emby Server user name?

 

Thanks.

 

Since I can't tell you the exact time I sent the first one, I resent it on 06/02/2018 at 4:24:23 pm., the server name is LACEBE.

Edited by delacosta78
Link to comment
Share on other sites

The device is reporting no support for either DD nor DTS.

 

It is important to understand that when the Mi markets that it "supports" these, it means it supports passing them through to equipment that can decode them.  If you are just hooked up to a TV that doesn't support those audio codecs then they will need to transcode on the server.

 

However, again, the beta of the app will allow these to play without transcoding if you set it to "Downmix to Stereo".

Link to comment
Share on other sites

Richard Branches

The device is reporting no support for either DD nor DTS.

 

It is important to understand that when the Mi markets that it "supports" these, it means it supports passing them through to equipment that can decode them.  If you are just hooked up to a TV that doesn't support those audio codecs then they will need to transcode on the server.

 

However, again, the beta of the app will allow these to play without transcoding if you set it to "Downmix to Stereo".

 

This is weird because it doesn't transcode other video codecs with those audio codecs, let me explain what it does with every codec on my end, it's important to note every video is in mkv container:

 

- when the video is h264 and dolby digital it plays directly

 

- when the video is h264 and dolby digital plus it streams directly

 

- when the video is h264 and dolby truehd it streams directly

 

- when the video is h264 and dolby atmos it streams directly

 

- when the video is h264 and dts in all of its formats (standard, es, 96/24, master audio and X) it streams directly

 

I haven't tested videos with hevc and dolby or dts codecs but I'm sure it does the same as above.

 

I even tested the same videos on Plex and all the mpeg-2 videos play directly.

Edited by delacosta78
Link to comment
Share on other sites

Richard Branches

What is the box connected to?

 

The box is connected directly to the TV, which only support PCM, the digital audio settings of the device is set to auto, also, on Emby the audio was set to "direct" with the previous logs, I'm sending another log with the audio set to "downmix to stereo", obviously the video was transcoded and the other video codecs explained in the previous reply are played the same, it's clear the issue here is with the mpeg-2 codec and not the audio codecs. I'm going to try to find an h264 video with pcm to see what happens...

ffmpeg-transcode-8dbdfe87-d66f-4408-8356-02c78845e616.txt

Link to comment
Share on other sites

If the items are mpeg-2 and interlaced, they will be de-interlaced on the server to avoid them looking very poor.

 

However, if your TV doesn't support DD input, then the current app will also require transcoding to convert the audio.  But, if you install the beta version using the instructions I linked to above, this will no longer be the case.

Link to comment
Share on other sites

Richard Branches

If the items are mpeg-2 and interlaced, they will be de-interlaced on the server to avoid them looking very poor.

 

However, if your TV doesn't support DD input, then the current app will also require transcoding to convert the audio.  But, if you install the beta version using the instructions I linked to above, this will no longer be the case.

 

I understand that but how do you explain why h264 or VC-1 videos I tested are not transcoded when they have the same audio codecs found in the mkv with the mpeg-2 codec?

 

By the way, I found on the internet an mkv with h264 and PCM 5.1 and guess what, it plays directly, however I didn't find any logs so I assume they don't get created when videos are played directly.

 

I'm not going to test the beta version, I'm gonna wait for the official release to test this.

Edited by delacosta78
Link to comment
Share on other sites

Richard Branches

If the items are mpeg-2 and interlaced, they will be de-interlaced on the server to avoid them looking very poor.

 

However, if your TV doesn't support DD input, then the current app will also require transcoding to convert the audio.  But, if you install the beta version using the instructions I linked to above, this will no longer be the case.

 

Looks like emby app is having issues with interlaced videos on the Mi Box, now I found another of my videos which is h264 720i resolution is getting transcoded as well, and don't tell me the reason is the audio codec because my other videos are progressive (720p, 1080p, etc) and they are not getting transcoded, please take a closer look into this issue.

ffmpeg-transcode-4294df2e-c287-41b9-b06f-36a9595deae1.txt

Edited by delacosta78
Link to comment
Share on other sites

Looks like emby app is having issues with interlaced videos on the Mi Box, now I found another of my videos which is h264 720i resolution is getting transcoded as well, and don't tell me the reason is the audio codec because my other videos are progressive (720p, 1080p, etc) and they are not getting transcoded, please take a closer look into this issue.

 

Hi.  I thought I answered that question in the post that you quoted...

 

 

If the items are mpeg-2 and interlaced, they will be de-interlaced on the server to avoid them looking very poor.

Link to comment
Share on other sites

Richard Branches

Hi.  I thought I answered that question in the post that you quoted...

 

 

"If the items are mpeg-2 and interlaced, they will be de-interlaced on the server to avoid them looking very poor"

 

Yes, I read that, but I didn't noticed the meaning of it, you're saying every interlaced video will be always transcoded to avoid them looking very poor, the question is, can I turn that off? I don't care if they look poor, I just don't want them to be transcoded, that's all. Thank you.

Link to comment
Share on other sites

Richard Branches

Hi.  I thought I answered that question in the post that you quoted...

 

Besides, on my phone the video is not getting transcoded, on another computer I have the video is not getting transcoded, only on Mi Box, that's why I insist about this.

Edited by delacosta78
Link to comment
Share on other sites

Different devices have different capabilities and interlaced video is sometimes a personal preference or very display dependent.

 

Therefore, I will probably move this decision to a user option.

 

Thanks.

Link to comment
Share on other sites

  • 1 month later...
Richard Branches

Hello, I'm testing the beta app for Android TV and the MPEG-2 codec is still getting transcoded:

 

- I went to settings and unchecked the option to deinterlace SD content

 

- The quality setting was set to 100 Mbits/sec, switched to Auto

 

- All the videos are in MKV container with VobSub subtitles, I turn them off thinking it was the reason of transcoding but didn't work

 

The reason of transcoding says media bitrate exceeds limit

 

5ab15e242d4ef_transcoding.png

ffmpeg-transcode-1a892cda-e2ba-4833-af27-77eab222a598.txt

ffmpeg-transcode-3e6306f5-f0b2-474b-ac87-8c0f1db823b7.txt

ffmpeg-transcode-4dcef324-22a8-4b45-a160-c5245668eade.txt

ffmpeg-transcode-4f1d004c-4ed5-4797-a35d-143103609edc.txt

ffmpeg-transcode-6a93c639-6c8c-450e-8e8b-2118a66d2bfa.txt

ffmpeg-transcode-21d3b84c-7648-4dd5-90f2-ab92b174dd18.txt

ffmpeg-transcode-07467d35-ffb8-4da4-b657-dcc91571fe96.txt

Link to comment
Share on other sites

Richard Branches

I tested more MPEG-2 videos without VobSub subtitles and noticed they play directly, so those with VobSub subtitles are getting transcoded even if it's turned-off.

 

The problem is not with the MPEG-2 codec anymore but the VobSub subtitle.

Edited by delacosta78
Link to comment
Share on other sites

Richard Branches

Just to confirm, I have other videos with h.264 codec and are getting transcoded because of the VobSub subtitle, when I turn the subtitle off, sometimes they get transcoded and sometimes they play directly, sometimes I can't turn the subtitle on.

Edited by delacosta78
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...