#5155 closed defect (fixed)
mxf muxer ignores -aspect
Reported by: | danousea | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | mxf aspect |
Cc: | daniel@shimshoni.com | Blocked By: | |
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Summary of the bug:
When mixing into MXF, the -aspect option does not translate into the final result.
The tool shows "DAR 16:9", but the resulting file shows 4:3
How to reproduce:
ffmpeg -framerate 23.973 -i 2007_04_22-17_48_50_2000%1d.jp2 -c:v copy -aspect 16:9 -loglevel verbose test.mxf ffmpeg version N-77693-gc5b3c4c-tessus Copyright (c) 2000-2015 the FFmpeg developers built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --as=yasm --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-version3 --disable-ffplay --disable-indev=qtkit --disable-indev=x11grab_xcb libavutil 55. 11.100 / 55. 11.100 libavcodec 57. 20.100 / 57. 20.100 libavformat 57. 20.100 / 57. 20.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 22.100 / 6. 22.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 [jpeg2000 @ 0x7fe15900be00] Progression order RPCL Last message repeated 3 times Input #0, image2, from '2007_04_22-17_48_50_2000%1d.jp2': Duration: 00:00:00.13, start: 0.000000, bitrate: N/A Stream #0:0: Video: jpeg2000 (JPEG 2000 codestream restriction 0), 1 reference frame, rgb24, 1440x1080 (0x0), 23.98 fps, 23.97 tbr, 23.97 tbn, 23.97 tbc Overriding aspect ratio with stream copy may produce invalid files [mxf @ 0x7fe159801400] 1000/23973 input time base matched 1001/24000 container time base Output #0, mxf, to 'test.mxf': Metadata: encoder : Lavf57.20.100 Stream #0:0: Video: jpeg2000, 1 reference frame, rgb24, 1440x1080 (0x0) [SAR 4:3 DAR 16:9], q=2-31, 23.98 fps, 23.97 tbr, 23.98 tbn, 23.97 tbc Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help No more output streams to write to, finishing. frame= 3 fps=0.0 q=-1.0 Lsize= 406kB time=00:00:00.12 bitrate=26551.9kbits/s speed= 157x video:397kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.135734% Input file #0 (2007_04_22-17_48_50_2000%1d.jp2): Input stream #0:0 (video): 3 packets read (406605 bytes); Total: 3 packets (406605 bytes) demuxed Output file #0 (test.mxf): Output stream #0:0 (video): 3 packets muxed (406605 bytes); Total: 3 packets (406605 bytes) muxed
RESULT:
Container Format : MXF Format version : 1.2 Format profile : OP-1a Format settings : Closed / Complete Duration : 125ms Overall bit rate : 26.6 Mbps Encoded date : 0-00-00 00:00:00.000 Writing application : FFmpeg OP1a Muxer 57.20.100 Video ID : 2 Format : JPEG 2000 Format settings, wrapping mode : Frame Codec ID : 0D010301020C0100-0401020203010100 Duration : 125ms Width : 1 440 pixels Height : 1 080 pixels Original height : 1 088 pixels Pixel aspect ratio : 1.000 Display aspect ratio : 4:3 Frame rate : 23.976 fps Frame count : 3 Color space : YUV Bit depth : 8 bits Scan type : Progressive Other #1 ID : 1-Material Type : Time code Format : MXF TC Time code of first frame : 00:00:00:00 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 : 00:00:00:00 Time code settings : Source Package Time code, striped : Yes Other #3 Type : Time code Format : SMPTE TC Muxing mode : SDTI Time code of first frame : 00:00:00:00
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
Change History (6)
comment:1 by , 9 years ago
Cc: | added |
---|---|
Component: | undetermined → ffmpeg |
Keywords: | jpeg2000 j2k added |
Summary: | MXF Muxer: -aspect option ignored by muxer → JPEG2000 -aspect option ignored by muxer |
Version: | unspecified → git-master |
comment:2 by , 9 years ago
Component: | ffmpeg → avformat |
---|---|
Keywords: | jpeg2000 j2k muxer removed |
Reproduced by developer: | set |
Status: | new → open |
Summary: | JPEG2000 -aspect option ignored by muxer → mxf muxer ignores -aspect |
comment:3 by , 8 years ago
comment:4 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Fixed by Paul in 14156e607d4941079a400c3969173518ebb6f6ed
comment:5 by , 6 years ago
Not really, for some codecs muxer for some reason hardcodes and overwrite aspect ratio.
Note:
See TracTickets
for help on using tickets.
i can confirm this, mxf muxing always seems to set aspect 4:3 , see test below where i convert a dvvideo stream to 16:9 and remux it to mxf, result is 4:3, tho it says original aspect 16:9 , this is really annoying for us as we need to rewrap / encode half petabyte video with 4:3 to 16:9 aspect, due faulty files any suggestion how to wrokaround is appreciated or any ETA on when this bug is fixed or are there any patches yet ?
Regards Tina
tina@violetina ~ $ ffprobe n29p274d0j.mxf
ffprobe version 3.2.2 Copyright (c) 2007-2016 the FFmpeg developers
Input #0, mxf, from 'n29p274d0j.mxf':
tina@violetina ~ $ ffmpeg -y -hide_banner -loglevel info -i n29p274d0j.mxf -an -c:v dvvideo -aspect 16:9 -flags +ildct+ilme n29p274d0j.dv
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 'n29p274d0j.mxf':
Output #0, dv, to 'n29p274d0j.dv':
Stream mapping:
Press [q] to stop, ? for help
frame= 3060 fps=350 q=-0.0 Lsize= 430312kB time=00:02:02.40 bitrate=28800.0kbits/s speed= 14x
video:430312kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
tina@violetina ~ $ ffprobe n29p274d0j.dv
ffprobe version 3.2.2 Copyright (c) 2007-2016 the FFmpeg developers
[dv @ 0x1ca25b0] Estimating duration from bitrate, this may be inaccurate
Input #0, dv, from 'n29p274d0j.dv':
tina@violetina ~ $ ffmpeg -y -hide_banner -loglevel info -i n29p274d0j.mxf -vn -c:a copy a01.wav a02.wav a03.wav a04.wavGuessed 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 'n29p274d0j.mxf':
Output #0, wav, to 'a01.wav':
Output #1, wav, to 'a02.wav':
Output #2, wav, to 'a03.wav':
Output #3, wav, to 'a04.wav':
Stream mapping:
Press [q] to stop, ? for help
size= 11475kB time=00:02:02.40 bitrate= 768.0kbits/s speed= 634x
video:0kB audio:45900kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
tina@violetina ~ $ ffmpeg -i n29p274d0j.dv -i a01.wav -i a02.wav -i a03.wav -i a04.wav -c copy muxed.mxf
ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
[dv @ 0x14c9ea0] Estimating duration from bitrate, this may be inaccurate
Input #0, dv, from 'n29p274d0j.dv':
Guessed Channel Layout for Input Stream #1.0 : mono
Input #1, wav, from 'a01.wav':
Guessed Channel Layout for Input Stream #2.0 : mono
Input #2, wav, from 'a02.wav':
Guessed Channel Layout for Input Stream #3.0 : mono
Input #3, wav, from 'a03.wav':
Guessed Channel Layout for Input Stream #4.0 : mono
Input #4, wav, from 'a04.wav':
File 'muxed.mxf' already exists. Overwrite ? [y/N] y
Output #0, mxf, to 'muxed.mxf':
Stream mapping:
Press [q] to stop, ? for help
frame= 3060 fps=0.0 q=-1.0 Lsize= 445236kB time=00:02:02.40 bitrate=29798.8kbits/s speed= 269x
video:430312kB audio:11475kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.780589%
tina@violetina ~ $ ffprobe muxed.mxf
ffprobe version 3.2.2 Copyright (c) 2007-2016 the FFmpeg developers
Input #0, mxf, from 'muxed.mxf':
tina@violetina ~ $ mediainfo muxed.mxf
General
Complete name : muxed.mxf
Format : MXF
Commercial name : DV
Format version : 1.2
Format profile : OP-1a
Format settings : Closed / Complete
File size : 435 MiB
Duration : 2 min 2 s
Overall bit rate : 29.8 Mb/s
Recorded date : 1970-01-01 00:00:00.000
Encoded date : 0-00-00 00:00:00.000
Writing application : FFmpeg OP1a Muxer 57.56.100
Video
ID : 2
Format : DV
Format settings, wrapping mode : Frame
Codec ID : 0D01030102024101-0401020202020200
Duration : 2 min 2 s
Bit rate mode : Constant
Bit rate : 24.4 Mb/s
Encoded bit rate : 28.8 Mb/s
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 4:3
Original display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 FPS
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Bottom Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 2.357
Time code of first frame : 10:00:00:00
Time code source : Subcode time code
Stream size : 357 MiB (82%)
Encoded stream size : 420 MiB (97%)
Audio
ID : 3
Format : PCM
Format settings, Endianness : Little
Format settings, wrapping mode : Frame (AES)
Codec ID : 0D01030102060300
Duration : 2 min 2 s
Bit rate mode : Constant
Bit rate : 768 kb/s
Channel(s) : 1 channel
Sampling rate : 48.0 kHz
Frame rate : 25.000 FPS (1920 spf)
Bit depth : 16 bits
Stream size : 11.2 MiB (3%)
Locked : Yes
Other #1
ID : 1-Material
Type : Time code
Format : MXF TC
Time code of first frame : 10:00:00:00
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 : 10:00:00:00
Time code settings : Source Package
Time code, striped : Yes
Other #3
Type : Time code
Format : SMPTE TC
Muxing mode : SDTI
Time code of first frame : 10:00:00:00
tina@violetina ~ $ ffmpeg -i n29p274d0j.dv -i a01.wav -i a02.wav -i a03.wav -i a04.wav -c copy -aspect 16:9 muxed.mxf
ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
[dv @ 0x9b3ee0] Estimating duration from bitrate, this may be inaccurate
Input #0, dv, from 'n29p274d0j.dv':
Guessed Channel Layout for Input Stream #1.0 : mono
Input #1, wav, from 'a01.wav':
Guessed Channel Layout for Input Stream #2.0 : mono
Input #2, wav, from 'a02.wav':
Guessed Channel Layout for Input Stream #3.0 : mono
Input #3, wav, from 'a03.wav':
Guessed Channel Layout for Input Stream #4.0 : mono
Input #4, wav, from 'a04.wav':
File 'muxed.mxf' already exists. Overwrite ? [y/N] y
Overriding aspect ratio with stream copy may produce invalid files
Output #0, mxf, to 'muxed.mxf':
Stream mapping:
Press [q] to stop, ? for help
frame= 3060 fps=0.0 q=-1.0 Lsize= 445236kB time=00:02:02.40 bitrate=29798.8kbits/s speed= 285x
video:430312kB audio:11475kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.780589%
tina@violetina ~ $ mediainfo muxed.mxf
General
Complete name : muxed.mxf
Format : MXF
Commercial name : DV
Format version : 1.2
Format profile : OP-1a
Format settings : Closed / Complete
File size : 435 MiB
Duration : 2 min 2 s
Overall bit rate : 29.8 Mb/s
Recorded date : 1970-01-01 00:00:00.000
Encoded date : 0-00-00 00:00:00.000
Writing application : FFmpeg OP1a Muxer 57.56.100
Video
ID : 2
Format : DV
Format settings, wrapping mode : Frame
Codec ID : 0D01030102024101-0401020202020200
Duration : 2 min 2 s
Bit rate mode : Constant
Bit rate : 24.4 Mb/s
Encoded bit rate : 28.8 Mb/s
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 4:3
Original display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 FPS
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Bottom Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 2.357
Time code of first frame : 10:00:00:00
Time code source : Subcode time code
Stream size : 357 MiB (82%)
Encoded stream size : 420 MiB (97%)
Audio
ID : 3
Format : PCM
Format settings, Endianness : Little
Format settings, wrapping mode : Frame (AES)
Codec ID : 0D01030102060300
Duration : 2 min 2 s
Bit rate mode : Constant
Bit rate : 768 kb/s
Channel(s) : 1 channel
Sampling rate : 48.0 kHz
Frame rate : 25.000 FPS (1920 spf)
Bit depth : 16 bits
Stream size : 11.2 MiB (3%)
Locked : Yes
Other #1
ID : 1-Material
Type : Time code
Format : MXF TC
Time code of first frame : 10:00:00:00
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 : 10:00:00:00
Time code settings : Source Package
Time code, striped : Yes
Other #3
Type : Time code
Format : SMPTE TC
Muxing mode : SDTI
Time code of first frame : 10:00:00:00
tina@violetina ~ $ ffprobe muxed.mxf
ffprobe version 3.2.2 Copyright (c) 2007-2016 the FFmpeg developers
Input #0, mxf, from 'muxed.mxf':