[FFmpeg-user] Dolby E decoder
Mike Brown
brown at mrvideo.vidiot.com
Sun Sep 10 16:45:46 EEST 2017
On Sun, Sep 10, 2017 at 10:13:51AM +0200, Paul B Mahol wrote:
> On 9/10/17, Mike Brown <brown at mrvideo.vidiot.com> wrote:
> > On Sat, Sep 09, 2017 at 05:24:24PM +0300, foo86 wrote:
> >> On Fri, Sep 08, 2017 at 05:08:54PM -0500, Mike Brown wrote:
> >> > On Fri, Sep 08, 2017 at 03:55:35PM +0200, Paul B Mahol wrote:
> >> > > You need to override input decoder so S302 is not used.
> >> >
> >> > Any update on how I override the s302 decoder?
> >>
> >> You don't want to override s302m decoder, it has to be used to process
> >> non-PCM data in TS to obtain s337m compliant stream that FFmpeg will
> >> recognize as such and decode as Dolby E.
> >>
> >> -non_pcm_mode copy parameter has to be passed to s302m decoder since by
> >> default it drops non-PCM.
> >>
> >> Correct command line for your case (extract and decode 20-bit Dolby E)
> >> would be:
> >>
> >> ffmpeg -non_pcm_mode copy -i input_test.ts -map 0:1 -c:a pcm_s24le -f
> >> s24le out.dat
> >> ffmpeg -i out.dat out.wav
> >
> > Here is the result:
> >
> > ffmpeg -non_pcm_mode copy -i input_test.ts -map 0:1 -c:a pcm_s24le -f s24le
> > out.dat
> > ffmpeg version N-87196-g6cadbb1 Copyright (c) 2000-2017 the FFmpeg
> > developers
> > built with gcc 7.1.0 (GCC)
> > configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid
> > --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc
> > --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
> > --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
> > --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
> > --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
> > --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264
> > --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy
> > --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
> > --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis
> > --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
> > --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg
> > --enable-lzma --enable-zlib
> > libavutil 55. 74.100 / 55. 74.100
> > libavcodec 57.105.100 / 57.105.100
> > libavformat 57. 81.100 / 57. 81.100
> > libavdevice 57. 8.100 / 57. 8.100
> > libavfilter 6.101.100 / 6.101.100
> > libswscale 4. 7.103 / 4. 7.103
> > libswresample 2. 8.100 / 2. 8.100
> > libpostproc 54. 6.100 / 54. 6.100
> > [s302m @ 000000000049d560] S302 non PCM mode with data type 28 not supported
> > Last message repeated 1 times
> > [mpeg2video @ 000000000049c4e0] Invalid frame dimensions 0x0.
> > [s302m @ 000000000049d560] S302 non PCM mode with data type 28 not supported
> > [mpeg2video @ 000000000049c4e0] Invalid frame dimensions 0x0.
> > [s302m @ 000000000049d560] S302 non PCM mode with data type 28 not supported
> > [mpeg2video @ 000000000049c4e0] Invalid frame dimensions 0x0.
> > [s302m @ 000000000049d560] S302 non PCM mode with data type 28 not supported
> > [mpeg2video @ 000000000049c4e0] Invalid frame dimensions 0x0.
> > [s302m @ 000000000049d560] S302 non PCM mode with data type 28 not supported
> > [mpeg2video @ 000000000049c4e0] Invalid frame dimensions 0x0.
> > [s302m @ 000000000049d560] S302 non PCM mode with data type 28 not supported
> > [mpeg2video @ 000000000049c4e0] Invalid frame dimensions 0x0.
> > [s302m @ 000000000049d560] S302 non PCM mode with data type 28 not supported
> > [mpeg2video @ 000000000049c4e0] Invalid frame dimensions 0x0.
> > [s302m @ 000000000049d560] S302 non PCM mode with data type 28 not supported
> > [mpeg2video @ 000000000049c4e0] Invalid frame dimensions 0x0.
> > [s302m @ 000000000049d560] S302 non PCM mode with data type 28 not supported
> > [mpeg2video @ 000000000049c4e0] Invalid frame dimensions 0x0.
> > [s302m @ 000000000049d560] S302 non PCM mode with data type 28 not supported
> > Last message repeated 18 times
> > [mpegts @ 00000000005670e0] decoding for stream 1 failed
> > [mpegts @ 00000000005670e0] PES packet size mismatch
> > Last message repeated 2 times
> > [mpegts @ 00000000005670e0] Could not find codec parameters for stream 1
> > (Audio: s302m (BSSD / 0x44535342), stereo, s32 (20 bit), 2304 kb/s):
> > unspecified sample rate
> > Consider increasing the value for the 'analyzeduration' and 'probesize'
> > options
> > Input #0, mpegts, from 'input_test.ts':
> > Duration: 00:00:19.19, start: 94349.992444, bitrate: 43715 kb/s
> > Program 1
> > Stream #0:0[0x31]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
> > yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], Closed
> > Captions, 40266 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
> > Stream #0:1[0x33](eng): Audio: s302m (BSSD / 0x44535342), stereo, s32
> > (20 bit), 2304 kb/s
> > Stream #0:2[0x34](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
> > stereo, s16p, 256 kb/s
> > Stream #0:3[0x35](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
> > stereo, s16p, 256 kb/s
> > Stream #0:4[0x3b]: Data: bin_data (LU-A / 0x412D554C)
> > Stream mapping:
> > Stream #0:1 -> #0:0 (s302m (native) -> pcm_s24le (native))
> > Press [q] to stop, [?] for help
> > Output #0, s24le, to 'out.dat':
> > Metadata:
> > encoder : Lavf57.81.100
> > Stream #0:0(eng): Audio: pcm_s24le, 48000 Hz, stereo, s32 (20 bit), 2304
> > kb/s
> > Metadata:
> > encoder : Lavc57.105.100 pcm_s24le
> > [mpegts @ 00000000005670e0] PES packet size mismatch
> > [s302m @ 00000000022924e0] frame has invalid header
> > Error while decoding stream #0:1: Invalid data found when processing input
> > size= 5330kB time=00:00:18.95 bitrate=2304.0kbits/s speed= 202x
> > video:0kB audio:5330kB subtitle:0kB other streams:0kB global headers:0kB
> > muxing overhead: 0.000000%
> >
> >
> > ffmpeg -i out.dat out.wav
> > ffmpeg version N-87196-g6cadbb1 Copyright (c) 2000-2017 the FFmpeg
> > developers
> > built with gcc 7.1.0 (GCC)
> > configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid
> > --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc
> > --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
> > --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
> > --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
> > --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
> > --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264
> > --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy
> > --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
> > --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis
> > --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
> > --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg
> > --enable-lzma --enable-zlib
> > libavutil 55. 74.100 / 55. 74.100
> > libavcodec 57.105.100 / 57.105.100
> > libavformat 57. 81.100 / 57. 81.100
> > libavdevice 57. 8.100 / 57. 8.100
> > libavfilter 6.101.100 / 6.101.100
> > libswscale 4. 7.103 / 4. 7.103
> > libswresample 2. 8.100 / 2. 8.100
> > libpostproc 54. 6.100 / 54. 6.100
> > [dolby_e @ 000000000034ba60] Stream has 2 programs (configuration 0),
> > channels will be output in native order.
> > Input #0, s337m, from 'out.dat':
> > Duration: N/A, bitrate: N/A
> > Stream #0:0: Audio: dolby_e, 53706 Hz, 7.1, fltp
> > Stream mapping:
> > Stream #0:0 -> #0:0 (dolby_e (native) -> pcm_s16le (native))
> > Press [q] to stop, [?] for help
> > [dolby_e @ 00000000003ef760] Stream has 2 programs (configuration 0),
> > channels will be output in native order.
> > Output #0, wav, to 'out.wav':
> > Metadata:
> > ISFT : Lavf57.81.100
> > Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 53706 Hz, 7.1,
> > s16, 6874 kb/s
> > Metadata:
> > encoder : Lavc57.105.100 pcm_s16le
> > size= 15876kB time=00:00:18.91 bitrate=6874.6kbits/s speed= 126x
> > video:0kB audio:15876kB subtitle:0kB other streams:0kB global headers:0kB
> > muxing overhead: 0.000627%
> >
> >
> > ffmpeg -drc_scale 0 -i out.wav -c:a ac3 -ab 640k -center_mixlev 0.707
> > output_test.ac3
> > ffmpeg version N-87196-g6cadbb1 Copyright (c) 2000-2017 the FFmpeg
> > developers
> > built with gcc 7.1.0 (GCC)
> > configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid
> > --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc
> > --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
> > --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
> > --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
> > --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
> > --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264
> > --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy
> > --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
> > --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis
> > --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
> > --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg
> > --enable-lzma --enable-zlib
> > libavutil 55. 74.100 / 55. 74.100
> > libavcodec 57.105.100 / 57.105.100
> > libavformat 57. 81.100 / 57. 81.100
> > libavdevice 57. 8.100 / 57. 8.100
> > libavfilter 6.101.100 / 6.101.100
> > libswscale 4. 7.103 / 4. 7.103
> > libswresample 2. 8.100 / 2. 8.100
> > libpostproc 54. 6.100 / 54. 6.100
> > Input #0, wav, from 'out.wav':
> > Metadata:
> > encoder : Lavf57.81.100
> > Duration: 00:00:18.92, bitrate: 6874 kb/s
> > Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 53706 Hz, 7.1,
> > s16, 6874 kb/s
> > Codec AVOption drc_scale (percentage of dynamic range compression to apply)
> > specified for input file #0 (out.wav) has not been used for any stream. The
> > most likely reason is either wrong type (e.g. a video option with no video
> > streams) or that it is a private option of some decoder which was not
> > actually used for any stream.
> > Stream mapping:
> > Stream #0:0 -> #0:0 (pcm_s16le (native) -> ac3 (native))
> > Press [q] to stop, [?] for help
> > [ac3 @ 000000000044eee0] invalid sample rate
>
> Looks like you need to resample audio to sample rate ac3 supports.
But, it is already 48kHz.
MB
--
e-mail: vidiot at vidiot.com | vidiot at vidiot.net /~\ The ASCII
6082066843 at email.uscc.net (140 char limit) \ / Ribbon Campaign
Visit - URL: http://vidiot.com/ X Against
http://vidiot.net/ / \ HTML Email
"You're Sherlock Holmes, wear the damn hat!" - Watson to Sherlock
Sherlock - The Abominable Bride - 1/01/16
More information about the ffmpeg-user
mailing list