Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
A Bug Found In Virtualdub 1.5.4, Bug in framerate conversion
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
sswroom
Posted: May 30 2003, 04:56 PM


Unregistered









Test file:
http://sswroom.uhome.net/test-.avi

Procedure 1:
1 open the file
2 Video > Direct Stream Copy
3 Video > Framerate
4 Frame rate conversion > Convert to fps: 119.88 (source rate = 23.976, 1:5)
5 Save AVI

Result 1:
Source file contains 3 frames only. The output AVI file contains 14 frames (not 15 frames??).
--------------------------------------
Procedure 2:
1 open the file (same file)
2 Video > Direct Stream Copy
3 Video > Framerate
4 Source framerate adjustment > Change to 29.97 frames per second
5 Frame rate conversion > Convert to fps: 59.94
6 Save AVI

Result 2:
Source Frame type: (K = Key frame, D = Drop frame, d = delta frame)
0 K
1 D
2 d

Output Frame type:
0 K
1 D
2 D
3 D
4 D <-- Why add drop frame here, not adding after delta frame?
5 d

 
  Top
phaeron
Posted: May 31 2003, 02:15 AM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



These aren't bugs, I'm afraid -- they're caused by roundoff errors due to mixing rational and decimal frame rates.

In your first case, your file is NTSC FILM (24000/1001 fps), but your actual target is 11988/100 fps. The actual ratio between the two is a tiny bit less than 5:1, which with point sampling is enough to ensure you get one frame less than you expected. This is a UI issue -- the engine itself receives the conversion target rate in rational form and you can specify the exact value by editing the script.

In your second case, the problem is that the "adjust frame rate" value actually sets frame period in microseconds rather than rational or decimal. (This is a legacy adjustment that needs to be fixed.) The actual frame rate is 1000000 / round(1000000 / 29.97) = 29.9697 fps, meaning your conversion ratio is 59.94 / 29.9697 = 2.000004:1. As it happens, that 0.000004 resulted in an extra frame early in the process. Unfortunately, in this case you can't easily work around the issue as the engine only accepts periods in microseconds. You can, however, edit the dwRate/dwScale values in the AVI file directly to (30 75 00 00 E9 03 00 00) without too much difficulty.

 
    Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
1 replies since May 30 2003, 04:56 PM Track this topic | Email this topic | Print this topic

<< Back to Testing / Bug Reports