Quantcast
Channel: VideoHelp Forum
Viewing all articles
Browse latest Browse all 45790

Clarification needed on re-encoding cut portion of video

$
0
0
I am working on a project for cutting and joining videos with the least amount of re-encoding and have searched and read everything I can find. What I need clarified on is, I understand video encoders encode on a frame by frame basis and each frame will have a certain duration. E.G. a CFR video of 29.97 FPS would have frames lasting approximately 0.033367 seconds. I also understand that an audio encoder encodes on a similar 'frame' basis based on the sample rate. E.G. a video with audio AAC at 44100 sample rate would have chunks lasting approximately 0.000002267 seconds.

What I don't understand is how you can encode only the 200 frames of a video prior to the next I-Frame and have it join perfectly with the rest of the video from the I-Frame on. It would seem 200 frames of video would be 6.673400 seconds long (0.033367 X 200) and the audio would have to be 2943714 frames X 0.000002267 for 6.673398 to be the closest. Depending on how many frames must be recoded, the error could be as much as 8 ms i actual trials. Wouldn't this make the joining less than perfect. Although negligible for a single cut, I would think the sync would be multiplied by the number of cuts/joins.

I have verified most of the above using FFMPEG, FFPROBE and MediaInfo as best I could and by running numerous tests and examining the result with these programs also, If there is a way to make this better, I would greatly appreciate new knowledge or suggestions on how to do this better.
Thank you

Viewing all articles
Browse latest Browse all 45790

Trending Articles