News:

--

Main Menu

problem cutting videos

Started by tessen, November 05, 2016, 07:03:10 PM

Previous topic - Next topic

tessen

Hello everyone
I love this program, but I have a problem, in videos I canÃ,´t start the cut with precision, the program only allows to start cuts from preset positions (in my case each approx 5.333 sg) and that position match with the key "up" in the cursors i.e I can finish a video at any point, but for example, if I want to cut a video from 4sg after the start to the second 5, ie a video of 1sg, it is not possible, I can only use it as a marker for the start Multiples of 5.333sg approximately, iÃ,´m using windows 7 64bits and the video file is a mp4

The same happens with the "time" button, to move to some particular point of the video, it only allows me to jump to multiple positions of 5.333sg

Someone knows something or has had a similar problem?

best regards (and excuse my english)

eumagga0x2a

This is how it works due to the very nature of video compression. If you want to be able to start a cut at any frame of the source video, you must re-encode. If you want to use the copy mode to preserve quality, you can start a cut at a keyframe (I-frame) only. If you want both at the same time, you can only use source videos consisting of keyframes only (like old mjpeg or completely uncompressed, huge video files).

https://en.wikipedia.org/wiki/Group_of_pictures

To navigate to any frame (not only a keyframe), go to the closest keyframe, then use arrow keys LEFT or RIGHT. On top of that, you might want to use a current nightly build matching your operating system too. Recent nightly builds include a bunch of fixes for navigation and editing issues present in 2.6.14 and earlier releases. However, the fixes won't help you to achieve your unattainable goal.

dosdan

#2
Tessen, you can edit "frame-accurate" but it will require some effort. First off, install the most recent version of VirtualDub FliterMod:

https://sourceforge.net/p/vdfiltermod/wiki/Home/

Now load your MP4 file in Vdud and use R.Arrow to step frame-by-frame though it.  Look down the bottom of the screen. You will see:

Frame 0 (0:00:00.000) [ I ]

Look at the last symbol. You can move your mouse over this area and a tool-tip will appear showing what the "[ I ]" means. It's a "Intra" I-frame aka key-frame. You can only cut on these. As you frame advance you'll see a sequence like this:

IBPBPBP...

You can use Shift-R.Arrow to advance directly to the next I-frame. In the MP4 I'm viewing they are at Frame 30, Frame 60 and so on.  It is a 59.94fps file, so cut-points are occurring approximately every 0.5s in my example. Your "5.3333s", if it's a 60p file, means that there is an I-frame every 320 frames. To edit with better granularity, you need to have a file that contains more frequent I-frames. The way to do this is to convert the file to a format that is all I-frames (i.e. no B or P frames).  This will not compress well, (I-frames are large - like a sequence of JPEGs - 60 JPEGs/sec in my example), so the converted file will be large, but these "intermediate-format" files can tolerate many generations of editing without much further quality loss.

You can get a free version of the Grass Valley HQX codec and instructions on how to install it here: http://www.slomo.jp137.com/index-hqx.html

HQX is using the VFW (Video For Windows) interface.  VirtualDub will recognise that HQX is installed and be able to open and interpret a HQX-encoded file. ADM is using open-source libraries and will not recognise this proprietary codec.

Now, after installing HQX, reopen your MP4 in Vdub.  Click on:  Video | Compression | Grass Valley HQX | click on the "Configure" button | click on Online (Standard) level of compression | OK | OK. 

Once you've selected to use this compression, click on File | Save as AVI... and give it a name. An I-frame-only AVI version of your video will be produced.

In this example, my 667MB MP4 produced an 10,445MB AVI.  You'll find a table showing the filesize (GB/min) and compression ratio for various HQX settings here: https://www.avforums.com/threads/mvtools-a-few-notes-on-creating-super-slo-mo-for-free.1978311/#post-23553835

Now load this intermediate AVI back into Vdub and frame-advance through it. You seen that every frame is a "K" (AVI key-frame). To mark a region, either use the Home & End keys or click blanks arrow buttons next to the Frame number display. You can find info on the Vdub interface here : http://d.pcnews.at/ins/pcn/110/001000/_prg/ADV-Dokumentation/Port-Apps-Programmdokumentationen/Virtual_Dub_1_6_19.pdf

Be aware that not all of this document may not apply 100% to the this new, reworked version of Vdub.

You can save the marked region as an MP4 using File | Export | Use external encoder. You can create new export setups using Options | External Encoders...


Dan.










mean

Why doing so complicated ?
Just re-encode instead of copying, it's much simpler and ends up with the same result

tessen

Hi!
Many thanks everyone, I am a total newbie in video editing, i only need this program to cut parts of a video, at the first moment i thought that this problem could be a bug, i'll follow the advice.
many thanks again!