[FFmpeg-user] DVCPro50 MXF
adam smith
adamsmith79 at icloud.com
Fri Feb 24 02:09:30 EET 2023
Hi people, hope you are all good.
I am using ffmpeg 5.1.2
I am trying to make a DVCPro50 in a MXF wrapper but I am getting some odd results.
If I start by trying to make it a DV wrapper it’s still giving me some problems.
For example, I choose -target pal-dv50 and it looks like it’s encoding at the desired bitrate of 50mbps.
ffmpeg -I source.mxf -target pal-dv50 -aspect 16:9 output.dv
frame= 1375 fps=151 q=-0.0 size= 385280kB time=00:00:55.16 bitrate=57219.2kbits/s speed=6.07x
But when I check the file using media info or ffprobe it shows as 25mbps.
Input #0, dv, from '/data/disposable/output.dv':
Metadata:
timecode : 00:00:00:00
Duration: 00:01:34.72, start: 0.000000, bitrate: 57600 kb/s
Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 64:45 DAR 16:9], 25000 kb/s, 25 fps, 25 tbr, 25 tbn
Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
The filesize is significantly larger however than if I encoded using -target pal-dv (25mbps), so maybe its possible it is encoding at 50mbps?
The other metadata looks good..eg DVCPRO, TFF, aspect ratio, pixel aspect ratio.
@type": "Video",
"Format": "DV",
"Format_Commercial_IfAny": "DVCPRO",
"Duration": "189.440",
"BitRate_Mode": "CBR",
"BitRate": "24441600",
"Width": "720",
"Height": "576",
"PixelAspectRatio": "1.422",
"DisplayAspectRatio": "1.778",
"FrameRate_Mode": "CFR",
"FrameRate": "25.000",
"FrameCount": "4736",
"Standard": "PAL",
"ColorSpace": "YUV",
"BitDepth": "8",
"ScanType": "Interlaced",
"ScanOrder": "TFF",
"Compression_Mode": "Lossy",
"Delay": "0.000",
"TimeCode_FirstFrame": "00:00:00:00",
"TimeCode_Source": "Subcode time code",
"StreamSize": "578777088"
If however I try and use a mxf wrapper..
ffmpeg -I source.mxf -target pal-dv50 -aspect 16:9 output.mxf
The metadata has this additional extra tag in the general that complains about invalid extension dv dif. Plus in the video metadata it shows as BFF instead of TFF.
"@type": "General",
"VideoCount": "1",
"AudioCount": "2",
"FileExtension": "mxf",
"Format": "DV",
"Format_Commercial_IfAny": "DVCPRO",
"FileSize": "681984000",
"Duration": "189.440",
"OverallBitRate_Mode": "CBR",
"OverallBitRate": "28800000",
"FrameRate": "25.000",
"FrameCount": "4736",
"StreamSize": "30461952",
"Recorded_Date": "1970-01-01 00:00:00.000",
"File_Modified_Date": "UTC 2023-02-23 23:57:36",
"File_Modified_Date_Local": "2023-02-23 23:57:36",
"extra": {
"FileExtension_Invalid": "dv dif"
@type": "Video",
"Format": "DV",
"Format_Commercial_IfAny": "DVCPRO",
"Duration": "189.440",
"BitRate_Mode": "CBR",
"BitRate": "24441600",
"Width": "720",
"Height": "576",
"PixelAspectRatio": "1.422",
"DisplayAspectRatio": "1.778",
"FrameRate_Mode": "CFR",
"FrameRate": "25.000",
"FrameCount": "4736",
"Standard": "PAL",
"ColorSpace": "YUV",
"BitDepth": "8",
"ScanType": "Interlaced",
"ScanOrder": "BFF",
"Compression_Mode": "Lossy",
"Delay": "0.000",
"TimeCode_FirstFrame": "00:00:00:00",
"TimeCode_Source": "Subcode time code",
"StreamSize": “578777088"
If I add -f mxf to the command..
ffmpeg -I source.mxf -target pal-dv50 -aspect 16:9 output.mxf
The metadata shows it as MPEG Video..
@type": "General",
"VideoCount": "1",
"AudioCount": "1",
"OtherCount": "3",
"FileExtension": "mxf",
"Format": "MXF",
"Format_Version": "1.3",
"Format_Profile": "OP-1a",
"Format_Settings": "Closed / Complete",
"FileSize": "28652710",
"Duration": "94.720",
"OverallBitRate_Mode": "VBR",
"OverallBitRate": "2419992",
"FrameRate": "25.000",
"FrameCount": "2368",
"StreamSize": "8098470",
"FooterSize": "2214",
"Encoded_Date": "0-00-00 00:00:00.000",
"File_Modified_Date": "UTC 2023-02-24 00:01:25",
"File_Modified_Date_Local": "2023-02-24 00:01:25",
"Encoded_Application_CompanyName": "FFmpeg",
"Encoded_Application_Name": "OP1a Muxer",
"Encoded_Application_Version": "59.27.100.0.0",
"Encoded_Library_Name": "Lavf (linux)",
"Encoded_Library_Version": "59.27.100.0.0"
},
{
"@type": "Video",
"StreamOrder": "0",
"ID": "2",
"Format": "MPEG Video",
"Format_Version": "2",
"Format_Profile": "4:2:2",
"Format_Level": "Main",
"Format_Settings_BVOP": "No",
"Format_Settings_Matrix": "Default",
"Format_Settings_GOP": "N=12",
"Format_Settings_Wrapping": "Frame",
"CodecID": "0D01030102046001-0401020201020300",
"Duration": "94.720",
"BitRate_Mode": "VBR",
"BitRate": "200000",
"Width": "720",
"Height": "576",
"Sampled_Width": "720",
"Sampled_Height": "576",
"PixelAspectRatio": "1.422",
"DisplayAspectRatio": "1.778",
"FrameRate": "25.000",
"FrameCount": "2368",
"Standard": "PAL",
"ColorSpace": "YUV",
"ChromaSubsampling": "4:2:2",
"BitDepth": "8",
"ScanType": "Progressive",
"Compression_Mode": "Lossy",
"Delay": "0.000",
"Delay_Original": "0.000",
"TimeCode_FirstFrame": "00:00:00:00",
"TimeCode_Source": "Group of pictures header",
"Gop_OpenClosed": "Open",
"Gop_OpenClosed_FirstFrame": "Closed",
"StreamSize": "2368000",
"BufferSize": "6144",
"colour_description_present": "Yes",
"colour_description_present_Source": "Stream",
"colour_range": "Limited",
"colour_range_Source": "Container",
"colour_primaries_Source": "Stream",
"transfer_characteristics": "BT.601",
"transfer_characteristics_Source": "Container",
"transfer_characteristics_Original": "BT.470 System M",
"transfer_characteristics_Original_Source": "Stream",
"matrix_coefficients_Source": "Stream",
"extra": {
"Delay_SDTI": "0",
"intra_dc_precision": "8"
}
If I add specific values to the command..
ffmpeg -i /data/disposable/ERT_reference_file_DVCPRO.mxf -target pal-dv50 -pix_fmt yuv422p -c:v dvvideo -s 720x576 -aspect 16:9 -color_primaries bt709 -color_trc bt709 -colorspace bt709 -b:v 50000000 -maxrate 50000000 -minrate 50000000 -c:a pcm_s16le -filter:v "fieldorder=tff" -f mxf /data/disposable/output.mxf
The metadata shows it as DV Video and the interlacing is shown as."ScanType": "Interlaced”, "ScanOrder": "BFF”, "ScanOrder_Original": "TFF",
{
"@type": "General",
"VideoCount": "1",
"AudioCount": "1",
"OtherCount": "3",
"FileExtension": "mxf",
"Format": "MXF",
"Format_Commercial_IfAny": "DV",
"Format_Version": "1.3",
"Format_Profile": "OP-1a",
"Format_Settings": "Closed / Complete",
"FileSize": "703208493",
"Duration": "94.720",
"OverallBitRate": "59392609",
"FrameRate": "25.000",
"FrameCount": "2368",
"StreamSize": "344030253",
"FooterSize": "557",
"Encoded_Date": "0-00-00 00:00:00.000",
"File_Modified_Date": "UTC 2023-02-24 00:03:47",
"File_Modified_Date_Local": "2023-02-24 00:03:47",
"Encoded_Application_CompanyName": "FFmpeg",
"Encoded_Application_Name": "OP1a Muxer",
"Encoded_Application_Version": "59.27.100.0.0",
"Encoded_Library_Name": "Lavf (linux)",
"Encoded_Library_Version": "59.27.100.0.0"
},
{
"@type": "Video",
"StreamOrder": "0",
"ID": "2",
"Format": "DV",
"Format_Settings_Wrapping": "Frame",
"CodecID": "0D01030102025101-0401020202020400",
"Duration": "94.720",
"BitRate_Mode": "CBR",
"BitRate": "24441600",
"BitRate_Encoded": "28800000",
"Width": "720",
"Height": "576",
"PixelAspectRatio": "1.422",
"DisplayAspectRatio": "1.778",
"FrameRate_Mode": "CFR",
"FrameRate": "25.000",
"FrameCount": "2368",
"Standard": "PAL",
"ColorSpace": "YUV",
"ChromaSubsampling": "4:2:2",
"BitDepth": "8",
"ScanType": "Interlaced",
"ScanOrder": "BFF",
"ScanOrder_Original": "TFF",
"Compression_Mode": "Lossy",
"Delay": "0.000",
"StreamSize": "289388544",
"StreamSize_Encoded": "340992000",
"colour_range": "Limited",
"colour_range_Source": "Container",
"colour_primaries": "BT.709",
"colour_primaries_Source": "Container",
"transfer_characteristics": "BT.709",
"transfer_characteristics_Source": "Container",
"matrix_coefficients": "BT.709",
"matrix_coefficients_Source": "Container",
"extra": {
"Delay_SDTI": "0"
}
It would be very much appreciated if someone could help me create a DVCPro50.mxf at 50mbps, shown as DVCPro, Interlaced TFF wrapper in an MXF.
Thank you in advance for any suggestions.
Adam
More information about the ffmpeg-user
mailing list