VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Member
    Join Date
    Jun 2005
    Location
    USA
    Search Comp PM
    Is there a way to import a picture into AVIsynth? I wanted to make a title page and insert some jpegs into my video and I couldn't figure out how or find a post on it. Thanks!
    Quote Quote  
  2. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    ImageSource is a starting point

    Edit : fixed avisynth reference
    Read my blog here.
    Quote Quote  
  3. Yeah, what you actually want is a little unclear to me, but how about:

    ImageSource("C:\Path\To\Picture.jpg")

    http://avisynth.org/mediawiki/ImageSource
    Quote Quote  
  4. Member
    Join Date
    Jun 2005
    Location
    USA
    Search Comp PM
    Yeah I want to do both importing a picture, which it looks like ImageSource does (thanks for the help ), along with the video I took from my digital camera.

    And then I also wanted to create a title page for the video. Like if I made something in Photoshop and then imported it in somehow.

    In that reference about ImageSource, I don't understand what the use_DevIL means. It says it will bypass the internal parser if set to true. What is the reason we should or should not do this? Thanks!
    Quote Quote  
  5. Yeah I want to do both importing a picture, which it looks like ImageSource does (thanks for the help ), along with the video I took from my digital camera.
    I still don't understand. Do you know and understand AviSynth? And that ImageSource page didn't help? What do you want to do? Can you be more specific? Do you just want to have the still pic for a certain amount of time, followed by the video:

    A=ImageSource("C:\Path\To\Picture.jpg",End=300,FPS =29.97)
    A=A.ConvertToYV12()
    B=MPEG2Source(C:\Path\To\Video.d2v")
    A+B

    That'll display the pic for 300 frames (10 seconds at 29.97fps), followed by the video. If the video is in the YV12 colorspace, the pic has to be converted to the same. I'm assuming the video in an MPG of some sort and you've created a D2V project for it using DGIndex. Maybe it's an AVI, in which case you use AVISource, and maybe the colorspace doesn't have to be converted. The picture and video have to be the same resolution, or one or the other has to be resized. Test out your scripts in VDub(Mod) to get understandable error messages.

    I still don't understand what you mean by creating a title page. Are you talking about a menu, like for a DVD?

    Ignore the DevIL stuff. You'll never need it.
    Quote Quote  
  6. Member
    Join Date
    Jun 2005
    Location
    USA
    Search Comp PM
    Yeah for title page I meant like title of my video, but not necessarily a menu to navigate, although that would be cool. Seeing how I cannot get basic functions to even work, I will do that at a later time. But just out of curiosity, can I use TMPG Author to do that after I make my video? Is that the best way?

    So for my title, it would be just like a slideshow, some black screen that said, "boat race 10/20/07" or something like that. I figured I could create something in photoshop, save it as a JPEG, and import it in with ImageSource.

    I had this in my script:
    a=DirectShowSource("myfile")
    b=ImageSource(file="myPicture")
    a+b

    and I got the error that my video had audio and my picture didn't. So I then did

    bAudio=WavSource("some random .wav I found on my computer")
    c=AudioDub(b,bAudio)
    a+c

    then I got the error that video formats don't match. The size of my picture is the same size as my video. Any advice here? Thanks!
    Quote Quote  
  7. I use TMPG Author to do that after I make my video? Is that the best way?
    OK, I think I understand about your title page. It's more commonly called (if for DVD) a First-Play video. Something that plays before going to the menu or to the main video, often a logo or short intro. I don't use TMPGEnc DVD Author, but I've read it can do that easily enough. Me, I've added in a First-Play before, after authoring, by using PGCEdit's Title->Import DVD's First-Play (Startup) Clip.

    DirectShowSource, why do people use it? First, make sure your AviSynth is up-to-date. Then it's less likely that DirectShowSource itself is the problem. Then, to make sure the audio isn't the problem, disable it entirely:

    a=DirectShowSource("myfile",Audio=False)

    Then, as for video formats not matching, make sure the color spaces are the same, as I advised earlier. If you don't know what they are for the 2 sources:

    DirectShowSource("myfile",Audio=False)
    Info()

    and then do it for the other. The framerates for the 2 have to be the same as well, as I also tried to make clear in my earlier post. If you insist on using DirectShowSource, you sometimes have to set the framerate. The Info line will also give you the framerate for the 2 sources.

    http://avisynth.org/mediawiki/DirectShowSource
    Quote Quote  
  8. Member
    Join Date
    Jun 2005
    Location
    USA
    Search Comp PM
    I used Info() to find the Info on my picture and it said, "RGB24." I then tried a=a.ConvertToYV12(), but it gave me the error:

    "The script's return value was not a video clip"

    Any advice? Thanks.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!