digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Capturing / Recording (http://www.digitalfaq.com/archives/capture/)
-   -   capture/transfer videos with mjpeg codec? (http://www.digitalfaq.com/archives/capture/13371-capture-transfer-videos.html)

Prodater64 03-02-2005 01:14 PM

capture/transfer videos with mjpeg codec?
 
I have several family's VHS tapes and I want to know what is the better way to capture they.
From another thread I think I must to capture with mjpeg codec (as I can't see huffyuv in the codecs drop down box) Or, if I install this codec, will I be able to select it in the program (Adobe Premiere, Pinnacle or Media Studio?)
I want also to edit them (scenes, cuts, transitions)
I have edited before, but I don't know what is the way that gives the better quality, as this mean one recompression, what should be my output codec if later I would want to convert to KVCD/KDVD?

Edited: What would be an avs script for these, not clean material.

Dialhot 03-02-2005 04:04 PM

Re: First pass.
 
Quote:

Originally Posted by Prodater64
I have edited before, but I don't know what is the way that gives the better quality, as this mean one recompression, what should be my output codec if later I would want to convert to KVCD/KDVD?

The best you have to do is to use DV. As your card also support it. I know that means a lot of HD, but this is the best choice.

Quote:

Edited: What would be an avs script for these, not clean material.
You have a VHS optimal script in the optimal section, but it has to be updated for avs2.5

the viking 03-02-2005 04:08 PM

What capturecard do you have?
I got a pinnacle DC10Plus card with hardware compression,that means
you have to use that one when capturing,you cant choose other codecs for capture.I capture at full resolution 768x576,max data rate 6000kbytes/sec.
I have used pinnacle studio 8 for editing and it works ok.So to the fun part,when you are finished with editing,you can choose codecs to output trough,picvideo,huffyuv,xvid,divx etc. or you can choose
the option"same as input" wich means you got no quality loss from the captured file.
Then you are ready to encode to mpeg 2, here is one of my scripts,for interlaced top field first encodings:
Quote:

LoadPlugin("C:\programfiler\AviSynth 2.5\plugins\Cnr2.dll")
LoadPlugin("C:\programfiler\AviSynth 2.5\plugins\Removegrain.dll")
#LoadPlugin("C:\programfiler\AviSynth 2.5\plugins\LoadPluginEx2.dll")
#LoadPlugin("C:\programfiler\AviSynth 2.5\plugins\old\DustV5.dll")
AviSource("D:\Full Capture\Video 1.avi",Pixel_Type="YUY2")
AssumeTFF()
Bob(0,0.5)
Cnr2()
RemoveGrain(mode=2)
TemporalSoften(2,4,5,15,2)
#Faerydust(3)
LanczosResize(704,560,9,4,750,560)
AddBorders(8,8,8,8 )
ConvertToRGB24() # For TMPGEnc or VFAPI
SeparateFields()
SelectEvery(4,1,2)
Weave()

------------------------
viking

Boulder 03-03-2005 03:13 AM

Re: First pass.
 
Quote:

Originally Posted by Prodater64
I have several family's VHS tapes and I want to know what is the better way to capture they.
From another thread I think I must to capture with mjpeg codec (as I can't see huffyuv in the codecs drop down box) Or, if I install this codec, will I be able to select it in the program (Adobe Premiere, Pinnacle or Media Studio?)
I want also to edit them (scenes, cuts, transitions)
I have edited before, but I don't know what is the way that gives the better quality, as this mean one recompression, what should be my output codec if later I would want to convert to KVCD/KDVD?

Edited: What would be an avs script for these, not clean material.

Wouldn't you be able to use VirtualDub for capturing? The latest version supports WDM capturing :D

I suggest Didée's LRemoveDust, it's a lot like PixieDust but much faster.

For YUY2 material:
Code:

function LRemoveDust(clip input, int _mode, int "limit")
{
limit  = default(limit,4)
LL      = string(limit)
STR    = "x "+LL+" + y < y "+LL+" - x "+LL+" - y > y "+LL+" + x ? ?"
repmode = 2
clensed = Clense(input)
rep    = Repair(clensed, input, mode=repmode)
rg      = RemoveGrain(rep, mode=_mode)
trep    = TemporalRepair(rg, rep)
trep2  = isyuy2(input)
 \      ? trep.converttoyv12()
 \      : trep
input2  = isyuy2(input)
 \      ? input.converttoyv12()
 \      : input
limit!=0 ? yv12lutxy(trep2,input2,yexpr=STR,U=2,V=2) : last
out    = isyuy2(input)
 \      ? last.converttoyuy2().mergechroma(trep)
 \      : last
return out
}

You'll need removegrain.dll and repair.dll , both are in the latest RemoveGrain package at http://www.removegrain.de.tf

There's another version (faster) of LRemoveDust for YV12 if you're interested.

Prodater64 03-03-2005 02:52 PM

Re: First pass.
 
Thanks you all.

Quote:

Originally Posted by Boulder
Wouldn't you be able to use VirtualDub for capturing? The latest version supports WDM capturing :D

What is the advantage of WDM capturing?

Boulder 03-03-2005 03:19 PM

WinXP supports only WDM drivers so you might not get the v1.5 branch working since it's VfW only. The 1.5 versions use a VfW->WDM wrapper which doesn't work nearly every time and often you are limited to n x 240/288 pixels in capture format.

WDM (I think it was Windows Driver Model or something like that) is basically the same as DirectShow. All current TV cards are shipped with WDM drivers instead of VfW ones since they work in Win98 and above.

Before Avery Lee reworked the capture portion to work with WDM stuff, the only proper option was VirtualVCR which hasn't been updated in a long while. VDub includes the same functionality and it's still developed further.

digitall.doc 03-03-2005 05:43 PM

Boulder,

... LRemoveDust for YV12 :idea:

Yes, I would like to test it on some bad VHS sources I have.

Could you post it?

Thanx

Boulder 03-04-2005 02:00 AM

function LRemoveDust(clip input, int _mode, int "limit")
{
limit=default(limit,4)
LL=string(limit)
STR="x "+LL+" + y < y "+LL+" - x "+LL+" - y > y "+LL+" + x ? ?"
repmode = 2
clensed = Clense(input)
rep=Repair(clensed, input, mode=repmode)
rg = RemoveGrain(rep, mode=_mode)
TemporalRepair(rg, rep)
return limit!=0 ? yv12lutxy(last,input,yexpr=STR,U=2,V=2) : last
}

Recommended settings for both YUY2 and YV12 version are LRemoveDust(4,2). You'll also need MaskTools (at the moment v1.5.6) for the YV12 script.

incredible 03-04-2005 04:22 AM

Im not shure if the latest Release of VirtualDub which supports WDM Drivers is stable enough. I do recommend VirtualVCR as its well known for stability and it gots all you need for a proper capturing. Also all Dshow Codec can be used when capturing. Im not shure if VirtualDub ALSO provides the usage of Dshow Codecs when capturing and not only the vfw ones.

Capturing in DV also means a FieldorderChange from TFF to BFF which HAS to be kept in mind when filtering and encoding to mpeg2.

Do use as Codec HuffYUV or PicVideo at Q=19

Boulder 03-04-2005 04:26 AM

Well, I haven't found it unstable and many others have been using it with success. I haven't had a single crash or a/v sync issues. VVCR has crashed on me several times if I record, stop and then record again. 1.6-branch is experimental, of course, but we are used to that :wink:

Dialhot 03-04-2005 04:59 AM

Quote:

Originally Posted by incredible
Do use as Codec HuffYUV or PicVideo at Q=19

If the card let you choose the codec you want, there a a lot of lossless codec more efficient than huffYUV or PicVideo.

http://compression.ru/video/codec_co...codecs_en.html

Boulder 03-04-2005 05:02 AM

I'm not sure if many codecs can handle realtime compression at high resolutions, at least MSU can't. Decoding is also dead slow compared to HuffYUV with predict gradient. FFV1 is YV12 if I remember correctly.

Prodater64 03-04-2005 03:14 PM

Quote:

Originally Posted by incredible
Capturing in DV also means a FieldorderChange from TFF to BFF which HAS to be kept in mind when filtering and encoding to mpeg2.

I am completely newbie in captures. I have captured before, but without any knowledge (crap captures). I would wish an orientation not to much hard to understand.
In this moment, I don't know how codec to use, DV or mjpeg or if I can capture with huffyuv.
Also, I don't know what do you mean with the fieldorder change (related with the avs script) and I would see it better if you post the script.
I want to deinterlace the PAL video I captured. Are any of the usual scripts used useful in this sense?

Dialhot 03-04-2005 03:38 PM

Quote:

Originally Posted by Prodater64
Also, I don't know what do you mean with the fieldorder change (related with the avs script) and I would see it better if you post the script.
I want to deinterlace the PAL video I captured. Are any of the usual scripts used useful in this sense?

Actually, order has to do with deinterlace filters. Take a look at all of them (leakerneldeint for instance), they all use a "order" parameter.

Boulder 03-05-2005 03:30 AM

Quote:

Originally Posted by Prodater64
I am completely newbie in captures. I have captured before, but without any knowledge (crap captures). I would wish an orientation not to much hard to understand.
In this moment, I don't know how codec to use, DV or mjpeg or if I can capture with huffyuv.
Also, I don't know what do you mean with the fieldorder change (related with the avs script) and I would see it better if you post the script.
I want to deinterlace the PAL video I captured. Are any of the usual scripts used useful in this sense?

If you do DVDs, don't deinterlace. The motion will remain as smooth as it is on the tape and no details are lost in the process.

You can check the field order with a simple script:
AVISource("path\clip.avi")
AssumexFF() # where x is T or B
Bob()

Open the script in VDub. If the motion is smooth, you've got the correct field order set; AssumeTFF for top field first, AssumeBFF for bottom field first. DVs are BFF but you can always doublecheck it with that script.

When loading a DV source, you'll have to be extra careful as some codecs output RGB, some YUY2 and you must determine which one is the right one. I'm not the one to tell you what to do as I don't use DV myself, but Inc can probably help you. Also the Doom9 DV forum is a good source of information.

If you can, use HuffYUV. That will keep things simple and lossless :wink:

Prodater64 03-07-2005 01:45 PM

Re: First pass.
 
Quote:

Originally Posted by Boulder
I suggest Didée's LRemoveDust, it's a lot like PixieDust but much faster.

For YUY2 material:
Code:

function LRemoveDust(clip input, int _mode, int "limit")
{
limit  = default(limit,4)
LL      = string(limit)
STR    = "x "+LL+" + y < y "+LL+" - x "+LL+" - y > y "+LL+" + x ? ?"
repmode = 2
clensed = Clense(input)
rep    = Repair(clensed, input, mode=repmode)
rg      = RemoveGrain(rep, mode=_mode)
trep    = TemporalRepair(rg, rep)
trep2  = isyuy2(input)
 \      ? trep.converttoyv12()
 \      : trep
input2  = isyuy2(input)
 \      ? input.converttoyv12()
 \      : input
limit!=0 ? yv12lutxy(trep2,input2,yexpr=STR,U=2,V=2) : last
out    = isyuy2(input)
 \      ? last.converttoyuy2().mergechroma(trep)
 \      : last
return out
}

You'll need removegrain.dll and repair.dll , both are in the latest RemoveGrain package at http://www.removegrain.de.tf

There's another version (faster) of LRemoveDust for YV12 if you're interested.

This function give me an allocation memory error.

Prodater64 03-07-2005 02:54 PM

I finished my first capture and edited it with Adobe Premiere. Saved with no compression and loaded through avs in tmpgenc. Video ok.
Audio uncompressed to mp2 with VirtualDubMod. Video ok.
Multiplexed with bbmpeg. ok.
CD burned as SVCD play ok, but suddenly audio stop and come back several times?
I did a search but can't find a possible answer to this problem (surely there are several, but I can't find any.)
I fixed audio from 48 to 44.1.
I downed max bitrate from 3500 to 2500.
All times audio seems to stop and come back in same or similar places.
Any idea?

Boulder 03-07-2005 02:59 PM

Try this one:

Code:

org=last
ConverttoYV12()
LRemoveDust(4,2)
ConverttoYUY2()
MergeChroma(org)

function LRemoveDust(clip input, int _mode, int "limit")
{
limit=default(limit,4)
repmode = 2
clensed = Clense(input)
rep=Repair(clensed, input, mode=repmode)
rg = RemoveGrain(rep, mode=_mode)
rd=TemporalRepair(rg, rep)
return LimitChange(rd, input, limit, limitU=255)
}

You'll need this package. You can have only one ssetools and removegrain dll in the plugins folder. They are optimized for certain instruction sets so choose which one is appropriate for you. Did you have only one removegrain and repair dll in the plugins folder when you got that error?

If your source is YV12, you only need the LRemoveDust line (and the function, of course).

Boulder 03-07-2005 03:01 PM

Quote:

Originally Posted by Prodater64
I finished my first capture and edited it with Adobe Premiere. Saved with no compression and loaded through avs in tmpgenc. Video ok.
Audio uncompressed to mp2 with VirtualDubMod. Video ok.
Multiplexed with bbmpeg. ok.
CD burned as SVCD play ok, but suddenly audio stop and come back several times?
I did a search but can't find a possible answer to this problem (surely there are several, but I can't find any.)
I fixed audio from 48 to 44.1.
I downed max bitrate from 3500 to 2500.
All times audio seems to stop and come back in same or similar places.
Any idea?

Try lowering the maximum bitrate even more than that. You could also check the video with Bitrate Viewer, there might be huge spikes in those problemous parts.

Prodater64 03-09-2005 03:28 PM

Quote:

Originally Posted by Boulder
Try lowering the maximum bitrate even more than that. You could also check the video with Bitrate Viewer, there might be huge spikes in those problemous parts.

That is not the solution.
I changed part of the audio clip and then no more audio problem with this one, but problems still with the first one (it have 3 songs). It is courious, wav file not problem and mp2 not problem. Only when I burn the SVCD the problem does appear. The audio stop for a second or so and come back, later another time, but now 2 or 3 seconds, and come back.
No problem in any other place. Not problem with the video.


All times are GMT -5. The time now is 06:16 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.