[FFmpeg-user] Several issues encoding DV* video

Kai-Mikael Jää-Aro kai at vizrt.com
Fri Aug 19 13:57:50 CEST 2011


I'm trying to generate video in DV25, DVCPro25, DVCPro50 (and ideally 
also DVCPro 100, but I know this is not possible).  I'd like to have 
them as both raw DV files and wrapped in MXF, but have problems getting 
the correct encoders.  In short I do not know how to get DV25 with audio 
in DV and MXF wrappers and DVCPro25 in MXF wrapper.

These are the results I get when testing different combinations:

DV25

ffmpeg -i input.y4m -s 720x576 -r 25 -pix_fmt yuv420p output.dv

generates a DV file.  No problem.  But then I try to add the audio tracks:

ffmpeg -i input.y4m -i left.flac -i right.flac -s 720x576 -r 25 -pix_fmt 
yuv420p output.dv

generates what mediainfo reports as a DVCPRO file, though the chroma is 
4:2:0.

The same thing happens if I wrap as MXF:

ffmpeg -i input.y4m -s 720x576 -r 25 -pix_fmt yuv420p -target dv output.mxf

generates DV and

ffmpeg -i input.y4m -i left.flac -i right.flac -s 720x576 -r 25 -pix_fmt 
yuv420p -target dv output.mxf

generates DVCPRO.

DVCPro25

ffmpeg -i input.y4m -s 720x576 -r 25 -pix_fmt yuv411p output.dv

generates a DVCPro25 file.  No problem.

ffmpeg -i input.y4m -s 720x576 -r 25 -pix_fmt yuv411p output.mxf

generates MPEG-2 in MXF wrapper, whereas

ffmpeg -i input.y4m -s 720x576 -r 25 -pix_fmt yuv411p -target dv output.mxf

generates DV with 4:2:0 subsampling.  Not what I wanted.

Now, trying to add the audio tracks:

ffmpeg -i input.y4m -i left.flac -i right.flac -s 720x576 -r 25 -pix_fmt 
yuv411p output.dv

gives the error message

"[dv @ 0x28e3960] Can't initialize DV format!
Make sure that you supply exactly two streams:
      video: 25fps or 29.97fps, audio: 2ch/48kHz/PCM
      (50Mbps allows an optional second audio stream)"

How come ffmpeg managed to take the two audio files earlier and combine 
them in one stereo stream in the output?  I need to map the audio 
channels; this cannot be done in ffmpeg, as far as I have been able to 
figure out, but ffmbc lets me do this:

ffmbc -i input.y4m -i left.flac -i right.flac -s 720x576 -r 25 -pix_fmt 
yuv411p output.dv -map_audio_channel 1:0:0:0:1:0 -map_audio_channel 
2:0:0:0:1:1

This works and gives me DVCPro25 output.  But, now attempting to wrap in 
MXF:

ffmbc -i input.y4m -i left.flac -i right.flac -s 720x576 -r 25 -pix_fmt 
yuv411p -target dv output.mxf -map_audio_channel 1:0:0:0:1:0 
-map_audio_channel 2:0:0:0:1:1

generates something marked as DVCPRO, but with 4:2:0 subsampling.

DVCPro50

ffmpeg -i input.y4m -i left.flac -i right.flac -s 720x576 -r 25 -pix_fmt 
yuv422p output.dv

generates the same error as before.

ffmpeg -i input.y4m -i left.flac -i right.flac -s 720x576 -r 25 -pix_fmt 
yuv422p -target dv50 output.dv

generates DVCPro50 output, with two stereo streams in the output file.

ffmpeg -i input.y4m -i left.flac -i right.flac -s 720x576 -r 25 -pix_fmt 
yuv422p -target dv50 output.mxf

also generates the expected output.




More information about the ffmpeg-user mailing list