1
I recently got some CCTV video released to me via a FOIA/PA request. I'd like to put up the full version on YouTube, as well as version edited w/ Final Cut Pro. However, Handbrake, Quicktime, Final Cut Pro, & YouTube are all unable to open the original .avi file. :-(
ffmpeg -i says for avi input #0 (there is no audio part):
Duration: 00:48:48.73, start: 0.000000, bitrate: 2497 kb/s
Stream #0:0: Video: h264 (Main) (V264 / 0x34363256), yuv420p, 1280x960, 2495 kb/s, 9.99 fps, 9.99 tbr, 9.99 tbn, 19.98 tbc
Handbrake's log showed this before giving up with "no valid source found" (note the tbr discrepancy vs ffmpeg -i):
Duration: 00:48:48.72, start: 0.000000, bitrate: 2497 kb/s
Stream #0.0: Video: V264 / 0x34363256, 1280x960, 10 fps, 29.97 tbr, 9.99 tbn
[13:54:47] scan: decoding previews for title 1
[13:55:28] scan: could not get a decoded picture
[13:55:38] scan: could not get a decoded picture
[13:55:43] scan: could not get a decoded picture
[13:55:49] scan: could not get a decoded picture
[13:55:54] scan: could not get a decoded picture
[13:55:58] scan: could not get a decoded picture
[13:56:03] scan: could not get a decoded picture
[13:56:06] scan: could not get a decoded picture
[13:56:07] Warning: Could not read data for preview 9, skipped
[13:56:07] Warning: Could not read data for preview 10, skipped
[13:56:07] libhb: scan thread found 0 valid title(s)
[13:56:07] macgui: ScanDone state received from fHandle
VLC is able to play it just fine, but I've not managed to get VLC to transcode it into something usable; an attempt at transcoding to m4v and importing that to FCP resulted in a weirdly stuttering and moonwalky video when FCP tried to convert it to a normal FPS. (Edit: not FCP's fault; the transcode itself was screwy. Have also now tried VLC's transcode to mp4 h264 w/ fps set @ 30 also [in addition to not setting fps, and its transcode wizard]; the fps@30 attempt didn't even output something playable. ><)
How can I convert this into something that's of normal size / fps / codec so that I can edit it in FCP and upload it to YouTube specs?
My guess is that ffmpeg should be able to do the job, but I'm not sure how to go about it.
ETA: Now attempting this: ffmpeg -i input.avi -r "29.97" -an -sn -c:v libx264 -qp 0 -preset ultrafast -pix_fmt yuv420p -f mp4 -benchmark output.mp4 - not trying to compress at this stage, just to get it to something workable in FCP & YT.
ETA2: Output of above playable in VLC, not in QT or FCP (but haven't let FCP transcode it for optimized/proxy media yet). In VLC, it does have 29.97 fps, doesn't stutter. About 11x the size of the original (~11.5GB vs 914MB) o.o.
Trying again with -crf 18 -preset slow instead of qp 0 -preset ultrafast to see if I can get a more manageable size w/out noticeable quality loss. ffmpeg docs do warn that many things aren't compatible w/ lossless (but say that YouTube is).
ETA3: Looks like that last one worked. Can be viewed in QuickTime & FCP. Uploading partial edit to YT now. Yay!
Tried Compressor, independently of FCP ? – Tetsujin – 2014-10-22T20:42:52.990
@Tetsujin Yup, that was actually my first attempt. Compressor wasn't able to preview the file, and output a totally white video of wrong length. – Sai – 2014-10-22T20:46:05.677
i don't have the knowledge to answer with any authority, but my hunch is that the source vid isn't stating its actual stats correctly, so you're into 'hacky' territory to replace/override those headers. [outside my area of expertise, sorry] – Tetsujin – 2014-10-22T20:48:32.763
@Tetsujin That's quite possible. FWIW, other FOIA'd documents showed that agency people were having a lot of trouble even reading the source video. They mention that the source video was Verint video codec. I don't know whether the video I provided is the same as the one they reference, or some sort of transcode thereof. – Sai – 2014-10-22T20:55:26.653