VideoHelp Forum




+ Reply to Thread
Results 1 to 18 of 18
  1. I`ve read here for a solution of using AviSynth for doing this. The post is here

    I`m having a problem since AviSynth reports that the image formats don`t mach (but they are all bmps!)

    I archived them and uploaded them on my server, please take a look and tell me what to do further
    Quote Quote  
  2. Hi-

    A=AVISource("C:\Path\To\SourceVideo.avi")
    B=B=AVISource("C:\Path\To\Logo.avi")
    B=B.Loop(400)# Adjust for the length of the video. That one will continue for roughly 25 minutes
    Overlay(A,B)

    http://avisynth.org/mediawiki/Overlay

    I originally had it working using ImageSource, but for some reason it quit working so I made a YV12 lossless Lagarith AVI of the logo.

    That sticks the logo in the upper left of the main video. You can add in the x and y parameters so it gets placed anywhere you like. You can also adjust the opacity so it's translucent (see though). I didn't feel like figuring out why the script you were following didn't work for you. Here's the Lagarith AVI I made of the logo:

    logo.rar
    Quote Quote  
  3. Thank-you, seems that it fixed the problem, but I will have to study a little bit more on AviSynth to fix some issues, as I suppose that you don`t feel like answering me anymore questions. Not a nice reply by the way.
    Quote Quote  
  4. I heavily edited that first reply after I was fooling around some more and ImageSource stopped working for me. Maybe it's working OK for you and you can use the original script I posted. I revised it in that earlier post to make use of the Lagarith AVI which I've included in case you'd like to use it yourself. Ask away. There are lots of people here besides me that can answer AviSynth questions.

    That error message you received usually points to 2 different color spaces being used for the main video and the one being overlayed. If the original AVI is YV12 and the BMPs are RGB, then that would account for it unless you made them both the same (as the guy in the link made them both YUY2 and I made the Logo.avi YV12 to match the AVI on which I tested).

    Not a nice reply? In what way was it not nice? Because I said I didn't feel like figuring out why the script didn't work for you? To do that I'd first need your script which you didn't post, and then I'd need to decipher his, and I don't write mine like he does, and I didn't feel like it when there's a simpler and more elegant solution to your problem, in my opinion.
    Quote Quote  
  5. I was not talking about your help. I thanked you about it and I appreciate it. I didn`t say that I will try to fix the other issues by myself just because you said that you don`t feel like figuring out, it is just that I wanted to learn things in AviSynth, of course I could have asked for somebody else to help me if you wouldn`t wanted to continue. And thank-you for editing the posts, I will try to use your tips now. And what would that "elegant" solution would be?

    EDIT: Unfortunately I don`t know the colour format of the video
    Quote Quote  
  6. Believe me, there was no malice or condescension intended in that reply. One reason I tackled the problem, got your logo and spent some time with it, was because I've had trouble in the past opening a series of BMPs and the link gave a sample script. And it worked - until it stopped working for me. Ask all the questions you like, but don't reference his script because some of it has nothing to do with what you're doing, the logo resize, for example. And I "phrase" my scripts differently than he does. There's nothing wrong with his, but I prefer to do things differently.
    EDIT: Unfortunately I don`t know the colour format of the video
    Make a simple script:

    AVISource("C:\Path\To\Video.avi")
    Info()

    Open it in VDub(Mod) and it'll give you the colorspace and lots of other information. Standard XviD and DivX AVIs are usually YV12.
    And what would that "elegant" solution would be?
    Mine, of course. Fewer lines, fewer letters used, easier to understand what's going on with it.
    Quote Quote  
  7. Originally Posted by manono
    Believe me, there was no malice or condescension intended in that reply.
    Yes, I know now, just that sometimes I interpret written phrases wrongly. It may happen only for me, it may happen to other people too, I don`t know. I`m sorry for the mischief caused

    Originally Posted by manono
    AVISource("C:\Path\To\Video.avi")
    Info()
    Yes, did that and I found out that it was YV12. I have managed to make AviSynth use all the frames but I still have 3 issues that I couldn`t find a solution for in the AviSynth manual yet.

    Originally Posted by manono
    Mine, of course. Fewer lines, fewer letters used, easier to understand what's going on with it.
    I was thinking you were talking about a trick or program other than AviSynth that does this task, but nevermind by now

    My .avs file looks like this by now:
    Code:
    LoadPlugin("C:\Windows\System32\vsfilter.dll")
    A=DirectShowSource("source avi path")
    B=ImageSource("logo path\%01d.bmp",1,92)
    B=ConvertToYV12(ConvertToYV12(B))
    B=B.Loop()7
    Overlay(A,B) 
    TextSub("path to .ass sub")
    The two issues are:
    - How can I set the transparency colour? (as the logo shows with a white background, and I don`t want that)
    - How can I set the time of one frame to be displayed? (such as 10ms, 100ms, etc)
    - How can I set the delay between the logo loops? (so when AviSynth plays the bmps from 1.bmp to 92.bmp it would stop for a few seconds/minutes, maybe fade in ad out before and after? or this is too much for AviSynth? )
    Quote Quote  
  8. Yes, I know now, just that sometimes I interpret written phrases wrongly.
    Well, I am sometimes a little... abrupt, shall we say. But I wasn't trying to be that time. Honest!
    - How can I set the transparency colour?
    That's done during the logo creation. I don't know anything about creating transparent backgrounds for logos as I spend way to much time trying to get rid of the damn things. Maybe someone else can help. Or you can ask whoever made it for you. As you may gather, I don't much approve of defacing videos with logos. Maybe you're in an anime group or something and don't want others stealing your videos, I don't know.
    - How can I set the time of one frame to be displayed?
    That's something I may be able to help with, but one frame of what? The logo? Maybe you want each logo frame displayed for a longer period, maybe to slow the movement? I'm not sure you can do that with an ImageSource unless you start making duplicate frames of the BMPs (instead of 92 of them, you might have 184 or 276, for example). You can also do it by converting the BMPs to an AVI (as I did above), and then padding the AVI with duplicate frames to stretch the length. The AVI will eventually take the framerate of the main video, though. If it's 23.976fps, each of the 92 frames of the logo plays lasts about 40 ms. Fairly easy would be to make each frame play as a multiple of 40ms, again by duplicating frames. Duplicating the BMPs can be done in VDub(Mod). I just converted the BMPs into 184 of them without any difficulty using VDubMod's Convert To FPS 59.94 and then File->Save Image Sequence. Then instead of playing for about 3.8 seconds at 23.976fps, it lasts about 7.5 seconds. There's another way that works by repeating each frame a specified number of times. That's stickboy's RepeatEveryFrame function, part of his ApplyEvery filter:

    http://avisynth.org/stickboy/

    You'd load the ApplyEvery.dll and then:

    B=B.RepeatEveryFrame(3)#plays each frame 3 times, lenthening the entire logo by a factor of 3
    - How can I set the delay between the logo loops?
    I thought I had that one figured out by using stickboy's InterleaveEvery function, but I can't get it right. I'd do it with trims, making sure each is a multiple of the length of the logo (so it doesn't start up again in the middle of the logo):

    C=Overlay(A,B)#the logo overlayed on the entire video
    D=C.Trim(0,91)#the logo is seen on the first 92 frames, the cycle of the logo
    E=A.Trim(92,919)#plays A (just video, no logo)
    F=C.Trim(920,1011)#logo again, with frames chosen to get it from beginning to end
    G=A.Trim(1012,0)#no logo for rest of video
    D+E+F+G#adding up all the pieces

    I don't really like the looks of this and can't help thinking there's a better and more elegant way to do it. Maybe someone else can suggest a better way to do it.
    maybe fade in ad out before and after
    That's easy:

    B=B.FadeIO0(15)

    That has it fade in at the beginning of the logo over a 15 frame period, and fade out at the end, also over 15 frames:

    http://avisynth.org/mediawiki/FadeIO

    Then the entire script might look like some variation of this:

    LoadPlugin("C:\Path\To\ApplyEvery.dll")#if you plan on repeating frames/lengthening the logo
    A=AVISource("C:\Path\To\Source.avi")
    B=AVISource("C:\Path\To\Logo.avi")#or your ImageSource line that I can't seem to make work
    B=B.ConvertToYV12()#if not YV12 already
    #B=B.RepeatEveryFrame(3)#if you want, but then adjust the trims down below as the logo now lasts 276 frames
    B=B.FadeIO0(10)#fades both in and out over a 10 frame period
    B=B.Loop()#loops continuously
    C=Overlay(A,B)#the looping and fading logo over the main AVI video
    D=C.Trim(0,91)#the rest is explained farther up.
    E=A.Trim(92,919)
    F=C.Trim(920,1011)
    G=A.Trim(1012,0)
    D+E+F+G
    Quote Quote  
  9. Originally Posted by manono
    Well, I am sometimes a little... abrupt, shall we say. But I wasn't trying to be that time. Honest!
    I know, I know ^_^

    Originally Posted by manono
    That's done during the logo creation.
    Negative, you cannot make the bmp transparent unfortunately, you must guide applications/programs what colour to use as transparent

    Originally Posted by manono
    As you may gather, I don't much approve of defacing videos with logos. Maybe you're in an anime group or something and don't want others stealing your videos, I don't know.
    Yes, I`m in a fansub group, and maybe that`s one of the reasons for the logo, but the other may be just to impress

    Originally Posted by manono
    #B=B.RepeatEveryFrame(3)#if you want, but then adjust the trims down below as the logo now lasts 276 frames
    What should I replace the first # with? As code right now is invalid (I did set the LoadPlugin string)
    Quote Quote  
  10. [Negative, you cannot make the bmp transparent unfortunately, you must guide applications/programs what colour to use as transparent
    OK, if you say so. Maybe I should have just said "I don't know" to the original question and left it at that.
    What should I replace the first # with? As code right now is invalid (I did set the LoadPlugin string)
    I thoroughly tested everything in that script, but using my Lagarith AVI I made of the logo as I didn't have much luck using ImageSource. It worked at first and then quit on me. I don't know why. So, maybe that RepeatEveryFrame doesn't work with individual BMPs, but only with videos.

    I'd first suggest getting the AVI I uploaded here a few posts up (as logo.rar) and trying with that. If that still doesn't work I'd need to see your full script and the exact error message. Or, alternatively, make duplicate copies of all the BMPs and try again using them without the RepeatEveryFrame line.

    Or, you could do your logo work in VDub using Donald Graft's Logo filter:

    http://neuron2.net/logo/logo.html
    Quote Quote  
  11. That logo filter seems to be a good solution. Still I don`t know how to make it loop some times and fade it away, and start looping again after some minutes, I will have to ask on the forums, if anyone is still interested in the solution for this please see this
    Quote Quote  
  12. Maybe set up the filter for as many times as you want it to start in the video.
    Quote Quote  
  13. That`s not a bad idea but I don`t know how to create the avisynth script for that
    Quote Quote  
  14. Member
    Join Date
    Nov 2006
    Location
    United Kingdom
    Search Comp PM
    Thank You

    I am so glad you two made up, it was very entertaining

    P.S. Please don't disinterperate this post
    Quote Quote  
  15. That`s not a bad idea but I don`t know how to create the avisynth script for that
    Although VDub Filters can be set up and used in an AviSynth script, I've always found it more trouble than it's worth. I meant for you to open your script in VDub(Mod) and do the logo stuff in there. That Logo filter is a VDub filter and not an AviSynth filter.

    I don't know how many times you'd like to show your logo, but run one instance of the filter for every time you want the logo in a different place in the video.
    Quote Quote  
  16. Originally Posted by manono
    I don't know how many times you'd like to show your logo, but run one instance of the filter for every time you want the logo in a different place in the video.
    Yes, that`s what the author of the filter suggested me to do also, sorry for the misunderstanding. Thank-you very much for your help, and sorry again for my bad reaction from the 3rd post.
    Quote Quote  
  17. I have successfully done this but now I`ve got another question. Is there any way that I could do this in mkvmerge?
    Quote Quote  
  18. I'm glad it worked for you. I know nothing about MKVs, so I'm bumping this in the hope someone that does will come along to help. Good luck.
    Quote Quote  



Similar Threads

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