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
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 30 of 66
Thread
-
-
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? -
This is the thread I was reading https://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. -
Originally Posted by manono
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. -
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. -
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. -
Originally Posted by n00bNeedsHelp
#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\\ -
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. -
what is the sample rate (e.g. 48000Hz vs. 44000Hz) , not bitrate
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. -
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 -
Originally Posted by poisondeathray
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%) -
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. -
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. -
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. -
Originally Posted by n00bNeedsHelp
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:
Code:a = ImageSource("a.png", fps=25, end=74) b = ImageSource("b.png", fps=25, end=99) c = ImageSource("c.png", fps=25, end=124) a++b++c ConvertToYV12() vid=last aud=DirectShowSource("audio.mp3").SSRC(48000) AudioDub(vid,aud)
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.
Code:a = ImageSource("a.png", fps=25, end=74) b = ImageSource("b.png", fps=25, end=99) c = ImageSource("c.png", fps=25, end=124) a++b++c ConvertToYV12() vid=last aud=DirectShowSource("audio.mp3").SSRC(48000) AudioDub(vid,aud) intro=last main=AVISource("mainvideo.avi") intro++main
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 -
Originally Posted by poisondeathray
Originally Posted by poisondeathray
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.
Originally Posted by poisondeathray -
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 -
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? -
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) -
I was starting simple - just the intro. Then I was going to try an Append AVI in Vdub.
-
-
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 -
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
-
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. -
Originally Posted by n00bNeedsHelp
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 -
Originally Posted by n00bNeedsHelp
-
Originally Posted by poisondeathray
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.
Similar Threads
-
how to add intro video on multiavchd?
By ps3z in forum Authoring (Blu-ray)Replies: 1Last Post: 29th Jan 2012, 14:43 -
Completely Useless with this ...Add intro to already made DVD
By stressbag in forum Newbie / General discussionsReplies: 6Last Post: 5th Feb 2010, 07:02 -
How to add short intro image to video?
By Bytez in forum Newbie / General discussionsReplies: 1Last Post: 2nd Mar 2008, 09:00 -
What is the easiest method to add intro clip on DIVX ?
By rob3rtz in forum Newbie / General discussionsReplies: 3Last Post: 7th Oct 2007, 05:35 -
Need to add intro video before menu on several finished DVDs
By benracin in forum EditingReplies: 1Last Post: 1st Oct 2007, 12:29