[MEncoder-users] need to add audio to movie question

Tom Poe tompoe at fngi.net
Wed Feb 21 19:46:09 CET 2007


DEF wrote:
> --- Tom Poe <tompoe at fngi.net> wrote:
>
>   
>> DEF wrote:
>>     
>>> --- Tom Poe <tompoe at fngi.net> wrote:
>>>   
>>>       
>>>> I used:
>>>> .ogg audio file
>>>> *.png images for video
>>>> ran:
>>>> mencoder mf://*.png -delay 20 -mf
>>>> w=320:h=240:fps=5:type=png -ovc copy 
>>>> -audiofile Open_Studios_theme.ogg -oac copy -o
>>>> test.avi
>>>>         
>
>   
>> DEF:  Thanks.  I've got the song on a CD, so I
>> should be able to extract 
>> and save it in whatever format.  What do you
>> recommend I use?  wav? 
>>     
>
> mencoder can already generate the compatible mp2 file
> or mp3 file from the ogg file. so it does not really
> matter the format from which you want to read it with
> mencoder.
>
>   
>> I 
>> have .png images, but can change that to .jpg if
>> that is better.  
>>     
> I have always done that from .jpg files but some times
> on the mplayer list, the group had thought that .png
> was better. in some circumstances I think so too,
> because I get better results with .png at times. 
>   
>> I want 
>> to put video podcasts on my site, so I want the best
>> format to have the 
>> widest range of players be able to play it.  What do
>> you recommend?
>>     
>
> In that case, vcd compatible mpeg1 files like you had
> generated with your lavf command will be ok. From my
> personal experience, I think you will get more players
> to play an mpeg1 file when you use the mencoder native
> muxer.  I do something like this, (which is not
> however documented, and better still vcdimager will
> not complain if you ever use it with the generated
> files)
> "mencoder -of mpeg -mpegopts *format=vcd* -oac lavc 
> -ovc lavc -lavcopts ...................etc  "
>
>
> DEF
>
>
>
>  
> ____________________________________________________________________________________
> Any questions? Get answers on any topic at www.Answers.yahoo.com.  Try it now.
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>
>   
DEF:  Wow!  A lot of struggle here, trying to get something that seems 
to work.  Your suggestion did the trick.  I was able to compile a bunch 
of images, and ran:
$ mencoder mf://*.png -mf w=320:h=240:fps=1:type=png -ovc copy 
-audiofile Open_Studios_theme.ogg -oac copy -o test.avi
then
$ mencoder test.avi -o new5.mpg -ofps 25 -vf scale=352:288,harddup -of 
mpeg -mpegopts format=vcd -oac lavc -lavcopts acodec=mp2:abitrate=224 
-ovc lavc -lavcopts 
vcodec=mpeg1video:vrc_buf_size=327:keyint=15:vrc_maxrate=1152:vbitrate=1152:vmax_b_frames=0
then,
opened Cinelerra, brought up a terminal, ran:
$ midentify new5.mpg
ID_VIDEO_ID=0
ID_AUDIO_ID=0
ID_FILENAME=new5.mpg
ID_DEMUXER=mpegps
ID_VIDEO_FORMAT=0x10000001
ID_VIDEO_BITRATE=1152000
ID_VIDEO_WIDTH=352
ID_VIDEO_HEIGHT=288
ID_VIDEO_FPS=25.000
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_CODEC=mp3
ID_AUDIO_FORMAT=80
ID_AUDIO_BITRATE=224000
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=2
ID_LENGTH=83.64
ID_VIDEO_CODEC=mpegpes
and set format options in Cinelerra, and VOILA!  Ready to discover the 
wide, wide world of video editing.

What is so extraordinary for me, as a computer-challenged user, is the 
frame rate concept.  I created 91 .png images, in order to have the 
screens display for the length of the audio file.  When I created the 
test.avi file, that seemed to work, using 1fps.  When I ran the next 
command, to create new5.mpg file, it automagically set the fps setting 
to 25fps, but displayed each frame for 1 second.  Can you point me to 
info on how that works?
Tom



More information about the MEncoder-users mailing list