0

What difference between these files might make YouTube accept one and not the other?

Each is about 100KB or 150KB. Each of the two are one second long so are small easy to download and quick to test or fiddle with.

c_good.mp4 http://ge.tt/1ia9sWv2 (uploads)

c_bad.mp4 http://ge.tt/79FFvWv2 (does not upload)

The one that fails to upload, YouTube says "The video has failed to process. Please make sure you are uploading a supported file type."

E:\bigmoved2\22\editing\old\problem>mediainfo c_good.mp4
General
Complete name                            : c_good.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom
File size                                : 143 KiB
Duration                                 : 1s 3ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 1 166 Kbps
Writing application                      : Lavf58.3.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Baseline@L3.1
Format settings, CABAC                   : No
Format settings, ReFrames                : 1 frame
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 1s 2ms
Bit rate                                 : 963 Kbps
Width                                    : 854 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 29.970 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.078
Stream size                              : 118 KiB (82%)

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 1s 3ms
Bit rate mode                            : Variable
Bit rate                                 : 187 Kbps
Maximum bit rate                         : 195 Kbps
Channel count                            : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Stream size                              : 22.9 KiB (16%)



E:\bigmoved2\22\editing\old\problem>


E:\bigmoved2\22\editing\old\problem>mediainfo c_bad.mp4
General
Complete name                            : c_bad.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom
File size                                : 97.7 KiB
Duration                                 : 1s 22ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 783 Kbps
Writing application                      : Lavf58.3.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.0
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 1s 4ms
Bit rate                                 : 651 Kbps
Width                                    : 640 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 4:3
Frame rate mode                          : Constant
Frame rate                               : 29.900 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.071
Stream size                              : 79.7 KiB (82%)
Writing library                          : x264 core 152 r2851 ba24899
Encoding settings                        : 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 /
is=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / 

lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / blu
trained_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=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 

/ aq=1:1.00
Language                                 : English

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 1s 22ms
Bit rate mode                            : Variable
Bit rate                                 : 125 Kbps
Maximum bit rate                         : 128 Kbps
Channel count                            : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Delay relative to video                  : 67ms
Stream size                              : 15.6 KiB (16%)
Language                                 : English

E:\bigmoved2\22\editing\old\problem>

This link may help - https://support.google.com/youtube/answer/1722171 - as it mentions recommended encoding settings. Though i'm not sure what difference is making or breaking it.
Maybe if I was very good on ffmpeg I could know what to fiddle with to figure it out, but I'm not.

4
  • could be: i.stack.imgur.com/boALW.png
    – user0
    Apr 12, 2019 at 3:13
  • @user0 good find but I just tested this command ffmpeg -i c_bad.mp4 -vcodec libx264 -x264-params crf=23:bframes=2 zz.mp4 (I adapted the command from the command here superuser.com/questions/996949/… ) I did mediainfo zz.mp4 I see from the output of mediainfo that bframes=2 And when I try to upload zz.mp4 to youtube, I still get the failed error.
    – barlop
    Apr 12, 2019 at 4:45
  • maybe the main difference is all the junk there in the bad one, all those encoding settings "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 / is=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / blu trained_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 / scenecu ..."
    – barlop
    Apr 12, 2019 at 13:21
  • @user0 and perhaps not just bframes, great find though
    – barlop
    Apr 12, 2019 at 13:23

1 Answer 1

0

There is a flaw in the question in that the profile of the video, in this case doesn't actually show what caused the problem.

Also, the problem wasn't visible in any difference between the two profiles.

The problem wasn't the writing library and encoding settings shown in the profile of the bad one but not in the profile of the good one.

An ffmpeg expert(which I am not, though I have spoken with some), would have to see the output from the original file (or from a sample not created with ffmpeg i.e. not using ffmpeg -ss and -t. The sample should of course be the same format as the original i.e. 3gp. But will put making a sample aside for now, and will use the original file)

To cut a long story short, the tbn value in the result was enormous, perhaps due to a bug in the current ffmpeg,

This is showing the conversion that produced the bad mp4 file (and possibly the 3gp file, while not corrupt, has some unusualness to it. )

This command showing the version, shows a massive tbn value, which is problematic. (It would be a bit quicker if I did -ss and -t, and I still get the massive tbn value, but for the sake of simplicity i've not done -ss and -t).

I used the latest ffmpeg.

E:\bigmoved2\22\editing\old\problem\1>ffmpeg -i original.3gp -vcodec libx264 -acodec copy asdffappp.mp4
ffmpeg version N-93562-g3e10223385 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20190212
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --e
nable-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-libvids
tab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d
3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 50.100 / 58. 50.100
  libavformat    58. 27.102 / 58. 27.102
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 48.100 /  7. 48.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Apr__8_2019_WLC_C_3.3gp':
  Metadata:
    major_brand     : 3gp4
    minor_version   : 0
    compatible_brands: isom3gp4
    creation_time   : 2019-04-08T21:58:13.000000Z
    com.android.version: 6.0
  Duration: 00:08:21.25, start: 0.000000, bitrate: 4136 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480, 4007 kb/s, SAR 1:1 DAR 4:3, 29.90 fps, 90k tbr, 90k tbn, 180k tbc (default)
    Metadata:
      creation_time   : 2019-04-08T21:58:13.000000Z
      handler_name    : VideoHandle
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      creation_time   : 2019-04-08T21:58:13.000000Z
      handler_name    : SoundHandle
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[libx264 @ 00000000003d5300] using SAR=1/1
[libx264 @ 00000000003d5300] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 00000000003d5300] profile Progressive High, level 3.0, 4:2:0, 8-bit
[libx264 @ 00000000003d5300] 264 - core 157 r2969 d4099dd - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - 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=6 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, mp4, to 'asdffappp.mp4':
  Metadata:
    major_brand     : 3gp4
    minor_version   : 0
    compatible_brands: isom3gp4
    com.android.version: 6.0
    encoder         : Lavf58.27.102
    Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 29.90 fps, 1348290000.00 tbn, 29.90 tbc (default)
    Metadata:
      creation_time   : 2019-04-08T21:58:13.000000Z
      handler_name    : VideoHandle
      encoder         : Lavc58.50.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      creation_time   : 2019-04-08T21:58:13.000000Z
      handler_name    : SoundHandle
frame=14981 fps= 92 q=-1.0 Lsize=   34989kB time=00:08:21.24 bitrate= 571.8kbits/s dup=50 drop=50 speed=3.08x
video:26620kB audio:7832kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.558722%
[libx264 @ 00000000003d5300] frame I:69    Avg QP:20.62  size: 31985
[libx264 @ 00000000003d5300] frame P:3859  Avg QP:23.36  size:  4399
[libx264 @ 00000000003d5300] frame B:11053 Avg QP:27.92  size:   731
[libx264 @ 00000000003d5300] consecutive B-frames:  1.3%  0.6%  0.7% 97.3%
[libx264 @ 00000000003d5300] mb I  I16..4: 11.7% 50.6% 37.8%
[libx264 @ 00000000003d5300] mb P  I16..4:  0.9%  2.2%  0.6%  P16..4: 50.7%  6.9%  7.4%  0.0%  0.0%    skip:31.4%
[libx264 @ 00000000003d5300] mb B  I16..4:  0.1%  0.2%  0.0%  B16..8: 24.1%  1.4%  0.4%  direct: 0.7%  skip:73.1%  L0:38.2% L1:57.3% BI: 4.5%
[libx264 @ 00000000003d5300] 8x8 transform intra:56.6% inter:70.0%
[libx264 @ 00000000003d5300] coded y,uvDC,uvAC intra: 61.0% 83.2% 28.5% inter: 6.4% 16.7% 0.5%
[libx264 @ 00000000003d5300] i16 v,h,dc,p: 17% 23%  8% 52%
[libx264 @ 00000000003d5300] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 21% 16%  6%  6%  7%  7%  9%  6%
[libx264 @ 00000000003d5300] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 26% 11%  6%  7%  8%  6%  7%  5%
[libx264 @ 00000000003d5300] i8c dc,h,v,p: 44% 21% 26%  9%
[libx264 @ 00000000003d5300] Weighted P-Frames: Y:2.5% UV:1.5%
[libx264 @ 00000000003d5300] ref P L0: 62.1% 11.5% 19.2%  7.2%  0.1%
[libx264 @ 00000000003d5300] ref B L0: 91.7%  6.5%  1.8%
[libx264 @ 00000000003d5300] ref B L1: 94.9%  5.1%
[libx264 @ 00000000003d5300] kb/s:435.23

E:\bigmoved2\22\editing\old\problem\1>

Notice these lines

Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480, 4007 kb/s, SAR 1:1 DAR 4:3, 29.90 fps, 90k tbr, 90k tbn, 180k tbc (default)

Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 29.90 fps, 1348290000.00 tbn, 29.90 tbc (default)

(I heard it suggested that perhaps the device that made the recording was recording with a variable frame rate and hadn't warmed up or initialized properly yet)

Anyhow, you see the massive tbn value there. 1348290000.00 tbn

I also notice that I see that large tbn value even just doing ffmpeg -i c_bad.mp4

The answer for me was the following command. Notice the inclusion of -vsync crf, and -r 30000/1001

ffmpeg -vsync cfr -i original.3gp -acodec copy -vcodec libx264 -r 30000/1001 blah.mp4

Note that for any bug in ffmpeg if one is uploading a bug report, it doesn't look that straight forward but one can make a sample with QT-FastStart https://stackoverflow.com/questions/23787712/qt-faststart-windows-how-to-run-it/55671165#55671165 followed by dd. (and verifying the sample so i guess making sure it plays, and perhaps seeing if it gets the same output as the original).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.