|
|
| Dowlphin |
Posted: Apr 9 2014, 12:47 PM |
 |
|

Member
 
Group: Members
Posts: 23
Member No.: 37864
Joined: 9-April 14

|
I had this problems with various versions of Vdub and x264VFW, for as long as I can remember using those. It might not be exclusively a problem with VDub, but with the encoder maybe:
I render a video - doesn't matter whether it's a custom cut or a re-render of the whole video. I re-open it in VDub and the first two frames are black, and if I scroll back, the second is black and the first becomes the third. At the end there's also two frames missing, which is the real problem. This makes me wish even more VDub had an ffdshow API, because it doesn't happen when I open it using ffsdshow and AVISynth, but that's annoyingly inconvenient. An old version of After Effects throws error messages for the first few frames, too, though.
The contents of the video are fine. All frames are there and are being played, just VDub can't open them properly.
This problem does not occur if the video was rendered using one of the encoder settings "lossless" or "zero latency". (The latter seems to create pixelation in certain frames.)
In VDubMod the problem is the same (2 frames) and in VDub64 it manifests with a whopping 5 frames offset (rendered in 64 bit, opened in VDub32) or 9 frames (rendered in 64 bit, re-opened in VDub64).
Not sure whether that is related to x264FVW's "VDub hack", but if I disable that, the number of offset frames is extreme - spanning several seconds, so I never did that except now for testing purposes.
I'm working with the x264 codec a lot, so this is bothering me quite a bit. |
 |
| raffriff42 |
| Posted: Apr 9 2014, 01:27 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12

|
Confirmed; I see some black frames at the start; after jogging back and forth a bit, I might see video in those first frames, but the action will be out of order.
If I open the file with the DirectShow or FFmpeg input drivers, I see two or three repeated frames at the start - an improvement, but still, something is wrong.
I have found a different problem using x264vfw: when the file is uploaded to YouTube, the audio is sometimes cut off early. I now use VirtualDub with external encoders for any serious H.264 output.
(BTW zero latency is mostly for live video, ie, videoconferencing)
(I use x264vfw with preset=veryfast, fast decode On, zero latency Off, CRF 18, VirtualDub hack On.) |
 |
| dloneranger |
| Posted: Apr 9 2014, 02:16 PM |
 |
|
Moderator
  
Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07

|
It's because of b-frames in the encoding, you'll have a delay of however many b-frames are in the pipeline Virtualdub and avi's use VFW (video for windows) that's a fairly old system where one frame decoded gives one frame for display More modern video codecs have all these p and b frames "things"™ that don't give a full picture for display Instead the picture is made up of a mix of frames before and after the one you're actually looking at x264vfw's virtualdub hack squishes p-frames in with i-frames or null frames for decoding - nothing you can do about b-frames though as they haven't been created at that point in time (that's probably why there's a problem with youtube, their decoder doesn't handle those squished frames well and get the framecount wrong)
On playback with a normal player, those first black/green frames should not be shown as they should be skipped over by the player
Turning off b-frames is one option, but lowers the efficiency of the encoder (x264vfw's zero latency option) Or you can use an input plugin that can handle this kind of file DirectShow and FFMpeg plugins will both read these correctly, without showing black frames, or having a display delay as you move through the file One slight drawback is that these kind of files require the decoder to jump backwards and forwards through the file to put all hte pieces together again, so seeking can be a bit slower That depends on how the file was created though -> wmv's with no index can be a complete pain to seek in
There's an explanation of the frame types and a little picture -> note the way the b-frame (3rd frame) needs part of a frame that hasn't been read from the file yet (4th frame) http://en.wikipedia.org/wiki/Video_compres...n_picture_types
-------------------- MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask Windows7/8 Codec Chooser All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3 |
 |
| Dowlphin |
| Posted: Apr 9 2014, 02:58 PM |
 |
|

Member
 
Group: Members
Posts: 23
Member No.: 37864
Joined: 9-April 14

|
@dloneranger Interestingly, I can encode XviD with b-frames into AVI and the problem doesn't occur. And luckily I never had issues like that with Youtube uploads.
I forgot about input drivers. Probably I forgot how to use them. (Open dialoge and then selecting the acording file type description, right?) If my way of ffdshow-AVISynth avoids those empty frames, I guess the ffdshow input driver could do it, too. ... And it does! Nice, now things got somewhat less complicated. Now how do I tell VDub to use this input plugin as default, during file open operation, before having launched the program itself?
@raffriff42 I always use external audio encoders with VDub. The ones that are in the list by default didn't impress me one bit, haha. I trust LAME-ACM. I haven't checked new stuff in quite a while - Is there a proper AAC encoder by now? And can I save as MKV? VDubMod can do that, but I don't want to go back to that old thing. ... And what I also like about VDubMod is the way it manages and displays audio tracks. I've always wondered why those features were never integrated them into the main VDub. It can handle so many modern things now, but it's still limited to the AVI format. (Yeah I know, I can convert it afterwards to MKV or MP4. It's just tedious.) |
 |
| dloneranger |
| Posted: Apr 9 2014, 03:14 PM |
 |
|
Moderator
  
Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07

|
The streams feature of vdubmod was nice, but it's so old I can't go back to using it
Plugins report a priority back to virtualdub and highest wins Not sure if virtualdub's own avi handler has top priority, but for the next version of FFMPeg plugin I'm going to make the priority a user adjustable option
Nero, qaac and ffmpeg can encode aac (qaac uses part of quicktime) The external encoder method is really nice, especially as you can use batch files for better control Raffriff42 has done his (as usual, excellent) guides on this, that are ummm somewhere about on here
External encoding uses two codecs (video and audio) and a muxer The codecs produce two files and the muxer joins them up For mkv you can use ffmpeg or mkvtoolnix to mux
Xvid files may not be using b-frames, or a decoder that's just throwing them away before the first i-frame? Normally you'll get green first frames from xvid if it's got b-frames
-------------------- MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask Windows7/8 Codec Chooser All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3 |
 |
| Dowlphin |
| Posted: Apr 9 2014, 03:42 PM |
 |
|

Member
 
Group: Members
Posts: 23
Member No.: 37864
Joined: 9-April 14

|
The plugin priority would really be nice. FFdshow is so powerful that I'd probably prefer to let it open everything it can as a VDub default. And this also hints at me being kind of convenience-oriented here. I got a bunch of tools like mkvtoolnix and DGAVCDEC and such on my computer and I'm always happy if I can eliminate one of them from the workflow. Currently I'm making my Youtube videos as x264-AVIs with 320 kbit/s LAME MP3 audio. I guess it's not that bad. Upload takes a little longer than, say, 192 kbit/s AAC, but hey, audio data rate is small compared to video bitrate. The LAME ACM can become a bit bothersome though, since while I can open videos with AAC in VDub and save them with PCM, if I try to convert that audio stream to MP3, it tells me no-can-do. It lists the correct data format as a selectable list option, but when attempting to start the render, it says no suitable compressor found. Same with VDub's own MP3 encoder. Because of this I tend to juggle with huge data by saving my projects into LAGS+PCM first and do the final format from there. |
 |
| dloneranger |
| Posted: Apr 9 2014, 03:45 PM |
 |
|
Moderator
  
Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07

|
Yup, love convenience I used to do everything lags+pcm, but now I just use FFMPeg plugin for everything I cheat and modified virtualdub for my own needs though, so it uses the plugins I want all by itself
-------------------- MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask Windows7/8 Codec Chooser All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3 |
 |
| raffriff42 |
| Posted: Apr 9 2014, 06:04 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12

|
@Dowlphin, I think you misunderstand VirtualDub's special meaning of "external encoder" It doesn't mean "Windows encoders not built into VirtualDub," it means "don't use Windows encoders at all, use command line encoders." See How to use the external encoder feature, and follow the links in my previous post for more information. |
 |
| Dowlphin |
| Posted: Apr 9 2014, 06:37 PM |
 |
|

Member
 
Group: Members
Posts: 23
Member No.: 37864
Joined: 9-April 14

|
Thanks for pointing that feature out. It's just a bit inflexible, like if you want to change the encoding bitrate, you have to access that command line there and change it, and hope that the formats match somehow(?) ... Or create a stack of different profiles? And with all the complications already present, I don't trust such a process to frame-accurately synch the streams unless I've studied this in-depth. I'll check it out in more detail when I have the brainpower, but it all seems an awful lot of text to deal with. I've grown up with MS-DOS and I don't really miss the command lines and fiddling with syntax. Hell, this is why I'm trying to make AVISynth obsolete for my needs.
GUI is great. It's like a regular toolbox, that you open and see what's available. Command line stuff is like a toolbox that you open and it's empty, and you have to say the correct name and attibutes of a tool to make it appear in the box ... if it's available. Might work well for Picard and the replicator, but that's a different thing. |
 |
| raffriff42 |
| Posted: Apr 9 2014, 06:46 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12

|
I know what you mean. I still do LAGS+PCM too (actually UT Video+PCM) - it actually saves time if you are running a heavyweight Avisynth script. (script accessing many frames for temporal averaging etc + "log-GOP" compressor keeping many frames in memory = CPU/RAM overload) |
 |
|