So after beating my head against the wall for the better portion of a day, I'm afraid I need some help. Basically, I want to do the following:
- Take a variable framerate video and extract its contents to an image sequence with FFMPEG
- Perform whatever enhancements I need to on the image sequence, retaining the same number of still images from start to finish
- Convert the still image sequence into a variable framerate *.mov file (h.264 for testing purposes, something like ProRes once I've figured the process out) and remux with the audioyields a 1063 frame sequence whileCode:ffmpeg -i INPUT.MOV -vsync passthrough /path/to/still/images/frame-%04d.pngyields a 1062 frame sequence; the former is correct while the latter is not based on my testing. (The source file is 00:01:04.50 in length according to ffmpeg.)Code:ffmpeg -i INPUT.MOV -vsync vfr /path/to/still/images/frame-%04d.png
If I attempt to recombine the image sequence into an MP4 for testing purposes usingmy output is 00:01:04.50 in length according to ffmpeg, but the frames are out of sync with the original video. Changing -vsync vfr to passthrough does not fix the issue.Code:ffmpeg -r 16.48 -i /path/to/still/images/frame-%04d.png -pix_fmt yuv420p -enc_time_base 1:300 -video_track_timescale 600 -vsync vfr OUTPUT.MP4
Is there a way to copy the PTS from the original INPUT.MOV into the OUTPUT.MP4 file to create a FIXED.MOV file that plays identically to the original file? If my length is the same I would think that the issue would be mismatched timestamps in the variable framerate file.
Other VFR-related headaches that may or may not play a factor in what I'm trying to do:
- The original video reports 16.48 fps 16.50 tbr 600 tbn 600 tbc (default) in ffmpeg; the output video reports a 16.50 fps 300 tbr 600 tbn 600 tbc (default) — I can never get all four numbers to match the original video and excluding the timebase information above from my command results in 19200 tbn/tbc
- Simply rewrapping the videowith no timestamp instructions yields a 19200 tbn/tbcCode:ffmpeg -i INPUT.MOV -c copy OUTPUT.MOV
Video(s) are/have been shot using iOS devices and the MoviePro app, 400% quality, 30fps, and uncompressed audio settings. Unfortunately, like all iOS devices, the end result is VFR video.
Any help with this is greatly appreciated, thank you in advance for your time and assistance.
+ Reply to Thread
Results 1 to 2 of 2
Specs: Mac Mini (Early 2006): 1.66 GHz Intel Core Duo CPU, 320GB HDD, 2GB DDR2 RAM, Intel GMA 950 integrated graphics card, Matshita UJ-846 Superdrive, Mac OS X 10.5.7 and various peripherals. System runs Final Cut Express 3.5 for editing.