PDA

View Full Version : DV Codec?


danwatt
3rd March 2002, 21:09
I am doing some DV -> DIVX conversion, and I need a VFW driver in order for VirtualDub to access the DV data. I do not have a DV board/firewire on my machine (I just used a friend's comp on the lan in my building to cap since he has firewire). The video plays fine in Media Player, but thats not what I need. I need VFW access. Are there any good FREE decoding codecs out there?

bb
4th March 2002, 07:29
I guess you have a DV codec on your machine, otherwise you wouldn't see the film in WMP.

Further I guess you have a DV type-1 AVI file, which is not directly usable by VfW software like VirtualDub. You can either convert your file to DV type-2 or use AviSynth and its DirectShowSource command. In the latter case you'll get the video only (save your Audio as WAV using your favourite DV software, and process it seperately).

bb

danwatt
4th March 2002, 17:45
Well, as far as I can see, WMP8 uses a direct show filter, not Vfw to display DV. I did manage to find some trailware DV codec, but it puts a watermark in the image, so if there is something better out there...

GrojGuy
5th March 2002, 02:07
danwatt, you're right, WMP uses DirectShow filters to display DV.

I am going through the same DV -> DivX process, and am hitting similar hurdles. I know the trialware codec you are referring to. I think there is an alternative one....I will look when I get home.

I would like to hear what process and apps you find to work best to yield the best quality.

I have not been too successful so far in encoding my home videos from DV. Maybe I'm missing something, but the quality does not seem to be very good...I have had second thoughts about archiving all my DV tapes to DivX as I originally had planned. But perhaps I have yet to find the best encoder/settings.

danwatt
5th March 2002, 02:47
Converting the DV video to raw format (either via Premire, Quicktime 5, or the older versions of VirtualDub which I think support Direct Media) and archiving to DIVX, I got really good quality at 900k/s(and this was with DIVX4, before 5 came out today). I just want to avoid having to use a conversion from DV->RAW since that requires a LOT of space. I use VirtualDub, using 900k/s 2 pass VBR with 60 frames max keyframes. For audio, use whatever method you prefer, though I like using ~130-150k/s VBR MP3 (using LAME). For best quality at 720x480 (DV standard res), I would recommend VBR somewhere between 1200 and 1500k/s, if quality is of utmost importance to you.

Also, be sure to deinterlace your video. Some of the codecs out there (including the trailware) like to not deinterlace. The best way to deinterlace that I have used is the "Field bob" filter for VirtualDub, using the settings "Smooth/Smooth".

Milos
5th March 2002, 14:41
Try Mainconcept DV codec.

It adds watermark ONLY when encoding.

theReal
7th March 2002, 04:26
Use the Panasonic DV codec, it adds no watermarks, is 100% free and works perfectly (convert to type 2 with this codec)

http://www.panasonic.co.jp/avc/video/DIGICAM/mdv/downl.htm
(the download link is way down at the bottom of the page)

theReal
7th March 2002, 04:36
btw. to install the Panasonic codec in NT (XP?? I don't know, I don't work with OSes in beta stage...) you need to add the following registry settings:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\drivers.desc]
"pdvcodec.dll"="Panasonic DV Codec"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32]
"vidc.dvsd"="pdvcodec.dll"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MediaResources\icm\vidc.dvsd]
"Driver"="pdvcodec.dll"
"Description"="Panasonic DV Codec"

in Win98/ME you must add the following under [drivers32] in the system.ini:

vidc.dvsd=pdvcodec.dll

more info (in German): http://www.slashcam.de/cgibin/dvfaq/dvfaq.pl?lesen&quid=20


btw. I find the only way to get DV video look really good in Divx is resizing to 640x468 with soft bicubic filter (or "precise bilinear" in VDub) and encoding at a bitrate of 3000 in SBC with Nandub. Then you can hardly see any differences to the original :-)

j_olson
8th March 2002, 01:28
The Tsunami Full Filter Pack includes some DV codecs - Canopus DVSD Standard, Canopus CDVC Standard, Panasonic and MainConcept.

damjang
8th March 2002, 15:17
You can use avisynth and frameserve to vdub

damjang

hakamutu
8th March 2002, 22:01
LoadPlugin("C:\MPEG2DEC.DLL")
DirectShowSource("C:\capture.avi")

what about audio?

hyc
11th March 2002, 06:19
AVISynth's DirectShowSource drops frames when I've used it. I don't know what reference clock gets installed, and so far my debugging attempts have all been crash-fests. (Adding the graph to the RunningObjectTable doesn't work very well, dunno why.)

What is needed to make DirectShow really useful here is a piece of filter code that handles both audio and video and supplies its own reference clock. The reference clock needs to be slaved to the video frame processing rate, to avoid dropping of frames. I've started writing this filter, but as I'm extremely new to DirectX I haven't gotten it working yet.

The filter itself is a TransformInPlace filter, it does not allocate any buffers of its own. It also does not create any worker threads of its own. This is crucial, the video channel must block until the downstream filter has completely processed a single frame. The reference clock reads the display frame rate of the stream to determine the virtual time. I.e., if the video stream is 30fps, then each video frame should take .033seconds. The reference clock will return a monotonically increasing time value in each frame, until the counter reaches .033seconds. Then, if the current frame still isn't done, the counter stops incrementing. This way the Filter Graph Manager will deliver all of the audio data for the current video frame, and then stop until the next video frame begins. No video frames will ever drop due to slow video processing.

Using this approach, you can build a graph starting from the DVD Navigator and feed it directly into a compressor, to rip and compress on the fly. (I use DVMpeg, the 6.0 version includes a DirectShow A/V compression filter. It can handle DVD to VCD in realtime on my 1.1GHz laptop. The problem is that without an A/V synchronization filter, the audio and video streams get out of sync and the compressor dies from starvation.)

I just recently bought a Dazzle Hollywood DV Bridge, and for grins I've also been using it to play DVDs to my TV. (Yes, it's a stupid thing to do; so much easier just to play the DVD in my Sony DVD player. But it's been an interesting experiment.) There are a couple ways to do this - Use the DirectShow DVD Navigator to play, hook it up to the Intervideo or Cyberlink Audio and Video decoders, and then feed the video to the DV Video encoder, feed A/V to the DV Mux, and then the DV Mux to the DV VCR filter. This actually works in realtime, if you turn on hardware acceleration in the MPEG video decoder. But again, there are reference clock issues. It seems to only work correctly if you render the audio in the PC and use the audio as reference clock, instead of muxing the audio into the DV output stream. Also I hit about 95% CPU use doing this, so it's just barely keeping up.

Another way I tried to do this is to use DVDx 1.8 to rip the DVD and feed the output thru the VideoServer plugin, and then use GraphEdit to read the IPCServer.AVI file. Take the A and V channels from that into the DV Muxer and the DV VCR. It works, but DVDx uses such a slow MPEG decoder that it runs about 1/2 realtime on my machine.
I think DVDx is extremely cool, but it would be sooooo much faster if it could use DirectShow to extract the DVD contents. Playing a DVD using DirectShow only uses about 5% of my CPU, ripping it with DVDx takes 40%, and that's without any kind of re-encoding being done.

Sorry for the long ramble, it's all been somewhat related I think. I guess my point is I think DirectShow is pretty cool, there's a lot of power to tap here, but so far none of the existing tools take advantage of it. I think AVISynth has a lot of potential here, which is why I've started mucking with its source code, but currently I consider it unusable since you cannot avoid losing video frames in the current version. And of course, it's not a satisfying solution until it gets the audio stream supported. I'm working on that too, slowly.