Jump to content

Multiple audio tracks in webm without transcoding


Recommended Posts

Posted

Hi,

I want to play a movie in the Google Chrome browser with the possibility to choose the audio language, but without using the transcoding function. Ideally I would like to reproduce it without using the "convert without encoding" option, but I can use it if there is no other choice.

When I use mp4 / h264 / aac, it works when I enable "convert without encoding" and disable "enable transcoding", but not when I use webm / vp9 / opus or vorbis.

I coded the movie myself with the following command:

ffmpeg -y -i input.mkv -map 0 -c:v libvpx-vp9 -pass 1 -b:v 2M \
-threads 1 -cpu-used 0 -deadline best -tile-columns 0 -frame-parallel 0 \
-g 9999 -aq-mode 0 -an -f webm /dev/null
ffmpeg -y -i input.mkv -map 0 -c:v libvpx-vp9 -pass 2 -b:v 2M \
-threads 1 -cpu-used 0 -deadline best -tile-columns 0 -frame-parallel 0 \
-g 9999 -aq-mode 0 -auto-alt-ref 1 -lag-in-frames 25 -c:a libopus -b:a 128k -ac 2 -f webm "Taxi driver.webm"

When I play the movie with the default audio track it works fine, but when I change the language I get the message "No compatible streams are currently available. Please try again later or contact your system administrator for details.". 

I use Debian Linux, but I also tried on Windows and I get the same error, so I have posted this in the "General" forum.

For each failed replay attempt, emby generates three log files.

Thanks in advance.

ffmpeg-directstream-753a8b0e-6605-4a66-9181-a9eba99d3521_1.txt ffmpeg-directstream-8bcca4fc-b795-44dd-913f-175063a085d9_1.txt ffmpeg-directstream-95e6ae66-c5a0-4cbd-b545-99d164be0cde_1.txt embyserver.txt

Posted

Hello Herberst,

Please wait for someone from staff support or our members to reply to you.

It's recommended to provide more info, as it explain in this thread:

Thank you.

Emby Team

Posted

Hi, the browser video player does not provide an API for us to change the selected track, so if you select a secondary audio track, then a conversion on the server will be necessary. Please let us know if this helps. Thanks.

Posted

But is a conversion without video transcoding possible? My server has a very limited CPU and has many simultaneous clients.

Thanks

rbjtech
Posted

Why not change the default audio track to be the mobile friendly one (opus), and put the secondary audio as the original ?  Emby only reads the 1st Video track anyway - so no point trying to multi-track on that.

Just use the ffmpeg map command to insert the track and disposition to change the default - for EXAMPLE

 -map 0:v -map 0:a:0 -map 0:a -c:v copy -c:a copy -c:a:0 <Audio Codec> < remap the tracks to insert a new audio track 0 with the codec of your liking  

-disposition:a:0 default -disposition:a:1 0  < change the audio default track to track 0 

-metadata:s:a:0 title="New Audio Track" -metadata:s:a:1 title="Original Audio Track" < you can write new track data while you are at it ..

I hope this helps.

 

Posted
18 hours ago, Herberst said:

But is a conversion without video transcoding possible? My server has a very limited CPU and has many simultaneous clients.

Thanks

If the video codec is h264, yes.

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