Unable to upload MP4 video file

video
media-upload

#1

I’m unable to upload certain mp4 video files using twitter media API. I’m seeing the following error:

{ code: 324, message: 'Not valid video' }

I’m able to upload the same video in a lower resolution, but 1280x720 resolution doesn’t seem to working. Following is details of the video fetched using ffprobe

ffprobe version 4.0.2 Copyright (c) 2007-2018 the FFmpeg developers
  built with Apple LLVM version 9.1.0 (clang-902.0.39.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'ad37b581-3eb3-46c1-b584-0543d7041ae3-file_example_MP4_1280_10MG.mp4-transcoded.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.71.100
  Duration: 00:00:30.56, start: 0.000000, bitrate: 2307 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 159 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Stream #0:1(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 2175 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler

I’m unable to understand why the request in failing. I would like to transcode the video to a format that is compatible with twitter. The problem doesn’t seem to be with code since I’m able to upload videos with a resolution lower that 1280x720.

Thanks.


#2

Are you able to provide a link to the source video that is failing, so what we can try to reproduce?


#3

Here is the link to the video: