ffmpeg concat always return error `Invalid data found when processing input`

I think I did it right by following the guide on wiki but it didn't work

Demo file

The 1.mp4 and 2.mp4 are cut from the same video so they have the same encoding

Setup:demo

@echo off
@cd/d %~dp0
(for %%i in (*.mp4) do @echo file '%%i') > Concat.txt
ffmpeg -i Concat.txt -f concat -safe 0 -c copy output_concat.mp4
pause

Result:result

 ffmpeg version 2021-12-12-git-996b13fac4-full_build- Copyright (c) 2000-2021 the FFmpeg developers built with gcc 11.2.0 (Rev2, 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-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-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. 11.100 / 57. 11.100 libavcodec 59. 14.100 / 59. 14.100 libavformat 59. 10.100 / 59. 10.100 libavdevice 59. 0.101 / 59. 0.101 libavfilter 8. 20.100 / 8. 20.100 libswscale 6. 1.101 / 6. 1.101 libswresample 4. 0.100 / 4. 0.100 libpostproc 56. 0.100 / 56. 0.100
Concat.txt: Invalid data found when processing input
2

1 Answer

-f concat is the switch that is supposed to specify the "demuxer", so it needs to be placed before -i Concat.txt.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like