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: (19) « First ... 6 7 [8] 9 10 ... Last » ( Go to first unread post )
VirtualDub File Input Filter, how to create one
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
Moitah
Posted: Oct 10 2007, 08:50 AM


Advanced Member


Group: Members
Posts: 210
Member No.: 8955
Joined: 20-February 04



Avery,

Are you aware that VideoSource::GetSampleInfo is being called for the last dummy frame on the timeline? This causes MoCrap to crash too.
 
      Top
Gromozeka
Posted: Oct 10 2007, 12:35 PM


Unregistered









"I have very basic FLV support working ..."
Where I can download him? sad.gif
 
  Top
pintcat
Posted: Oct 10 2007, 10:06 PM


Advanced Member


Group: Members
Posts: 142
Member No.: 18182
Joined: 19-February 06



@fccHandler: Thank you for the fast support and your great work - I tested the new bug-fix of your MPEG2 plug-in with VirtualDub 1.7.6 test9 and it solves my little XviD problem! Unfortunately, this introduces another bug right in the filter/cropping preview (not again!): There's no preview available. No matter if you move the timeline cursor or you just skip single frames, no preview picture comes up.
 
     Top
Moitah
Posted: Oct 10 2007, 10:33 PM


Advanced Member


Group: Members
Posts: 210
Member No.: 8955
Joined: 20-February 04



I'll post what I have done of the FLV plugin in case someone wants to play with it. There is no audio support yet but I will be working on it tonight. It uses the FourCC "FLV1" for H.263 and "VP6F" for VP6, so you need a decoder to handle those. ffdshow-tryouts contains both, be sure to enable them in the VFW configuration.

FLV Input Driver [EDIT: Updated link]
 
      Top
fccHandler
Posted: Oct 11 2007, 12:07 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



QUOTE (pintcat @ Oct 10 2007, 06:06 PM)
Unfortunately, this introduces another bug right in the filter/cropping preview (not again!)

This one I can reproduce, and I'll see if I can fix it ASAP.

EDIT: Found it, and it's embarrassing. I could swear I had already fixed this, yet the current version is still unfixed. I must be losing my mind... Anyway, it's definitely fixed now, and I'll upload a new version later tonight.

EDIT: Ah, that was painless. (The gods of Comcast are with me tonight!) Here you go:

http://fcchandler.home.comcast.net/Plugins/MPEG2

--------------------
May the FOURCC be with you...
 
     Top
fccHandler
Posted: Oct 11 2007, 07:20 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



QUOTE (Moitah @ Oct 10 2007, 06:33 PM)
I'll post what I have done of the FLV plugin in case someone wants to play with it.  There is no audio support yet but I will be working on it tonight.

Your plugin works great so far. I didn't notice any problems at all...

As for audio, the plugin API is a bit limited in that you can only pass the audio in one format. You can either decompress it internally and pass it on as uncompressed PCM, or you can pass the real compressed audio to the host and hope he figures out how to decompress it.

Anyway, keep up the good work. smile.gif

--------------------
May the FOURCC be with you...
 
     Top
Moitah
Posted: Oct 11 2007, 07:35 AM


Advanced Member


Group: Members
Posts: 210
Member No.: 8955
Joined: 20-February 04



Thanks for testing it. I don't know if you looked at the code but I borrowed your VFW decoder class tongue.gif so thanks for that as well.

Most FLV files have MP3 audio. I'd like to pass the compressed MP3 frames but I'm not completely sure how to do it. I tried to do it similar to how VBR MP3 is written to AVI, with the sample rate = 44100 / 1152 for example, and nBlockAlign = 1152. Then each sample should correspond to 1 MP3 frame. I'm not having any luck so far, but it could be a really stupid mistake in the code, I haven't spent a lot of time debugging yet. Anyway, if Avery reads this maybe he can tell me if I'm going in the right direction with this...

EDIT: I think it's not my fault, but VirtualDub doesn't allow me to do it this way. When I check the audio by doing File > Save WAV and look at it in a hex editor, there are MP3 frames spaced every 1152 bytes with a bunch of 0's in between.

EDIT2: It works when I set nBlockAlign to the exact byte size of each MP3 frame, but I guess this wouldn't work all the time for CBR because of the way MP3 frames are padded, and for VBR I guess it wouldn't work at all.

EDIT3: Tomorrow I'll try it so that each sample is 1 byte, that is how CBR MP3 is written to AVI from what I understand.
 
      Top
phaeron
Posted: Oct 11 2007, 08:49 AM


Virtualdub Developer


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



I couldn't reproduce the end-frame issue, but I went ahead and added guards around all of the stream calls into the plugin to make sure it doesn't happen. There shouldn't be any places where VirtualDub actually cares what is returned for invalid frames.

http://www.virtualdub.org/beta/VirtualDub-....7.6-test10.zip
http://www.virtualdub.org/beta/VirtualDub-...est10-AMD64.zip
http://www.virtualdub.org/beta/VirtualDub-...6-test10-src.7z

As for the VBR issue, you cannot currently return variable-sized frames from an audio stream. If you try, there is code in the audio path that traps it and corrects the sample sizes. The main code in current versions that doesn't like variable frame sizes is the audio pipe between the I/O and processing thread. I'm actually in the process of working through some of these issues, but it turns out there are a bunch of little problems in other places that I don't think even the modded versions addressed, such as what happens if the preview code is pushing the VBR audio into the waveOut device -- in that case the device can return only sample timestamps and the only way to handle audio sync properly is to maintain a running lookup table. Right now it just stutters horribly.

I won't say more than this for now, since I'll probably start pushing the code out for test after 1.7.6 finals and will explain the API solution at that point... but in the meantime, you need to do what the AVI code currently does and rewrite the format as CBR, which will work for at least decompressing the audio as long as you implement the VBR timing translation calls so the sync is correct.
 
    Top
Gromozeka
Posted: Oct 11 2007, 08:51 AM


Unregistered









And probably loadings d2v files or all vob's smile.gif
 
  Top
Moitah
Posted: Oct 11 2007, 08:59 AM


Advanced Member


Group: Members
Posts: 210
Member No.: 8955
Joined: 20-February 04



QUOTE (phaeron @ Oct 11 2007, 03:49 AM)
I couldn't reproduce the end-frame issue, but I went ahead and added guards around all of the stream calls into the plugin to make sure it doesn't happen.

Strange that you couldn't reproduce it, it happens every time for me. Just open test.mocrap and Ctrl+G to 73, or drag the seek bar all the way to the end, and crash (test9 but I think all the older ones did it too). But test10 does indeed fix it.

Thanks for the info about the VBR audio.
 
      Top
pintcat
Posted: Oct 11 2007, 05:57 PM


Advanced Member


Group: Members
Posts: 142
Member No.: 18182
Joined: 19-February 06



@fccHandler: Good job! Everything seem to work now with your latest release. Thanks again for the very fast and great support.
 
     Top
Moitah
Posted: Oct 11 2007, 08:28 PM


Advanced Member


Group: Members
Posts: 210
Member No.: 8955
Joined: 20-February 04



I have the audio part working but it will take some effort to get it completely correct especially for seeking. It turns out that FLV files sometimes have MP3 frames split across tags (a tag is similar to a chunk in AVI) so I need to actually parse all the audio bytes to find the MP3 frames. Each tag is timestamped though, which I could use instead, but it's not quite as accurate and I would rather do it properly.

EDIT: Here's another version you guys can play with if you want, it supports MP3 audio (the vast majority of FLV files) but the synch will probably be messed up until I can code it properly: FLV Input Driver [EDIT: Updated link]
 
      Top
Loadus
Posted: Oct 11 2007, 11:06 PM


Advanced Member


Group: Members
Posts: 352
Member No.: 10881
Joined: 1-July 04



@fcchandler:

Thanks from here too. Plugin works beautifully - good work, man.


@Moitah:

Just finished testing the FLV input - works, some clips show black but
they're probably VP6 or some other exotic video .. But all 'normal' clips
worked very well. Good job.

--------------------
deviantART behance
 
       Top
Moitah
Posted: Oct 12 2007, 02:55 AM


Advanced Member


Group: Members
Posts: 210
Member No.: 8955
Joined: 20-February 04



The 0.2.0 version will crash if the file doesn't have audio, will be fixed in the next release.

@Loadus: Thanks smile.gif. It does support VP6 if you have a recent ffdshow-tryouts build with VP6F VFW decoding enabled. Aside from that and H.263, the only other video codecs currently possible in FLV are Screen Video and Screen Video 2, I'm not exactly sure what those are, I guess for screen recording. It won't handle those but I haven't seen any FLV files in that format. As for audio, only MP3 works right now but I will support uncompressed PCM audio after I get the MP3 stuff fixed up. FLV also allows Nellymoser and ADPCM audio but I won't be able to support those.
 
      Top
tateu
Posted: Oct 12 2007, 03:09 AM


Member


Group: Members
Posts: 17
Member No.: 22214
Joined: 7-October 07



And here's the first release for quicktime video (mov, some mp4, etc.):

binary
http://www.tateu.net/software/dl.php?f=qtvd_bin

source code
http://www.tateu.net/software/dl.php?f=qtvd_src


"Quicktime.vdplugin" should go in your plugins32 folder and "Quicktime.ini" should go in the VirtualDub root folder.

There are several different modes that can be used to open a movie, these are specified in Quicktime.ini as "mode=." Mode=-1 and color=-1 are the recommended defaults but you can read about the different modes in "Quicktime_ReadMe.txt." Eventually, these options will be implemented as an "Ask for Extended Options Dialog."

Audio is currently not implemented and I am sure there are many bugs. Questions, comments, suggestions, whatever...are welcome.


I will also most likely...someday...implement my avisynth OMF importer.
 
     Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
281 replies since Sep 25 2007, 05:43 AM Track this topic | Email this topic | Print this topic
Pages: (19) « First ... 6 7 [8] 9 10 ... Last »
<< Back to VirtualDub Filters and Filter Development