I have an application that reads a VFR video and processes its frames, and then pipe them into ffmpeg for encoding (application cannot do that itself). I know the timestamps of each frame because i have the original video, and could also, for instance, provide them in a file such as a mkv timecode v2 file. How do i set the frame timestamps for each of the incoming raw frames, so that ffmpeg encodes a VFR file? I am using an up to date 5.0.0 build from gyan.dev, on Windows.
command line:
-y -f rawvideo -video_size 1920x1080 -framerate 25 -pixel_format rgb24 -i pipe: -c:v libx264 sceneVideo.mp4
I have tried using -x264-params tcfile-in=tsFile.txt
, but found out that is a parameter for the x264 command line program, not for using it as a library through ffmpeg, so doesn't work.
Another solution would perhaps be to use copyts
somehow to instruct ffmpeg to use only the timestamps from the original VFR file during encode (or during a later remux) of the processed video, but how would i do that?
If using another common container such as mkv makes this easier than mp4, that would be ok!