View Full Version : Weird behaviour with Avidemux cutting
eXistenZ_69
16th December 2007, 17:27
Hello,
today I tried out Avidemux 2.4 Preview 3.1 (GTK+) on WinXP for cutting video. My test file is an avi containing xvid encoded video and vbr mp3 audio. The bitstream is not packed. Upon loading the file Avidemux prompts me to 'Build VBR time map' and 'Rebuild frames', which I both do. Here is what I noticed regarding the cutting end point:
I set the selection end marker to frame 32703 (00:21:48.120) (Frame:P(05)) in Avidemux. The two frames before it are B-frames.
When I have a look at the saved segment, the frame before the last one, Frame 5121 (00:03:24.840) in Avidemux is the frame I selected as end point of my selection. This frame shouldn't be present in my saved segment, no? And where did that B-frame go that should have been where that frame is now?? And for some reason the timestamps between Avidemux and a frame list saved by MPEG4Modifier don't match :(...
Cheers,
eXistenZ_69
LoRd_MuldeR
16th December 2007, 18:24
Well, as far as I understand, your selection ends with two B-Frames. Somehow like this:
I.......[I......BB]P....... (with [ and ] representing the start/end markers)
That would result in a video like that:
I..................BB
Of course the two B-Frames cannot stand alone at the End of the stream!
That's because a B-Frame requires the the previous and the following reference frame to be decoded!
It usually looks like:
IBBPBBPBBIBBPBBPBBI....
I frames can be decoded alone.
P frames require the previous P/I frame to be decoded.
B frames require both, the previous and the following P/I frame, to be decoded.
eXistenZ_69
16th December 2007, 18:42
Ok, I understand. Thanks for the explanation. But why isn't 'smart copy' applied then like on the start of the segment? And why is the P-frame now suddenly before the B-frame? It even replaced another B-frame!
LoRd_MuldeR
16th December 2007, 18:54
Ok, I understand. Thanks for the explanation. But why isn't 'smart copy' applied then like on the start of the segment? And why is the P-frame now suddenly before the B-frame? It even replaced another B-frame!
a) ...............[.........BB]P.....
b) ...............[.........BP]......
I think instead of a), where the last P-Frame is cut off and the two last B-Frames could not be decoded, you will get b), where one of the B frames is removed and replaced by the required P-Frame. Now you have one frame you didn't want and one frame you wanted is gone. But that's still better than having two scrambled frames at the end, I guess...
Also I think SmartCopy is used at the beginning of the stream (when needed), but never at the end of the stream.
eXistenZ_69
16th December 2007, 19:09
Well, I think it would be better then to keep the P-frame at the end without replacing one of the B-frames. That the needed P-frame is kept I can understand. But just replacing another frame is very unexpected.
I'd prefer smart copy on the end of the segment as well though, since I don't want to keep the P-frame, but I do want to keep the two preceding B-frames. Is there a reason smart copy is not applied to the end of a segment?
LoRd_MuldeR
16th December 2007, 19:25
Well, I think it would be better then to keep the P-frame at the end without replacing one of the B-frames. That the needed P-frame is kept I can understand. But just replacing another frame is very unexpected.
I'd prefer smart copy on the end of the segment as well though, since I don't want to keep the P-frame, but I do want to keep the two preceding B-frames. Is there a reason smart copy is not applied to the end of a segment?
Ask mean :p
http://www.avidemux.org/admForum/
Surf
17th December 2007, 21:22
Lord Mulder,
Can you shed more light on this SMARTCOPY? The last time I used it with the default 4? setting, the xvid won't play on the standalone! Ran the file thru GSpot, the IVOP and the BVOP(no idea what they are) is blank. Just by running the same file thru mp4modifier brought back the ivop & bvop....
As you can tell, I kno nuthin...
LoRd_MuldeR
17th December 2007, 21:32
I think all that I know about SmartCopy was said in the FAQ:
http://forum.doom9.org/showthread.php?t=126164
eXistenZ_69
18th December 2007, 00:01
Just by running the same file thru mp4modifier brought back the ivop & bvop....
What do you mean by that?? Did you unpack the bitstream?
LoRd_MuldeR
18th December 2007, 00:15
I highly doubt that Avidemux will produce 'packed bitstream' unless explicitly forced in Xvid configs...
eXistenZ_69
18th December 2007, 00:22
Btw. I started a topic on the avidemux forum regarding my problem as suggested by LoRd_MuldeR. Will report back when I get feedback...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.