Jump to content

When playing an MKV containing VP9/Opus on Firefox, video and audio are transcoded


Recommended Posts

Posted

When I play a WEBM file containing VP9, it does not transcode.  My expectation was that, in the case of MKV, Emby would just change the container, but instead it transcodes the streams as well.  Since the streams are natively supported in Firefox, this seems like a waste.  Is this the intended result or do I have something configured incorrectly?

visproduction
Posted

Check what audio the media is using.  I believe that Ac3 is not supported by Firefox and needs transcoding.  In such a case, it does not matter what the video is.

Posted

The audio is Opus, which is supported by Firefox and my usual experience anyway has been that Emby only transcodes container and the incompatible streams.

I'm thinking that maybe Emby doesn't have the ability to transcode to WEBM at all and so it can't even try to use VP9 in a transcoded file.

Posted

Hi, the transcoding protocol being used doesn't support opus so that's why it has to be transcoded once the file is unable to direct play.

Posted

Is there a combination under which I could get VP9 to direct play out of an MKV on Firefox?  It would be a heck of a lot easier to add in a compatible audio format than to reencode the video.  I know that the container will still have to be changed, but I am hoping to find a way to to keep at least the video from transcoding.

visproduction
Posted

Bill,

You could replace the audio with compatible .mp3 copy.  FFmpeg commands or a video app like AVIDemux can do this.  MKVTools and Audacity are also helpful.  You can set the video to copy and then only the audio is converted.  On an average computer notebook, this might take around 30 minutes.  Newer workstations might only need 5 minutes.  I think it is impractical to have Emby do this.  The two apps, I mention have perhaps over 50 parameters you can adjust to do with this type of audio conversion. 

I would do it in these steps:

  1. AVIDemux: Import original Movie and convert audio to .mp3 and copy video. (20 minutes)

If that is not allowed because the audio is not supported.

  1. MKVtools: Extract audio only - (2 minutes)
  2. Audacity: Load and convert to high quality .mp3 (10 minutes)
  3. AVIDemux: Import original Movie.  Switch embedded audio to copy audio from .mp3 file. - Output new file with same video and replace audio (20 minutes)

There are just too many variables that would have to setup every possible option to build this into Emby. Maybe it is coming.  I just used separate 3rd party software and get the media correct so it stops causing a problem.

Hope that helps.

Posted
15 hours ago, billcw said:

Is there a combination under which I could get VP9 to direct play out of an MKV on Firefox?  It would be a heck of a lot easier to add in a compatible audio format than to reencode the video.  I know that the container will still have to be changed, but I am hoping to find a way to to keep at least the video from transcoding.

Firefox doesn't support the mkv container. It might direct play with webm though. And then there's Chrome, which can play mkv.

Posted

I've worked out a few things that largely solve my problem.  I had all of my content that has only video and audio converted to WEBM already and that works fine.  Everything else was MKV with VP9 and Opus, but with subtitles and additional audio tracks, which I thought was incompatible with WEBM, but I have now learned that WebVTT subtitles work in WEBM containers and also that Emby can detect additional audio tracks in WEBM even though it doesn't seem to be officially supported.  So, it appears that I can convert all of my MKVs to WEBMs without having to reencode audio and video, which is a little work, but not too crazy.  Then, everything should direct play on every device that we use.

visproduction
Posted

Bill,
Do some random testing before committing to do all your content.  I would guess that both MKV and WEBM, which dates back 15 years, may have issues, especially with media using multiple audio or other embedded content.  You are also looking at situations where other users may use different browsers. Mac, Windows or even Linux as well as all the different TV apps that may not support the containers you are thinking to move into.

I use the old but, I think smooth looking video h.264 in .mp4 and AAC (FDK) audio (LC 126 kbps or HE-AAC up to 360 kbps and not AC3, remove any embedded subtitles and convert them to files and usually do not include alternate Audio.  These copies seem to play back on everything.  I would guess if you do your conversion, you may still run into user combinations hardware and software where it will not play back.

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