FINALIZE call in Video upload API giving error

video
api

#1

Hi,

We have implemented twitter video upload API integration in which the video file is uploaded using INIT, APPEND and FINALIZE call.

INIT call:-
Request: {“command”=>“INIT”, “media_type”=>“video/mp4”, “total_bytes”=>2139606}
Response body: {:media_id=>628093038540120064, :media_id_string=>“628093038540120064”, :expires_after_secs=>3599}

APPEND call:-
Request: {“command”=>“APPEND”, “media”=>#UploadIO:0x007f849684e438, “media_id”=>“628093038540120064”, “segment_index”=>0}
Response body: nil (http code : 200 OK)

FINALIZE call:-
Request: {“command”=>“FINALIZE”, “media_id”=>“628093038540120064”}
Response:- Invalid media: fail: [decode/mp4.cpp: finish_initialization (69)] internal inconsistency: “!(summary)” condition failed, Reason: Some(InvalidContent).

The above problem is coming with the below video:-

Some of the other videos are working fine.

Can somebody advise as to why this error is coming up?

Thanks
Ganesh


#2

Hi Ganesh,

Looking at the details of the file, there are a couple streams in addition to the audio and video. This is the reason for the failure. Currently a rejection is the expected behavior, but engineering is now aware of this case and will consider striping extra streams on upload to allow such videos. This is being tracked internally as PREL-15232.

  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: isommp41avc1
    creation_time   : 2009-02-12 01:21:56
  Duration: 00:00:08.04, start: 0.000000, bitrate: 2128 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv), 640x360 [SAR 255:254 DAR 680:381], 2004 kb/s, 25 fps, 25 tbr, 600 tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2009-02-12 01:21:56
      handler_name    : ?Apple Video Media Handler
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      creation_time   : 2009-02-12 01:21:56
      handler_name    : ?Apple Sound Media Handler
    Stream #0:2(eng): Data: none (mp4s / 0x7334706D), 0 kb/s (default)
    Metadata:
      creation_time   : 2009-02-12 01:21:56
      handler_name    : ?
    Stream #0:3(eng): Data: none (mp4s / 0x7334706D), 0 kb/s (default)
    Metadata:
      creation_time   : 2009-02-12 01:21:56
      handler_name    : ?
Unsupported codec with id 0 for input stream 2
Unsupported codec with id 0 for input stream 3

#3

Sure. Hope this will be fixed soon.


#4

Hello,
Is the problem resolved?