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.

Pages: (14) « First ... 3 4 [5] 6 7 ... Last » ( Go to first unread post )
Test Thread: Virtualdub 1.7.x, 1.7.X?
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
phaeron
Posted: Oct 29 2007, 08:16 AM


Virtualdub Developer


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



The reason for the playback stuttering is that VirtualDub is unable to correctly determine the local bitrate of the VBR stream, and the audio playback buffer either hits an overflow or underflow condition. This is a side effect of having preview bolted on the side of the rendering engine -- the interleaver is still active. If you change the audio mode to full processing mode, the variable bitrate nature is stripped out prior to that point and things work. It shouldn't actually affect the data written out in either case, although it will affect interleaving in the direct case (which won't work well anyway).

This was one of the things that took me a while to fix for the internal plugins in 1.7.X, which I eventually did by adding an additional VBR mode -- true VBR, versus 1.7.6's psuedo VBR -- and changing the audio playback timing code to use timestamps instead of samples. True VBR mode is not exposed in the plugin API yet, unfortunately, but it's something I plan to add (has to wait until at least next weekend, I guess :-/ ). I might also be able to work around the issue also by making more use of the VBR time-to-position and position-to-time conversion functions -- might not be a bad idea anyway, as it would also improve interleaving for the psuedo VBR case.
 
    Top
XYZ
Posted: Oct 30 2007, 01:54 AM


Advanced Member


Group: Members
Posts: 48
Member No.: 22012
Joined: 27-August 07



I am sorry, I didn't wanted to sound harsh and impertinent. I already decided to leave this forum because my posts are misinterpreted, maybe because of my lack of English. I have just one additional note about different approaches of several software for appending files, if you don't mind. I extracted only video streams checking:

1. VirtualDub\source\AVIReadHandler.cpp - AVIReadHandler::AppendFile
CODE
if (fccOld != fccNew)

if ((sint64)pasn_old->hdr.dwScale * pasn_new->hdr.dwRate != (sint64)pasn_new->hdr.dwScale * pasn_old->hdr.dwRate)

if (pasn_old->hdr.dwSampleSize != pasn_new->hdr.dwSampleSize)

if (hdr1.biWidth != hdr2.biWidth || hdr1.biHeight != hdr2.biHeight)

if (hdr1.biCompression != hdr2.biCompression)

I put here VirtualDub's lines of code only for better comparation.

2. AVIMux_GUI\AVIMux_GUIDlg_AddFileList.cpp - CAVIMux_GUIDlg::OnAddFileList
CODE
// check if number of streams is the same          
if (a1->GetNbrOfStreams() != a2->GetNbrOfStreams())

// check if video resolution is the same
if (dwX[0] != dwX[1] || dwY[0] != dwY[1])

// check if video compression formats are the same
if (a1->GetFormatTag(0) != a2->GetFormatTag(0)) {

// check if framerate is the same. If it is not, only MKV output is possible                  
if (!bVFR && fabs((double)a1->GetNanoSecPerFrame() - (double)a2->GetNanoSecPerFrame()) > 1000)

In AVI-Mux GUI there is similar check for the number of streams, video resolution and the type of compression as it is in VirtualDub, but frame rate is calculated as double type and rounded to microseconds per frame. There is not a check for SampleSize.

3. avidemux\ADM_editor\ADM_edit.cpp - ADM_Composer::addFile
CODE
/* check for resolution */
if( info0.width != infox.width || info0.height != infox.height )

In Avidemux there is no check for the number of streams (you could try to append files with one and two audio streams, but second part of the resulting AVI will be bad)! There is no frame rate check (you can mix 25 and 12.5 fps without a problem, frame rate of the appended file is converted to the frame rate of the first file). There is no check for a type of compression (you can try to mix XviD and Indeo or even MPEG2, but second part of the resulting AVI will be bad)! Copy mode and Smart Copy are used, which is another way to get the smart rendering.

I am not saying that some approach is better or not. Especially, I don't want to say that VirtualDub is doing badly. I already said that VirtualDub is great software and I like it very much. As I said, I just wanted to help in some way to get it even better. But, never mind. I'd not disturbing you anymore.
 
     Top
olnima
Posted: Oct 30 2007, 09:15 AM


Advanced Member


Group: Members
Posts: 204
Member No.: 17204
Joined: 12-November 05



@XYZ:
I don't know if I get You right but what is the point to combine two avi-segments if the 2nd part of the avi is bad?
I like it more the existing way - means if VD let me append an avi-segment I can be shure that the resulting avi is good and usable. smile.gif

greetz
Olnima
 
     Top
and22
Posted: Oct 30 2007, 09:38 AM


Member


Group: Members
Posts: 14
Member No.: 22337
Joined: 29-October 07



I have problems with 1.7.X test5. When I use curve editor, effect is sometimes applied several hundreds frames earlier (or later) and not at current frame as expected. Moreover, when I save settings from File menu, quit VD, run VD and load settings again, curve settings do not work. I tested that with Delogo filter but I think that is a common problem. Those don't happen in 1.7.6.

to phaeron:
First, thank you for implementing preview in several of your internal filters (I asked you of that some time ago) - it's much easier to work with them now. I could not do that earlier as for unknown reason my registration on this forum was removed (as well as all my posts) and today only I registed again.
Second, as for curve editor, - color of vertical lines in curve editor (which indicate each separate frame) is very close to black color of background. As I often work frame by frame it's very important to see each frame but now it's very difficult. Is it possible if you make color of those frame lines little bit brighter?

And last. When saving settings, size of input and output panels is not saved. Because of that one has adjust them every time he starts VDub again. Will it be difficult for you to implement such feature as saving size (scale) of input and output panels in *.vdf file f.e.?
 
     Top
XYZ
Posted: Oct 30 2007, 12:18 PM


Advanced Member


Group: Members
Posts: 48
Member No.: 22012
Joined: 27-August 07



QUOTE (olnima @ Oct 30 2007, 09:15 AM)
I don't know if I get You right but what is the point to combine two avi-segments if the 2nd part of the avi is bad?
I like it more the existing way - means if VD let me append an avi-segment I can be shure that the resulting avi is good and usable.  smile.gif

I decided not to actively participate in this forum anymore, but if you ask me a question, I suppose that you want an answer from me. I think if you read my posts in this thread from the beginning that you could find an answer, but it is not hard for me to repeat.

1. I have two AVI files which I want to append. These AVIs are parts of the same AVI file which was previously splited in Direct stream copy. I want just opposite - to append this two parts into one AVI file. VirtualDub refuses that, other two mentioned software don't. Resulting AVI file appended by this two software is not bad at all, it plays perfectly. Reported difference by VirtualDub because it refuses to append AVI files is very small (24001 bytes/sec vs. 24000 bytes/sec).

2. After reading post on videohelp, I decided to reproduce mentioned problem. I described what I did in every detail. Please, try by yourself and you will see a same error message of VirtualDub when you try to append such files. Same as previous - resulting AVI file which is appended by another two software is not bad, it plays perfectly. Again, reported difference is very small (23.97602 vs. 23.97600 samples per sec).

You are right, I don't want to get bad AVIs either. But, these two situations has nothing similar with my last post. Avidemux could append AVI files without almost any checking. I tried to append two AVI files with different number of audio streams and different video formats just for experiment, not because I need such thing.

Maybe you are wondering why some video software has something like this. It is obvious, and has a name "Smart rendering" or "Smart copy" as is its name in Avidemux. It is another story why this "Smart copy" don't works as it should in Avidemux. But tell me, wouldn't be great if video software could append two AVI files recompressing only needed parts and not complaining about its formats? I already posted suggestion about that in this thread:
http://forums.virtualdub.org/index.php?act...ST&f=11&t=14731
 
     Top
neuron2
Posted: Oct 30 2007, 01:02 PM


Advanced Member


Group: Members
Posts: 1244
Member No.: 5294
Joined: 18-July 03



.
 
    Top
dchrbv
Posted: Nov 2 2007, 06:58 AM


Newbie


Group: Members
Posts: 2
Member No.: 22357
Joined: 1-November 07



HI

It's my first post in this forum.
I usually only read other posts, but the reason for writing this is that I agree with XYZ regarding the "problem" he is describing. I casually use virtualdub (since a ..long... while) to join multiple avi files and have noticed that the program would not join avi files with a difference of only 0.0000x frames, even it produced the files itself in a batch process, with exactly the same settings. I download every time a new version in the hope phaeron implements something like a "are you sure" dialog with permits a join even if the program detects this difference. This would be a nice addition, because just of the lack of this function, I have to seek for another program for joining, but none is so easy to use and trustworthy in the output like virtualdub.
The last time I saw this problem was after converting in batch some identical wmv files, wchich I've just transformed into avi (divx) using fccHandler WMV plugin. Even if virtualdub says that every single frame has a frame rate of 29.97000 when loading individual files, it won't load the next file because it reports that the appended file has a 29,96900 frame rate.

Thank you
 
     Top
phaeron
Posted: Nov 2 2007, 05:36 PM


Virtualdub Developer


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



QUOTE (dchrbv @ Nov 1 2007, 11:58 PM)
Even if virtualdub says that every single frame has a frame rate of 29.97000 when loading individual files, it won't load the next file because it reports that the appended file has a 29,96900 frame rate.

This sounds like a different problem -- irregardless of how strict the append is, it shouldn't be reporting a different frame rate. Do you have a reproducible case for this?
 
    Top
dchrbv
Posted: Nov 2 2007, 09:58 PM


Newbie


Group: Members
Posts: 2
Member No.: 22357
Joined: 1-November 07



The problem I've described earlier was produced with Virtualdub 1.7.6 and 1.7.x and WMV plugin 1.3. I have updated the WMV plugin to 1.4 and I can't save the avi file anymore without resizing it - the source WMV file has a 720x540 pixel size - error message is "The source image format is not acceptable (error code -2)". I don't think this is related with what I said earlier.
Previously (with 1.3 plugin) I could save the file directly, without resizing, but the target avi did have a 640x480 pixel size (I didn't insert a resize filter), and that were the files I couldn't join. If I now apply a resize filter it works - and the joined file is OK.
What I meant is exactly what XYZ described (it would be a nice feature, if tehnically possible) - the posibility to choose wherther to continue or not the joining due to such a small difference in frame rate. I will search this weekend for older files with which I've had in the past the mentioned problem of recoding and not joining - what I usually I do is to convert multiple files to a common sampling avi and join them - I like the easy way in Virtualdub to quickly remove unwanted overlapping frames.
I hope I've made myself clear - I'm only a casual English speaker
 
     Top
squid_80
Posted: Nov 18 2007, 02:50 AM


Advanced Member


Group: Members
Posts: 594
Member No.: 13813
Joined: 22-January 05



Is it expected behaviour for timeline edits to not affect the audio if it's an external source (loaded via "Audio from other file")? Even if the source is loaded before the edits are applied?

Edit: Never mind, too many late nights, didn't realize audio from other source was staying active when I switched files.
 
     Top
squid_80
Posted: Nov 18 2007, 10:22 AM


Advanced Member


Group: Members
Posts: 594
Member No.: 13813
Joined: 22-January 05



Ok, a real bug this time: load a video, add a filter that changes the framecount/framerate (such as ela doubler), add another filter and open the cropping dialog for that filter. The cropping dialog timeline only shows the original number of frames.
 
     Top
squid_80
Posted: Nov 18 2007, 11:02 AM


Advanced Member


Group: Members
Posts: 594
Member No.: 13813
Joined: 22-January 05



QUOTE (phaeron @ Oct 21 2007, 11:59 AM)
V1.7.X test-1 introduced an additional overload of audio.SetSource() to allow the input driver to be specified. This is necessary in case you have a file that can be read by multiple input drivers and you force a specific one in the file dialog. This wasn't necessary in earlier versions because only the WAV driver was ever used. The 1.7.6 one-argument syntax is still supported, but it auto-selects the best available input driver for the file.

This doesn't seem to work; saving the processing settings does indeed write out virtualdub.audio.setsource("file", "") but when trying to load the .vcf it throws an error: Overloaded method SetSource(string, string) not found.

I removed the else { } clause from around mAudioInputDriverName = pSelectedDriver->GetSignatureName() in VDProject::OpenWAV (project.cpp) and added another overload for func_VDAudio_SetSourceExternal (args "0ss") in script.cpp and that seems to fix it.
 
     Top
Fizick
Posted: Nov 19 2007, 08:06 PM


Newbie


Group: Members
Posts: 1
Member No.: 22462
Joined: 19-November 07



dchrbv,
abcAVI Tag Editor allows changing of FourCC video codec signatures, AVI frame rate (playback speed) and video frame size.
http://abcavi.kibi.ru/
 
      Top
phaeron
Posted: Nov 20 2007, 07:52 AM


Virtualdub Developer


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



QUOTE (squid_80 @ Nov 18 2007, 04:02 AM)
This doesn't seem to work; saving the processing settings does indeed write out virtualdub.audio.setsource("file", "") but when trying to load the .vcf it throws an error: Overloaded method SetSource(string, string) not found.

Damn, that was stupid. For that, I owe you a test build.

http://www.virtualdub.org/beta/VirtualDub-...1.7.X-test6.zip
http://www.virtualdub.org/beta/VirtualDub-...test6-AMD64.zip
http://www.virtualdub.org/beta/VirtualDub-....X-test6-src.7z

Changing project.cpp actually isn't the fix I went with... what's supposed to happen is that if you choose autoselect when opening the file, it still chooses autoselect in the job. This means that by default if you use a plugin to create a job and that plugin goes away, VirtualDub can still open the wave file with a different one. Not sure it matters much, but that's at least what the video side does.

Good catch on the cropping dialog w/ frame rate change bug... guess I might as well rewrite that dialog too. In case you don't know, writing raw Win32 UI really sucks, and I'm not one to use UI toolkits, partly because I think most of them suck almost as much as bare Win32. That's a rant for a blog entry, though (because I blog oh so much).

Veedub Time™ has been a bit scattered, so thus has been the work, but a few things in this build:

  • The filter list dialog has been rewritten and now allows individual entries to be temporarily enabled or disabled. I also replaced the listbox with some autosizing list view goodness.
  • Did some work on the MP3 input code to make it more robust (damn layer I free form), and also fixed a stupid mistake where I accidentally disabled optimization on the decoder code. I did a little optimization on it too, and then went back and fixed the stuff I broke when I optimized it. dry.gif
  • I adapted the pitch scaler code and wrote a new time stretch filter. The pitch scaler was actually a time stretcher with a crappy bilinear resampler on the end to correct the time length; this mainly just rips that off, so it does what people actually want in practice with better quality and a little less hassle.
  • The stretch audio filter, along with the new time stretch filter, now use much higher internal stepping precision and allow many more digits to be entered in the configuration dialog.
  • A few commands can be used during preview, most notably dragging the time bar and the mark-in/mark-out commands. This doesn't work as well as I'd like, since I'm pretty restricted in what I can allow due to threading issues -- in particular, hitting mark-in/out actually causes the preview to stop and restart, and it's a little off right now... but I'm seeing if someone finds it useful as-is, since it was requested.
  • Plugins can now export true VBR audio. I hadn't gotten a chance to actually try this and it's not documented, but you can find the new interfaces if you dig into src/h/vd2/plugin/vdinputplugin.h. You have to implement an AsInterface() query to the new interfaces and then set the magic flag that indicates the new (er, old) scheme for returning VBR samples. The new interfaces and structs aren't final yet, so don't ship production plugins that export them....
  • I fixed a bug in the 128-bit integer multiply routines that I happened to find while screwing around with fast division. I don't think this actually affected anything, which is why it's not in the change list, although in theory it might have affected audio resampler accuracy slightly in capture mode if you were doing a really long capture. The bug's in carry propagation out of one of the high bytes, so it'd be pretty hard to hit.


I did a little work on allowing plugins to delegate video decoding to VirtualDub, but there's a mess in VideoSource.cpp I have to clean up first, so nothing visible yet. I intend for that to get into 1.7.X before ship.

Looking at 1.7.7, there's not much on the pile, but I might try pushing it out some time this weekend. Given the relatively slow rate of check-ins into that branch, I'm thinking that 1.7.X might become 1.7.8.
 
    Top
rfmmars
Posted: Nov 27 2007, 01:15 AM


Advanced Member


Group: Members
Posts: 324
Member No.: 5438
Joined: 29-July 03



I have long waited for the ability to turn off and on a filter, and thats works great. However you can never edit in the filter again, double clicking doesn't do anything. You can delete the filter and bring it in again but can adjust it only one time.

1.7x-6

Richard
 
     Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
196 replies since Oct 17 2007, 05:26 AM Track this topic | Email this topic | Print this topic
Pages: (14) « First ... 3 4 [5] 6 7 ... Last »
<< Back to Testing / Bug Reports