Log in

View Full Version : delete 1 frame using VirtualDubMod from .avi video


Kjell
28th April 2015, 04:30
I have super8 film converted to video avi. the film/viedo show1408x1044, 18.000fps
One picture in the video is black. I want to delete/ remove that. Use VirtualDubMod. Mark "Mark in" and "Mark out". What is the correct way to "remove it". Next time I play it is back. Have read several "cut avi video" ,but they the "cut video" as a new file . Is there a comand to "refresh/rebuild" the video? rgds

StainlessS
28th April 2015, 13:58
What codec is the clip compressed with ?
You cannot cut out a single frame where compressed with eg DIVX or XVID, where cutting must be done at key frames.
http://forum.videohelp.com/threads/209075-Cutting-a-DivX-using-VirtualDub-keyframes-issue
I have not used DIVX for years, but think typical gap between key frames was 8 seconds, and so you would have to
cut about 8 secs or none.
If clip encoded with a frame separable codec (eg MJPEG, or some lossless codec eg Lagarith, HuffYUV, UT_Video) then can cut
on any frame.
On the readout just right of the buttons at bottom of VD interface you will see Frame number, time and if key frame then '[K]'.
Assuming that the black frame has a [K] and the frame following it has a [K], then you can cut out that frame.
Go to black frame and press HOME (mark in), go to following [K] frame and press END (mark out) and then DELETE key.
All frames including start frame but excluding end frame will be cut. You will then need to select 'Direct Stream Copy'
on the Video Menu and save the file.
If black frame and frame following are not both key frames then the cut will fail (probably just produce the exact same file).

"refresh/rebuild" the video

If file is all keyframes then might be theoretically possible to edit the file by making the bad frame into a JUNK CHUNK (not sure),
but I have no idea if anything like that exists, it would be much more usual to just re-save the file.

If file is not frame separable, then can only re-encode entire file to get rid of that frame, OR, edit out the entire section between keyframes
as stated above (entire section: not sure what its called under AVI, would be 'GOP' [Group Of Pictures] in MPEG).

EDIT: It might be possible that an app can cut a single frame and re-encode just the single section where that frame lives
whilst keeping all other sections as original, if anything can do this I suspect AVIDemux may be the one, take a look at it.
Perhaps LoRd_MuldeR can advise. (MPEG has several apps that can do that sort of thing).

EDIT: I did not actually read the thread linked above, but Manono enlightens us on re-encoding just that single section
by hand (then re-joining), that is if AviDemux does not help.

EDIT: From here (first post):- http://forum.doom9.org/showthread.php?t=126164

What do "Copy" mode and "Smart Copy" mean?

In Avidemux you can select "Copy" mode for both, audio and video, which equals "Direct Stream Copy" in VirtualDub. This means the streams will be copied "1:1" from the input file without any processing or re-encoding. Of course you can not apply any audio/video filters in that mode! Unfortunately the "Copy" mode requires the very first frame of your selection to be an I-Frame (Key Frame). That's because video files necessarily have to start with an I-Frame! Nevertheless Avidemux has a nice feature, which is called "Smart Copy". It gets used automatically in case you use the "Copy" mode, but the first frame of your selection is not an I-Frame. SmartCopy will only re-encode the frames that are located before the very first I-Frame. The rest of the video is copied 1:1 from the original video. Hence SmartCopy will only effect the first few seconds of the video (if it all), while the rest will be not be modified at all. Please note that "Smart Copy" is currently limited to MPEG-4 ASP (Xvid, DivX, etc.) video files!

So it is quite possible that AVIDemux will do as you require, you will have to investigate if your file is DIVX/XVID.

Kjell
29th April 2015, 10:48
Many thanks for that VERRY good reply for my. It was useful for me. It was [F] on bouth, so now the black frame is removed. Thanks for all detail explenation. Very usefull for me.

http://forum.doom9.org/images/smilies/thanks-t.gif

StainlessS
29th April 2015, 20:23
It may also be worth pointing out its good idea to check that audio mode is in Direct Stream Copy too (default), Video default is Full Processing mode.

EDIT:
It might be possible that an app can cut a single frame and re-encode just the single section where that frame lives
whilst keeping all other sections as original

Seems that VD has at some point added the Smart Rendering mentioned above, see Vdub Help,
Processing/Video Filters/ Direct Mode and Smart Rendering.