VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 18 of 18
Thread
  1. Member
    Join Date
    Apr 2009
    Location
    United Kingdom
    Search Comp PM
    hi, I have a bunch of avi files encoded in xvid and I want to insert a small piece of text for five seconds at the end of each file. Essentially it will be the credits so it could be a single image file displayed for five seconds.

    I use virtualdub, can someone please advise on the best way of achieving this please
    Quote Quote  
  2. Make an Xvid AVI of your credits using the same frame size, frame rate, and similar Xvid settings, same audio codec and parameters.

    Open your an AVI as usual, then use File -> Append AVI Segment to append the credits AVI. Put VirtualDub in Video -> Direct Stream Copy mode. File -> Save as AVI.
    Quote Quote  
  3. Member
    Join Date
    Apr 2009
    Location
    United Kingdom
    Search Comp PM
    hi,I tried that but I get a warning that the segment has a different number of streams, I'm no video editing expert! What is causing the problem please
    Quote Quote  
  4. Originally Posted by ahevans
    hi,I tried that but I get a warning that the segment has a different number of streams, I'm no video editing expert! What is causing the problem please
    Does your source AVI have multiple audio streams? MediaInfo can tell you this.
    Quote Quote  
  5. Member
    Join Date
    Apr 2009
    Location
    United Kingdom
    Search Comp PM
    apparently yes, it has two channels
    Quote Quote  
  6. Channels aren't streams. If the first video has audio and you want to add the 2nd video (the credits) directly to the first one, then you'll have to also create an audio stream with the same attributes as those of the first. Easier would be to remove the audio from the first one, then add the 2nd video to the first video before then adding back the audio for the first one.
    Quote Quote  
  7. Member
    Join Date
    Apr 2009
    Location
    United Kingdom
    Search Comp PM
    hi, would it be easier to take a JPEG image and insert it as a bunch of frames at the end? How could I achieve this?
    Quote Quote  
  8. You've already been told how to do it. If none of it made any sense then my suggestion is to give up the idea. Here's how you do it the AviSynth way:

    ImageSource("C:\Path\To\Credits.jpg",FPS=25,End=24 9)
    ConvertToYV12()
    LanczosResize(640,480)

    That creates a video of your picture that's 25fps and lasts 10 seconds (250 frames at 25fps). It gets converted to the same colorspace as your AVI and gets the same resolution as your AVI. Configure the XviD codec to make the video and then encode it and join (after removing the audio from the main video). Adjust the path, framerate, how long you want it to last, and the resolution, to match those of your credits picture and your XviD AVI. There are other ways to do this, but "take a JPEG image and insert it as a bunch of frames at the end" isn't one of them.
    Quote Quote  
  9. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by ahevans
    apparently yes, it has two channels
    i.e., stereo.
    Your new video clip probably has no audio.
    It needs to have audio, even if silent, of the same spec as the original clip.
    Quote Quote  
  10. Originally Posted by AlanHK
    It needs to have audio, even if silent, of the same spec as the original clip.
    No, not if he follows the suggestion I made twice to remove the audio from the main video before doing the join, and then adding it back afterwards. In my opinion, that's easier than creating a new and unwanted audio track, even if silent, for just the credits.
    Quote Quote  
  11. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by manono
    Originally Posted by AlanHK
    It needs to have audio, even if silent, of the same spec as the original clip.
    No, not if he follows the suggestion I made twice to remove the audio from the main video before doing the join, and then adding it back afterwards. In my opinion, that's easier than creating a new and unwanted audio track, even if silent, for just the credits.
    Either way, both video and audio have to be of the same spec to join.
    Quote Quote  
  12. But my advice requires only the one original audio track. You don't have to worry about matching up 2 audio tracks, only the 2 video segments. Of course, this all assumes he can even create a matching video credits AVI, and I'm pretty doubtful of that.
    Quote Quote  
  13. open the file in mediainfo (view=>text) and copy+paste the information back here
    Quote Quote  
  14. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by manono
    But my advice requires only the one original audio track. You don't have to worry about matching up 2 audio tracks, only the 2 video segments.
    -- And your way requires the video be demuxed first.
    Much of a muchness.
    Quote Quote  
  15. Member
    Join Date
    Apr 2009
    Location
    United Kingdom
    Search Comp PM
    Being "told" how to do something suggests it is complete/accurate and the only way!

    The original suggestion will not work because I don't have the original audio, adding audio to the new video file results in an error in vitualdub regarding sampling

    I thought it may be possible to use avisynth to just append a bunch of frames using a JPEG with no need to mess about with the audio or joining video files. I'm still not sure if this is possible because I tried an example I found on Google kept getting errors about the avi file not being found even though the script and file were in the same directory and I tried absolute and relative paths to the file

    I'm surprised no one has made a tool that allows this to be done
    Quote Quote  
  16. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Why are people always surprised that someone else hasn't already made a tool to suit their won bizarre circumstance ? Why haven't you created a tool to do this, as you are the one with the problem ? The general process for credits is to include them during the edit process, not stitch them on down the track. Also, when working in an environment that requires credits, one is also working in an environment that uses standards when encoding, so there are no issues with sample rates etc.

    When you are trying to append your own logo to a bunch of mismatched, encoded to any old stand, AVI file, these are the problems you encounter. The reason no-one has done it ? Because it is a a completely impractical idea and only required by people who don't realise how impractical it is, and who are too dense to program something for themselves.

    You can do it with avisynth, so long as you are happy to completely re-encode your video every time. Otherwise you have to work out what the audio and video specifications are for each file, create a specific credit file to match them, then append it. Now can you see why no-one has done this before ?
    Read my blog here.
    Quote Quote  
  17. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by ahevans
    I thought it may be possible to use avisynth to just append a bunch of frames using a JPEG with no need to mess about with the audio or joining video files.
    To make a credits sequence in Avisynth, see http://avisynth.org/mediawiki/ImageSource
    Then you'd have to join this to your credit video.
    If you did the join in Avisynth, you'd have to reencode the whole original video to get a new complete AVI file.
    Simple, but time consuming and would degrade it somewhat.


    Originally Posted by ahevans
    adding audio to the new video file results in an error in vitualdub regarding sampling
    So use the same sampling rate as the original video. (Open in Vdub, File/File Information.)
    Or follow manono's method, strip out the audio, join, add in old audio. (Maybe he was right, it could be simpler.)
    Quote Quote  
  18. You use the combination of Imagesource(), BlankClip() for audio , SSRC(), MergeChannels() etc.. to make it similar characteristics for the new section. I've done this before for beginning and/or ending material without re-encoding the main movie. You just join in vdub, as jagabo suggested in the 1st reply

    What was the error given in sampling? Sampling rates don't match? Just use SSRC()

    Can't help you with details if you don't provide more info... i.e. mediainfo as suggested or a sample clip
    Quote Quote  



Similar Threads