Log in

View Full Version : Possible to delete frames in a video file without re-encoding??


nukesgoboom
5th June 2006, 20:11
i have a 2 minute video encoded in the .xvid format. there is a 20 second part in the middle that i would like to delete, but when i do so and try to 'direct stream copy' the frames that i deleted are not deleted and still present!

is there anyway to delete frames in an encoded video file without reencoding?? i just want to delete 20 seconds of footage and not have to reencode and lose quality. if i have to re-encode a .xvid video to a .xvid video it would lose quality!

ChaosKing
5th June 2006, 20:18
You can only cut on keyframes (I-frames) without a re-encode.

setarip_old
5th June 2006, 20:43
"ChaosKing" is absolutely correct - and it seems your file has few, if any, keyframes. One method you can ust to resolve your problem is as follows:

The following may SEEM to be a great deal of work and/or complex, but it's really quite simple and easy to accomplish:

1) Load the ORIGINAL .AVI into VirtualDub
2) Set "Video" to "Full Processing Mode"
3) Set "Audio" to "Direct Stream Copy"
4) From the "Video" dropdown menu, click on "Compression" and select the same codec that was used to create the .AVI
5) Configure the codec in identical fashion to the .AVI's original settings - EXCEPT, change the keyframe rate to "every 1 second"
6) Save with a new filename (e.g. "2A.AVI")
7) Close and then re-open VirtualDub
8) Load your NEW .AVI
9) Do the cutting you desire

nukesgoboom
6th June 2006, 00:04
i see. right now, to solve my problem, i find the part i want to delete, and then i direct stream copy the part BEFORE it and the part AFTER it to new seperate avi files, and then i open up the part before it and append the part after it, and direct stream copy again, thus removing the part i wanted removed without re-encoding or anything. annoying, yes, but at least this way i dont have to worry about keyframes.

or am i an idiot? is there an easier way to do this? does making keyframes every second/frame increase the filesize?

thanks for replies.

setarip_old
6th June 2006, 01:15
when i do so and try to 'direct stream copy' the frames that i deleted are not deleted and still present!right now, to solve my problem, i find the part i want to delete, and then i direct stream copy the part BEFORE it and the part AFTER it to new seperate avi filesIf your second method works, I don't see/understand why your first method doesn't work. You're either able to cut on a keyframe or not...

As long as you're sure your second method works properly, use it ;>}

movmasty
10th June 2006, 03:17
i see. right now, to solve my problem, i find the part i want to delete, and then i direct stream copy the part BEFORE it and the part AFTER it to new seperate avi files, and then i open up the part before it and append the part after it, and direct stream copy again, thus removing the part i wanted removed without re-encoding or anything. annoying, yes, but at least this way i dont have to worry about keyframes.

or am i an idiot?
The two methods are the same, no need to save two files and append, just delete frames with the last mark on a key frame.

another way to do is to re encode just the part where you need a precise cut with same settings,
direct copy the other parts, then append