[FFmpeg-user] MP4 from MXP - Material Package Only
DeBacker, Bart
Bart.Debacker at turner.com
Mon Feb 18 00:26:51 EET 2019
On 2/17/19, 3:19 PM, "ffmpeg-user on behalf of Carl Eugen Hoyos" <ffmpeg-user-bounces at ffmpeg.org on behalf of ceffmpeg at gmail.com> wrote:
2019-02-17 20:22 GMT+01:00, DeBacker, Bart <Bart.Debacker at turner.com>:
> We are currently using ffmpeg to extract a lower resolution MP4 file
> from our MXF OP1A standard hi-res files. This is the command:
>
> ffmpeg -i hires.mxf -s 960x540 -preset veryfast -framerate 29.97
> -f mp4 lowres.mp4
Complete, uncut console output missing.
It is probably a good idea not to specify an output format "mp4" if the
suffix of your output file is "mp4" (which implies the default output
format "mp4"), specifying it makes debugging more difficult.
Is "-framerate 29.97" supposed to have an effect?
The reason I ask is that there is no output option "framerate" and
that - most likely - the correct framerate is 30000/1001, not 29.97.
The name of the option to force an output frame rate is "r".
(I cannot know if you want your output to have the same frame
rate as the input - in which case you should not specify an output
frame rate - or if you need constant frame rate. To make this more
complicated, FFmpeg's mp4 output only supports constant frame
rate, so it may make sense to specify "-r 30000/1001" in any case.)
Thanks for looking into this. We just want to match the frame rate of the input, so I have removed that flag as well as the output format flag. Here is the new command and output:
ffmpeg -i hires.mxf -s 960x540 lores.mp4
ffmpeg version 4.0.1 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libopenh264 --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
[mxf @ 0x7f8d6b800000] invalid KAGSize 0 - guessing 1
[mxf @ 0x7f8d6b800000] invalid KAGSize 0 - guessing 1
[mxf @ 0x7f8d6b800000] invalid KAGSize 0 - guessing 1
[mxf @ 0x7f8d6b800000] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for Input Stream #0.1 : mono
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Guessed Channel Layout for Input Stream #0.4 : mono
Input #0, mxf, from 'hires.mxf':
Metadata:
application_platform: Omneon Media Api (mqx)
uid : e4367ad7-e332-e911-aa0c-00d0280b03c6
generation_uid : 98377ad7-e332-e911-8165-00d0280b03c6
company_name : Omneon Inc.
product_name : Omneon Media Subsystem
modification_date: 2019-02-17T18:42:56.000000Z
product_version : 6.4.1.0.release
product_uid : 00000000-0000-0010-8000-050e0b010602
material_package_umid: 0x060A2B340101010501010D2313009497526E7AD7E332E911BFE500D0280B03C6
timecode : 13:42:58;09
Duration: 00:01:55.68, start: 0.000000, bitrate: 38069 kb/s
Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, top first), 1440x1080 [SAR 4:3 DAR 16:9], Closed Captions, 35000 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 59.94 tbc
Metadata:
file_package_umid: 0x060A2B340101010501010D231300AF26507A7AD7E332E911AF0900D0280B03C6
Stream #0:1: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
Metadata:
file_package_umid: 0x060A2B340101010501010D231300AF26507A7AD7E332E911AF0900D0280B03C6
Stream #0:2: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
Metadata:
file_package_umid: 0x060A2B340101010501010D231300AF26507A7AD7E332E911AF0900D0280B03C6
Stream #0:3: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
Metadata:
file_package_umid: 0x060A2B340101010501010D231300AF26507A7AD7E332E911AF0900D0280B03C6
Stream #0:4: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
Metadata:
file_package_umid: 0x060A2B340101010501010D231300AF26507A7AD7E332E911AF0900D0280B03C6
Stream #0:5: Data: none
Metadata:
file_package_umid: 0x060A2B340101010501010D231300AF26507A7AD7E332E911AF0900D0280B03C6
data_type : vbi_vanc_smpte_436M
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x7f8d6b801800] using SAR=1/1
[libx264 @ 0x7f8d6b801800] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7f8d6b801800] profile High, level 3.1
[libx264 @ 0x7f8d6b801800] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'lores.mp4':
Metadata:
application_platform: Omneon Media Api (mqx)
uid : e4367ad7-e332-e911-aa0c-00d0280b03c6
generation_uid : 98377ad7-e332-e911-8165-00d0280b03c6
company_name : Omneon Inc.
product_name : Omneon Media Subsystem
modification_date: 2019-02-17T18:42:56.000000Z
product_version : 6.4.1.0.release
product_uid : 00000000-0000-0010-8000-050e0b010602
material_package_umid: 0x060A2B340101010501010D2313009497526E7AD7E332E911BFE500D0280B03C6
timecode : 13:42:58;09
encoder : Lavf58.12.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 960x540 [SAR 1:1 DAR 16:9], q=-1--1, 0.03 fps, 30k tbn, 29.97 tbc
Metadata:
file_package_umid: 0x060A2B340101010501010D231300AF26507A7AD7E332E911AF0900D0280B03C6
encoder : Lavc58.18.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 69 kb/s
Metadata:
file_package_umid: 0x060A2B340101010501010D231300AF26507A7AD7E332E911AF0900D0280B03C6
encoder : Lavc58.18.100 aac
frame= 3345 fps=162 q=-1.0 Lsize= 9849kB time=00:01:51.61 bitrate= 722.9kbits/s speed= 5.4x
video:8781kB audio:946kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.258519%
[libx264 @ 0x7f8d6b801800] frame I:14 Avg QP:20.98 size: 42749
[libx264 @ 0x7f8d6b801800] frame P:1003 Avg QP:23.27 size: 5854
[libx264 @ 0x7f8d6b801800] frame B:2328 Avg QP:27.07 size: 1083
[libx264 @ 0x7f8d6b801800] consecutive B-frames: 0.8% 9.3% 29.8% 60.1%
[libx264 @ 0x7f8d6b801800] mb I I16..4: 16.8% 54.3% 28.9%
[libx264 @ 0x7f8d6b801800] mb P I16..4: 0.6% 2.0% 0.5% P16..4: 26.8% 10.5% 5.5% 0.0% 0.0% skip:54.1%
[libx264 @ 0x7f8d6b801800] mb B I16..4: 0.0% 0.1% 0.0% B16..8: 21.6% 2.9% 0.2% direct: 0.4% skip:74.7% L0:37.4% L1:58.0% BI: 4.6%
[libx264 @ 0x7f8d6b801800] 8x8 transform intra:61.5% inter:73.2%
[libx264 @ 0x7f8d6b801800] coded y,uvDC,uvAC intra: 61.0% 71.4% 29.6% inter: 5.2% 7.8% 0.1%
[libx264 @ 0x7f8d6b801800] i16 v,h,dc,p: 30% 31% 3% 36%
[libx264 @ 0x7f8d6b801800] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 17% 15% 6% 8% 8% 8% 8% 8%
[libx264 @ 0x7f8d6b801800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 28% 9% 4% 8% 8% 7% 5% 5%
[libx264 @ 0x7f8d6b801800] i8c dc,h,v,p: 46% 26% 21% 7%
[libx264 @ 0x7f8d6b801800] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7f8d6b801800] ref P L0: 64.1% 13.6% 14.9% 7.4%
[libx264 @ 0x7f8d6b801800] ref B L0: 86.8% 11.1% 2.1%
[libx264 @ 0x7f8d6b801800] ref B L1: 96.3% 3.7%
[libx264 @ 0x7f8d6b801800] kb/s:644.43
[aac @ 0x7f8d6b803400] Qavg: 118.104
Also, here is the output from MediaInfo which shows the different timecodes in the last 3 streams. It looks like this example actually has the same for Source and Material Package, but a different one for the last stream.
General
Complete name : /Users/bdebacker/xproxy/temp/testMp4/hires.mxf
Format : MXF
Commercial name : XDCAM HD 35
Format version : 1.2
Format profile : OP-1a
Format settings : Open / Incomplete
File size : 525 MiB
Duration : 1mn 51s
Overall bit rate : 39.5 Mbps
Encoded date : 2019-02-17 18:42:56.556
Writing application : Omneon Inc. Omneon Media Subsystem 6.4.1.0.1
Writing library : Omneon Media Api (mqx)
Video
ID : 2
Format : MPEG Video
Commercial name : XDCAM HD 35
Format version : Version 2
Format profile : Main at High
Format settings, BVOP : Yes
Format settings, Matrix : Custom
Format settings, GOP : M=3, N=15
Format settings, picture structure : Frame
Format settings, wrapping mode : Frame
Codec ID : 0D01030102046101-0401020201030300
Duration : 1mn 51s
Bit rate mode : Constant
Bit rate : 35.0 Mbps
Width : 1 440 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Active Format Description : Letterbox 16:9 image
Frame rate : 29.970 (30000/1001) fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.751
Time code of first frame : 13:42:58;06
Time code source : Group of pictures header
GOP, Open/Closed : Closed
Stream size : 466 MiB (89%)
Transfer characteristics : BT.709
< Snipped out Audio and Caption Streams >
Text #1
ID : 2-CC1
Format : EIA-608
Muxing mode : A/53 / DTVCC Transport
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
CaptionServiceName : CC1
Text #2
ID : 2-CC3
Format : EIA-608
Muxing mode : A/53 / DTVCC Transport
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
CaptionServiceName : CC3
Text #3
ID : 2-1
Format : EIA-708
Muxing mode : A/53 / DTVCC Transport
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
Text #4
ID : 2-3
Format : EIA-708
Muxing mode : A/53 / DTVCC Transport
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
Text #5
ID : 2-4
Format : EIA-708
Muxing mode : A/53 / DTVCC Transport
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
Text #6
ID : 2-5
Format : EIA-708
Muxing mode : A/53 / DTVCC Transport
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
Text #7
ID : 2-6
Format : EIA-708
Muxing mode : A/53 / DTVCC Transport
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
Text #8
ID : 7-CC1
Format : EIA-608
Muxing mode : Ancillary data / CDP
Duration : 1mn 51s
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
CaptionServiceName : CC1
Text #9
ID : 7-CC3
Format : EIA-608
Muxing mode : Ancillary data / CDP
Duration : 1mn 51s
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
CaptionServiceName : CC3
Text #10
ID : 7-1
Format : EIA-708
Muxing mode : Ancillary data / CDP
Duration : 1mn 51s
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
Text #11
ID : 7-3
Format : EIA-708
Muxing mode : Ancillary data / CDP
Duration : 1mn 51s
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
Text #12
ID : 7-4
Format : EIA-708
Muxing mode : Ancillary data / CDP
Duration : 1mn 51s
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
Text #13
ID : 7-5
Format : EIA-708
Muxing mode : Ancillary data / CDP
Duration : 1mn 51s
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
Text #14
ID : 7-6
Format : EIA-708
Muxing mode : Ancillary data / CDP
Duration : 1mn 51s
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
Other #1
ID : 1-Material
Type : Time code
Format : MXF TC
Time code of first frame : 13:42:58;09
Time code settings : Material Package
Time code, striped : Yes
Other #2
ID : 1-Source
Type : Time code
Format : MXF TC
Time code of first frame : 13:42:58;09
Time code settings : Source Package
Time code, striped : Yes
Other #3
Type : Time code
Format : SMPTE TC
Muxing mode : System scheme 1
Time code of first frame : 13:42:58;06
More information about the ffmpeg-user
mailing list