I have folder of YUV files in NV12 format and I want to make them into a video. I cannot glob them as they are not numbered in a good way with leading zeros. Practically I cannot change it. But I have a list of the files in the correct order for the video.
ffmpeg -y -pix_fmt nv12 -s 1920x1080 -r 30 -f concat -safe 0 -i yuvlist.txt -c:v libx264 -pix_fmt yuv420p output.mp4
file 'yuvfile_01.yuv' file 'yuvfile_02.yuv'
and so on (and yes the files exist)
This always ends in this error
[IMGUTILS] Picture size 0x0 is invalid [concat] Impossible to open 'yuvfile_01.yuv' yuvlist.txt Invalid argument
and I have tried to put the information for the NV12
-pix_fmt nv12 -s 1920x1080 at various places on the command line but to still get the same error.
I can achieve this by first converting all YUV with ffmpeg to e.g. BMP and then using
ffmpeg -y -r 30 -f concat -safe 0 -i bmplist.txt -c:v libx264 -pix_fmt yuv420p output.mp4 and here of course the Picture size is metadata inside the BMP and it can succeed.
It takes both time and disk space to do this via BMP so where shall I place my picture size and format to directly use YUV in the first ffmpeg command line example?