Re: combining a still with an audio file
Miriam English <[email protected]>
| Newsgroups | gmane.comp.video.mplayer.user |
|---|---|
| Message-ID | <[email protected]> |
Find the length of the audio file in seconds and use that instead of the
"443" below.
Replace "Sunset.jpg" and "Mirage.mp3" with your own files.
seconds=443; for x in `seq $seconds`; do cat Sunset.jpg; done | mencoder
-o out.avi -fps 1 -ovc lavc -demuxer lavf -lavfdopts format=mjpeg
-audiofile Mirage.mp3 -oac copy -
Note that the example above is a bash shell script, so requires Linux.
It won't work on MSWindows without alteration. The command "seq
$seconds" outputs a list from "1" to the number of seconds stored in the
variable "$seconds". The for... do... done loop cycles "$seconds"
number of times to output the image file (in this case "Sunset.jpg")
through a pipe (|) to the mencoder command. Notice the final "-" in the
mencoder command. that takes its input from the standard input, which is
in this case the pipe (|).
There are some other ways to do this that use just a single image once,
but you can't seek within the resulting file, can't resize the window
without losing the image, and can't see the seconds ticking by if you
use "o" in mplayer to display it. Using the loop to input the original
image over and over again fixes all those problems, and since it is
stored as mjpeg the size remains extremely small, since the difference
between two successive identical images is zero.
Hope this helps,
- Miriam
arthurpeabody wrote:
> I have an audio file I want to publish on YouTube. YouTube
> requires a video file. I want to combine a still with the audio file
> to make a video file. How do I do that? (Linux)
> _______________________________________________
> MPlayer-users mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
--
What is the most important thing in the world you could be working on right now, and if you are not working on that, why aren't you?
-- Aaron Swartz (internet genius, philanthropist)
_______________________________________________
MPlayer-users mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users