PDA

View Full Version : DV-PC-DV Perplexing Problem


eyemessiah
5th February 2004, 08:06
Hi, I am having some problems sending video back to my Sony TRV19 Digital camcorder via firewire.

I am capturing the video using Windv as type 2 avi.

I have firewire and everything working fine, and I understand that I need to send the video to the camera in the correct format if I want it to record it back onto DV tape.

So...

If I reencode the video and audio using some compressors, like Xvid and Lame, and then later reencode the result using the Sony DV codec and uncompressed PCM audio I should be able to transfer the video back onto the DV tape, right?

The problem is that when I do this the camera refuses to register the sound, i.e. it doesn't playback via the little built in speaker on the camera while im 'sending' and it doesnt record with the video.

Even if I tell Virtualdub just to use 'direct stream copy' and not alter the audio at all the camera just won't take it.

Winamp, BSplayer, Gspot and every player I have tried tell me that the audio format is the one which the camera expects (i.e. uncompressed PCM)

I have investigated the problem as far as my current understanding will allow and this is what I can figure out:

Ok, lets call the original capture file, "file A"

If I do the following:

1) 'save as' File A with direct stream copy for both vid and aud

(Should just copy the audio and video to a new file without alteration)

I get a file (File B) that is one megabyte smaller than File A, but can successfully be be recorded via firewire back onto the DV tape with functioning audio.

However, if I tell virtualdub to do:

1) 'save as' File A :direct stream copy audio & SonyDV vid

(Should copy the audio without altering it, and recompress the video, BUT recompress it into the format that the camera expects)

I get a file (File C) that is exactly the same size as File B, and that when transferred back onto DV tape has functioning video but no audio.

So, if I don't change the audio OR the video, then the audio and video will transfer correctly, even if Virtualdub is obviously altering the file in some way (i.e. File B is smaller than File A)

And here's another thing!

If I do the following.

1 'Save as' of File A - Direct stream copy vid, compress aud with LAME
2 'Save as' the result - direct stream copy vid, decompressed pcm aud

(I should end up with the same video stream I started with, but the audio ought to be slightly different because I compressed it with lame. However, the audio in the final file, despite being altered, should be (and is) in the format that the camera expects)

Then I get a file (File D) that is the same size as B & C but transfers with functioning audio and video!

_Conclusion_
So I can reencode the audio all I like so long as I send it to the camera as uncompressed PCM. BUT if i reencode the video then the audio will not transfer to DV tape at all, EVEN IF I change the video back to the correct format, and EVEN THOUGH the video will transfer correctly.

I have tried WinDV & DVIO and both give the same results.

If I compare the file information using Gspot I get the following results:

Files C & D are, on the surface, exactly the same, i.e. same format information, same size, same bit rate e.t.c. In fact all the information that Gspot provied, excepting the filename, is the same for both files. Furthermore, BOTH C & D differ from file A in the same way, i.e. both are slightly smaller and have a slightly lower video bitrate.

So A & D should be the same, but differ AND yet both transfer back with working audio.

And C, which looks the same as D does not transfer back with working audio.

What does it all mean?

Does anyone one know how I can compress & decompress the video without arbitrarily losing the audio when I send it back to the camera?

I am on a very strict budget so buying a huge HD and working with uncompressed video is not an option for me, and niether is buying a new videocard with analogue outs on it. I am really very keen to use the cameras dv in capabilities for archiving processed clips, and also for transfering processed clips onto VHS e.t.c.

thanks!

eyemessiah
5th February 2004, 09:38
I got it working by using Premier's export to video.

Seemingly it is doing something that DVIO, WinDV and MovieMaker do wrongly\differently.

I'd much rather use WinDV or DVIO, but I suppose I will have to do as needs must.

thanks,

mustardman
6th February 2004, 01:04
Interesting what you say.

With your conversion ...
Audio : original PCM -> lame MP3 -> PCM
Video : original DV -> orignal DV (direct stream copy)

Do you get the SAME audio as you started with, or the "new" audio? That is, say you get lame to compress really badly, or change the volume, or somthing else of note... do you get the changed audio, or the original audio?

AFAIK, the original DV contains an audio stream embedded in the video stream (type 1 & 2). Type 2 creates an extra audio stream which is put in the AVI (hence there are two distinct audio streams, although you can't get to the 'embedded' one). I would think a recompressed DV video stream would only contain the video.

PS: I have had no trouble doing what you are trying to do. What program are you using for DV output?

Also (silly point) check that the PCM audio is 48KHz?!

eyemessiah
7th February 2004, 08:41
> Interesting what you say.

Strange isn't it?

> With your conversion ...
> Audio : original PCM -> lame MP3 -> PCM
> Video : original DV -> orignal DV (direct stream copy)

> Do you get the SAME audio as you started with, or the "new" audio?

New. It ends up the same size as the original when you decompress to PCM, but it sounds different so you must have different data.

> AFAIK, the original DV contains an audio stream embedded in the
> video stream (type 1 & 2). Type 2 creates an extra audio stream
> which is put in the AVI (hence there are two distinct audio
> streams, although you can't get to the 'embedded' one). I would
> think a recompressed DV video stream would only contain the video.

That might explain why the audio gets lost when you mess about with the video format. Premier it seems understands this and must be compensating some how when it writes back to tape.

> PS: I have had no trouble doing what you are trying to do. What
> program are you using for DV output?

I was using WinDV for capture.
Virtualdub + Xvid + Lame for compressing & the Sony DV software codec for decompressing.
I was using DVIO for writing back to tape.

I am now using Premier for write back to tape, which works to a certain extent (see below.)

> Also (silly point) check that the PCM audio is 48KHz?!

Not silly at all! But yes, it is 48khz.

thanks for your help,

eyemessiah
7th February 2004, 08:49
Ack.

Now I have a new problem.

I can write back to tape after compressing\decompressing without losing video or audio using Premier.

However for some reason Premier does not seem to be able to playback the video properly, even though it can write it back to the tape properly and even though I can play it back fine in other players.


So what I am doing is:

1) Capture off camera into sony dv format (interlaced).
(Premier can play this back fine)
2) Compress into Xvid format for archival (interlaced).
(Premier can't play this back at all)
3) Convert from Xvid to sony dv when I need to edit it (still interlaced).
(Premier plays this back all messed up)

The file I end up with, which is in the sony dv format, plays back fine in other players and premier can successfully write it back to the tape in my camcorder. However, Premier does not seem able to play it back correctly: the sound play back fine, but the video is partially scrambled. By partially I mean that I can sort of tell what is going on, but it looks strangely blocky and jumbled up.

I have attached a screenshot.


The frame on the left is from within Premier at step 1.
The frame on the right is from within Premier at step 3.

I thought I was able to get around this by adding an extra step. I found the pinnacle DV codec on my machine so I converted from Xvid to Pinnacle DV, which Premier played back fine. The I tried writing back to the tape and my Camera LCD flashed up “Copy Inhibit!” and stopped recording after a few of frames (the half second of video looked fine on the tape though:) . Then I thought I’d be smart and convert from Pinnacle back to Sony (though I was beginning to worry about generational degradation by this point from all this converting) but when I tried to write the converted Sony DV back to tape it still flashed up “Copy Inhibit!”. Surprisingly smart…

So now I am shopping around for another DV format to try, but it would seem simpler to me to get Sony DV to work fine and cut out the extra conversion.

Any thoughts?
http://www.kcalder.pwp.blueyonder.co.uk/screenshot.jpg

mustardman
7th February 2004, 11:18
Hmm, I havn't used the pinnacle or the sony DV codecs. I use the panasonic (it is VFW so it works in VDub, and research I did showed it to mess with the picture least, and have very good multi-generation performance). The codec that premiere uses is the M$ directshow codec. They produce compatible files, both have the same fourCC code.

It is possible that the panasonic codec writes the audio into the file, and the others don't?

Your resulting video is really screwed up! I don't know if it would be screwing up on de-compressing XviD, or recompressing to DV.

Premiere 5.x can only play back DV. I think ver 6.x can play back others, but I don't know, I haven't got it!

What I use is WinDV for capture (through firewire).
Edit using VDub (DV -> DV, PCM 48KHz -> PCM 48KHz). Sometimes I use a middle step of HuffYUV for the video, and edit the audio with cooledit.
Output finished DV using WinDV again. I could never get DVIO to work!

I havn't tried the intermediate step of coverting to Xvid, but you always see what you are compressing with VDub, which is a big plus, although it won't play back real-time on the PC. :(

Are you PAL or NTSC? I use win98SE at the moment, but I have tried win2K with no problems.

If you use another "middle" compression (like Huff), do you get the same bad results?