View Full Version : MPEG2 Capture and Compression
Eagle117
29th March 2002, 19:35
I am fairly familiar with capturing and doing DivX compressions, but this one has me stumped. I used to have a WinTV card that worked great just capturing direct from VirtualDub into DivX, but eventually that card just stopped working with my drivers, so I went out and bought a new one. I got a IO/Magic PCPVR card for $30. It came with Cyberlink PowerVCR which is a pretty cool program. Only problem is, it only captures to MPEG1 or 2. So I got some Pinnacle drivers, since this card is a Studio PCTV Pro with a few item dropped from it. It worked fine in VirtualDub then, but the quality was very grainy. It just wasn't like I used to have it. Plus, the VCR version of VirtualDub annoyed me because it had to sit in the taskbar and not in the systray like I would like it. And I couldn't change channels on the fly.
So I went back to PowerVCR. I set everything for the highest MPEG2 compression and it works great for recording, but every hour is around 2.2GB which is expected. I tried to recompress it to DivX 3 like I do for all my other movies, and every few second the audio just skips a beat and then is back in sync. I thought maybe it was a framerate thing, since these files play back just fine as MPEG2. So I played around with it, making it 23 FPS or direct 30FPS and those just go really out of sync.
I'm fine with the space if I just want to watch something I'll miss, but I would like to archive Battlebots on CD. Any ideas of why this is doing it? I have tried MPEG1 and that didn't look very good and I've tried higher settings of MPEG2 and then the actual MPEG2 skipped the same way, so I dropped it by one megabit and it played back fine.
Any help is greatly appreciated.
Scuba
29th March 2002, 19:56
the only things I can think of as I don't have much experiance with TV Tuner cards is look att he basic hardware config again.
From Bios and CPU to virtual memory and such.
Normaly Mpg1 compression will stress the computer less them Mpg2 and the picture will be fine.
Just don't use the VCD settings....
Eagle117
29th March 2002, 20:25
I have an Athlon XP 1700+ so processor time shouldn't be a problem. It only takes around 26% processor usage during capture. I'll try MPEG1 again, but I'm looking for the best quality that will keep the audio in sync.
Scuba
30th March 2002, 13:45
Try increasing the PCI sycls to 64.
Eagle117
25th April 2002, 15:58
Ok, I found some stuff out. The problem with my capture lies in the MP2 audio. If I play it in PowerDVD or PowerVCR it plays back fine. If I try to open the file in Flask and do the audio player, it skips and all kinds of crap that I'm having trouble with.
I used Flask to direct stream copy the MP2 out of the movie and played it back in Winamp and it was fine. The I used the diskwriter software to make a wav out of it. Then I put the wav into VirtualDub along with the DivX copy of the movie from Flask and compressed it to MP3 and the output was fine. This just take along time to do.
Does anyone know of any setting I can change the MP2 into so I can just use flask to compress it to MP3 without loss of sync or choppy playback? The default bitrate is 224, but I can go up to like 448 that I'm trying now. Unfortunately PowerVCR doesn't let me choose just a raw wav or I would do that.
Thanks for your help.
Milkman Dan
5th May 2002, 12:19
Whoa, people still use Flask? Yeesh.
What you should do is use Tsunami's MPEG tools (under the file menu) to demux the mpeg layer2 audio from the video, and use HeadAC3he to make the mp3 directly from the mp2.
theReal
5th May 2002, 15:21
Eagle, it seems you know well how to use your computer and all kinds of different progs, so you should really consider not to keep on using Flask for Divx 3(!) encoding. If you want to use FlaskMpeg, then use Divx4 or Divx5 2-pass encoding to get a decent quality, if you want Divx 3, then consider changing to Gknot/Nandub with SBC. Or even better, use Gknot in any case, also for Divx4 or Divx5.
I have one more idea for the mp2 audio: try DVD2AVI, it should be able to demux it, as well as decode it to .wav directly (so you wouldn't need Winamp to decode).
Eagle117
5th May 2002, 16:11
I'm willing to use whatever I can get to work correctly. And there lies my problems.
I tried the DVD2AVI method to extract the audio and all I got was some .mpg or mpa that it thought was the audio stream and wasn't. I"ve also tried graphedit to extract the audio but it seems to never sync up with the video, so I"m still playing with that method. Where can I get Tsunami's MPEG tools from so I can try that one.
I tried Flask Preview 2 with DivX 5 and it threw me an error but I think I figured it out. I don't use Flask as my only method with DivX 3. I use it to pull from my MP2 to a bithrate of 6000 version in Divx 3 and then make high's and lows and Project DivX to mix them or use Nandub which I don't know if it is really doing me any good, but it looks ok to me.
Nandub has worked well for me, but I can't get a DVD2AVI project to work right with it. The audio goes horribly out of sync whenever I try that. I tried Gknot and what a bunch of settings. I still couldn't get the DVD2AVI thing to work correctly and when I did one time, the file size was way off from what I told it. I also tried using Gknot to frameserv into VirtualDub so I could do DivX 5 two pass and VirtualDub said Cannot determine file type of d:\divx\AVI.avs
My problem with those two could probably be solved if I knew more what I was doing, but I"ve followed Doom9's guides the best I can and am not having the best of luck, so that is why I have been doing it the way I have been lately.
If you have any suggestions to try to fix these problems I'm more than willing to try, but I've gone as far as I can from the guides, now I need real people to help out.
Thanks for your reply.
Milkman Dan
6th May 2002, 02:00
A link to Tsunami was in doom9's frontpage, although I think it was last month's news now.
As for your problems...well, from what I read, you seem to be having audio trouble. Aside from that, can you open the avs files (these are scripts that avisynth.dll interprets) in Media Player? If they play correctly, I think the problem is that you are trying to do something with the audio right away. All you should have DVD2AVI do is demux the audio (and you get an mp2) and then do with it what I told you before: That is, give it to HeadAC3he to make into Vorbis or mp3. Only use Vorbis if you are going to make an Ogg Media file (.ogm).
That "couldn't determine file type of avi.avs") error sounds like you don't have AVIsynth installed correctly. It should have done so when you installed the GordianKnot package. Although I suppose, if you tried GordianKnot more than about...what? 9-10 months? ago, it didn't come with the extensive installer that it does now. Even though I don' use GKnot anymore (to many new technologies that are unincorporated), I still install it because it installs just about everything else I use.
Just post here again after you try some stuff out, and we'll try and work it out.
Eagle117
6th May 2002, 04:04
Ah, you probably fixed my AVIsyth problem. I had formated my Windows install but kept the program files for Gknot, so I never reinstalled it, so it never had the registry settings for the progarm or something like that. I can get a *.mpa from DVD2AVI so I'll use that HeadAC3 program to convert it and see if it stays in sync.
Tsunami is TMPGenc! That is why I couldn't find it. Never knew what it stood for. I'll give it a shot also if I can get the video to stay in sync.
What is your opinion of VFAPI for going from a DVD2AVI file to frameserve to VirtualDub for DivX 5 encoding? I really like using VirtualDub because I'm most comfortable at it. Plus, I don't see the purpose of using Gknot to frameserv and bother setting file sizes and stuff if you are going to pass it to VirtualDub and set another bitrate in there. But I was following Doom9's http://www.doom9.net\divx5.htm file. But I could be horribly wrong also.
If I could get something to pass to VirtualDub and then DivX 5 from there on, I would be happy as a clam. I did do one encoding into DivX 5 and the file ended up looking like there was an artifact halo around anyone on the screen. Know what might be causing this?
Sorry about so many questions, but I finally found someone who bothers to reply and knows what they are talking about. Thanks a ton!
I'm capturing more video tonight and I'll encode it all tomorrow. More updates then.
Milkman Dan
6th May 2002, 07:38
[laugh] Thanks for the compliment.
Right, so one at a time.
@Avisynth/Gknot install:
Yeah, you gotta reinstall that to have it work. All those registry entries, just like you said...
@Tsunami:
Heh. Sorry about that. I get confused with the TMPGenc name (I can never remember which letters go where) that I just call it Tsunami.
@VFAPI: I used to use VFAPI back in the day. I never use it anymore however. Just isn't as flexible as AVIsynth, but I suppose it has slighty more support. I use AVIsynth for everything I do. Great scripted language. I'm all about VirtualDub, and Avery is my personal coder god. Hee.
But just to be clear, GKnot doesn't do the frameserving itself. Essentially, it automates some processes, and writes the virtualdub .job files that interact with Nandub/Vdub. But generally what you do in GKnot is determine the size of the audio first, then adjust the video bitrate according. All this is done for you automatically. So basically you import the .d2v file, set your desired framesize, point it at the ac3 files, and let it do its thing.
@DivX5 artifacts: I dunno about this. I've used DivX5 all of about 3 times. I'm a dyed-in-the-wool Xvid user. I suggest you post in the DivX4/5 forum about your artifacts.
Hope I touched on everything...
Eagle117
24th May 2002, 20:32
Ok, tried some more stuff. I got Gknot to work, but the audio is just screwed up with PowerVCR's recording. I used AviSyth, VAPI or whatever that is, and DVD2AVI and the audio is still out of sync. The only thing that seems to work properly is using VirtualDub to extract it. I'm still working some kinks out of DivX 5 I'm going good now.
Thank you for all your help. I'll keep trying to find out why this audio is like it is.
tarambuka3500
27th May 2002, 11:15
Well, I have your issues (the "skipping" sound), and I handled it with GraphEdit - parse the .mpeg2 stream, make a graph and encode it perfectly to whatever you want.
I've extracted it to pcm audio, then besweeted and it's perfect.
The sound+video muxed with nandub.
seems to me what u both have is a filter issue, and not an encoding issue.
if powerdvd plays it correctly it means 2 things: 1. the encoding is ok. 2. powerdvd doesn't use dshow decoding filters (that's a known fact).
suggestion:
0. if you have acm mpeg2 codecs installed (as is probably the case since you encode to mpeg2) try to lower their priority in the audio codecs section (control pannel related). sometimes acm codecs 'take over' other decoders with their default installation, but 'touching' their priority may bring them back to their correct place.
if that doesn't work, try the following:
1. remove ALL your mpeg2 related codecs (dshow filters, acm codecs etc).
2. try to install each of the filters INDIVIDUALLY (i.e. such that your system has only one mpeg2 dshow decoder at a time).
3. if you find a successfull filter (= that plays your file correctly with a dshow player), write that down, and build a manual graph that the player will use (possible with bsplayer, zoom player, and the upcomming powerdivx 4 version).
4. associate the '.dat' or '.mpg' extension with that manual graph (for each player individually).
now you can install the rest of your filters, and the player should stick to the one that's defined in it's svcd graph profile.
hope it helps
cheers
avi.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.