title: How to encode a series of .dpx files using X264
body: <p>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) </p>
  
  <p>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. </p>
  
  <p>1) using FFMPEG along with x264 library  and it works well. I am able to produce desired output</p>
  
  <pre><code>ffmpeg -start_number 0 -i frame%4d.dpx -pix_fmt yuv420p -c:v libx264 -crf 28 
  -profile:v baseline fromdpx.h264
  </code></pre>
  
  <p>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) . </p>
  
  <pre><code>ffmpeg -i "concat:frame0.dpx|frame01.dpx|frame2.dpx etc" -c copy output.dpx
  </code></pre>
  
  <p>then </p>
  
  <pre><code>x264 --crf 28 --profile baseline -o encoded.mp4 --input-res 1920x1080 --demuxer raw 
  output.dpx
  </code></pre>
  
  <p>I also tried to encoded the concatenated file using ffmpeg as follows</p>
  
  <pre><code>ffmpeg -i output.dpx -pix_fmt yuv420p -c:v libx264 -crf 28 -profile:v baseline fromdpx.h264
  </code></pre>
  
  <p>This also gives me a blank video. </p>
  
  <p>Could someone please point out to me what is going on here? Why does the first method work and the second does not? </p>
  
  <p>Thank you.</p>