[XviD-devel] Questions / Bug fixes / Patches
Carl Eric Codere
cecodere at yahoo.ca
Thu Nov 25 05:52:40 CET 2010
On 2010-11-24 06:46, Michael Militzer wrote:
> Carl,
>
> I have applied the frame_drop_ratio patch to CVS. When frame_drop_ratio is
> set to "0", no N_VOPs will now be produced anymore by xvidcore. Hopefully,
> this will workaround the issues you observed with MP4Box muxed .mp4 files.
>
> I have to admit however that I'm still confused: If I recall correctly
> we concluded last time when this topic was discussed that MP4Box appears
> to rewrite N_VOPs as P_VOPs with all Skip-MBs upon muxing a xvid encoded
> stream into .mp4 files using the -nodrop option. Your most recent post
> however seems to indicate that the N_VOPs are preserved by MP4Box for
> -nodrop. Has MP4Box behavior changed?
>
> Best regards,
> Michael
Greetings,
You are right, but maybe it was because I did a wrong
manipulation, or the stream was packed? Now I have been very careful to
do some accurate tests. Here is some further analysis on the issues I
have encountered. I have used Mencoder to encode the same file which
contains 1176 frames The main difference is the xvid level (Mencoder
has the same patch as i submitted to you) and the packed stream indicator.
The conclusions I see is as follows:
- When B-frames are disabled (Such as in Simple Profile), packed
bitstream for those profiles is not supported at all. See TEST 4, and
even in VFW the packed bitstream option is disabled. Because of this non
packed bitstream N-VOPs are inserted, is that actually logical and allowed?
- A lot of the decoders (see end of the analysis) are not frame accurate
and do not consider the N-VOPs accurately, this seems to even be the
case of the Xvid Directshow filter(?).
- When I run MP4Box on TEST 4, with the following options:
mp4box -nodrop -new -add %2_%bitRateHigh%_MP4 at SP_Xvid_packed.avi
%2_MP4 at SP_%bitRateHigh%_Xvid_packed_nodrop.mp4
MP4Box gives the following result :
AVI XVID video import - 320 x 240 @ 29.9700 FPS - 1176 Frames
Indicated Profile: ISO Reserved Profile
Import results: 1176 VOPs (6 Is - 1170 Ps)
Stream has 27 N-VOPs
Converting to ISMA Audio-Video MP4 file...
Saving
C:\video\testsuite\xvidtests\sherlock_qvga at 30fps_MP4@SP_768k_Xvid_packed_nodrop.mp4:
0.500 secs Interleaving
GSpot then indicates that the resulting MP4 has DF N-VOPs as P-VOPs.
1176 frames total.
MP4Box gives the following result :
mp4box -new -add %2_%bitRateHigh%_MP4 at SP_Xvid_packed.avi
%2_MP4 at SP_%bitRateHigh%_Xvid_packed.mp4
AVI XVID video import - 320 x 240 @ 29.9700 FPS - 1176 Frames
Indicated Profile: ISO Reserved Profile
Import results: 1149 VOPs (6 Is - 1143 Ps)
import using Variable Frame Rate - Removed 27 N-VOPs
Converting to ISMA Audio-Video MP4 file...
Saving
C:\video\testsuite\xvidtests\sherlock_qvga at 30fps_MP4@SP_768k_Xvid_packed.mp4:
0.500 secs Interleaving
GSpot then indicates that the resulting MP4 has only P-VOP, but only
1,149 frames, so 27 frames have been removed.
The four encoding tests I used:
TEST 1 =============================================
sherlock_qvga at 30fps_768k_MP4@ASP_DivX_Xvid.avi
Mencoder options:
bitrate=768
profile=asp5
me_quality=6
trellis
vhq=1
min_iquant=2
min_pquant=2
min_bquant=2
frame_drop_ratio=0
nopacked
par=vga11
max_bframes=2
MPEG4Modifier analysis on output file:
Packed bitstream: No
QPel: No
GMC: No
Interlaced: No
Aspect ratio: Square pixels
Quant type: H.263
FourCC: XVID
User data: XviD0050
I-VOPs: 6 (0,51%)
P-VOPs: 453 (38,52%)
B-VOPs: 717 (60,97%)
S-VOPs: 0 (0,00%)
N-VOPs: 0 (0,00%)
Max consecutive B-VOPs: 2
1 consec: 41,02%
2 consec: 58,98%
TEST 2 =============================================
sherlock_qvga at 30fps_768k_MP4@ASP_DivX_Xvid_packed.avi
Mencoder options:
bitrate=768
profile=asp5
me_quality=6
trellis
vhq=1
min_iquant=2
min_pquant=2
min_bquant=2
frame_drop_ratio=0
packed
par=vga11
max_bframes=2
MPEG4Modifier analysis on output file:
Packed bitstream: Yes
QPel: No
GMC: No
Interlaced: No
Aspect ratio: Square pixels
Quant type: H.263
FourCC: XVID
User data: DivX503b1393p
XviD0050
I-VOPs: 6 (0,51%)
P-VOPs: 453 (38,52%)
B-VOPs: 717 (60,97%)
S-VOPs: 0 (0,00%)
N-VOPs: 0 (0,00%)
Max consecutive B-VOPs: 2
1 consec: 41,02%
2 consec: 58,98%
TEST 3 =============================================
sherlock_qvga at 30fps_768k_MP4@SP_Xvid.avi
Mencoder options:
bitrate=768
me_quality=6
trellis
vhq=1
min_iquant=2
min_pquant=2
min_bquant=2
frame_drop_ratio=0
nopacked
par=vga11
profile=sp4a
MPEG4Modifier analysis on output file:
Packed bitstream: No
QPel: No
GMC: No
Interlaced: No
Aspect ratio: Square pixels
Quant type: H.263
FourCC: XVID
User data: XviD0050
I-VOPs: 6 (0,51%)
P-VOPs: 1143 (97,19%)
B-VOPs: 0 (0,00%)
S-VOPs: 0 (0,00%)
N-VOPs: 27 (2,30%)
TEST 4 =============================================
sherlock_qvga at 30fps_768k_MP4@SP_Xvid_packed.avi
Mencoder options:
bitrate=768
me_quality=6
trellis
vhq=1
min_iquant=2
min_pquant=2
min_bquant=2
frame_drop_ratio=0
packed
par=vga11
profile=sp4a
MPEG4Modifier analysis on output file:
Packed bitstream: No
QPel: No
GMC: No
Interlaced: No
Aspect ratio: Square pixels
Quant type: H.263
FourCC: XVID
User data: XviD0050
I-VOPs: 6 (0,51%)
P-VOPs: 1143 (97,19%)
B-VOPs: 0 (0,00%)
S-VOPs: 0 (0,00%)
N-VOPs: 27 (2,30%)
CODEC TESTS (using GraphStudio)
-------------------------------
These tests check the video output of the different DirectShow filters
tested, on
the MP4 generated by TEST 4 (With the 27 N-VOP frames in the MP4 Stream).
-> 3IVX 5.0.2
-> DivX 6.8.5
-> Xvid 1.2.2
-> FFDSHOW tryouts 3530 (August 2010)
1) MPC MP4 Splitter -> FFDSHOW -> Monograph FRAME Grabber (YUV Sequence)
Generated YUV (I420 file size): 132 364 800.
1149 Frames grabbed (NOK!)
2) 3IVX MPEG-4 Splitter -> 3IVX Video Decoder -> Monograph FRAME Grabber
(YUV Sequence)
Generated YUV (I420 file size): 135 475 200.
1176 Frames grabbed (OK)
3) 3IVX MPEG-4 Splitter -> XVID Video Decoder -> Monograph FRAME Grabber
(YUV Sequence)
Generated YUV (I420 file size): 108 199 936.
939 Frames grabbed (NOK!)
4) MPC MPEG-4 Splitter -> XVID Video Decoder -> Monograph FRAME Grabber
(YUV Sequence)
Generated YUV (I420 file size): 140 083 200.
1216 Frames grabbed (NOK!)
5) MPC MPEG-4 Splitter -> DivX Video Decoder -> Monograph FRAME Grabber
(YUV Sequence)
Generated YUV (I420 file size): 135 475 200.
1176 Frames grabbed (OK)
Hope this helps you out a bit, if not, I can send you my complte batch
files, tools as well as the video sequence tested.
Best regards,
Carl
More information about the Xvid-devel
mailing list