[FFmpeg-user] Transport Stream Descriptors
Marcelo Boufleur
mboufleur at gmail.com
Thu Sep 8 19:44:18 EEST 2016
Hello everyone,
I am using ffmpeg to remultiplex some MPEG-2 Transport Stream content, but
the audio tracks in the resulting file seem to miss some of the original
information and/or descriptors.
Below is the original file, read by ffmpeg
C:\>ffmpeg -i 0593000000000096_movie.mpg
ffmpeg version N-80980-g7af44ce Copyright (c) 2000-2016 the FFmpeg
developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-dxva2 --enable-libmfx
--enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128
--enable-fontconfig --enable-fre
i0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libc
aca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc
--enable-libmodplug --enab
le-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-li
bopus --enable-librtmp --enable-libschroedinger --enable-libsnappy
--enable-libsoxr --enable-libspee
x --enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvo-amrwbenc --enable-libvor
bis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-
libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink
--enable-zlib
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 50.100 / 57. 50.100
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, mpegts, from '0593000000000096_movie.mpg':
Duration: 00:13:17.98, start: 0.400400, bitrate: 55023 kb/s
Program 1
Stream #0:0[0x1e1]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 50000 kb/s,
29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x1e2](por): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
stereo, fltp, 448 kb/s
Stream #0:2[0x1e3](por): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
stereo, fltp, 448 kb/s
At least one output file must be specified
The file is then remultiplexed using this command
C:\>ffmpeg -i 0593000000000096_movie.mpg -map 0:0 -map 0:1 -map 0:2 -c:v
copy -c:a copy -f mpegts OUTPUT.ts
The resulting file is again read by ffmpeg with the following command
C:\>ffmpeg -i OUTPUT.ts
ffmpeg version N-80980-g7af44ce Copyright (c) 2000-2016 the FFmpeg
developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-dxva2 --enable-libmfx
--enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128
--enable-fontconfig --enable-fre
i0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libc
aca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc
--enable-libmodplug --enab
le-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-li
bopus --enable-librtmp --enable-libschroedinger --enable-libsnappy
--enable-libsoxr --enable-libspee
x --enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvo-amrwbenc --enable-libvor
bis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-
libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink
--enable-zlib
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 50.100 / 57. 50.100
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, mpegts, from 'OUTPUT.ts':
Duration: 00:13:17.98, start: 1.433367, bitrate: 54920 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 50000 kb/s,
29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x101](por): Audio: ac3 ([129][0][0][0] / 0x0081), 48000
Hz, stereo, fltp, 448 kb/s
Stream #0:2[0x102](por): Audio: ac3 ([129][0][0][0] / 0x0081), 48000
Hz, stereo, fltp, 448 kb/s
At least one output file must be specified
To better see the difference, I will put both audio stdout infos from the
fist audio track down here (Original & Remultiplexed):
Stream #0:1[0x1e2](por): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
stereo, fltp, 448 kb/s
Stream #0:1[0x101](por): Audio: ac3 ([129][0][0][0] / 0x0081), 48000
Hz, stereo, fltp, 448 kb/s
The first information within the square brackest is the PID, and the
information within the first parenthesis block is the language defined by
ISO639 Language Descriptor (with the 0x0A descriptor value)
My main concern is the information that ffmpeg shows within the second
parenthesis which would be the other descriptors. They somehow are changed
by ffmpeg.
The informations within the second parenthesis of the first original audio
track seem to be the following:
AC-3: User Private Descriptor (having the value of 0x81)
0x332D4341: Registration Descriptor (this value also seems to be the format
identifier of AC-3)
The informations within the second parenthesis of the second original audio
track are as follows:
[129][0][0][0] - No sure what is relates to, but 129 decimal is equal to
0x81
0x0081 - Again, the 0x81 value, but not associated with any descriptor
The information about the descriptors from the first file above I was able
to retrieve by looking the same original file in TSReader application.
The OUTPUT.ts file exported by ffmpeg only shows the descriptor for the
ISO639 Language descriptor, so I am not sure what these informations
"[129][0][0][0]" or "0x0081" stand for.
Does anyone would know how I would be able to re-create these audio
descriptors with ffmpeg? There are cases when I would like to also
multiplex separate audio files, so it would be nice to now about any
options in ffmpeg command line to achieve that.
There are some cases when AC-3 audio also uses 0x06 as User Private
Descriptor (which can be used for audio and/or subtitles), instead of 0x81,
so if this also would be possible to define, it would be great.
Marcelo
More information about the ffmpeg-user
mailing list