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.
Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or try DVDFab DRM and remove iTunes movie & music protection! :)
+ Reply to Thread
Results 1 to 5 of 5
I understand now the audio then but how then can you copy 33.667 ms video per frame on a frame basis and 21.333 me audio per chunk and get them to be equal length. Every ffmpeg script i try that uses copy for audio and video end up with unequal length. Is there a form of ffmpeg copy that actually creates equal length audio and video?
@sneaker... Ok thank you. That was the results of all my testing and I just needed to know if that were the case or i was missing something. I will take this information and keep in in mind in the future. Thank you for your help.