Peter B.
2018-11-09 12:18:09 UTC
Hi everyone :)
I have a situation where I would need to encode Quicktime (MOV) files
with ISO639-2 language metadata values "less popular/common" than
usual. I've also read the related the Quicktime Specs [1,2].
How can I set language to e.g. UND or QAA?
Whenever I try to encode a file e.g. with the language tracks "UND"
(=undetermined) or "QAA" (=reserved for local use), the value written to
the file is "ENG".
Both "und" and "qaa" are proper ISO639-2 codes [3].
In order to rule out syntax issues, I've tried with "ger" (=German) and
"fra" (=French): Both work flawlessly.
I've seen in "libavformat/isom.c" [4], and there's a hardcoded list of
ISO639 codes, but says:
/* deprecated by putting the code as 3*5 bits ASCII */
Sounded to me like this list-limitation is superseded
by"ff_mov_iso639_to_lang", but how do I trigger it to be used?
Grateful for any help :)
Thanks in advance,
Peter B.
Here's commandline and complete, uncut console output to reproduce it:
// ------------------------------
$ ffmpeg -y -f lavfi -i "sine=frequency=1000:duration=1" -c:a pcm_s16le
-metadata:s:a:0 language=qaa delme.mov
// ------------------------------
ffmpeg version N-92314-g323c2cf Copyright (c) 2000-2018 the FFmpeg
developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/usr/local --enable-gpl --enable-nonfree
--enable-version3 --enable-postproc --enable-ffplay --enable-swscale
--enable-avfilter --enable-pthreads --enable-bzlib --enable-zlib
--enable-decoder=png --enable-encoder=png --samples=../fate-suite
--enable-libfreetype --enable-libopenjpeg --disable-decoder=jpeg2000
--enable-libvpx --enable-libvorbis --enable-libx264 --enable-libx265
libavutil 56. 21.100 / 56. 21.100
libavcodec 58. 34.100 / 58. 34.100
libavformat 58. 19.102 / 58. 19.102
libavdevice 58. 4.106 / 58. 4.106
libavfilter 7. 39.100 / 7. 39.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
Input #0, lavfi, from 'sine=frequency=1000:duration=1':
Duration: N/A, start: 0.000000, bitrate: 705 kb/s
Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, mov, to 'delme.mov':
Metadata:
encoder : Lavf58.19.102
Stream #0:0(qaa): Audio: pcm_s16le (sowt / 0x74776F73), 44100 Hz,
mono, s16, 705 kb/s
Metadata:
encoder : Lavc58.34.100 pcm_s16le
[Parsed_sine_0 @ 0x2a09580] EOF timestamp not reliable
size= 87kB time=00:00:01.00 bitrate= 711.1kbits/s speed= 304x
video:0kB audio:86kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.777778%
// ------------------------------
$ ffprobe-git -loglevel quiet -show_entries
stream=index,codec_name,codec_type:stream_tags=language -i delme.mov
// ------------------------------
[STREAM]
index=0
codec_name=pcm_s16le
codec_type=audio
TAG:language=eng
[/STREAM]
// ------------------------------
$ ffmpeg-git -y -f lavfi -i "sine=frequency=1000:duration=1" -c:a
pcm_s16le -metadata:s:a:0 language=ger delme.mov
// ------------------------------
ffmpeg version N-92314-g323c2cf Copyright (c) 2000-2018 the FFmpeg
developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/usr/local --enable-gpl --enable-nonfree
--enable-version3 --enable-postproc --enable-ffplay --enable-swscale
--enable-avfilter --enable-pthreads --enable-bzlib --enable-zlib
--enable-decoder=png --enable-encoder=png --samples=../fate-suite
--enable-libfreetype --enable-libopenjpeg --disable-decoder=jpeg2000
--enable-libvpx --enable-libvorbis --enable-libx264 --enable-libx265
libavutil 56. 21.100 / 56. 21.100
libavcodec 58. 34.100 / 58. 34.100
libavformat 58. 19.102 / 58. 19.102
libavdevice 58. 4.106 / 58. 4.106
libavfilter 7. 39.100 / 7. 39.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
Input #0, lavfi, from 'sine=frequency=1000:duration=1':
Duration: N/A, start: 0.000000, bitrate: 705 kb/s
Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, mov, to 'delme.mov':
Metadata:
encoder : Lavf58.19.102
Stream #0:0(ger): Audio: pcm_s16le (sowt / 0x74776F73), 44100 Hz,
mono, s16, 705 kb/s
Metadata:
encoder : Lavc58.34.100 pcm_s16le
[Parsed_sine_0 @ 0x2998580] EOF timestamp not reliable
size= 87kB time=00:00:01.00 bitrate= 711.1kbits/s speed= 357x
video:0kB audio:86kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.777778%
// ------------------------------
$ ffprobe -loglevel quiet -show_entries
stream=index,codec_name,codec_type:stream_tags=language -i delme.mov
// ------------------------------
[STREAM]
index=0
codec_name=pcm_s16le
codec_type=audio
TAG:language=ger
[/STREAM]
== References:
[1]
https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html
[2]
https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap4/qtff4.html#//apple_ref/doc/uid/TP40000939-CH206-35103
[3] https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes
[4] https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/isom.c
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with subject "unsubscribe"
I have a situation where I would need to encode Quicktime (MOV) files
with ISO639-2 language metadata values "less popular/common" than
usual. I've also read the related the Quicktime Specs [1,2].
How can I set language to e.g. UND or QAA?
Whenever I try to encode a file e.g. with the language tracks "UND"
(=undetermined) or "QAA" (=reserved for local use), the value written to
the file is "ENG".
Both "und" and "qaa" are proper ISO639-2 codes [3].
In order to rule out syntax issues, I've tried with "ger" (=German) and
"fra" (=French): Both work flawlessly.
I've seen in "libavformat/isom.c" [4], and there's a hardcoded list of
ISO639 codes, but says:
/* deprecated by putting the code as 3*5 bits ASCII */
Sounded to me like this list-limitation is superseded
by"ff_mov_iso639_to_lang", but how do I trigger it to be used?
Grateful for any help :)
Thanks in advance,
Peter B.
Here's commandline and complete, uncut console output to reproduce it:
// ------------------------------
$ ffmpeg -y -f lavfi -i "sine=frequency=1000:duration=1" -c:a pcm_s16le
-metadata:s:a:0 language=qaa delme.mov
// ------------------------------
ffmpeg version N-92314-g323c2cf Copyright (c) 2000-2018 the FFmpeg
developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/usr/local --enable-gpl --enable-nonfree
--enable-version3 --enable-postproc --enable-ffplay --enable-swscale
--enable-avfilter --enable-pthreads --enable-bzlib --enable-zlib
--enable-decoder=png --enable-encoder=png --samples=../fate-suite
--enable-libfreetype --enable-libopenjpeg --disable-decoder=jpeg2000
--enable-libvpx --enable-libvorbis --enable-libx264 --enable-libx265
libavutil 56. 21.100 / 56. 21.100
libavcodec 58. 34.100 / 58. 34.100
libavformat 58. 19.102 / 58. 19.102
libavdevice 58. 4.106 / 58. 4.106
libavfilter 7. 39.100 / 7. 39.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
Input #0, lavfi, from 'sine=frequency=1000:duration=1':
Duration: N/A, start: 0.000000, bitrate: 705 kb/s
Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, mov, to 'delme.mov':
Metadata:
encoder : Lavf58.19.102
Stream #0:0(qaa): Audio: pcm_s16le (sowt / 0x74776F73), 44100 Hz,
mono, s16, 705 kb/s
Metadata:
encoder : Lavc58.34.100 pcm_s16le
[Parsed_sine_0 @ 0x2a09580] EOF timestamp not reliable
size= 87kB time=00:00:01.00 bitrate= 711.1kbits/s speed= 304x
video:0kB audio:86kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.777778%
// ------------------------------
$ ffprobe-git -loglevel quiet -show_entries
stream=index,codec_name,codec_type:stream_tags=language -i delme.mov
// ------------------------------
[STREAM]
index=0
codec_name=pcm_s16le
codec_type=audio
TAG:language=eng
[/STREAM]
// ------------------------------
$ ffmpeg-git -y -f lavfi -i "sine=frequency=1000:duration=1" -c:a
pcm_s16le -metadata:s:a:0 language=ger delme.mov
// ------------------------------
ffmpeg version N-92314-g323c2cf Copyright (c) 2000-2018 the FFmpeg
developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/usr/local --enable-gpl --enable-nonfree
--enable-version3 --enable-postproc --enable-ffplay --enable-swscale
--enable-avfilter --enable-pthreads --enable-bzlib --enable-zlib
--enable-decoder=png --enable-encoder=png --samples=../fate-suite
--enable-libfreetype --enable-libopenjpeg --disable-decoder=jpeg2000
--enable-libvpx --enable-libvorbis --enable-libx264 --enable-libx265
libavutil 56. 21.100 / 56. 21.100
libavcodec 58. 34.100 / 58. 34.100
libavformat 58. 19.102 / 58. 19.102
libavdevice 58. 4.106 / 58. 4.106
libavfilter 7. 39.100 / 7. 39.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
Input #0, lavfi, from 'sine=frequency=1000:duration=1':
Duration: N/A, start: 0.000000, bitrate: 705 kb/s
Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, mov, to 'delme.mov':
Metadata:
encoder : Lavf58.19.102
Stream #0:0(ger): Audio: pcm_s16le (sowt / 0x74776F73), 44100 Hz,
mono, s16, 705 kb/s
Metadata:
encoder : Lavc58.34.100 pcm_s16le
[Parsed_sine_0 @ 0x2998580] EOF timestamp not reliable
size= 87kB time=00:00:01.00 bitrate= 711.1kbits/s speed= 357x
video:0kB audio:86kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.777778%
// ------------------------------
$ ffprobe -loglevel quiet -show_entries
stream=index,codec_name,codec_type:stream_tags=language -i delme.mov
// ------------------------------
[STREAM]
index=0
codec_name=pcm_s16le
codec_type=audio
TAG:language=ger
[/STREAM]
== References:
[1]
https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html
[2]
https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap4/qtff4.html#//apple_ref/doc/uid/TP40000939-CH206-35103
[3] https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes
[4] https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/isom.c
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with subject "unsubscribe"