x264 parameter for setting audio language to german

Questions and answers on how to get the most out of FFAStrans
Post Reply
Ferdinand2021
Posts: 3
Joined: Mon Nov 08, 2021 10:42 am

x264 parameter for setting audio language to german

Post by Ferdinand2021 »

Dear all,

thank you for this great tool and the great support in this forum, I´ve been silently reading through it for a while.

But now I stumbled over a question I´m sorry I didn´t succeed to solve on my own:

when creating a mp4 file with h.264 encoder, how can I use a custom x264 option parameter to set metadata for audio language to german? Not using any parameter causes the audio language being set to "undefined", as a receiver of an endcoded file told me as feedback.

I tried:

Code: Select all

metadata:s:a:0 language=deu
as I found in ffmpeg documentation but it seems not to be compatible with custom option field as I get error on encoding:

"Encoding: Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height."

What is correct command for my project?

Thank you and best regards,
Ferdinand
emcodem
Posts: 1631
Joined: Wed Sep 19, 2018 8:11 am

Re: x264 parameter for setting audio language to german

Post by emcodem »

Hey Ferdinand,

i am happy that you finally found your way from just reading into contributing to this forum, Welcome to the Forum and thank you for using FFAStrans!

What you can write into the x264 params section bottom on the h264 processor are encoding related options only, it must be the exact same options that one would use when using x264.exe. This is not what you want, you want to set a muxer related option which the current h264 processor does not allow you.

There are multiple options, e.g. using commandline encoding or custom ffmpeg processor but i think it would be best and easiest to just "rewrap" the encoded h264 file at the end using a commandline processor.
E.g. if your workflow currently looks like "h264->deliver", it would be like "h264->cmd proc" instead.

Here is some example for you, let me know if that works for you.
emcodem_set_mp4_audio_language.json
(2.08 KiB) Downloaded 158 times
emcodem, wrapping since 2009 you got the rhyme?
Ferdinand2021
Posts: 3
Joined: Mon Nov 08, 2021 10:42 am

Re: x264 parameter for setting audio language to german

Post by Ferdinand2021 »

Dear Emcodem,

thank you very much for the friendly welcome and also for your immediate help and example workflow with the rewrap. It worked as expected and solved my problem, great!
Sorry for my late reply,

thanks again and best regards,
Ferdinand
Post Reply