Logo Logo
/// 
Clips in VirtualDub

Clips in VirtualDub



Frage von baum:
September 2005

Hello, is there a way to import into VirtualDub, a video clip to another, ie: is the one video (720 x 576px) that involve s.Stelle x, y of time a to time b another video. All this would look like this a little, do not hang up like the scenes in "".
Thanks
Peter



Antwort von Stefan:

No, in VD that is not or only extremely costly. VD is in fact only designed to create an input stream (video source) into an output stream (goal video).

If you absolutely möchstest using freeware, you can AviSynth (www.avisynth.org) take on this task. In order to do it.

Good luck
The fat Stefan



Antwort von bau:

Hello Stefan,
Thanks for the tip. I have tried it and had done some things with Avisynth and VD synonymous, but the thing with the layer I did not manage it.

Layer (base_clip, overlay_clip, string op, int level, int x, int y, int "threshold", bool "use_chroma")

I've tried it as such, it might not work:
Layer ( "d: \ base_clip.avi", "d: \ overlay_clip.avi", "brighten", "50", "20", "20 ","","")

The two avi files exist s.dem specified path. I know myself, but hardly at all with this programming and scripting stuff out and have certainly made mistakes. Could you (or someone to tell others), I must set the syntax?

Thanks in advance
Peter








Antwort von Stefan:

The layer function, I have never done it. In http://www.avisynth.org/Layer+Deutsch is something s.Hilfe.

You may have forgotten the simple AviSource ().

clip1 = (AviSource "Clip_1.avi")
clip2 = (AviSource "Clip_2.avi")
Layer (clip1, clip2, ... and so next ...)

The Mixerei for the different color spaces seems to be complicated. In a Stillimage pop-up script of katjarella the layer function is used. Maybe this will help you in testing:

http://forum.gleitz.info/showthread.php?t=21414&highlight=einblenden

On the other hand, the picture-in-Picture (PIP) function several times in the Avisynth forum is being discussed. There, the effect usually with the overlay function is done:

http://forum.doom9.org/search.php?searchid=277723

Good luck
The fat Stefan



Antwort von baum:

Great, now hats worked. The tip with AviSource () was spot-on.

clip1 = (AviSource "d: \ base_clip.avi")
clip2 = (AviSource "d: \ overlay_clip.avi")
Layer (clip1, clip2, "add", 255, 5, 170, 50, TRUE)

However, with vd I had to change the color depth to YUY2. The result is great, but I can no longer be my final video onto MiniDV tape played back. Gibts da ne way?

Thank you.
Peter



Antwort von Stefan:

Certain. You have to somehow get the video to DV format.

That means the size of 720x576 ago. This is currently defined by the dimensions of the base_clip.avi. If they're different, you need the size (cropping or resize to adjust).

And you have to create an AVI, which is compressed with the DV codec. In addition you can open the script in VirtualDub and save the settings as the source of video compression "DV Codec" as an AVI. Then this DV AVI with a DV capture program (WinDV, CaptureFlux etc.) transferred to the camera.

A hook might be for you the DV codec in VirtualDub. You need a VFW DV codec. For example, of the Panasonic. For details, is in the Schlashcam help.

Yet there is that there is a new open source DV codec development from good old Germany, the Cedocida DV codec.
Discussion and reference to download - http://forum.doom9.org/showthread.php?t=94458&page=1&pp=20
Development and Source code - http://www-user.rhrk.uni-kl.de/~dittrich/cedocida/index.html

Der Cedocida DV Codec müsste ebenfalls with VD funktionieren, der Autor Andreas Dittrich ist in der VD Szene kein unbekannter Filterentwickler, aber ich hatte noch nicht die Muse das auszuprobieren.

Die Farbtiefe kannst Du übrigens synonymous direkt im Avisynth-Skript ändern. Möglicherweise erspart Dir das eine Vorbearbeitung with VD and "of Hand". In Avisynth gibt es mehrere Funktionen zum Konvertieren of Farbräumen z.B. synonymous ConvertToYUY2(clip, bool "interlaced")
http://www.avisynth.org/Convert+Deutsch

[code: 1:46 a467715d] clip1 = ConvertToYUY2 (AviSource ( "d: \ base_clip.avi"), interlaced = true code) [/: 1:46 a467715d]

would give a clip capture and convert the same to YUY2. Re changing functions also exists.

Good luck
The fat Stefan



Antwort von baum:

Also it worked. The codec can convert the avis to spool out wonderfully and then NiniDV. These automated Farbtiefenwandlung 'funzt'.

Thanks again for the info
Peter



Antwort von Stefan:

Thank you, too! Ensure that you give feedback.
The fat Stefan



Antwort von prem:

Now, has still shown even a problem.

After converting with the DV codec (Panasonic and Cedocida) the resulting file looks great out in VirtualDub, in Media Player or PowerDVD but it has gruesome artifacts.

Tentatively, the file was played on tape and again reingespielt into the PC: same result: in VD 1a, in the other lousy quality.

With my modest knowledge, I suspect that the players are not using the correct codec. How can I get them to show the clean avi?

Peter



Antwort von Stefan:

Can you make a screenshot of the issue in Media Player or PowerDVD to make and show here? You can take pictures at Imageshack.us.

Addendum: How and with what program do you have a DV video camera and transferred to the calculator back? Are still having trouble synonymous, if you sufficient as WinDV, CaptureFlux or Sclive (Trial) used?

Good luck
The fat Stefan



Antwort von baum:

Now I wanted to make screenshots and behold: the screenshots are made (with camtasia) all black. Only the screenshot of VirtualDub is correct.

I have replayed and transferred with WinDV.



Antwort von Stefan:

Hmm.

# Black Screenshots With Camtasia

Camtasia does not seem to manage to the DirectShow Overlay properly incorporated. That's unfortunate, but is associated with your problem.

# Zerfretzelte with Wiedergbe Media Player or PowerDVD

I have tried to replicate that, but that did not succeed. With WinDV I could not recall the image to the camera because the camera is not found, no preference.

Instead, I took Sclive (Trial with Logo, no preference) and added a DV AVI Type-2. Before and after transferring my media player (v6.4) and PowerDVD to play back AVIs without error.

For deeper understanding of the problem - VD used to play safely installed from the DV codec.

The MP and use the PowerDVD either synonymous these DV codec (IMHO unlikely) or the Microsoft DV codec (more likely).

You can check whether there is a newer version of the Microsoft DV codec. It may be that smuggled to install an older version of the DV card.

Check the versions / dates of the files and msyuv.dll QDV.DLL QUARTZ.DLL in the Windows system directory and the version of DirectX. You can download the version numbers synonymous with beautiful GSpot to find out the tool.

Alternatively, you can try synonymous to turn off the DV codec installed from (Panasonic) temporarily. You can use the tool to VCSWAP.

Good luck
The fat Stefan








Antwort von baum:

Now the movie is (or down to see done, and load) under

http://www.global-cam.de

Thanks to some particular 'Fat Stefan' for the help and the tips.

Peter



Antwort von video07:

Hello Peter and Stefan,

I try the same function, namely, two clips to merge (Fct pip) to machen.Leider I do not succeed. What am I doing wrong that I receive error code "layer only suipport YUY2 format" Here is my source:

Script #
# Define clips
(clip1 = DirectShow source "C: Mediaprojektpie.avi")
(clip2 = DirectShow source "C: Mediaprojektgeschenk.avi")

# Convert to YUY2 both
ConvertToYUY2 (clip1)
ConvertToYUY2 (clip2)

Fused #
Layer (clip1, clip2, "add", 255, 5, 170, 50, TRUE)

Can you please help me?
Thank you,
Georg



Antwort von Stefan:

Change your script times from that point, the variables clip1 and clip2 synonymous to the converted clip.

# Convert to YUY2 both
clip1 = ConvertToYUY2 (clip1)
clip2 = ConvertToYUY2 (clip2)

In detail, I can now watch the event tonight.

Good luck
The fat Stefan



Antwort von video07:

Hello Stefan,

how do I apply only overlay of frame 20 to frame up 25? Dasb I would like to say that overlay of frame 20 to 25

Until now, my designs with Conditionalfilter have not worked. I think Ovberlay is better suited.

Here is my code:

Script #
# Define clips
(clip1 AviSource = "C: \ Media \ projekt \ pie.avi")
(clip2 AviSource = "C: \ Media \ projekt \ geschenk.avi")

# Convert to YUY2 both
clip1 = ConvertToYUY2 (clip1)
clip2 = ConvertToYUY2 (clip2)

Fused #
Layer (clip1, clip2, "add", 255, 244, 0, 165, TRUE)
ConditionalFilter (clip1, clip2, clip2, "overlay", "equals", "50")
ConditionalFilter (clip1, clip2, clip2, "overlay", "equals", "95")
ConditionalFilter (clip1, clip2, clip2, "BlankClip lessthan ()","", "50")
Overlay (clip1, clip2, mode = "blend", x = 244, y = 18, opacity = 1.0)

Thanks for your help



Antwort von Stefan:

The key to assembling the trim command.

The Conditionalfilter is for something else: action because of BildINHALTS (not the frame number of conduct).

Your example is not optimal because I do not know how to look your transition.

Through the overlay in your example, you just punched the Clip2 offset purely in the Clip1.

And the transition is only 5 frames with very very short. It flashes briefly and that was it.

With these constraints, the script looks like this:

[code: 1: a61c072788]
Script #
# Define clips
(clip1 = AviSource "pie.avi")
(clip2 = AviSource "geschenk.avi")

# Convert to YUY2 both
clip1 = ConvertToYUY2 (clip1)
clip2 = ConvertToYUY2 (clip2)

# Mix
clip3 = Overlay (clip1, clip2, mode = "blend", x = 244, y = 18, opacity = 1.0)

# Copy merge
# Only 20 frames from pie.avi s.Frame 0
# Then 5 frames superimposed pie + gift s.Frame 20-1 (counting s.0 ...)
# Then the rest of pie.avi
clip4 = clip1.trim (0.20) + clip3.trim (20-1,5) + clip1.trim (20 +5-1,0)

# Print
return clip4
[/ code: 1: a61c072788]

Good luck
The fat Stefan

ADD: Sorry, trying them out I removed the path to the clips. You may need to add again.



Antwort von video07:

Hello Stefan,

Thanks for the replies so far. If I could make it synonymous with ApplyRange?

I have the hingekriegt so already. However, only the most recent is displayed. But I want that on my Clip1, Clip2 and 3 are available as overlay on it.

My idea is two animated flags that I recorded with Camtasia previously positioned by overlay on the building next to the American flag. (See s.end images). After that, I would like about 20 per Mpeg2Source clips without sound as an overlay on a screen (not yet set illustrated). I have read somewhere that the processor rather ApplyRange auslastet when it is used multiple times. So I thought s.ConditionalFilter, or is this wrong? Anyway, I would think even with effort Processor ApplyRange if you could make several overlays.
I have already tried with two different clips that he always wants the last overlay show what I do wrong?

Script #
# Define clips
(clip1 AviSource = "C: Mediaprojektpie.avi")
(clip2 AviSource = "C: MediaprojektFlaggen.avi"). trim (0.205). reverse ()
(clip3 AviSource = "C: MediaprojektFlaggen.avi"). trim (8409.8714). reverse ()
# convert to YUY2 both
clip1 = ConvertToYUY2 (clip1)
clip2 = ConvertToYUY2 (clip2)

Fused #
# Overlay (clip1, clip2, mode = "blend", x = 244, y = 18, opacity = 1.0)
# ApplyRange (clip1, 20,30, "overlay", clip2, 244.58)
ApplyRange (clip1, 50.60, "overlay", clip3, 450, -16)

Thanks for the reply
video07
zum Bild
So it will be! zum Bild



Antwort von Stefan:

Oh, with ApplyRange I've never done something. If I had only read documents, and play around.

Quote:

I have already tried with two different clips that he always wants the last overlay show what I do wrong?


This is probably s.deiner Skiptprogrammierung. The functions always give the generated clip back and the file can be processed in the following commands.

So to fading of Clip2, clip3, clip4 in Clip1 would be (with a notional Einblendefunktion here as overlay or ApplyRange) Customize these steps:

[code: 1: f6e6333ef1]
Clipmix = Einblendefunktion (clip1, clip2) # first
Clipmix = Einblendefunktion (Clipmix, clip3) # second
Clipmix = Einblendefunktion (Clipmix, clip4) # third image
# Other operations with Clipmix ...
# ... Result s.Aufrufer spend or pass-throughs
return Clipmix
[/ code: 1: f6e6333ef1]

Good luck
The fat Stefan



Antwort von video07 zu Gast:

Thanks for your help to jetzt.Nun I have another problem: the flags "follow" the main video (pictures attached), they change their position. How can I say avisynth, the flags are 20 frames (or I've set wiviel) blow s.der same fixed position?

My script looks like this:

[code: 1:14 dca09fe9]
Script #
# Define clips
# clip1 is american pie!
(clip1 AviSource = "C: \ Media \ projekt \ pie.avi"). ConvertToYUY2 (). trim (210.398)
# clip2 is the EU flag!
(clip2 AviSource = "C: \ Media \ projekt \ Flaggen.avi"). trim (0.205). reverse (). ConvertToRGB32 (). BilinearResize (163.299)
# clip3 Ru is the flag!
(clip3 AviSource = "C: \ Media \ projekt \ Flaggen.avi"). trim (8409.8714). reverse (). ConvertToRGB32 (). BilinearResize (163.299)
[/ code: 1:14 dca09fe9]

I still have a very short question: how you just put a chromakey. So I want to, for example an avi without any blue color in the background (spider avi). I want to say something like the Greenbox produce effect by artificially I define the blue color should be set to transparent.

Would do something like this work?
Colorkeymask ( "blue", 1)

Appendix: zum Bild
zum Bild




Antwort von video07:

Update: I've now done, at least, that the blue color to black and change with the command:

# blue mask
maskclip = ColorKeyMask (clip5, $ 0f0fb4, 60,)

But I want the blue color has gone!

Have a nice evening

Appendix: zum Bild
zum Bild








Antwort von Stefan:

I know nothing more.

"The flags follow the main video ..." and "Spinne.avi ..." Bohemian villages are for me.

The inserts with the flags will you be using s.einer screen position. How can you follow the main video? They can only remain s.dem space and the image content from the main video can include (eg moving away) turn in the main video.

To hinzubiegen such a divergence, you're with Avisynth s.der border. In a real editing program with composing characteristics would make the position of the flags are not static s.einer place, but to adapt the movement of the background videos.

As a stopgap measure, I could only imagine to keep the background video at the time of Flaggeneinblendens statically, by example, is used instead of the real video at the scene a Stillimage.

The Masking of the blue background, I have never made synonymous. As a starting point for experiments, I would look at me as follows.

From the video with the blue background, I would make a mask. Ie everything is blue and everything else should be black in the mask will be white. With this screen you can then select how transparent the superimposed picture-in the main video is used: white spots are not in the overlay image transparent, black bodies are fully transparent.

By ColorKeyMask () you are actually on the right track, you must still be worked into the command that makes the transition then.

[code: 1:4 bd8e5a26b]
Script #
# define clips
# clip1 is american pie!
(clip1 AviSource = "C: \ Media \ projekt \ pie.avi"). ConvertToYUY2 (). trim (210.398)
#
# blue mask
maskclip1 = ResetMask (clip1) # until all opaque
maskclip1 = ColorKeyMask (clip1, $ 0f0fb4, 60, transparent) # then blue posts
clip1teiltransparent = Mask (clip1, maskclip1)
#
# When done with layer would then Üblerblendung ...
(Clipmix = Einblendefunktion main video, clip1teiltransparent)
return Clipmix
[/ code: 1:4 bd8e5a26b]

Good luck
The fat Stefan



Antwort von video07:

... Many thanks for your help,

I have my project almost done ...

If you want I can my project is finished (but since it "DVD quality" has to be big to upload 5 GB, so that you can look at you.

Have a nice evening
video07




Antworten zu ähnlichen Fragen:
Davinci Resolve .mov Clips ersetzen mit .braw Clips
Mpeg schneiden mit virtualdub
Virtualdub mod Probleme mit dem komprimieren von audio
Firewire VirtualDub
VirtualDub und Arte
virtualDub frage
Sound-Problem bei VirtualDub
virtualdub filter frage
VirtualDub 1.5.10 - "VideoSourceAVI error" beim Lesen von DivX 5.11 Dateien !
VirtualDub: DivX + framegenau schneiden
Nichmal Frage zu VirtualDub
VirtualDub - Capturing mit PCTV-Stereo?
Kein Capturen mit VirtualDub und Terratec Cinergy 400 TV
VirtualDub.jobs manuel editieren ... wie gehts?
VirtualDub und Win-XP bitte Hilfe
MS MPEG 4 v3 geht nicht mit VirtualDub?
Zeitgesteuertes Capturen mit VirtualDub
Suche zusätzliche Filter für VirtualDub !!!
VirtualDub Plugin
mpeg-Aufnahme nach Einlesen in VirtualDub asynchron
VirtualDub mpeg2 Dateien bearbeiten

















weitere Themen:
Spezialthemen


AI
ARD
AVCHD
AVI
Adobe After Effects
Adobe Premiere Pro
After effects
Apple Final Cut Pro
Audio
Avid
Avid Media Composer
Cam
Camcorder
Camera
Canon
Capture
Capturing
Clip
EOS
Editing
Effect
Error
Film
Final Cut
Format
HDR
Import
JVC
Layer
Light
MAGIX video deLuxe
Magix
Microphone
Movie
Panasonic
Pinnacle
Pinnacle Studio
Premiere
RAM
RED
Recording
Software
Sony
Sound
Studio
TV
Video
Videos