[FFmpeg-trac] #7468(avformat:new): AVC muxing issue in a MOV container
FFmpeg
trac at avcodec.org
Wed Oct 3 14:49:50 EEST 2018
#7468: AVC muxing issue in a MOV container
-------------------------------------+-------------------------------------
Reporter: | Type: defect
alex.buisson | Priority: normal
Status: new | Version:
Component: avformat | unspecified
Keywords: x264 AVC | Blocked By:
MOV muxer | Reproduced by developer: 0
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Hi,
we found that a transcoding command line may result an invalid output file
just by changing the output file extension from MP4 to MOV.
Using
{{{
ffmpeg version N-92087-gdcbd89e000 Copyright (c) 2000-2018 the FFmpeg
developers
built with gcc 8.2.1 (GCC) 20180813
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-
libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-
amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora
--enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg
--enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-
libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex
--enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-
ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec
--enable-dxva2 --enable-avisynth
libavutil 56. 19.101 / 56. 19.101
libavcodec 58. 31.102 / 58. 31.102
libavformat 58. 18.104 / 58. 18.104
libavdevice 58. 4.105 / 58. 4.105
libavfilter 7. 33.100 / 7. 33.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
}}}
We run 2 transcoding, the input file is a proprietary content I cannot
share it, but please find it's spec below, the same transcoding to MOV
work well with others files but only that intputfile leads to a "High
4:2:2 at L3.1 10bits 422" output AVC stream.
Input file spec:
{{{
1
Format : ProRes
Format version : Version 0
Format profile : 422 Proxy
Codec ID : apco
Duration : 1 s 0 ms
Bit rate mode : Variable
Bit rate : 37.3 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:2
Scan type : Interlaced
Scan type, store method : Interleaved fields
Scan order : Top Field First
}}}
the command we use to create those weird MOV file is:
{{{
ffmpeg -i inputfile -t 5 -vf yadif -an -c:v libx264 -vsync 1 -r 30 -s
1280x720 -b:v 600k -g 60 -keyint_min 60 -preset ultrafast -tune
zerolatency -y out.mov
}}}
and for the MP4
{{{
ffmpeg -i inputfile -t 5 -vf yadif -an -c:v libx264 -vsync 1 -r 30 -s
1280x720 -b:v 600k -g 60 -keyint_min 60 -preset ultrafast -tune
zerolatency -y out.mp4
}}}
just the output file extension changed, I also compared the 2 command line
logs and they are the same
{{{
[libx264 @ 064e4c80] using SAR=1/1
[libx264 @ 064e4c80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
AVX FMA3 BMI2 AVX2
[libx264 @ 064e4c80] profile High 4:2:2, level 3.1, 4:2:2, 10-bit
[libx264 @ 064e4c80] 264 - core 157 r2932 303c484 - H.264/MPEG-4 AVC codec
- Copyleft 2003-2018 - http://www.videolan.org/x264.html - options:
cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1
psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=8
lookahead_threads=8 sliced_threads=1 slices=8 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=60
keyint_min=31 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=600
ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=81 qpstep=4 ip_ratio=1.40 aq=0
}}}
So why the output files are so different, the MOV output file report to be
encoded using "AVC High 422 Intra profile" where it should be "High
4:2:2 at L3.1" ! ffplay cannot play the output MOV file ! The MP4 is exactly
what we expected and play well.
{{{
ffmpeg -i out.mov
....
Duration: 00:00:05.00, start: 0.000000, bitrate: 621 kb/s
Stream #0:0(eng): Video: h264 (High 4:2:2 Intra) (ai1p / 0x70316961),
yuv422p10le(pc, bt709), 1280x720 [SAR 1:1 DAR 16:9], 618 kb/s, 30 fps, 30
tbr, 15360 tbn, 100 tbc (default)
....
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7468>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list