|
|
| ALbino |
| Posted: Feb 9 2010, 10:51 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 101
Member No.: 26983
Joined: 9-February 10

|
Hey all,
I'm using XP, VirtualDub 1.9.8, and the latest MPEG-2 plugin (1/30/10) by fccHandler.
It takes approximately 50 seconds to load a VOB from my slower 5400rpm laptop HDD compared to over 3 minutes and 10 seconds to load it from my 7200rpm external drive over USB 2.0. Once they're loaded into VirtualDub the external drive actually converts to AVI at a slightly higher FPS than the internal, but that load time is just terrible. Does anybody have any insights into what might be causing this and if there's a fix?
As a side note: has anyone ever considered porting FlaskMPEG's MPEG-2 decoder? It loads MPEG-2 files almost instantaneously.
Thanks! |
 |
| Placio74 |
| Posted: Feb 10 2010, 06:02 AM |
 |
|

VideoAudio
  
Group: Members
Posts: 1216
Member No.: 21485
Joined: 24-May 07

|
It's not a problem with decoding. Wait for fccHandler's answer/explanation (what happens (indexing, before decoding) when you open MPEG-2 PS and why).
BTW Of course... with already created an index file, then it (VD with MPEG-2 plugin) loads MPEG-2 files almost instantaneously.
BTW Can use VirtualDub to simple conversion, but this is primarily a video editor.
-------------------- VideoAudio.pl - Serwis o technologii wideo & audio |
 |
| ALbino |
| Posted: Feb 10 2010, 06:12 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 101
Member No.: 26983
Joined: 9-February 10

|
I assumed it was something like that, but wasn't entirely sure. Just out of curiosity, why does a program like FlaskMPEG not have to index the MPEG-2 file first? Or does it just do it VERY fast?
Is there any way to batch-index VOB files in advance so they load instantly?
Thanks for the reply, Placio. I look forward to hearing fccHandler's explanation on why indexing over USB is so slow.
(FWIW, if it helps, I believe FlaskMPEG just uses the MSSG MPEG-2 decoder, but I could be wrong.) |
 |
| stephanV |
| Posted: Feb 10 2010, 08:07 AM |
 |
|
Spam killer ;)
  
Group: Moderators
Posts: 4348
Member No.: 8917
Joined: 18-February 04

|
| QUOTE (ALbino @ Feb 10 2010, 07:12 AM) | | I assumed it was something like that, but wasn't entirely sure. Just out of curiosity, why does a program like FlaskMPEG not have to index the MPEG-2 file first? Or does it just do it VERY fast? | Indexing MPEG files is required to do frame accurate editing as MPEG files do not have an index themselves (this is why WMP often shows the wrong length for MPEG files).
I don't know if Flask offers any editing functionality, but if it doesn't it isn't required.
-------------------- useful links: VirtualDub, Input plugins and filters, AviSynth, AVI-Mux GUI, AC3ACM by fcchandler, VirtualDub FAQ |
 |
| ALbino |
| Posted: Feb 10 2010, 04:15 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 101
Member No.: 26983
Joined: 9-February 10

|
| QUOTE (stephanV @ Feb 10 2010, 08:07 AM) | Indexing MPEG files is required to do frame accurate editing as MPEG files do not have an index themselves (this is why WMP often shows the wrong length for MPEG files).
I don't know if Flask offers any editing functionality, but if it doesn't it isn't required. | FlaskMPEG is specifically designed to edit VOB (MPEG-2) files and pull snippets out of them. It's an old program that the developer abandoned years ago, but you can still find the program and source files here:
http://sourceforge.net/projects/flaskmpeg/
Is it possible it does frame-accurate editing without actually indexing? |
 |
| fccHandler |
| Posted: Feb 11 2010, 01:05 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
ALbino:
The MPEG-2 plugin doesn't do anything differently whether the input is on a hard drive or a DVD or a USB drive, so any slowdown you see can only be due to the speed of the media or interface. Is USB 2.0 really 3-4 times slower than a hard drive?
I haven't seen FlasKMPEG in almost 10 years, but I used to use it a lot and I don't remember any feature that would allow you to randomly seek to a specific position in an MPEG stream. If FlasK has acquired that ability in the intervening years then it definitely deserves to be revisited!
Are you telling me that FlasK can jump immediately to say, frame 3223 without having built an index of the stream?
It may interest you to know that the source code of my MPEG-2 plugin was also based around the MSSG MPEG-2 decoder, although at this point you probably wouldn't recognize it anymore.
-------------------- May the FOURCC be with you... |
 |
| ALbino |
| Posted: Feb 11 2010, 05:18 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 101
Member No.: 26983
Joined: 9-February 10

|
| QUOTE (fccHandler @ Feb 11 2010, 01:05 AM) | | The MPEG-2 plugin doesn't do anything differently whether the input is on a hard drive or a DVD or a USB drive, so any slowdown you see can only be due to the speed of the media or interface. Is USB 2.0 really 3-4 times slower than a hard drive? |
I can't imagine this to be the case, but you never know? :) Like I said, for saving the VOB to raw AVI (very large multi-gb filesizes) the external 7200rpm drive is actually slightly faster, or at worst equal to the 5400rpm laptop. Maybe USB bogs down with the hundreds (thousands?) of little chunk requests that indexing would require.
| QUOTE (fccHandler @ Feb 11 2010, 01:05 AM) | I haven't seen FlasKMPEG in almost 10 years, but I used to use it a lot and I don't remember any feature that would allow you to randomly seek to a specific position in an MPEG stream. If FlasK has acquired that ability in the intervening years then it definitely deserves to be revisited!
Are you telling me that FlasK can jump immediately to say, frame 3223 without having built an index of the stream?
|
Absolutely this is the case. I use FlaskMPEG (version 0.6) just about every day, and I *only* pull frame-specific content from it. I scroll to the specific scene I would like, then place a beginning marker, scroll to the end of the scene and then place an ending marker, after which I "flask it" to render a raw AVI. A typical 1gb VOB from a DVD will load in Flask in less than a second.
As the program has been more or less defunct for years if you have any specific questions about operating it, or would like me to send you the program files directly, I would be more than happy to assist you. Alternatively you can download them from the archived SourceForge page located here:
http://sourceforge.net/projects/flaskmpeg/files/
There are actually a few other things FlaskMPEG does with DVD content better than VirtualDub too (such as the Output Pad for determining proper Aspect Ratio and cropping accordingly), but that's probably a discussion for another day.
| QUOTE (fccHandler @ Feb 11 2010, 01:05 AM) | It may interest you to know that the source code of my MPEG-2 plugin was also based around the MSSG MPEG-2 decoder, although at this point you probably wouldn't recognize it anymore. |
Ah, that is interesting. I suppose more than anything I confused myself at the beginning by correlating indexing and decoding instead of realizing they were separate things. |
 |
| fredgiblet |
| Posted: Feb 11 2010, 06:50 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 356
Member No.: 22601
Joined: 13-December 07

|
Fragmentation? |
 |
| ALbino |
| Posted: Feb 11 2010, 05:09 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 101
Member No.: 26983
Joined: 9-February 10

|
| QUOTE (fredgiblet @ Feb 11 2010, 06:50 AM) | | Fragmentation? | Good question, I didn't defragment the drive, but I did check and it was only 1% fragmented according to Windows and none of the specific VOBs were listed as fragmented files. But just to be safe I think I'll go ahead and defragment it now and see what happens. |
 |
| dloneranger |
| Posted: Feb 11 2010, 05:45 PM |
 |
|
Moderator
  
Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07

|
You can check the drive speeds with something like hdtune for a nice graph
But usb2 is pretty slow compared to internal/esata speeds
-------------------- MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask Windows7/8 Codec Chooser All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3 |
 |
| fccHandler |
| Posted: Feb 12 2010, 02:11 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
| QUOTE (ALbino @ Feb 11 2010, 01:18 AM) | | I scroll to the specific scene I would like, then place a beginning marker, scroll to the end of the scene and then place an ending marker, after which I "flask it" to render a raw AVI. A typical 1gb VOB from a DVD will load in Flask in less than a second. |
I downloaded FlasKMPEG 0.78.39 and played around with it some. At first glance it does seem to have the capability you described, but upon closer examination I believe it is a clever trick.
Contrary to what you said, it isn't frame accurate as far as I can tell. It doesn't allow you to jump to a specific frame number, nor does it seem to know what frame it is showing you at any given moment. There is no indication of elapsed time either.
It takes longer to load a large video than it does to load a short one, so it is definitely parsing something and creating an index. I suspect it is parsing the system layer and nothing else. The fact that it will not load elementary video (which has no system layer) is another clue.
Still, seeking using the system layer alone is pretty slick! But that method would be unsuitable for a VirtualDub plugin because we absolutely have to be frame accurate. When VirtualDub says "give me frame 3223" we have to know exactly where that is and be able to produce it immediately.
In my experience the MPEG system layer isn't reliable enough to give us an accurate frame position. At best you can deduce a rough approximation, but if the stream is non-standard or broken your guess may be way off. And don't think that broken streams are rare. People innocently send me broken streams all the time asking "how come your plugin chokes on this?"
It's supposed to snow here starting tomorrow, so I'll probably spend part of my weekend looking at the source code of FlasK. I am quite curious to know really how it is doing this.
-------------------- May the FOURCC be with you... |
 |
| ALbino |
| Posted: Feb 12 2010, 04:23 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 101
Member No.: 26983
Joined: 9-February 10

|
| QUOTE (ALbino @ Feb 11 2010, 05:09 PM) | | QUOTE (fredgiblet @ Feb 11 2010, 06:50 AM) | | Fragmentation? |
Good question, I didn't defragment the drive, but I did check and it was only 1% fragmented according to Windows and none of the specific VOBs were listed as fragmented files. But just to be safe I think I'll go ahead and defragment it now and see what happens. | I went ahead and defragmented the external drive with no noticeable effect. |
 |
| phaeron |
| Posted: Feb 12 2010, 04:29 AM |
 |
|

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

|
Probably just checking present/decode timestamps with a guess/retry algorithm. The tricky part is that the timestamp isn't guaranteed to be monotonic, due to splicing and wrapping (limited number of bits).
|
 |
| ALbino |
| Posted: Feb 12 2010, 04:31 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 101
Member No.: 26983
Joined: 9-February 10

|
| QUOTE (fccHandler @ Feb 12 2010, 02:11 AM) | I downloaded FlasKMPEG 0.78.39 and played around with it some. At first glance it does seem to have the capability you described, but upon closer examination I believe it is a clever trick.
Contrary to what you said, it isn't frame accurate as far as I can tell. It doesn't allow you to jump to a specific frame number, nor does it seem to know what frame it is showing you at any given moment. There is no indication of elapsed time either.
It takes longer to load a large video than it does to load a short one, so it is definitely parsing something and creating an index. I suspect it is parsing the system layer and nothing else. The fact that it will not load elementary video (which has no system layer) is another clue.
Still, seeking using the system layer alone is pretty slick! But that method would be unsuitable for a VirtualDub plugin because we absolutely have to be frame accurate. When VirtualDub says "give me frame 3223" we have to know exactly where that is and be able to produce it immediately.
In my experience the MPEG system layer isn't reliable enough to give us an accurate frame position. At best you can deduce a rough approximation, but if the stream is non-standard or broken your guess may be way off. And don't think that broken streams are rare. People innocently send me broken streams all the time asking "how come your plugin chokes on this?"
It's supposed to snow here starting tomorrow, so I'll probably spend part of my weekend looking at the source code of FlasK. I am quite curious to know really how it is doing this. | Hmm, yeah, perhaps we had different definitions of "frame accurate". I was saying that you can scroll to a specific frame to start, and another one to end, but you're right in that it does not display the actual frame number, nor is there any way to jump to a specific frame -- however, with that said, if Flask is to make an AVI from those starting and ending points then surely it must be tracking those frame numbers at least internally? I suppose it is possible though that they're only giving an approximation. Usually I pull the AVI from Flask and then edit it later with VirtualDub or Premiere rarely picking the *exact* frame that I want, but more the general area for expediency's sake.
Elapsed Time is listed under File Time and is visible while the VOB is playing, or am I thinking of something different?
Regardless, I'll be curious to hear any conclusions you draw from researching the subject further as I love VirtualDub and would like it to be the best it can be ;) |
 |
| ALbino |
| Posted: Feb 12 2010, 04:32 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 101
Member No.: 26983
Joined: 9-February 10

|
| QUOTE (dloneranger @ Feb 11 2010, 05:45 PM) | You can check the drive speeds with something like hdtune for a nice graph
But usb2 is pretty slow compared to internal/esata speeds | I'll try running that and see what I come up with, thanks for the suggestion! |
 |