News:

--

Main Menu

Trimming video: AVD ignores first 5 seconds

Started by MiMoHo, January 04, 2017, 03:34:40 PM

Previous topic - Next topic

MiMoHo

I'm trying to trim a H.264 video in MP4 and MKV containers within the first seconds but AVD cuts only if I set key A later than 5 seconds from the beginning of the video. Tried it several times by checking the exported file. I'm using the MP4 Muxer and pass-through of video and audio stream. This issue does not appear at the end of the clip. Tried to split with QuickTime 7 and 10 as well but the result there is a very pixelated start of the video.

AVD 2.6.16
Mac OS X 10.11.6

mean


MiMoHo

Don't get that question. For sure it does start at zero like every video file.

eumagga0x2a

Most videos don't start at zero, though the delay rarely exceeds 1/5 of a second. Load the source video in Avidemux, what time is shown on the time display at the bottom left (after you hit the "Pos 1" or "Home" button)? In copy mode, a cut must start at a keyframe.

MiMoHo

The video starts at 00:00.033. Tried the very latest build 2.6.18 but it's still the same: AVD does not cut within the first 5 seconds

Jan Gruuthuse

@ around 5 seconds into video:
- Select cut only with 1x keyboard up arrow, 1x keyboard down arrow. (not left or right arrow)
- Mark [A ].
- Eventually select an end point in the video and mark [ B].
- Save the video now, does this work?

I've seen video with key index frame larger then 5 seconds.

If this did not work either: can you upload such video (100-300MB max, 10 seconds duration max, more or less)

Upload:
Use a free dropbox account, https://www.wetransfer.com/, mega or similar webservice (free public access, without registration to download your uploaded video) thank you.

MiMoHo

When I press arrow up after start, it jumps to second 5,3, when I press down it goes back to the very beginning. Find the video file here: https://we.tl/xA73quwemR

eumagga0x2a

Works for me saving in copy mode with the marker A at the zero, at the first keyframe (00:00:00.033) or at the second keyframe (00:00:05.371), then loading and playing the resulting video in mpv, ffplay or in Avidemux itself. The quality of the video is very poor, but ADM or a player can't help it.

ADM 2.6.18
Fedora 24

Jan Gruuthuse

Quote from: eumagga0x2a on January 06, 2017, 11:59:12 PM
Works for me saving in copy mode with the marker A at the zero, at the first keyframe (00:00:00.033) or at the second keyframe (00:00:05.371), then loading and playing the resulting video in mpv, ffplay or in Avidemux itself. The quality of the video is very poor, but ADM or a player can't help it.

ADM 2.6.18
Fedora 24
You have to use [00:00:05.371] and can't set the index @ [00:00:05.000] in copy mode.

MiMoHo

Quote from: Jan Gruuthuse on January 07, 2017, 07:36:17 AM
Quote from: eumagga0x2a on January 06, 2017, 11:59:12 PM
Works for me saving in copy mode with the marker A at the zero, at the first keyframe (00:00:00.033) or at the second keyframe (00:00:05.371), then loading and playing the resulting video in mpv, ffplay or in Avidemux itself. The quality of the video is very poor, but ADM or a player can't help it.

ADM 2.6.18
Fedora 24
You have to use [00:00:05.371] and can't set the index @ [00:00:05.000] in copy mode.

I don't mind one or two frames difference but I'd like to cut after two or three seconds in the video rather than using a keyframe 5 seconds from the beginning.

Jan Gruuthuse

#10
Quote from: MiMoHo on January 12, 2017, 12:38:27 AM
I don't mind one or two frames difference but I'd like to cut after two or three seconds in the video rather than using a keyframe 5 seconds from the beginning.

We all would that, but this wish is inherent to the newer video codecs being used:
Very non-technical explanation: Full video frame is hold in keyframe, between keyframes is only partial video frame information. If you cut inbetween you only have partial video frames to the next key video frame.

With videos you wish to do so: there is only one option: re-encode the video. It is only a matter of choice.

Be certain when you record you have sufficient lead in time, so you can pick the keyframe before the six seconds.

I use lead(in/out) of 15 minutes

eumagga0x2a

In short: either cut anywhere you wish but re-encode the video, or cut only on keyframes and preserve quality. To have both: choose another universe.