Opened 6 years ago

Closed 6 years ago

#6857 closed defect (invalid)

mp4 encode to h264 can not play in the firefox and ie11,but fine in the chrome

Reported by: gy0624ww Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

mp4 encode to h264 can not play in the firefox and ie11,but fine in the chrome
but,use desktop program "easy video maker" to encode the same video to h264 is ok in the firefox,ie11,chrome.

i use the command:
ffmpeg -i bad.mp4 -vcodec libx264 -strict 2 999.mp4

version:
ffmpeg version 3.3.4-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.4.0 (Debian 6.4.0-4) 20170820
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libfribidi --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100

Change History (17)

comment:1 by gy0624ww, 6 years ago

Priority: normalimportant

ffmpeg -i bad.mp4:

ffmpeg version 3.3.4-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2017 the FFmpeg developers

built with gcc 6.4.0 (Debian 6.4.0-4) 20170820
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libfribidi --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bad.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.71.100

Duration: 00:00:38.36, start: 0.000000, bitrate: 879 kb/s

Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x400 [SAR 709:720 DAR 709:400], 741 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:

handler_name : VideoHandler

Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 88200 Hz, stereo, fltp, 128 kb/s (default)
Metadata:

handler_name : SoundHandler

comment:2 by Carl Eugen Hoyos, 6 years ago

Component: ffmpegundetermined
Keywords: mov added; ffmpeg removed
Priority: importantnormal
Reproduced by developer: unset

Are you sure that you reported this issue on the right bug tracker?

Please test current FFmpeg git head (the only version supported here) with a command line like the following and report back:

$ ffmpeg -f lavfi -i testsrc2=d=10 -vcodec libx264 out.mov

comment:3 by gy0624ww, 6 years ago

[guanyue@stor2 ~]$ ffmpeg -i bad.mp4 -vcodec libx264 -strict 2 toobad.mp4

ffmpeg version 3.3.4-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2017 the FFmpeg developers

built with gcc 6.4.0 (Debian 6.4.0-4) 20170820
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libfribidi --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bad.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.71.100

Duration: 00:00:38.36, start: 0.000000, bitrate: 879 kb/s

Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x400 [SAR 709:720 DAR 709:400], 741 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:

handler_name : VideoHandler

Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 88200 Hz, stereo, fltp, 128 kb/s (default)
Metadata:

handler_name : SoundHandler

Stream mapping:

Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))

Press [q] to stop, ? for help
[libx264 @ 0x54a0620] using SAR=709/720
[libx264 @ 0x54a0620] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x54a0620] profile High, level 3.0
[libx264 @ 0x54a0620] 264 - core 152 r19 ba24899 - 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 'toobad.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.71.100
Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 720x400 [SAR 709:720 DAR 709:400], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
Metadata:

handler_name : VideoHandler
encoder : Lavc57.89.100 libx264

Side data:

cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1

Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 88200 Hz, stereo, fltp, 128 kb/s (default)
Metadata:

handler_name : SoundHandler
encoder : Lavc57.89.100 aac

frame= 959 fps=284 q=-1.0 Lsize= 3898kB time=00:00:38.26 bitrate= 834.6kbits/s speed=11.3x
video:3254kB audio:602kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.100231%
[libx264 @ 0x54a0620] frame I:4 Avg QP:19.57 size: 32435
[libx264 @ 0x54a0620] frame P:334 Avg QP:22.57 size: 7165
[libx264 @ 0x54a0620] frame B:621 Avg QP:26.76 size: 1302
[libx264 @ 0x54a0620] consecutive B-frames: 9.1% 10.8% 8.8% 71.3%
[libx264 @ 0x54a0620] mb I I16..4: 17.1% 45.5% 37.4%
[libx264 @ 0x54a0620] mb P I16..4: 4.0% 9.6% 1.1% P16..4: 40.5% 15.9% 7.2% 0.0% 0.0% skip:21.6%
[libx264 @ 0x54a0620] mb B I16..4: 0.3% 0.6% 0.0% B16..8: 40.8% 4.7% 0.8% direct: 1.3% skip:51.5% L0:49.1% L1:44.1% BI: 6.8%
[libx264 @ 0x54a0620] 8x8 transform intra:63.7% inter:58.9%
[libx264 @ 0x54a0620] coded y,uvDC,uvAC intra: 41.5% 60.6% 11.0% inter: 12.2% 13.9% 1.0%
[libx264 @ 0x54a0620] i16 v,h,dc,p: 37% 28% 14% 21%
[libx264 @ 0x54a0620] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 21% 23% 4% 3% 4% 4% 4% 4%
[libx264 @ 0x54a0620] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 23% 18% 4% 5% 5% 5% 4% 4%
[libx264 @ 0x54a0620] i8c dc,h,v,p: 54% 23% 20% 3%
[libx264 @ 0x54a0620] Weighted P-Frames: Y:5.7% UV:2.4%
[libx264 @ 0x54a0620] ref P L0: 70.4% 13.7% 12.8% 2.9% 0.1%
[libx264 @ 0x54a0620] ref B L0: 93.8% 5.3% 0.9%
[libx264 @ 0x54a0620] ref B L1: 98.1% 1.9%
[libx264 @ 0x54a0620] kb/s:694.69
[aac @ 0x53da280] Qavg: 340.530

comment:4 by Carl Eugen Hoyos, 6 years ago

Is the issue only reproducible when using bad.mp4 as input or also with the command line I suggested?

Please test current FFmpeg git head to make this a valid ticket.

comment:5 by gy0624ww, 6 years ago

apologize for the attachment, it's a broken file, the mp4 file is out of the limit size to upload.

how can i upload a size of 4M file?

thanks

comment:6 by gy0624ww, 6 years ago

or can i email to you?

comment:7 by Carl Eugen Hoyos, 6 years ago

You can upload to dropbox, datafilehost or https://streams.videolan.org/upload/ but please try to also answer my questions or tell me if they are unclear.

comment:8 by gy0624ww, 6 years ago

the bad.mp4 on the dropbox link:
https://www.dropbox.com/s/8ohav21h7nnj1v7/bad.mp4?dl=0
you can reproducible the problem,

and you command you said result is like this:

[guanyue@stor2 ~]$ ffmpeg -f lavfi -i testsrc2=d=10 -vcodec libx264 out.mov
ffmpeg version 3.3.4-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2017 the FFmpeg developers

built with gcc 6.4.0 (Debian 6.4.0-4) 20170820
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libfribidi --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100

Input #0, lavfi, from 'testsrc2=d=10':

Duration: N/A, start: 0.000000, bitrate: N/A

Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc

Stream mapping:

Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))

Press [q] to stop, ? for help
[libx264 @ 0x4815c40] using SAR=1/1
[libx264 @ 0x4815c40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x4815c40] profile High, level 1.3
[libx264 @ 0x4815c40] 264 - core 152 r19 ba24899 - 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=7 lookahead_threads=1 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, mov, to 'out.mov':

Metadata:

encoder : Lavf57.71.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:

encoder : Lavc57.89.100 libx264

Side data:

cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1

frame= 250 fps=0.0 q=-1.0 Lsize= 341kB time=00:00:09.88 bitrate= 282.5kbits/s speed= 41x
video:337kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.085631%
[libx264 @ 0x4815c40] frame I:1 Avg QP:20.46 size: 4510
[libx264 @ 0x4815c40] frame P:74 Avg QP:26.74 size: 1965
[libx264 @ 0x4815c40] frame B:175 Avg QP:31.40 size: 1112
[libx264 @ 0x4815c40] consecutive B-frames: 4.0% 5.6% 7.2% 83.2%
[libx264 @ 0x4815c40] mb I I16..4: 34.3% 41.0% 24.7%
[libx264 @ 0x4815c40] mb P I16..4: 2.3% 4.9% 1.2% P16..4: 13.5% 10.2% 7.0% 0.0% 0.0% skip:60.9%
[libx264 @ 0x4815c40] mb B I16..4: 0.2% 0.3% 0.1% B16..8: 20.3% 7.2% 2.0% direct: 2.6% skip:67.2% L0:52.0% L1:42.5% BI: 5.5%
[libx264 @ 0x4815c40] 8x8 transform intra:54.5% inter:31.4%
[libx264 @ 0x4815c40] coded y,uvDC,uvAC intra: 9.8% 27.2% 23.4% inter: 5.3% 15.0% 12.4%
[libx264 @ 0x4815c40] i16 v,h,dc,p: 69% 25% 6% 0%
[libx264 @ 0x4815c40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 7% 9% 84% 1% 0% 0% 0% 0% 0%
[libx264 @ 0x4815c40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 40% 21% 34% 1% 1% 1% 1% 1% 1%
[libx264 @ 0x4815c40] i8c dc,h,v,p: 53% 18% 29% 1%
[libx264 @ 0x4815c40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x4815c40] ref P L0: 57.8% 8.0% 20.1% 14.0%
[libx264 @ 0x4815c40] ref B L0: 78.8% 17.1% 4.0%
[libx264 @ 0x4815c40] ref B L1: 91.9% 8.1%
[libx264 @ 0x4815c40] kb/s:275.57

comment:9 by gy0624ww, 6 years ago

i clear up the issue:

  1. the video is play fine in the firefox on my personal computer(macbook pro). it's can be reproduced in the windows system.

i think it may be wake up some encode on my mac.

  1. i find out the same video re-encoded, in the other company system ,works fine in the all browsers. so i figure out it's not depend the client browser and the video. something wrong in the process re-encode

comment:10 by Carl Eugen Hoyos, 6 years ago

Please download current FFmpeg git head, nothing else is supported here and there is nothing we can do if the issue is not reproducible with the current version.

Please test the command line I provided and please tell me on which systems the output file that you created with the command line worked.

comment:11 by gy0624ww, 6 years ago

i have tested the command you told me, and i post the result above.

i use the git head version. no matter what version on windows, can be reproduced .

i don't know how can i do anything else.

comment:12 by tbucher, 6 years ago

Most likely you need to prepare the file also for progressive download by moving the required data to the beginning of the file. Try to use this based on your original command line:

ffmpeg -i bad.mp4 -vcodec libx264 -strict 2 -movflags faststart 999.mp4

in reply to:  12 comment:13 by gy0624ww, 6 years ago

you can download the bad.mp4 from https://www.dropbox.com/s/8ohav21h7nnj1v7/bad.mp4?dl=0
i try the command you give to me , it didn't work either.

Replying to tbucher:

Most likely you need to prepare the file also for progressive download by moving the required data to the beginning of the file. Try to use this based on your original command line:

ffmpeg -i bad.mp4 -vcodec libx264 -strict 2 -movflags faststart 999.mp4

comment:14 by galad, 6 years ago

Are you sure the issue is the video? Your file has got an aac track with a high samplerate (88200), try without the audio, or to downsample it to 48000 or less.

in reply to:  14 comment:15 by gy0624ww, 6 years ago

ffmpeg -i bad.mp4 -vcodec libx264 -sample_rate 48000 999.mp4
it didn't work ,too

do you reproduce the issue?

Replying to galad:

Are you sure the issue is the video? Your file has got an aac track with a high samplerate (88200), try without the audio, or to downsample it to 48000 or less.

comment:16 by gy0624ww, 6 years ago

issue has resolved

@galad thanks.

ffmpeg -i bad.mp4 -vcodev libx264 -ar 44100 456.mp4

comment:17 by Carl Eugen Hoyos, 6 years ago

Keywords: h264 mov removed
Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.