[FFmpeg-user] ffmpeg don't writes metadata in file (but shows it correctly)

Felix Muster felixjan.muster at icloud.com
Fri Jan 11 00:00:47 EET 2019


I really don't understand this.

 

For the first command the metadata (handler, language) is stored correctly.
The second keeps the metadata from temp.mkv.

 

What am I doing wrong?

 

Works:

 

ffmpeg^

-i video.h264 -i audio1.dts -i audio2.dts -i sbtl1.srt -i sbtl2.srt^

-map 0:0 -map 1:0 -map 2:0 -map 3:0 -map 4:0^

-metadata:s:v:0 handler="AVC"^

-metadata:s:a:0 language=deu -metadata:s:a:0 handler="DTS-HD Master Audio"^

-metadata:s:a:1 language=kor -metadata:s:a:1 handler="DTS-HD Master Audio"^

-metadata:s:s:0 language=ger -metadata:s:s:0 handler="Deutsch (forced)"^

-metadata:s:s:1 language=ger -metadata:s:s:1 handler="Deutsch"^

-movflags disable_chpl^

-c:s mov_text -c:v copy -c:a alac -sample_fmt:a s16p^

output.m4v

 

Don't:

 

ffmpeg^

-i temp.mkv -i sbtl1.srt -i sbtl2.srt^

-map 0:0 -map 0:1 -map 0:2 -map 1:0 -map 2:0^

-metadata:s:v:0 handler="AVC"^

-metadata:s:a:0 language=deu -metadata:s:a:0 handler="DTS-HD Master Audio"^

-metadata:s:a:1 language=kor -metadata:s:a:1 handler="DTS-HD Master Audio"^

-metadata:s:s:0 language=ger -metadata:s:s:0 handler="Deutsch (forced)"^

-metadata:s:s:1 language=ger -metadata:s:s:1 handler="Deutsch"^

-movflags disable_chpl^

-c:s mov_text -c:v copy -c:a alac -sample_fmt:a s16p^

output.m4v

 

temp.mkv = video.h264 & audio1.dts & audio2.dts

 

 

Almost googled for more than 4 hours now.

I can't get it to work.

Tried almost everything.

 

Think it's a bug.

Or something such trivial I don't see it.

 

 

Log from the second command:

 

ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers

  built with gcc 8.2.1 (GCC) 20181017

  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libbluray --enable-libfreetype --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
--enable-libzimg --enable-lzma --enable-zlib --enable-gmp
--enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
--enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid
--enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2
--enable-avisynth

  libavutil      56. 22.100 / 56. 22.100

  libavcodec     58. 35.100 / 58. 35.100

  libavformat    58. 20.100 / 58. 20.100

  libavdevice    58.  5.100 / 58.  5.100

  libavfilter     7. 40.101 /  7. 40.101

  libswscale      5.  3.100 /  5.  3.100

  libswresample   3.  3.100 /  3.  3.100

  libpostproc    55.  3.100 / 55.  3.100

Input #0, matroska,webm, from 'temp.mkv':

  Metadata:

    encoder         : Haali Matroska Writer b0

  Duration: 01:59:51.48, start: 0.000000, bitrate: 17000 kb/s

    Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709, progressive),
1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 20k tbn, 47.95 tbc
(default)

Input #1, srt, from 'sbtl1.srt':

  Duration: N/A, bitrate: N/A

    Stream #1:0: Subtitle: subrip

Input #2, srt, from 'sbtl2.srt':

  Duration: N/A, bitrate: N/A

    Stream #2:0: Subtitle: subrip

Stream map '0:1' matches no streams.

To ignore this, add a trailing '?' to the map.

ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers

  built with gcc 8.2.1 (GCC) 20181017

  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libbluray --enable-libfreetype --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
--enable-libzimg --enable-lzma --enable-zlib --enable-gmp
--enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
--enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid
--enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2
--enable-avisynth

  libavutil      56. 22.100 / 56. 22.100

  libavcodec     58. 35.100 / 58. 35.100

  libavformat    58. 20.100 / 58. 20.100

  libavdevice    58.  5.100 / 58.  5.100

  libavfilter     7. 40.101 /  7. 40.101

  libswscale      5.  3.100 /  5.  3.100

  libswresample   3.  3.100 /  3.  3.100

  libpostproc    55.  3.100 / 55.  3.100

Input #0, matroska,webm, from 'temp.mkv':

  Metadata:

    title           : SYMPATHYFORMRVENGEANCE.Title5

    encoder         : libebml v1.3.4 + libmatroska v1.4.5

    creation_time   : 2019-01-07T18:15:21.000000Z

  Duration: 02:01:01.55, start: 0.000000, bitrate: 20800 kb/s

    Chapter #0:0: start 0.000000, end 241.282000

    Metadata:

      title           : (01)00:00:00:000

    Chapter #0:1: start 241.282000, end 808.349000

    Metadata:

      title           : (02)00:04:01:282

    Chapter #0:2: start 808.349000, end 1154.194000

    Metadata:

      title           : (03)00:13:28:349

    Chapter #0:3: start 1154.194000, end 1538.537000

    Metadata:

      title           : (04)00:19:14:194

    Chapter #0:4: start 1538.537000, end 2034.574000

    Metadata:

      title           : (05)00:25:38:537

    Chapter #0:5: start 2034.574000, end 2278.567000

    Metadata:

      title           : (06)00:33:54:574

    Chapter #0:6: start 2278.567000, end 2765.095000

    Metadata:

      title           : (07)00:37:58:567

    Chapter #0:7: start 2765.095000, end 2829.660000

    Metadata:

      title           : (08)00:46:05:095

    Chapter #0:8: start 2829.660000, end 3309.014000

    Metadata:

      title           : (09)00:47:09:660

    Chapter #0:9: start 3309.014000, end 3840.336000

    Metadata:

      title           : (10)00:55:09:014

    Chapter #0:10: start 3840.336000, end 4142.388000

    Metadata:

      title           : (11)01:04:00:336

    Chapter #0:11: start 4142.388000, end 4515.469000

    Metadata:

      title           : (12)01:09:02:388

    Chapter #0:12: start 4515.469000, end 4876.079000

    Metadata:

      title           : (13)01:15:15:469

    Chapter #0:13: start 4876.079000, end 5259.295000

    Metadata:

      title           : (14)01:21:16:079

    Chapter #0:14: start 5259.295000, end 5674.877000

    Metadata:

      title           : (15)01:27:39:295

    Chapter #0:15: start 5674.877000, end 5956.408000

    Metadata:

      title           : (16)01:34:34:877

    Chapter #0:16: start 5956.408000, end 6418.412000

    Metadata:

      title           : (17)01:39:16:408

    Chapter #0:17: start 6418.412000, end 6740.024000

    Metadata:

      title           : (18)01:46:58:412

    Chapter #0:18: start 6740.024000, end 7074.942000

    Metadata:

      title           : (19)01:52:20:024

    Chapter #0:19: start 7074.942000, end 7261.547000

    Metadata:

      title           : (20)01:57:54:942

    Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive),
1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
(default)

    Metadata:

      BPS             : 16001624

      BPS-eng         : 16001624

      DURATION        : 02:01:01.171000000

      DURATION-eng    : 02:01:01.171000000

      NUMBER_OF_FRAMES: 174094

      NUMBER_OF_FRAMES-eng: 174094

      NUMBER_OF_BYTES : 14523816039

      NUMBER_OF_BYTES-eng: 14523816039

      _STATISTICS_WRITING_APP: DVDFab 11.0.1.0

      _STATISTICS_WRITING_APP-eng: DVDFab 11.0.1.0

      _STATISTICS_WRITING_DATE_UTC: 2019-01-07 18:15:21

      _STATISTICS_WRITING_DATE_UTC-eng: 2019-01-07 18:15:21

      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

    Stream #0:1(deu): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s16p
(default)

    Metadata:

      BPS             : 2398247

      BPS-eng         : 2398247

      DURATION        : 02:01:01.547000000

      DURATION-eng    : 02:01:01.547000000

      NUMBER_OF_FRAMES: 680770

      NUMBER_OF_FRAMES-eng: 680770

      NUMBER_OF_BYTES : 2176873544

      NUMBER_OF_BYTES-eng: 2176873544

      _STATISTICS_WRITING_APP: DVDFab 11.0.1.0

      _STATISTICS_WRITING_APP-eng: DVDFab 11.0.1.0

      _STATISTICS_WRITING_DATE_UTC: 2019-01-07 18:15:21

      _STATISTICS_WRITING_DATE_UTC-eng: 2019-01-07 18:15:21

      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

    Stream #0:2(kor): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s16p

    Metadata:

      BPS             : 2395235

      BPS-eng         : 2395235

      DURATION        : 02:01:01.547000000

      DURATION-eng    : 02:01:01.547000000

      NUMBER_OF_FRAMES: 680770

      NUMBER_OF_FRAMES-eng: 680770

      NUMBER_OF_BYTES : 2174139552

      NUMBER_OF_BYTES-eng: 2174139552

      _STATISTICS_WRITING_APP: DVDFab 11.0.1.0

      _STATISTICS_WRITING_APP-eng: DVDFab 11.0.1.0

      _STATISTICS_WRITING_DATE_UTC: 2019-01-07 18:15:21

      _STATISTICS_WRITING_DATE_UTC-eng: 2019-01-07 18:15:21

      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

Input #1, srt, from 'sbtl1.srt':

  Duration: N/A, bitrate: N/A

    Stream #1:0: Subtitle: subrip

Input #2, srt, from 'sbtl2.srt':

  Duration: N/A, bitrate: N/A

    Stream #2:0: Subtitle: subrip

Stream mapping:

  Stream #0:0 -> #0:0 (copy)

  Stream #0:1 -> #0:1 (dts (dca) -> alac (native))

  Stream #0:2 -> #0:2 (dts (dca) -> alac (native))

  Stream #1:0 -> #0:3 (subrip (srt) -> mov_text (native))

  Stream #2:0 -> #0:4 (subrip (srt) -> mov_text (native))

Press [q] to stop, [?] for help

Output #0, ipod, to 'output.m4v':

  Metadata:

    title           : SYMPATHYFORMRVENGEANCE.Title5

    encoder         : Lavf58.20.100

    Chapter #0:0: start 0.000000, end 241.282000

    Metadata:

      title           : (01)00:00:00:000

    Chapter #0:1: start 241.282000, end 808.349000

    Metadata:

      title           : (02)00:04:01:282

    Chapter #0:2: start 808.349000, end 1154.194000

    Metadata:

      title           : (03)00:13:28:349

    Chapter #0:3: start 1154.194000, end 1538.537000

    Metadata:

      title           : (04)00:19:14:194

    Chapter #0:4: start 1538.537000, end 2034.574000

    Metadata:

      title           : (05)00:25:38:537

    Chapter #0:5: start 2034.574000, end 2278.567000

    Metadata:

      title           : (06)00:33:54:574

    Chapter #0:6: start 2278.567000, end 2765.095000

    Metadata:

      title           : (07)00:37:58:567

    Chapter #0:7: start 2765.095000, end 2829.660000

    Metadata:

      title           : (08)00:46:05:095

    Chapter #0:8: start 2829.660000, end 3309.014000

    Metadata:

      title           : (09)00:47:09:660

    Chapter #0:9: start 3309.014000, end 3840.336000

    Metadata:

      title           : (10)00:55:09:014

    Chapter #0:10: start 3840.336000, end 4142.388000

    Metadata:

      title           : (11)01:04:00:336

    Chapter #0:11: start 4142.388000, end 4515.469000

    Metadata:

      title           : (12)01:09:02:388

    Chapter #0:12: start 4515.469000, end 4876.079000

    Metadata:

      title           : (13)01:15:15:469

    Chapter #0:13: start 4876.079000, end 5259.295000

    Metadata:

      title           : (14)01:21:16:079

    Chapter #0:14: start 5259.295000, end 5674.877000

    Metadata:

      title           : (15)01:27:39:295

    Chapter #0:15: start 5674.877000, end 5956.408000

    Metadata:

      title           : (16)01:34:34:877

    Chapter #0:16: start 5956.408000, end 6418.412000

    Metadata:

      title           : (17)01:39:16:408

    Chapter #0:17: start 6418.412000, end 6740.024000

    Metadata:

      title           : (18)01:46:58:412

    Chapter #0:18: start 6740.024000, end 7074.942000

    Metadata:

      title           : (19)01:52:20:024

    Chapter #0:19: start 7074.942000, end 7261.547000

    Metadata:

      title           : (20)01:57:54:942

    Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709,
progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr,
16k tbn, 1k tbc (default)

    Metadata:

      BPS             : 16001624

      BPS-eng         : 16001624

      DURATION        : 02:01:01.171000000

      DURATION-eng    : 02:01:01.171000000

      NUMBER_OF_FRAMES: 174094

      NUMBER_OF_FRAMES-eng: 174094

      NUMBER_OF_BYTES : 14523816039

      NUMBER_OF_BYTES-eng: 14523816039

      _STATISTICS_WRITING_APP: DVDFab 11.0.1.0

      _STATISTICS_WRITING_APP-eng: DVDFab 11.0.1.0

      _STATISTICS_WRITING_DATE_UTC: 2019-01-07 18:15:21

      _STATISTICS_WRITING_DATE_UTC-eng: 2019-01-07 18:15:21

      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

      handler         : AVC

    Stream #0:1(deu): Audio: alac (alac / 0x63616C61), 48000 Hz, 5.1, s16p,
128 kb/s (default)

    Metadata:

      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

      BPS             : 2398247

      BPS-eng         : 2398247

      DURATION        : 02:01:01.547000000

      DURATION-eng    : 02:01:01.547000000

      NUMBER_OF_FRAMES: 680770

      NUMBER_OF_FRAMES-eng: 680770

      NUMBER_OF_BYTES : 2176873544

      NUMBER_OF_BYTES-eng: 2176873544

      _STATISTICS_WRITING_APP: DVDFab 11.0.1.0

      _STATISTICS_WRITING_APP-eng: DVDFab 11.0.1.0

      _STATISTICS_WRITING_DATE_UTC: 2019-01-07 18:15:21

      _STATISTICS_WRITING_DATE_UTC-eng: 2019-01-07 18:15:21

      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

      handler         : DTS-HD Master Audio

      encoder         : Lavc58.35.100 alac

    Stream #0:2(kor): Audio: alac (alac / 0x63616C61), 48000 Hz, 5.1, s16p,
128 kb/s

    Metadata:

      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

      BPS             : 2395235

      BPS-eng         : 2395235

      DURATION        : 02:01:01.547000000

      DURATION-eng    : 02:01:01.547000000

      NUMBER_OF_FRAMES: 680770

      NUMBER_OF_FRAMES-eng: 680770

      NUMBER_OF_BYTES : 2174139552

      NUMBER_OF_BYTES-eng: 2174139552

      _STATISTICS_WRITING_APP: DVDFab 11.0.1.0

      _STATISTICS_WRITING_APP-eng: DVDFab 11.0.1.0

      _STATISTICS_WRITING_DATE_UTC: 2019-01-07 18:15:21

      _STATISTICS_WRITING_DATE_UTC-eng: 2019-01-07 18:15:21

      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

      handler         : DTS-HD Master Audio

      encoder         : Lavc58.35.100 alac

    Stream #0:3(ger): Subtitle: mov_text (tx3g / 0x67337874)

    Metadata:

      handler         : Deutsch (forced)

      encoder         : Lavc58.35.100 mov_text

    Stream #0:4(ger): Subtitle: mov_text (tx3g / 0x67337874)

    Metadata:

      handler         : Deutsch

      encoder         : Lavc58.35.100 mov_text

frame=  160 fps=0.0 q=-1.0 size=   20481kB time=00:02:38.19
bitrate=1060.5kbits/s speed= 316x    

frame=  338 fps=338 q=-1.0 size=   34049kB time=00:02:38.19
bitrate=1763.1kbits/s speed= 158x    

frame=  481 fps=321 q=-1.0 size=   39425kB time=00:02:38.19
bitrate=2041.5kbits/s speed= 105x    

frame=  649 fps=324 q=-1.0 size=   45057kB time=00:02:38.19
bitrate=2333.2kbits/s speed=79.1x    

frame=  787 fps=315 q=-1.0 size=   51713kB time=00:02:38.19
bitrate=2677.8kbits/s speed=63.3x    

frame=  946 fps=315 q=-1.0 size=   61953kB time=00:02:38.19
bitrate=3208.1kbits/s speed=52.7x    

frame= 1114 fps=318 q=-1.0 size=   72705kB time=00:02:38.19
bitrate=3764.9kbits/s speed=45.2x    

frame= 1156 fps=316 q=-1.0 Lsize=   76051kB time=00:02:38.19
bitrate=3938.1kbits/s speed=43.3x    

video:58769kB audio:17242kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.052430%

Exiting normally, received signal 2.



More information about the ffmpeg-user mailing list