How to decode two Dolby E audio streams simultaneously with ffmpeg? - ffmpeg

I'm trying to decode 2 Dolby-E audio streams simultaneously.
ffmpeg -non_pcm_mode copy -i C:\vlc-record.ts -map 0:3 -map 0:4 -c:a pcm_s24le -f s24le - | ffplay -
Using -map 0:3 it works for one at a time but when I add the second one -map 0:4 it only process the first one and there is just one stream on my dolby_e output pipe.
Is there a way to create a two streams multicanal non-pcm output from 2 Dolbys PCM streams ?
I tried to find a solution with named pipe but it seems like windows command line doesn't accept this. I also tried to merge the PCM streams but then it says Invalid data found when processing input.
I can't make it with 2 pass because I'll be using it with udp live video streams.
ffmpeg version 2022-03-07-git-e645a1ddb9-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 11.2.0 (Rev7, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 57. 22.100 / 57. 22.100
libavcodec 59. 22.100 / 59. 22.100
libavformat 59. 17.103 / 59. 17.103
libavdevice 59. 5.100 / 59. 5.100
libavfilter 8. 27.100 / 8. 27.100
libswscale 6. 5.100 / 6. 5.100
libswresample 4. 4.100 / 4. 4.100
libpostproc 56. 4.100 / 56. 4.100
ffplay version 2022-03-07-git-e645a1ddb9-full_build-www.gyan.dev Copyright (c) 2003-2022 the FFmpeg developers
built with gcc 11.2.0 (Rev7, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 57. 22.100 / 57. 22.100
libavcodec 59. 22.100 / 59. 22.100
libavformat 59. 17.103 / 59. 17.103
libavdevice 59. 5.100 / 59. 5.100
libavfilter 8. 27.100 / 8. 27.100
libswscale 6. 5.100 / 6. 5.100
libswresample 4. 4.100 / 4. 4.100
libpostproc 56. 4.100 / 56. 4.100
Input #0, mpegts, from 'C:\vlc-record.ts':
Duration: 00:00:15.76, start: 42530.445511, bitrate: 31505 kb/s
Program 1
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn
Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:2: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:3: Audio: s302m (BSSD / 0x44535342), stereo, s32 (20 bit), 2304 kb/s
Stream #0:4: Audio: s302m (BSSD / 0x44535342), stereo, s32 (20 bit), 2304 kb/s
Stream mapping:
Stream #0:3 -> #0:0 (s302m (native) -> pcm_s24le (native))
Press [q] to stop, [?] for help
Output #0, s24le, to 'pipe:':
Metadata:
encoder : Lavf59.17.103
Stream #0:0: Audio: pcm_s24le, 48000 Hz, stereo, s32 (20 bit), 2304 kb/s
Metadata:
encoder : Lavc59.22.100 pcm_s24le
[dolby_e # 0000026b16da0640] Stream has 2 programs (configuration 0), channels will be output in native order.
Input #0, s337m, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #0:0: Audio: dolby_e, 44800 Hz, 7.1, fltp
[dolby_e # 0000026b16d7ca80] Stream has 2 programs (configuration 0), channels will be output in native order.
1.25 M-A: 0.000 fd= 0 aq= 292KB vq= 0KB sq= 0B f=0/0
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe
size= 1451kB time=00:00:05.20 bitrate=2286.3kbits/s speed=3.07x
video:0kB audio:1462kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Error closing file pipe:: Broken pipe
Conversion failed!

Related

ffmpeg conversion from MOD files (artefacts, codec selection)

I am new to ffmpeg and trying to figure out how to convert .MOD files to any generally readable format.
So far I was trying to
ffmpeg -i MOV00A.MOD -vcodec libx264 -acodec aac out.mp4
Result video is readable and has correct ratio aspect is correct but with artefacts like those horizontal lines:
My guess is that I might be using wrong codec but I do not understand which one to choose ?
Running ffmprobe on .MOD results:
ffprobe version 5.1.2 Copyright (c) 2007-2022 the FFmpeg developers
built with Apple clang version 14.0.0 (clang-1400.0.29.202)
configuration: --prefix=/usr/local/Cellar/ffmpeg/5.1.2_4 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
Input #0, mpeg, from 'MOV00A.MOD':
Duration: 00:00:41.28, start: 0.262222, bitrate: 5285 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bt470bg, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn
Side data:
cpb: bitrate max/min/avg: 9286000/0/0 buffer size: 1835008 vbv_delay: N/A
Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 256 kb/s

Error while concatenating audio files with ffmpeg

While concatenating audio files with
ffmpeg -safe 0 -f concat
-segment_time_metadata 1
-i {m3u_file_name}
-vf select=concatdec_select
-af aselect=concatdec_select,aresample=async=1 {ogg_file_name}
I get the following output
ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, concat, from 'fm3u.m3u':
Duration: N/A, start: -0.006500, bitrate: N/A
Stream #0:0: Audio: opus, 48000 Hz, mono, fltp
Stream mapping:
Stream #0:0 -> #0:0 (opus (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
Output #0, ogg, to 'fout.ogg':
Metadata:
encoder : Lavf57.83.100
Stream #0:0: Audio: vorbis (libvorbis), 48000 Hz, mono, fltp
Metadata:
encoder : Lavc57.107.100 libvorbis
[opus # 0x558b2c245400] Error parsing the packet header.
Error while decoding stream #0:0: Invalid data found when processing input
[opus # 0x558b2c245400] Error parsing the packet header.
Error while decoding stream #0:0: Invalid data found when processing input
[opus # 0x558b2c245400] Error parsing the packet header.
...
...
Error while decoding stream #0:0: Invalid data found when processing input
[opus # 0x558b2c245400] Error parsing the packet header.
Error while decoding stream #0:0: Invalid data found when processing input
size= 47kB time=00:00:10.84 bitrate= 35.2kbits/s speed=4.38x
video:0kB audio:42kB subtitle:0kB other streams:0kB global headers:3kB muxing overhead: 10.251080%
/fout.ogg
The final audio sounds good.
ffprobe on the 2 participating files looks like
# ffprobe <FILE>
ffprobe version 3.4.8-0ubuntu0.2 Copyright (c) 2007-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, ogg, from 'f1.ogg':
Duration: 00:00:01.08, start: 0.000000, bitrate: 34 kb/s
Stream #0:0: Audio: opus, 48000 Hz, mono, fltp
# ffprobe <FILE>
ffprobe version 3.4.8-0ubuntu0.2 Copyright (c) 2007-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, ogg, from 'f2.ogg':
Duration: 00:00:05.00, start: 0.000000, bitrate: 6 kb/s
Stream #0:0: Audio: vorbis, 48000 Hz, mono, fltp, 80 kb/s
Metadata:
ENCODER : Lavc57.107.100 libvorbis
What is the reason of the error?
As explained in this answer
"file-level concatenation (-f concat) requires all files in the listing to have the exact same codec parameters. "
In this case, the input files have codecs opus and vorbis.
To resolve the issue, I recreated some files (silence files) so they all have the same CODEC as the files I am mixing them with.
In particular, instead of creating them using:
ffmpeg -f lavfi -i anullsrc=r=48000:cl=mono -t 5.8 -c:a libvorbis silence-5.8.ogg
I use now (note libopus)
ffmpeg -f lavfi -i anullsrc=r=48000:cl=mono -t 5.8 -c:a libopus silence-5.8.ogg
And the "concat with ffmpeg" works without any problem.
I also tried
ffmpeg -f lavfi -i anullsrc=r=48000:cl=mono -t 5.8 -c:a opus silence-5.8.ogg
But that returns with
[opus # 0x5607f1765900] The encoder 'opus' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.
[opus # 0x5607f1765900] Alternatively use the non experimental encoder 'libopus'.
So, libopus works just fine (no need for opus)

FFMPEG Metadata Extraction Fails

I have a little issue with FFMPEG on Windows:
ffmpeg version 4.4-full_build-www_gyan_dev Copyright (c) 2000-2021 the FFmpeg developers
I Have got a video and a zip file to embed in the container as metadata
I encoded source files with the command
.\ffmpeg.exe -y -i D:\TestVideo3_T0.mkv -map 0 -attach .\TestVideo3_Merged_Meta.zip -metadata:s:t mimetype=application/zip -c:v copy D:\TestVideo3_Merged.mkv
Result of encoded data:
Input #0, matroska,webm, from 'D:\TestVideo3_T0.mkv':
Metadata:
ENCODER : Lavf58.76.100
Duration: 00:00:02.00, start: 0.000000, bitrate: 4461 kb/s
Stream #0:0: Video: hevc (Rext), gbrp(pc, gbr/unknown/unknown, progressive), 2048x1536, 10 fps, 10 tbr, 1k tbn, 10 tbc (default)
Metadata:
ENCODER : Lavc58.134.100 libx265
DURATION : 00:00:02.000000000
Output #0, matroska, to 'D:\TestVideo3_Merged.mkv':
Metadata:
encoder : Lavf58.76.100
Stream #0:0: Video: hevc (Rext), gbrp(pc, gbr/unknown/unknown, progressive), 2048x1536, q=2-31, 10 fps, 10 tbr, 1k tbn, 1k tbc (default)
Metadata:
ENCODER : Lavc58.134.100 libx265
DURATION : 00:00:02.000000000
Stream #0:1: Attachment: none
Metadata:
filename : .\TestVideo3_Merged_Meta.zip
mimetype : application/zip
Stream mapping:
Stream #0:0 -> #0:0 (copy)
File .\TestVideo3_Merged_Meta.zip -> Stream #0:1
Press [q] to stop, [?] for help
frame= 20 fps=0.0 q=-1.0 Lsize= 3473kB time=00:00:01.70 bitrate=16727.1kbits/s speed= 554x
video:1086kB audio:0kB subtitle:0kB other streams:0kB global headers:2kB muxing overhead: 219.801529%
When I analyze the output file I can find the zip file embedded on the mkv video.
Deconding the file seems not working. (I tries -dump_attacment:s :s:t :t, ecc...)
.\ffmpeg -y -i .\TestVideo3_Merged.mkv -dump_attachment:t .\Meta.zip
ffmpeg version 4.4-full_build-www_gyan_dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Trailing option(s) found in the command: may be ignored.
[matroska,webm # 0000023ddd5cf880] Could not find codec parameters for stream 1 (Attachment: none): unknown codec
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, matroska,webm, from '.\TestVideo3_Merged.mkv':
Metadata:
ENCODER : Lavf58.76.100
Duration: 00:00:02.00, start: 0.000000, bitrate: 14226 kb/s
Stream #0:0: Video: hevc (Rext), gbrp(pc, gbr/unknown/unknown, progressive), 2048x1536, 10 fps, 10 tbr, 1k tbn, 10 tbc (default)
Metadata:
ENCODER : Lavc58.134.100 libx265
DURATION : 00:00:02.000000000
Stream #0:1: Attachment: none
Metadata:
filename : .\TestVideo3_Merged_Meta.zip
mimetype : application/zip
At least one output file must be specified
PS D:\> .\ffmpeg -y -i .\TestVideo3_Merged.mkv -dump_attachment:s:t .\Meta.zip
ffmpeg version 4.4-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Trailing option(s) found in the command: may be ignored.
[matroska,webm # 000002492afef7c0] Could not find codec parameters for stream 1 (Attachment: none): unknown codec
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, matroska,webm, from '.\TestVideo3_Merged.mkv':
Metadata:
ENCODER : Lavf58.76.100
Duration: 00:00:02.00, start: 0.000000, bitrate: 14226 kb/s
Stream #0:0: Video: hevc (Rext), gbrp(pc, gbr/unknown/unknown, progressive), 2048x1536, 10 fps, 10 tbr, 1k tbn, 10 tbc (default)
Metadata:
ENCODER : Lavc58.134.100 libx265
DURATION : 00:00:02.000000000
Stream #0:1: Attachment: none
Metadata:
filename : .\TestVideo3_Merged_Meta.zip
mimetype : application/zip
At least one output file must be specified
Can anyone give a hint to solve this problem?
Thanks in advance
-dump_attachment goes before the input with the attachment.
ffmpeg -y -dump_attachment:t .\Meta.zip -i .\TestVideo3_Merged.mkv

FFmpeg: How can I loop a single frame of video to cover the length of audio track

I have a VOB file holding an MPEG-2 video track with an AC-3 audio track. The video track of that VOB file consists of a single frame, which when played in a DVD player, holds that still frame until the audio track has finished.
How can I (with FFMPEG ideally), loop that frame to make a "normal" video track that lasts for the length of the audio track, rather than just a single frame?
ffmpeg version N-91999-g148a21611d Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20180813
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. 19.101 / 56. 19.101
libavcodec 58. 30.100 / 58. 30.100
libavformat 58. 18.102 / 58. 18.102
libavdevice 58. 4.103 / 58. 4.103
libavfilter 7. 32.100 / 7. 32.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
Input #0, mpeg, from '.\SINGLEFRAME.VOB':
Duration: 00:00:47.94, start: 0.336711, bitrate: 439 kb/s
Stream #0:0: Data: dvd_nav_packet
Stream #0:1: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR 16:15 DAR 4:3], 8000 kb/s, 25 tbr, 90k tbn, 50 tbc
Stream #0:2: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s

FFMPEG sidechaincompress not working as it should?

I have been trying to get sidechaining to work with FFMPEG, but my complex filter skills are lacking.
I'm running two aif files into ffmpeg, hoping the voice would "duck" the background music when the voice-over is speaking. But I get an error with this command-line (on Windows, with latest FFMPEG binary):
ffmpeg.exe -i temp_music.aif -i temp_voice.aif \
-filter_complex "[1:a]asplit=2[sc][mix];[0:a] \
[sc]sidechaincompress=threshold=0.1:ratio=5[bg]; \
[bg][mix]amerge[fin‌​al]" -map [final] final.mp3
Everything decodes fine:
ffmpeg version N-87353-g183fd30 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.2.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-libxml2 --enable-libzimg --enable-lzma --enable-zlib
libavutil 55. 76.100 / 55. 76.100
libavcodec 57.106.101 / 57.106.101
libavformat 57. 82.101 / 57. 82.101
libavdevice 57. 8.101 / 57. 8.101
libavfilter 6.105.100 / 6.105.100
libswscale 4. 7.103 / 4. 7.103
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, aiff, from 'temp_music.aif':
Duration: 00:01:26.68, start: 0.000000, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16be, 48000 Hz, stereo, s16, 1536 kb/s
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, aiff, from 'temp_voice.aif':
Duration: 00:01:26.68, start: 0.000000, bitrate: 1536 kb/s
Stream #1:0: Audio: pcm_s16be, 48000 Hz, stereo, s16, 1536 kb/s
Output with label 'final' does not exist in any defined filter graph, or was already used elsewhere.
But then I receive an error:
Output with label 'final' does not exist in any defined filter graph,
or was already used elsewhere.
Anybody knows why?
This looks to be some type of character encoding issue.
When I execute your command as copy-pasted, I get the same error. But if I remove the final label and retype it, it works. For now, since you have only one stream to export, you can just leave it unlabelled and ffmpeg will automatically map it.
ffmpeg.exe -i temp_music.aif -i temp_voice.aif \
-filter_complex "[1:a]asplit=2[sc][mix];[0:a] \
[sc]sidechaincompress=threshold=0.1:ratio=5[bg]; \
[bg][mix]amerge" final.mp3

Resources