Opened 10 years ago

Last modified 10 years ago

#3375 open defect

FFmpeg doesn't set the right language code for Dutch tracks

Reported by: Nemesis7 Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mov
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: When remuxing an .mkv file with Dutch audio/subtitle tracks to an .mp4 file, the language code is not set properly, which results in an "unknown" language in programs such as VLC and Subler. After creating a bug report on the Subler site, the developer replied the following:

you need to use an ISO-639-2/T language code as specified in the mp4 specifications. ISO-639-2/B languages code are invalid.

So please make sure FFmpeg uses the right language codes for mp4 files i.e. set the language code for Dutch tracks to 'nld' instead of 'dut'.

How to reproduce:

ffmpeg -i sample.mkv -map 0 sample.mp4
ffmpeg version 2.0.2
built on Oct  8 2013 20:26:27 with llvm-gcc 4.2.1 (LLVM build 2336.1.00)

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (4)

comment:1 by Carl Eugen Hoyos, 10 years ago

Component: ffmpegundetermined
Keywords: language code removed

Please provide the command line you used to reproduce this problem together with complete, uncut console output to make this a valid ticket. And please test current FFmpeg git head.

comment:2 by Nemesis7, 10 years ago

Here, still the same. It makes sense, the mov says the language code is 'dut', however this is not recognized by the mp4 container, since it expects 'nld' as the language code for Dutch tracks.

ffmpeg -v 9 -loglevel 99 -i /Users/Nemesis7/Encoding/sample.mkv -map 0 -c copy /Users/Nemesis7/Encoding/sample.mp4
ffmpeg version 2.1.3-tessus Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan 16 2014 13:50:59 with llvm-gcc 4.2.1 (LLVM build 2336.1.00)
  configuration: --prefix=/Users/tessus/data/ext/ffmpeg/sw --as=yasm --extra-version=tessus --disable-shared --enable-static --disable-ffplay --enable-gpl --enable-pthreads --enable-postproc --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libspeex --enable-bzlib --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxavs --enable-version3 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvpx --enable-libgsm --enable-libopus --enable-fontconfig --enable-libfreetype --enable-libass --enable-libbluray --enable-filters --enable-runtime-cpudetect
  libavutil      52. 48.101 / 52. 48.101
  libavcodec     55. 39.101 / 55. 39.101
  libavformat    55. 19.104 / 55. 19.104
  libavdevice    55.  5.100 / 55.  5.100
  libavfilter     3. 90.100 /  3. 90.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-i' ... matched as input file with argument '/Users/Nemesis7/Encoding/sample.mkv'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0'.
Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '/Users/Nemesis7/Encoding/sample.mp4' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input file /Users/Nemesis7/Encoding/sample.mkv.
Successfully parsed a group of options.
Opening an input file: /Users/Nemesis7/Encoding/sample.mkv.
[matroska,webm @ 0x10280f000] Format matroska,webm probed with size=2048 and score=100
st:0 removing common factor 1000000 from timebase
st:1 removing common factor 1000000 from timebase
[matroska,webm @ 0x10280f000] File position before avformat_find_stream_info() is 5802
[h264 @ 0x102812200] no picture 
[matroska,webm @ 0x10280f000] All info found
[matroska,webm @ 0x10280f000] File position after avformat_find_stream_info() is 309321
Input #0, matroska,webm, from '/Users/Nemesis7/Encoding/sample.mkv':
  Metadata:
    title           : Sample File
    creation_time   : 2014-02-10 09:06:24
  Duration: 00:01:01.98, start: 0.000000, bitrate: 8248 kb/s
    Chapter #0.0: start 0.000000, end 61.984000
    Metadata:
      title           : 00:00:00.000
    Stream #0:0(eng), 4, 1/1000: Video: h264 (High), yuv420p, 1280x534, 417083/20000000, SAR 1:1 DAR 640:267, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Metadata:
      title           : Video Track
    Stream #0:1(dut), 24, 1/1000: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default)
    Metadata:
      title           : English DTS 5.1 1509Kbps
Successfully opened the file.
Parsing a group of options: output file /Users/Nemesis7/Encoding/sample.mp4.
Applying option map (set input stream mapping) with argument 0.
Applying option c (codec name) with argument copy.
Successfully parsed a group of options.
Opening an output file: /Users/Nemesis7/Encoding/sample.mp4.
File '/Users/Nemesis7/Encoding/sample.mp4' already exists. Overwrite ? [y/N] y
Successfully opened the file.
[mp4 @ 0x102098400] track 1: codec frame size is not set
Output #0, mp4, to '/Users/Nemesis7/Encoding/sample.mp4':
  Metadata:
    title           : Sample File
    encoder         : Lavf55.19.104
    Chapter #0.0: start 0.000000, end 61.984000
    Metadata:
      title           : 00:00:00.000
    Stream #0:0(eng), 0, 1/16000: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1280x534 [SAR 1:1 DAR 640:267], 1/1000, q=2-31, 23.98 fps, 16k tbn, 1k tbc (default)
    Metadata:
      title           : Video Track
    Stream #0:1(dut), 0, 1/48000: Audio: dts ([169][0][0][0] / 0x00A9), 48000 Hz, 5.1(side), 1536 kb/s (default)
    Metadata:
      title           : English DTS 5.1 1509Kbps
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=  492 fps=0.0 q=-1.0 size=   17950kB time=00:00:20.48 bitrate=7180.2kbits/frame=  733 fps=731 q=-1.0 size=   29968kB time=00:00:30.53 bitrate=8038.7kbits/frame= 1064 fps=707 q=-1.0 size=   43264kB time=00:00:44.43 bitrate=7975.8kbits/frame= 1439 fps=716 q=-1.0 size=   60480kB time=00:01:00.02 bitrate=8254.6kbits/No more output streams to write to, finishing.
frame= 1486 fps=732 q=-1.0 Lsize=   62462kB time=00:01:01.97 bitrate=8256.7kbits/s    
video:50968kB audio:11418kB subtitle:0 global headers:0kB muxing overhead 0.122486%
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x101d075a0] Statistics: 86 seeks, 8132 writeouts
[AVIOContext @ 0x101d03d00] Statistics: 63906922 bytes read, 0 seeks

comment:3 by Carl Eugen Hoyos, 10 years ago

Any reason why you can not test current FFmpeg?

Note: See TracTickets for help on using tickets.