I am complete newbie to video encoding. I am trying to encode a series of .dpx files into one single encoded video O/P file in any of the following format. ( .mp4,.avi,.h264,.mkv etc)
I have tried 2 different approaches. The first one works and the second one does not. I would like to know the difference between the two. Any help / input would be much appreciated.
1) using FFMPEG along with x264 library and it works well. I am able to produce desired output
ffmpeg -start_number 0 -i frame%4d.dpx -pix_fmt yuv420p -c:v libx264 -crf 28
-profile:v baseline fromdpx.h264
2) I first try to concatenate all the dpx files into a single file using concate protocol in ffmpeg and then use x264 to encode the concatenated file. Here I see that the size of the concatenated file is the sum of all the files concatenated. But when I use x264 command to encode the concatenated file, I get a green screen (basically not the desired output) .
ffmpeg -i "concat:frame0.dpx|frame01.dpx|frame2.dpx etc" -c copy output.dpx
then
x264 --crf 28 --profile baseline -o encoded.mp4 --input-res 1920x1080 --demuxer raw
output.dpx
I also tried to encoded the concatenated file using ffmpeg as follows
ffmpeg -i output.dpx -pix_fmt yuv420p -c:v libx264 -crf 28 -profile:v baseline fromdpx.h264
This also gives me a blank video.
Could someone please point out to me what is going on here? Why does the first method work and the second does not?
Thank you.