Forum Archive Home -> Editing -> Trying to add intro to AVI
Trying to add intro to AVI | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 19:39 | ||||||||||||
| Hi All,
I'm trying to add an intro to an AVI movie file. The intro is composed of 3 jpg files and an mp3 song. I've been able to join them but the resulting file seems to be half the size to the eye (about the same file size, a little bigger) with the picture quality loss that goes with it. I made the jpg pictures in Photoshop. I can save them to some other format when I figure out what they should be. I saw a similar thread in this forum dated Jan 2008. I hope there is an easier way by now. It said something about saving the picture files as YV12 but I don't see how to save a file as that format - or where to change some setting to YV12. I'd love it if there was a program that can figure out for itself what the parameters of the AVI are and use those exact parameters for the output file. I got the avi off the internet. I've been trying to make the edit using AVS Video Editor but I'm open to using any program that works the easiest. Here are the original avi movie file details as given by SUPER below. I can post the details of the new avi movie too for comparison. Thanks for you help SUPER © v2009.build.36 (June 10, 2009) Multimedia Analysis Box by http://mediainfo.sourceforge.net Expanded Analysis of: L1.avi General Count : 256 Count of stream of this kind : 1 Kind of stream : General Kind of stream : General Stream identifier : 0 Count of video streams : 1 Count of audio streams : 1 Video_Format_List : MPEG-4 Visual Video_Format_WithHint_List : MPEG-4 Visual (DivX 5) Codecs Video : DivX 5 Audio_Format_List : MPEG Audio Audio_Format_WithHint_List : MPEG Audio (MP3) Audio codecs : MPEG-1 Audio layer 3 Complete name : C:\Documents and Settings\User\Desktop\L1.avi Folder name : C:\Documents and Settings\User\Desktop File name : L1 File extension : avi Format : AVI Format : AVI Format/Info : Audio Video Interleave Format/Extensions usually used : avi Interleaved : Yes Codec : AVI Codec : AVI Codec/Info : Audio Video Interleave Codec/Extensions usually used : avi File size : 26744204 File size : 25.5 MiB File size : 26 MiB File size : 26 MiB File size : 25.5 MiB File size : 25.51 MiB Duration : 334240 Duration : 5mn 34s Duration : 5mn 34s 240ms Duration : 5mn 34s Duration : 00:05:34.240 Overall bit rate : 640119 Overall bit rate : 640 Kbps Stream size : 298495 Stream size : 291 KiB (1%) Stream size : 291 KiB Stream size : 291 KiB Stream size : 291 KiB Stream size : 291.5 KiB Stream size : 291 KiB (1%) Proportion of this stream : 0.01116 File creation date : UTC 2009-09-28 03:25:52.328 File creation date (local) : 2009-09-27 23:25:52.328 File last modification date : UTC 2009-09-28 03:25:54.953 File last modification date (local) : 2009-09-27 23:25:54.953 Writing application : Nandub v1.0rc2 Writing library : VirtualDub build 30091/release Writing library : VirtualDub build 30091/release Video Count : 144 Count of stream of this kind : 1 Kind of stream : Video Kind of stream : Video Stream identifier : 0 Format : MPEG-4 Visual Format settings : BVOP Format settings, BVOP : Yes Format settings, BVOP : Yes Format settings, QPel : No Format settings, QPel : No Format settings, GMC : 0 Format settings, GMC : No warppoints Format settings, Matrix : Default (H.263) Format settings, Matrix : Default (H.263) Codec ID : DX50 Codec ID/Hint : DivX 5 Codec ID/Url : http://mediaarea.net/DX50 Codec : DX50 Codec : DivX 5 Codec/Family : MPEG-4V Codec/Url : http://www.divx.com Codec/CC : DX50 Codec settings : BVOP Codec settings, Packet bitstream : No Codec settings, BVOP : Yes Codec settings, QPel : No Codec settings, GMC : 0 Codec settings, GMC : No warppoints Codec settings, Matrix : Default (H.263) Duration : 334240 Duration : 5mn 34s Duration : 5mn 34s 240ms Duration : 5mn 34s Duration : 00:05:34.240 Bit rate : 536993 Bit rate : 537 Kbps Width : 512 Width : 512 pixels Height : 224 Height : 224 pixels Pixel aspect ratio : 1.000 Display aspect ratio : 2.286 Display aspect ratio : 2.25 Frame rate : 25.000 Frame rate : 25.000 fps Frame count : 8356 Resolution : 24 Resolution : 24 bits Scan type : Progressive Scan type : Progressive Interlacement : PPF Interlacement : Progressive Bits/(Pixel*Frame) : 0.187 Delay : 0 Stream size : 22435597 Stream size : 21.4 MiB (84%) Stream size : 21 MiB Stream size : 21 MiB Stream size : 21.4 MiB Stream size : 21.40 MiB Stream size : 21.4 MiB (84%) Proportion of this stream : 0.83890 Writing library : DivX503b830 Writing library : DivX 5.0.5 (UTC 2003-04-24) Writing library/Name : DivX Writing library/Version : 5.0.5 Writing library/Date : UTC 2003-04-24 Audio Count : 122 Count of stream of this kind : 1 Kind of stream : Audio Kind of stream : Audio Stream identifier : 0 Format : MPEG Audio Format version : Version 1 Format profile : Layer 3 Format settings : Joint stereo Codec ID : 55 Codec ID/Hint : MP3 Codec ID/Url : http://www.iis.fraunhofer.de/amm/index.html Codec : MPA1L3 Codec : MPEG-1 Audio layer 3 Codec/CC : 55 Codec profile : Joint stereo Duration : 334204 Duration : 5mn 34s Duration : 5mn 34s 204ms Duration : 5mn 34s Duration : 00:05:34.204 Bit rate mode : CBR Bit rate mode : Constant Bit rate : 96000 Bit rate : 96.0 Kbps Channel(s) : 2 Channel(s) : 2 channels Sampling rate : 48000 Sampling rate : 48.0 KHz SamplingCount : 16041792 Resolution : 16 Resolution : 16 bits Delay : 0 Video delay : 0 Video0 delay : 0 Stream size : 4010112 Stream size : 3.82 MiB (15%) Stream size : 4 MiB Stream size : 3.8 MiB Stream size : 3.82 MiB Stream size : 3.824 MiB Stream size : 3.82 MiB (15%) Proportion of this stream : 0.14994 Alignment : Aligned Alignment : Aligned on interleaves Interleave, duration : 2.40 Interleave, duration : 96 Interleave, duration : 96 ms (2.40 video frames) Interleave, preload duration : 576 Interleave, preload duration : 576 ms | ||||||||||||
| manono posted 2009 Oct 07 19:53 | ||||||||||||
| Unless you make an AVI of the JPGs and audio using exactly the same characteristics/settings as the AVI to which it's to be joined (including, yes, converting the JPGs to YV12), and then join it to the untouched AVI, I see nothing for it except to reencode the original AVI. What you're attempting to do may sound easy in principle but can be quite difficult to achieve in practice.
Perhaps if you pointed to the link you found we can tell you if that's the preferred or best way to accomplish this. I don't guess you know any AviSynth, eh? | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 19:59 | ||||||||||||
| This is the thread I was reading http://forum.videohelp.com/topic344542.html
I just downloaded AviSynth but funny thing - I go to start it and there's no actual program in the Start-Programs-AviSynth program list - just links, folders and uninstaller. | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 20:05 | ||||||||||||
| [quote="manono"]Unless you make an AVI of the JPGs and audio using exactly the same characteristics/settings as the AVI to which it's to be joined (including, yes, converting the JPGs to YV12), and then join it to the untouched AVI, I see nothing for it except to reencode the original AVI. What you're attempting to do may sound easy in principle but can be quite difficult to achieve in practice.
[/quote] I've been trying to make the avi with the exact settings but it's hard when I didn't create the original avi, don't understand many of the settings, and am using a program that seems to only let me choose a few settings even in advanced mode. So I'd like to know if there is a better program for doing it, ideally one that can figure out to use the same settings for the output avi and input avi for itself. I don't have a problem with reencoding, but don't know how to do it, especially without losing quality. I've used SUPER to convert things before but with a lot of trial and error and guesswork. | ||||||||||||
| manono posted 2009 Oct 07 20:25 | ||||||||||||
| Yeah, AviSynth uses scripts to filter your video (or pics in this case) before being sent to the encoder. Most encoders (including VDub which might be used for this) accept AviSynth scripts as sources just as they do regular video:
http://avisynth.org/mediawiki/Main_Page I could easily do it myself, but I don't know how to explain it to someone that's never used AviSynth. Nor do I know of any programs that can do it with or without reencoding the main AVI, although apparently you're using one. Perhaps someone else can help. | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 21:24 | ||||||||||||
| I read some of the avisynth page. I understand the concept, but don't see the commands I might need to use.
What are my options here? Learn the avisynth language and write my own script to take the 3 pix and mp3 and add it on to the front of the AVI or Reencode the avi and .... I dont understand this very well at all. or Find some program that lets me properly set all the settings needed to make the output the same settings as the input - assuming that will maintain the size and quality of the movie.... or Find some program that (doesnt exist) is smart enough to figure out the input avi settings and produce an output avi with the same settings, the main point being that this will make it maintain the same size and quality. | ||||||||||||
| poisondeathray posted 2009 Oct 07 21:29 | ||||||||||||
#4 doesn't exist #2 Re-encoding it would be the easiest, but you would lose some quality How long in duration do you want the 3 pictures displayed for? The fps is 25, so if they lasted 1 second each, they would need 25 frames each. What are the dimensions of the pictures? the video is 512x288 , so you might have aspect ratio issues (might need to letterbox/pillarbox the pictures) How long is the mp3? and do you want the full length? and what are the specs (like sample rate) use mediainfo\\ | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 21:32 | ||||||||||||
| The pictures would show for (for example) 3 seconds/4 seconds/5 seconds and the mp3 would play for those 12 seconds.
Then the intro would end and the existing avi would start. I created the stills to be the same size as the avi, 512 x 224. The mp3 is 192 bitrate. | ||||||||||||
| poisondeathray posted 2009 Oct 07 21:37 | ||||||||||||
what is the sample rate (e.g. 48000Hz vs. 44000Hz) , not bitrate
Is that the main problem ? What do you mean by half size? | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 21:43 | ||||||||||||
| 44.1 KHz, 2 channels
Audio Format : MPEG Audio Format version : Version 1 Format profile : Layer 3 Duration : 4mn 20s Bit rate mode : Constant Bit rate : 192 Kbps Channel(s) : 2 channels Sampling rate : 44.1 KHz Resolution : 16 bits Stream size : 5.97 MiB (100%) Writing library : LAME3.90 | ||||||||||||
| poisondeathray posted 2009 Oct 07 21:45 | ||||||||||||
| I edited my post above. What do you mean half size? Do you mean file size of joined segments? Is that your main concern?
Were you successful in making the intro AVI by itself? You should use .png or other lossless export from photoshop, because jpg is lossy. | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 21:54 | ||||||||||||
| [quote="poisondeathray"]I edited my post. What do you mean half size?
Were you successful in making the intro AVI ?[/quote] I put everything into AVS Video Editor and the resulting avi does have all the parts in place but when I play it the picture quality sucks and it takes up half the size on the screen (even though I specified 512 x 224). I might not be right in saying the quality sucks. The suckage might just be a result of the shrinkage in size. I guess the new file is still 512 x 224 or so SUPER tells me... but I play both files in Windows Media Player and the first one is about twice as long and twice as high and the new one. (Both set to Video Size = 100%) | ||||||||||||
| poisondeathray posted 2009 Oct 07 22:01 | ||||||||||||
| But do your stills fill up 512x224 space ? or are there blank areas?
When you say takes up half the size of the screen, do you mean the monitor? 512x224 on your average monitor will look tiny. Or do you mean the video as in there are black borders when viewed in a 512x224 frame video? Try to be more clear in what you are trying to say. Do you mean the encoded stills are smaller than 512x224? Do they not match the other video ? Maybe post some examples Also, your mp3 audio is 4minutes 20 sec. It doesn't match the time of the video for the intro that you said 12sec. | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 22:17 | ||||||||||||
| Ok they are both 512x224
Windows Media Player was tricking me with its black background. The original avi takes up the whole 512x224 The new avi sits in a 298x130 box inside a 512x224 black box. | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 22:19 | ||||||||||||
| The mp3 is 4:20 but I can drag the right edge to line it up with the end of the pictures.
The app knows how to take only the audio from that time window. There doesn't seem to be any problem there. | ||||||||||||
| poisondeathray posted 2009 Oct 07 22:24 | ||||||||||||
Do you mean the intro avi only , or the joined intro+main avi ? And what about the audio? the mp3 is the wrong length. It's not 12 seconds. What part of it do you want to keep? If you wanted to do this in avisynth , and the audio was the same length (12 sec), your script might look like this:
The SSRC(48000) resamples the audio to 48000Khz , so it matches the main video You would then encode this intro segment, using the same settings for audio and video (I think it should append even is you used xvid), then join using avidemux or vdub. This is preferrable to re-encoding the main segment and losing quality If you can't get it to join, then re-encode the whole thing (including main video) and do the joining in avisynth e.g.
But it might take you bit to learn the avisynth basics. If you upload all the stuff to a free hosting site e.g. mediafire.com or megaupload.com , I can do this for you quickly or if you have access to a real editor like vegas or premiere, this should be easy to do as well | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 22:34 | ||||||||||||
The new avi meaning the intro+main avi. Both the intro and vid are in the tiny box in the black box.
I don't understand what's the problem. That's the one thing that seems to be working. I don't need to cut the mp3 into a 12 second clip any more than I need to make a separate copy of the intro pic for every frame. The application lets me pull or squeeze the components into the timeline and figures out that the section of the mp3 that is showing is the section I want. OK, I guess you are saying it needs to be 12 seconds for AviSynth to work with it. I should be able to do that.
Thanks for the code! I'll see if I can run it. | ||||||||||||
| poisondeathray posted 2009 Oct 07 22:37 | ||||||||||||
| The problem is the ends are flush the way the script is written. It will be the first 12 seconds of the mp3. But you might have wanted somewhere else in the mp3 like a middle section
You should be able to append this without re-encoding the main section. You just need to set the encoding settings properly for audio & video. The only "hurdle" that I can see is the main video uses an older DivX version, but that shouldn't matter | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 23:07 | ||||||||||||
| I opened the avs in Vdub and did Save As AVI.
The resulting avi is perfect........ but it is 171 MB! I dont know what to do for the next step. How do I encode it? | ||||||||||||
| poisondeathray posted 2009 Oct 07 23:11 | ||||||||||||
| You probably didn't use compression, that's why it so big in filesize (uncompressed)
Which script did you use? The intro only, or the intro+main? You have to select compression for video and audio & use the right settings if your are joining. If you are doing the intro+main, it doesn't matter as much the settings you use You need to install lame acm for the audio, and divx or xvid for the video I'll give you more instructions once you tell which approach you are using (i.e. intro only, or intro+main encoded) | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 23:18 | ||||||||||||
| I was starting simple - just the intro. Then I was going to try an Append AVI in Vdub. | ||||||||||||
| poisondeathray posted 2009 Oct 07 23:21 | ||||||||||||
| ok need a bit more info on the main video
open it in gspot, take a screen capture, and post it back here The audio part is fairly simple, but lame mp3 doesn't encode less than 128kbps for 48000Hz, so use the generic mp3 (audio=>compression=>make sure all formats is checked) ![]() | ||||||||||||
| Cornucopia posted 2009 Oct 07 23:24 | ||||||||||||
| If I understand this right, you want to put your own intro onto an existing AVI and you would prefer to not re-encode.
So what you do is this: 1. Find out the EXACT specs of the existing AVI (framerate, rez, codec, VBR/CBR, bitrates, colorspace...everything). 2. You encode your intro to EXACTLY match those specs (remember to put fade ups and fade downs for smoothness). 3. You join your 2 AVIs (intro+main). This will not re-encode and shouldn't give you any trouble (since they're both the same specs now). You CAN'T do this all at once in AVISynth, because it DECODES first (hence the need to re-encode). If you've first done the #2, you could do the join in Virtualdub (append, direct stream copy). Of course, there are also other good file/stream joiners... Scott | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 23:31 | ||||||||||||
![]() | ||||||||||||
| poisondeathray posted 2009 Oct 07 23:34 | ||||||||||||
| OK DivX using the "home theatre" profile gives the same results, except that I have a newer DivX 6.8.5. Your main video uses DivX 5, but it shouldn't matter.
So video=>fast recompress , video=>compression select DivX The only other thing I changed was the rate control to 1-pass quality (but bitrate shouldn't matter when appending) Vdub will output packed bitstream, but your main video isn't. So you have to unpack it with mpeg4modifier EDIT: sorry, it gives 1b-frame, so it's not quite exact. Just a sec... In the DivX codec tab, advanced button , you will see a command line, near the end it will say -b 1 , change that to -b 0 , that will make it so there are no b-frames to match the main movie ![]() | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 23:39 | ||||||||||||
| I managed to take the avs in Vdub, set compression to Divx something and produce a much smaller file.
The Audio compression menu item is greyed out. | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 23:40 | ||||||||||||
| My Divx option is 6.8.5 also. | ||||||||||||
| poisondeathray posted 2009 Oct 07 23:43 | ||||||||||||
Checkmark show all formats ? as in the screenshot? Also see the edits to the DivX config I posted above ^ The next step after encoding is to unpack the bitstream using mpeg4modifier (checkmark unpack bitstream) Then it should append | ||||||||||||
| Comfort Addict posted 2009 Oct 07 23:45 | ||||||||||||
Select "Full Processing Mode" in the Audio menu. | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 23:46 | ||||||||||||
| [quote="poisondeathray"][quote="n00bNeedsHelp"]The Audio compression menu item is greyed out.[/quote]
Checkmark show all formats ? as in the screenshot? Also see the edits to the DivX config I posted above ^[/quote] Not like the screenshot. In Vdub I have the avs open. On the menu I click Audio - on the dropdown I see Compression under Interleaving but it's greyed out. | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 23:47 | ||||||||||||
| [quote="Comfort Addict"][quote="n00bNeedsHelp"]The Audio compression menu item is greyed out. [/quote]
Select "Full Processing Mode" in the Audio menu.[/quote] That did it. Thanks | ||||||||||||
| poisondeathray posted 2009 Oct 07 23:47 | ||||||||||||
| ^ Yes, thanks comfort addict :)
Select full processing mode in the audio menu | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 23:52 | ||||||||||||
| looking good... saved a avi that's working great and tiny file size.
Now to try mpeg4modifier... | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 07 23:56 | ||||||||||||
| mpeg4modifier is telling me that it is already unpacked
Packed bitstream: No | ||||||||||||
| poisondeathray posted 2009 Oct 07 23:57 | ||||||||||||
| ok, I forgot you used no b-frames....that makes sense! sorry false alarm! | ||||||||||||
| Comfort Addict posted 2009 Oct 07 23:57 | ||||||||||||
| So now you can append your files.
http://www.afterdawn.com/guides/archive/virtualdub_join_avi.cfm | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 08 00:03 | ||||||||||||
| Cannot append segment "L1.avi": The video streams have incompatible data formats.
(Mismatch detected in opaque codec data at byte 21 of the format data.) | ||||||||||||
| poisondeathray posted 2009 Oct 08 00:05 | ||||||||||||
| Try avidemux
Open the 1st file, then file=>append select main video Set video & audio to "copy" , format to "avi", press save and enter extension (e.g. "mynewvideo.avi") If that doesn't work, use mpeg4modifier to change the user data to match DivX versions e.g. DivX503b etc. etc.. | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 08 00:16 | ||||||||||||
| IT WORKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thanks for your help!!!! When the video is done I'll post a link for you to check it out. | ||||||||||||
| Comfort Addict posted 2009 Oct 08 00:16 | ||||||||||||
| What about converting the second file in vdub using the same settings as for the intro before appending... Or would it cause quality loss ? | ||||||||||||
| poisondeathray posted 2009 Oct 08 00:19 | ||||||||||||
Yes would incur some quality loss , but that would have been the next plan if the append using the various "tricks" didn't work (or reencode the whole thing in 1 step, using the avisynth script to join) In my experience, vdub is more "finicky" than avidemux for appending. Even simple things like header information can screw up the append | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 10 09:31 | ||||||||||||
| Here is the vid you helped create.
It is full of inside jokes about the game Duels.com. There's a player named The Unbeatable Larry who accidentally created his avatar as a female. In his quest to correct his gender other players had some fun and told him he would require a certain amount of fictional material called Noblestone:Coal. Larry's journey brings him to the offices of the game's creators who have recently abandoned their games. http://www.youtube.com/watch?v=gAOWhvNexrs WARNING - video does have naughty language. Thanks again for your help! | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 22 12:51 | ||||||||||||
| New question:
Is there a way for avisynth to move around a picture like a slide show does? I want to be able to pan across the still images in the intro. I just need a hint on what the command is, then I can look it up and hopefully find an example I can copy. Thanks | ||||||||||||
| Gavino posted 2009 Oct 22 13:30 | ||||||||||||
There is no built-in Avisynth function to do this explicitly, but it can be done by applying Animate to any of the resizers, dynamically changing the resizer parameters to select a different part of the image for each frame. Alternatively, you could look at the Zoom plugin or the KenBurnsEffect function. | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 22 18:04 | ||||||||||||
| Thanks
Which folder do I unzip the zoom zip into? AviSynth 2.5/plugins? AviSynth 2.5\FilterSDK\include? or some files in one place and some in another? Should the avisynth.h in the zip overwrite the avisynth.h in AviSynth 2.5\FilterSDK\include? Then I copy the code for KenBurnsEffect(), ZoomBox(), ZoomBoxIt(), CalcBox() into the avs file? Or do I add them to some other file where I can call them from the avs file? Thanks | ||||||||||||
| Gavino posted 2009 Oct 22 18:27 | ||||||||||||
| You only need zoom.dll from the zoom zip - the other files (including avisynth.h) are source files, for reference only, but you probably want to look at the documentation in zoom.txt.
The simplest thing is to unzip zoom.dll into AviSynth 2.5\Plugins, that way it will be loaded automatically by Avisynth. However, you can put it anywhere and load it explicitly with LoadPlugin if you want. The KenBurnsEffect code can be copied into your avs file if you like, but it's probably tidier to put them in a separate file and use Import to make them available to your script - that way you can reuse them more easily in other scripts. | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 22 20:33 | ||||||||||||
| New problem - back to the original one.
I just made an intro with exactly 20 seconds of mp3 intro. This worked fine for my first 2 videos but now there is a problem with the 3rd. If I play the intro3.avi it's fine. It's perfect. But once I append the movie and watch it the intro plays about one extra second of the mp3 at the end - that is, right at the transition from intro to movie you hear the first second or half second of the mp3 repeated. example "Some blah blah blah blah ----------------------------- blah blah blah End Some" movie starts What do I do to prevent that? Thanks | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 23 22:00 | ||||||||||||
| bump for help plz | ||||||||||||
| Gavino posted 2009 Oct 24 04:39 | ||||||||||||
| Are the video and audio durations of intro3.avi (as shown by GSpot or MediaInfo) the same?
Is the MP3 CBR or VBR? What program are you using to append the intro to the movie? If using Avisynth, post your script here. | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 24 11:42 | ||||||||||||
| Format : MPEG Audio
File size : 313 KiB Duration : 20s 35ms Overall bit rate : 128 Kbps Genre : Blues Audio Format : MPEG Audio Format version : Version 1 Format profile : Layer 3 Duration : 20s 35ms Bit rate mode : Constant Bit rate : 128 Kbps Channel(s) : 2 channels Sampling rate : 44.1 KHz Resolution : 16 bits Stream size : 313 KiB (100%) I did the append with Avidemux | ||||||||||||
| poisondeathray posted 2009 Oct 24 11:49 | ||||||||||||
| Your audio and video probably don't match lengths. You probably have flush ends on the ones that worked, but you didn't do the 3rd one correctly | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 24 11:51 | ||||||||||||
| Wow - I just noticed it say 20s 35 ms duration.
When I cut the clip using Audacity it said 20.000000 seconds. Now I open it back up in Audacity and it's bigger than the 20.000000 I cut, pasted, and saved. It looks like 20.009774. I'll try to recut it. Thanks! | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 24 12:19 | ||||||||||||
| Audacity is driving me nuts.
What program should I be using? | ||||||||||||
| poisondeathray posted 2009 Oct 24 12:22 | ||||||||||||
| I would do it all with avisynth and audiodub() as shown on page 1. You can make the segment longer, then use Trim() to cut it. It should be perfectly flush then | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 24 12:41 | ||||||||||||
| [quote="poisondeathray"]I would do it all with [url=http://www.videohelp.com/tools/Avisynth]avisynth[/url] and audiodub() as shown on page 1. You can make the segment longer, then use Trim() to cut it. It should be perfectly flush then[/quote]
This is my code for the creation of Intro [code]a = ImageSource("a.png", fps=25, end=99) b = ImageSource("b.png", fps=25, end=149) c = ImageSource("e.png", fps=25, end=249) a++b++c ConvertToYV12() vid=last aud=DirectShowSource("audio3.mp3").SSRC(48000) AudioDub(vid,aud) [/code] So am I going to take the audio3.mp3 and make it say 30 seconds instead of ~20 seconds, run the code above, watch it in VDub to see which frame to cut on, and then re-run the code above with an added command of Trim(0,x)? | ||||||||||||
| poisondeathray posted 2009 Oct 24 12:46 | ||||||||||||
| Adding Trim(0,249) after audiodub would give you flush ends, but that is 20seconds. The last frame was given by the last still at 249 in that script
You would have to make the stills longer in duration to match, ending at 299 to match the new 30 sec audio, otherwise they will mismatch e.g. use end 100, end 200, end 299 for each instead If you want the audio to sync up you can shift it by using DelayAudio(). DelayAudio(0.5) is 500ms or 0.5sec. Negative values shift it the other direction | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 24 13:15 | ||||||||||||
| [code]a = ImageSource("a.png", fps=25, end=99)
b = ImageSource("b.png", fps=25, end=149) c = ImageSource("e.png", fps=25, end=249) a++b++c ConvertToYV12() vid=last aud=DirectShowSource("audio3dlong.mp3").SSRC(48000) AudioDub(vid,aud) Trim(0,249)[/code] I don't get it. I run this and get a 10 second intro avi. I took the mp3 and cut it to about 23.516393 sec I figured if in my end video the audio is restarting then it must not be filling the whole 20 seconds, so I take a longer cut, build it and trim it at 20 seconds - but I guess I don't get it. Starting off - how do I cut the audio right? I still want a 20sec intro not 30sec. I'll try the delay command and see what it does. Thanks | ||||||||||||
| poisondeathray posted 2009 Oct 24 13:24 | ||||||||||||
| yes my math sucks :)
25fps , so 10 sec is 250 frames 20 sec is 500 frames => Trim(0,499) 30 sec is 750 frames => Trim(0,749)
That would give 30 seconds, assuming your mp3 audio track was around 30sec or longer | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 24 13:24 | ||||||||||||
| [code]a = ImageSource("a.png", fps=25, end=99)
b = ImageSource("b.png", fps=25, end=149) c = ImageSource("e.png", fps=25, end=249) a++b++c ConvertToYV12() vid=last aud=DirectShowSource("audio3.mp3").SSRC(48000) AudioDub(vid,aud) DelayAudio(0.5)[/code] I ran this. It gives me intro.avi with the last word of the song missing. When I append the movie to the intro, it plays with the intro missing the last 2.5 words. | ||||||||||||
| poisondeathray posted 2009 Oct 24 13:26 | ||||||||||||
| I edited my post above^. You have to make the stills longer in duration to match
Don't use DelayAudio() unless you have overhanging ends on both sides of the audio,otherwise you can get silence gaps e.g. the audio is 40 seconds, but the the section you want is 30 seconds in the middle (5 sec ends on each side). Then you would use delayaudio to shift it insync (but you would need more video at the beginning as well, and you would have to use a nonzero start for the trim e.g. Trim(100,850) ) | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 24 13:39 | ||||||||||||
| [quote="poisondeathray"]I edited my post above^. You have to make the stills longer in duration to match
Don't use DelayAudio() unless you have overhanging ends on both sides of the audio,otherwise you can get silence gaps e.g. the audio is 40 seconds, but the the section you want is 30 seconds in the middle (5 sec ends on each side). Then you would use delayaudio to shift it insync[/quote] I don't understand. It looks like you are showing me how to make my clip 30 seconds but I want it to be 20 seconds. Every which way I do it the intro plays fine alone but flubs the audio when the movie is appended. In my latest try the last word of the intro mp3 is being replaced by the first word. Could it be a problem with the movie file and not the intro - that is causing the intro to break at the connection? | ||||||||||||
| poisondeathray posted 2009 Oct 24 13:43 | ||||||||||||
| You said you wanted it 30 sec for the 3rd clip?
Just change the values then for 20 seconds e.g.
Since all the other clips worked in appending, I suspect it's this 3rd clips fault, or how you prepared it. When you have overhangs, you experience the repeats exactly as you described when appending If you can't figure it out, just re-encode the whole thing | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 24 14:07 | ||||||||||||
| I mentioned "30 seconds" meaning I had so much trouble trying to make the audio exactly 20 seconds I'd take 30 instead, run the avs and do a trim to get just the first 20 seconds (of avi).
Maybe I can combine the avs scripts and see if that works better than the append. I just need to figure out how to combine
with
| ||||||||||||
| poisondeathray posted 2009 Oct 24 14:10 | ||||||||||||
Make sure the first intro script works properly by itself, otherwise it wont work | ||||||||||||
| n00bNeedsHelp posted 2009 Oct 24 16:22 | ||||||||||||
| Mission Accomplished. It worked!
Thanks! I'll be back to bump this later when I try the KenBurnsEffect on the final end credits. | ||||||||||||
| Gavino posted 2009 Oct 24 17:23 | ||||||||||||
It's worth understanding why this works. Because the two videos are joined with the ++ operator (firstvid++secondvid), an AlignedSplice is performed, so that if the audio from firstvid is longer than the video part, it will be truncated to fit. If you had used the + operator instead (UnalignedSplice), the video and audio parts would be joined independently, making the second video out of sync. @poisondeathray: I think you were getting confused by the clips a, b and c. These are independent images to be shown for 4, 6 and 10 secs each to give a total of 20 secs, so end=99, 149 and 249 was correct all along. |
Login/Register to our forum to be able to post here.



