[FFmpeg-user] Losing metadata when encoding to .ts chunks

videoworker n4y5m3ma5j at snkmail.com
Tue May 27 14:56:29 CEST 2014


Since in my E-Mail programm all formatted text (especially the ffmpeg output
lines) seem to have disappeard, here comes the question again, without
formatting (sorry for the double post):

Hello,

I am converting a videofile (mp4) with a video stream and two or more audio
streams (german and english) to .ts chunks.

The source file contains information about the language of each audio
stream.

The resulting segmented .ts files do not contain the language information
anymore. How do I fix this?

ffmpeg command line:

ffmpeg -i D:\temp\tests\source.mp4 ^
-bsf h264_mp4toannexb ^
-map 0:0 -map 0:1 -map 0:2 ^
-vcodec copy ^
-acodec libvo_aacenc -b:a 96k -ar 44100 -ac 2  ^
-f segment ^
-segment_time 10 ^
-segment_list_type csv ^
-segment_list D:\temp\tstest\chunklist.csv ^
-segment_format mpegts ^
D:\temp\tstest\output_%%04d.ts ^
-progress D:\temp\tstest\output.log



Information in detail:

Information about the source file:

D:\temp\tests>ffprobe source.mp4
ffprobe version N-63350-g19e66c7 Copyright (c) 2007-2014 the FFmpeg
developers
  built on May 20 2014 22:09:33 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm
--enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink
--enable-zlib
  libavutil      52. 86.100 / 52. 86.100
  libavcodec     55. 63.100 / 55. 63.100
  libavformat    55. 39.100 / 55. 39.100
  libavdevice    55. 13.101 / 55. 13.101
  libavfilter     4.  5.100 /  4.  5.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\temp\tests\source.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.39.100
  Duration: 00:05:00.09, start: 0.036281, bitrate: 6149 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1280x544, 5945 kb/s, 23.98 fps, 23.98 tbr, 16k tbn, 47.95 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(ger): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
fltp, 96 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Stream #0:2(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
fltp, 96 kb/s
    Metadata:
      handler_name    : SoundHandler


ffmpeg command line:

ffmpeg ^
-i D:\temp\tests\source.mp4 ^
-bsf h264_mp4toannexb ^
-map 0:0 -map 0:1 -map 0:2 ^
-vcodec copy ^
-acodec libvo_aacenc -b:a 96k -ar 44100 -ac 2  ^
-f segment ^
-segment_time 10 ^
-segment_list_type csv ^
-segment_list D:\temp\tstest\chunklist.csv ^
-segment_format mpegts ^
D:\temp\tstest\output_%%04d.ts ^
-progress D:\temp\tstest\output.log



ffmpeg output:

ffmpeg version N-63350-g19e66c7 Copyright (c) 2000-2014 the FFmpeg
developers
  built on May 20 2014 22:09:33 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm
--enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink
--enable-zlib
  libavutil      52. 86.100 / 52. 86.100
  libavcodec     55. 63.100 / 55. 63.100
  libavformat    55. 39.100 / 55. 39.100
  libavdevice    55. 13.101 / 55. 13.101
  libavfilter     4.  5.100 /  4.  5.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\temp\tests\source.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.39.100
  Duration: 00:05:00.09, start: 0.036281, bitrate: 6149 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1280x544, 5945 kb/s, 23.98 fps, 23.98 tbr, 16k tbn, 47.95 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(ger): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
fltp, 96 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Stream #0:2(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
fltp, 96 kb/s
    Metadata:
      handler_name    : SoundHandler
Output #0, segment, to 'D:\temp\tstest\output_%04d.ts':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.39.100
    Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 1280x544,
q=2-31, 5945 kb/s, 23.98 fps, 90k tbn, 23.98 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(ger): Audio: aac (libvo_aacenc), 44100 Hz, stereo, s16, 96
kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      encoder         : Lavc55.63.100 libvo_aacenc
    Stream #0:2(eng): Audio: aac (libvo_aacenc), 44100 Hz, stereo, s16, 96
kb/s
    Metadata:
      handler_name    : SoundHandler
      encoder         : Lavc55.63.100 libvo_aacenc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (aac -> libvo_aacenc)
  Stream #0:2 -> #0:2 (aac -> libvo_aacenc)
Press [q] to stop, [?] for help
frame= 7195 fps=672 q=-1.0 Lsize=N/A time=00:05:00.04 bitrate=N/A
video:217789kB audio:7034kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 8012709756928.000000%




Information about the first .ts chunk:

D:\temp\tests>ffprobe "d:\temp\tstest\output_0000.ts"
ffprobe version N-63350-g19e66c7 Copyright (c) 2007-2014 the FFmpeg
developers
  built on May 20 2014 22:09:33 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm
--enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink
--enable-zlib
  libavutil      52. 86.100 / 52. 86.100
  libavcodec     55. 63.100 / 55. 63.100
  libavformat    55. 39.100 / 55. 39.100
  libavdevice    55. 13.101 / 55. 13.101
  libavfilter     4.  5.100 /  4.  5.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mpegts, from 'd:\temp\tstest\output_0000.ts':
  Duration: 00:00:12.71, start: 0.010911, bitrate: 2370 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B),
yuv420p, 1280x544, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Stream #0:1[0x101]: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz,
stereo, fltp, 98 kb/s
    Stream #0:2[0x102]: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz,
stereo, fltp, 98 kb/s


Kind Regards 



--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Losing-metadata-when-encoding-to-ts-chunks-tp4665486p4665490.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list