Opened 5 years ago

Closed 4 years ago

#2073 closed defect (needs_more_info)

m4v with h264 container problem, but with mp4 is working fine

Reported by: nikov Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: mov
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
Hello, I need to use m4v container.
When I try to convert video with h264 encoding and mp4 container it is fine. The converted video is playing, but when I try to switch to m4v the output file is unplayable. I tried to play the video by using VLC and QuickTime?.

ffmpeg.exe -i pb.avi -an -vcodec libx264 -preset fast -profile:v baseline -f mp4 pbtest.mp4

ffmpeg.exe -i pb.avi -an -vcodec libx264 -preset fast -profile:v baseline -f m4v pbtest.m4v

How to reproduce:

C:\ffmpeg>ffmpeg.exe -i pb.avi -an -vcodec libx264 -preset fast -profile:v baseline -f mp4 pbtest.mp4
ffmpeg version N-48218-ga2349dc Copyright (c) 2000-2012 the FFmpeg developers
  built on Dec 26 2012 16:59:00 with gcc 4.7.2 (GCC)
  configuration: --enable-static --arch=x86_64 --target-os=mingw32 --cross-prefi
x=/ffmpeg_build/build/mgw/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --pkg-config=
pkg-config --enable-gpl --disable-ffplay --disable-ffprobe --enable-libx264 --en
able-avisynth --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable
-libspeex --enable-libfreetype --enable-fontconfig --enable-libass --disable-w32
threads --enable-filter=subtitles --extra-cflags=-DPTW32_STATIC_LIB --enable-lib
vpx --enable-runtime-cpudetect
  libavutil      52. 12.100 / 52. 12.100
  libavcodec     54. 81.100 / 54. 81.100
  libavformat    54. 50.102 / 54. 50.102
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 30.101 /  3. 30.101
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mpeg4 @ 00000000035413e0] Invalid and inefficient vfw-avi packed B frames detec
ted
Input #0, avi, from 'pb.avi':
  Metadata:
    encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
  Duration: 00:39:45.53, start: 0.000000, bitrate: 1225 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv
420p, 640x352 [SAR 1:1 DAR 20:11], 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 32 kb
/s
File 'pbtest.mp4' already exists. Overwrite ? [y/N] y
using SAR=1/1
[libx264 @ 000000000037e480] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShu
ffle SSE4.2 AVX
[libx264 @ 000000000037e480] profile Constrained Baseline, level 3.0
[libx264 @ 000000000037e480] 264 - core 129 r2230 1cffe9f - H.264/MPEG-4 AVC cod
ec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=0 r
ef=2 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed
_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pski
p=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 dec
imate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 key
int=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 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 'pbtest.mp4':
  Metadata:
    encoder         : Lavf54.50.102
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 640x352 [SAR 1:1
 DAR 20:11], q=-1--1, 12800 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 -> libx264)
Press [q] to stop, [?] for help
[mpeg4 @ 00000000078ac6e0] Invalid and inefficient vfw-avi packed B frames detec
ted
frame=  159 fps=0.0 q=28.0 size=     233kB time=00:00:04.64 bitrate= 411.6kbits/
frame=  320 fps=311 q=28.0 size=     573kB time=00:00:11.08 bitrate= 423.8kbits/
frame=  463 fps=300 q=28.0 size=     942kB time=00:00:16.80 bitrate= 459.3kbits/
frame=  605 fps=294 q=28.0 size=    1319kB time=00:00:22.48 bitrate= 480.5kbits/
frame=  767 fps=298 q=28.0 size=    1703kB time=00:00:28.96 bitrate= 481.6kbits/
frame=  778 fps=283 q=511.0 Lsize=    1816kB time=00:00:31.12 bitrate= 478.0kbit
s/s dup=1 drop=0
video:1812kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.214753%
[libx264 @ 000000000037e480] frame I:36    Avg QP:19.30  size: 11453
[libx264 @ 000000000037e480] frame P:742   Avg QP:22.46  size:  1944
[libx264 @ 000000000037e480] mb I  I16..4: 51.1%  0.0% 48.9%
[libx264 @ 000000000037e480] mb P  I16..4:  4.5%  0.0%  1.9%  P16..4: 32.5%  7.0
%  2.0%  0.0%  0.0%    skip:52.1%
[libx264 @ 000000000037e480] coded y,uvDC,uvAC intra: 35.7% 57.3% 13.5% inter: 7
.2% 14.4% 0.1%
[libx264 @ 000000000037e480] i16 v,h,dc,p: 58% 19% 13% 11%
[libx264 @ 000000000037e480] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 22% 19%  5%  6%
 5%  5%  5%  4%
[libx264 @ 000000000037e480] i8c dc,h,v,p: 52% 20% 25%  4%
[libx264 @ 000000000037e480] ref P L0: 75.2% 24.8%
[libx264 @ 000000000037e480] kb/s:476.85
Received signal 2: terminating.

C:\ffmpeg>
C:\ffmpeg>
C:\ffmpeg>
C:\ffmpeg>
C:\ffmpeg>
C:\ffmpeg>ffmpeg.exe -i pb.avi -an -vcodec libx264 -preset fast -profile:v baseline -f m4v pbtest.m4v
ffmpeg version N-48218-ga2349dc Copyright (c) 2000-2012 the FFmpeg developers
  built on Dec 26 2012 16:59:00 with gcc 4.7.2 (GCC)
  configuration: --enable-static --arch=x86_64 --target-os=mingw32 --cross-prefi
x=/ffmpeg_build/build/mgw/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --pkg-config=
pkg-config --enable-gpl --disable-ffplay --disable-ffprobe --enable-libx264 --en
able-avisynth --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable
-libspeex --enable-libfreetype --enable-fontconfig --enable-libass --disable-w32
threads --enable-filter=subtitles --extra-cflags=-DPTW32_STATIC_LIB --enable-lib
vpx --enable-runtime-cpudetect
  libavutil      52. 12.100 / 52. 12.100
  libavcodec     54. 81.100 / 54. 81.100
  libavformat    54. 50.102 / 54. 50.102
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 30.101 /  3. 30.101
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mpeg4 @ 00000000035a13e0] Invalid and inefficient vfw-avi packed B frames detec
ted
Input #0, avi, from 'pb.avi':
  Metadata:
    encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
  Duration: 00:39:45.53, start: 0.000000, bitrate: 1225 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv
420p, 640x352 [SAR 1:1 DAR 20:11], 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 32 kb
/s
File 'pbtest.m4v' already exists. Overwrite ? [y/N] y
using SAR=1/1
[libx264 @ 0000000001b9e3c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShu
ffle SSE4.2 AVX
[libx264 @ 0000000001b9e3c0] profile Constrained Baseline, level 3.0
Output #0, m4v, to 'pbtest.m4v':
  Metadata:
    encoder         : Lavf54.50.102
    Stream #0:0: Video: h264, yuv420p, 640x352 [SAR 1:1 DAR 20:11], q=-1--1, 90k
 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 -> libx264)
Press [q] to stop, [?] for help
[mpeg4 @ 0000000007967c00] Invalid and inefficient vfw-avi packed B frames detec
ted
frame=  187 fps=0.0 q=28.0 size=     268kB time=00:00:05.76 bitrate= 381.4kbits/
frame=  333 fps=323 q=28.0 size=     616kB time=00:00:11.60 bitrate= 435.2kbits/
frame=  473 fps=306 q=28.0 size=     964kB time=00:00:17.20 bitrate= 459.1kbits/
frame=  617 fps=300 q=28.0 size=    1354kB time=00:00:22.96 bitrate= 483.2kbits/
frame=  772 fps=300 q=28.0 size=    1710kB time=00:00:29.16 bitrate= 480.3kbits/
frame=  903 fps=292 q=28.0 size=    2051kB time=00:00:34.40 bitrate= 488.4kbits/
frame=  979 fps=283 q=3599.0 Lsize=    2346kB time=00:00:39.16 bitrate= 490.7kbi
ts/s dup=1 drop=0
video:2346kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.000000%
[libx264 @ 0000000001b9e3c0] frame I:48    Avg QP:19.67  size: 10922
[libx264 @ 0000000001b9e3c0] frame P:931   Avg QP:22.76  size:  2017
[libx264 @ 0000000001b9e3c0] mb I  I16..4: 52.7%  0.0% 47.3%
[libx264 @ 0000000001b9e3c0] mb P  I16..4:  4.6%  0.0%  2.2%  P16..4: 33.3%  7.4
%  2.1%  0.0%  0.0%    skip:50.4%
[libx264 @ 0000000001b9e3c0] coded y,uvDC,uvAC intra: 37.1% 57.0% 12.9% inter: 7
.5% 14.3% 0.1%
[libx264 @ 0000000001b9e3c0] i16 v,h,dc,p: 58% 18% 13% 11%
[libx264 @ 0000000001b9e3c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 20% 19%  5%  5%
 5%  5%  5%  4%
[libx264 @ 0000000001b9e3c0] i8c dc,h,v,p: 51% 19% 27%  4%
[libx264 @ 0000000001b9e3c0] ref P L0: 75.1% 24.9%
[libx264 @ 0000000001b9e3c0] kb/s:490.69
Received signal 2: terminating.

C:\ffmpeg>

Change History (2)

comment:1 Changed 5 years ago by cehoyos

  • Component changed from FFmpeg to undetermined
  • Keywords mov added; m4v problem removed

Is the problem only reproducible with an external library (x264) or also with -vcodec mpeg4 ?

comment:2 Changed 4 years ago by cehoyos

  • Resolution set to needs_more_info
  • Status changed from new to closed

Please reopen this ticket if you can add the missing information.

Note: See TracTickets for help on using tickets.