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 ... 8 9 [10] 11 12 ... 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
tateu
Posted: Oct 12 2007, 03:51 PM


Member


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



QUOTE (tateu @ Oct 12 2007, 12:53 AM)
Hmm...I though I had checked what happens when you preview quicktime video in one of the filters, such as sharpen...I guess I didn't.  In RGB24 & RGB32, the preview displays upside down, in YUY2 it is scrambled and in YV12 it crashes.  I guess I'll have to fix that.

Well, I know why YUY2 and YV12 are broken. My import plugin can only decode to one color format at a time.

When you first open a video, VirtualDub calls the import plugin with SetTargetFormat(). It requests color formats in the following order. If the plugin returns false, it calls SetTargetFormat again with the next format in this list:
07 = kPixFormat_RGB888
08 = kPixFormat_XRGB8888
05 = kPixFormat_XRGB1555
00 = kPixFormat_Null (When this one gets called, I set it to the format requested by the user in Quicktime.ini)
04 = kPixFormat_Pal8

When you open the preview window for one of the filters (brightness, etc.) , VirtualDub calls the import plugin with SetTargetFormat() requesting color formats in the following order:
07 = kPixFormat_RGB888
08 = kPixFormat_XRGB8888
05 = kPixFormat_XRGB1555
04 = kPixFormat_Pal8

Notice that the filter preview never calls kPixFormat_Null. It only accepts video in RGB24, RGB32, RGB15 and PAL8. The other import plugins (Mpeg2, WMV and FLV) have methods that can change the decompression colorspace format on a per frame basis. My quicktime plugin does not and I am not sure what to do about it.

Possible solutions:
1) I could set up two decompression sessions if YV12 or YUY2 are selected as the main decompression colorspace. This sounds like a nasty solution to me, though. Just thinking about what I would have to add to the quicktime code makes my head hurt.

2) Decompress to YUY2/YV12 as usual and borrow code from somewhere that can convert a buffer in YV12/YUY2 format into RGB when a filter preview is requested.

3) Disable YUY2/YV12 altogether and only allow the plugin to decode to RGB.

And I still don't know why the RGB previews are upside down.
 
     Top
Loadus
Posted: Oct 12 2007, 04:18 PM


Advanced Member


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



QUOTE (Placio74 @ Oct 12 2007, 07:29 AM)
QUOTE (Loadus @ Oct 12 2007, 11:37 AM)
QUOTE (Moitah @ Oct 11 2007, 08:55 PM)
@Loadus: Thanks smile.gif.� It does support VP6 if you have a recent ffdshow-tryouts build with VP6F VFW decoding enabled.

Kewl.
I have VP6 decoder installed, and some players show these (like GOM).
...

DirectShow decoder?
GOM Player is DirectShow player and most other too.

VirtualDub not use DirectShow filters - required VfW codecs (or wrapper as ffdshow VfW).

Repeat...
Switch-on VP6F in ffdshow VfW configuration?
ffdshow video encoder configuration > Decoder > Codecs > VP6F (and FLV1)

Aah, good point. There's no VP6 decoding in the ffdshow version I have, I'll have to get the latest.

--------------------
deviantART behance
 
       Top
fccHandler
Posted: Oct 12 2007, 06:17 PM


Administrator n00b


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



QUOTE (XYZ @ Oct 12 2007, 04:22 AM)
fccHandler, how about a support for loading of successive VOB files in one go?

I think it could only be done with a hack. The "append" function will never work for this, as too much info is destroyed and/or reorganized after the first file is parsed, and it isn't feasible to add additional files. Instead, I'm considering popping up a dialog allowing you to choose multiple files.

QUOTE (heustess @ Oct 12 2007, 10:58 AM)
@fccHandler:
On [Input playback] of the short file maryann.wma downloaded from http://heustess.com/soundbytes.htm I get the following error message:

The audio codec reported an error while decompressing audio data. Error code 512 (ACMERR_NOTPOSSIBLE)

I have the same problem. It happens in preview, but not in output playback. Changing "Audio / Error mode" doesn't make any difference. The error comes from the WMA codec on the host's side, and I don't know what causes it. Last night in the debugger, I thought I saw some exceptions in kernel32.

FWIW, if there's no video, the plugin returns IsVBR() = false for the audio stream. It seemed like IsVBR() = true made the playback even worse. Anyway, that's why I've logged this change as "experimental." smile.gif

Thanks for the links, BTW. I only had two WMA files handy to test with last night.

--------------------
May the FOURCC be with you...
 
     Top
Moitah
Posted: Oct 12 2007, 07:01 PM


Advanced Member


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



@Loadus: Yeah, it has to be a VFW decoder. ffdshow-tryouts (not the official ffdshow) is the only decoder I know of that will work right now. It would be possible to make the On2 VP6 VFW decoder work but it doesn't right now. This is because I use the FourCC 'VP6F' (F indicates the Flash variety) which the On2 decoder doesn't recognize. However, as far as I know the only difference between regular VP6 and Flash VP6 is that the image is stored upside down. So I could use a FourCC that it recognizes such as 'VP62' and flip the image before handing it to VirtualDub. This would be nice because I came across one file (demo file on Adobe's site, haven't seen any like this in the wild) that the libavcodec decoder can't decode correctly, some strange bitstream option that hasn't been reverse engineered yet.

EDIT: Those files you posted work fine for me. storm.flv is variable framerate though so the synch is messed up. But when you look at the timestamps of VFR FLVs it's usually pretty obvious that they could be converted to constant framerate cleanly:
CODE
33
100
166
200
233
266
300
366
400

This one is just NTSC and most of the timestamps jump 33/34 ms, but for larger gaps drop frames could be inserted to maintain constant framerate.
 
      Top
heustess
Posted: Oct 12 2007, 07:11 PM


Advanced Member


Group: Members
Posts: 67
Member No.: 21872
Joined: 5-August 07



@fccHandler:
I don't know if it helps, but all of those wma files were created with Windows Media Encoder 9 Series with default settings except for -a_setting 20_22_2.

--------------------
http://heustess.com/
 
      Top
Gromozeka
Posted: Oct 12 2007, 07:33 PM


Unregistered









QUOTE
I'm considering popping up a dialog allowing you to choose multiple files.

Its very, very good idea! smile.gif smile.gif smile.gif
 
  Top
Loadus
Posted: Oct 13 2007, 12:29 AM


Advanced Member


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



QUOTE (Moitah @ Oct 12 2007, 01:01 PM)
@Loadus: Yeah, it has to be a VFW decoder.

I always forget that. biggrin.gif

Where's that 'Directshow Input filter' for Virtualdub when you need one. wink.gif

--------------------
deviantART behance
 
       Top
fccHandler
Posted: Oct 13 2007, 06:20 AM


Administrator n00b


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



I've uploaded tonight's version of the MPEG-2 plugin:

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

This experimental version will allow you to open multiple MPEG files. But I'm not really happy with this first attempt, and I guarantee that it will be completely rewritten before I'm finished with it. Therefore, please don't complain about any missing features just yet. I welcome any crash reports though...

The plugin will "virtually" join up to 16 files, of any type, and parse them all as a single MPEG. However, if the files you select were not meant to be joined together, well, you'll get what's coming to you. tongue.gif

--------------------
May the FOURCC be with you...
 
     Top
Gromozeka
Posted: Oct 13 2007, 07:06 AM


Unregistered









QUOTE
I've uploaded tonight's version of the MPEG-2 plugin:


It is not work. It works as previous plugin sad.gif
 
  Top
fccHandler
Posted: Oct 13 2007, 07:14 AM


Administrator n00b


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



You have to check the "Ask for extended options after this dialog" checkbox when you open your MPEG file.

--------------------
May the FOURCC be with you...
 
     Top
Gromozeka
Posted: Oct 13 2007, 08:04 AM


Unregistered









Vaooooooooooooo, he has opened all files and played his very good!
smile.gif)))))))))))))))))))))
THANKS!
If compile VirtualDub 1.7.6 + plugins32 + VirtualDubMod (mkv + subtitles & chapters) = virtualDub 2.x.x.
But its my fantasion
 
  Top
Moitah
Posted: Oct 13 2007, 08:07 AM


Advanced Member


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



I tried out the drop frame idea for padding VFR->CFR and it works quite well. It actually was a lot easier than I expected it might be. So that will probably be in the next release, but I want to look through some more of my videos and make sure it doesn't mess up anything.
 
      Top
Gromozeka
Posted: Oct 13 2007, 08:13 AM


Unregistered









fccHandler
And it is possible to unite also wma, wmv or other format (flv or mp3?) smile.gif

Moitah
We wait smile.gif smile.gif smile.gif
 
  Top
Moitah
Posted: Oct 13 2007, 08:20 AM


Advanced Member


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



I don't plan on allowing FLVs to be appended. If you really need to do it for some reason it would probably be better handled with AviSynth. Maybe something like:

DirectShowSource("file1.flv", fps=30, convertfps=true) ++ DirectShowSource("file2.flv", fps=30, convertfps=true)

Of course you need a DirectShow FLV splitter installed.
 
      Top
Gromozeka
Posted: Oct 13 2007, 08:54 AM


Unregistered









Directshow - it's I know, but VirtualDub can directstream copy overtake from flv and wmv in avi - without a compression
 
  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 ... 8 9 [10] 11 12 ... Last »
<< Back to VirtualDub Filters and Filter Development