I'm trying to create an AVI with basically one still, and a 1.30 hrs audio track.
If I load the jpg into AviDeMux, and the audio (as wav or MP3) and save, i get a 1 frame long AVI (1/25 s).
Any simple way to have the still "duplicated" to fit the audio length, or to create an AVI of a specific length (from the still) to use together with the audio?
/Mats
+ Reply to Thread
Results 1 to 5 of 5
-
-
I found this information here on this "relatively old" (but still very good) post:
http://gecius.de/linux/dvd.html
... however last I looked that web site URL was down.
So the following is a quote from that site:Photos
Now, I wanted to add all the digital pictures to that DVD, as there was plenty of space on the disc. But it also needs additional steps to convert the images to a DVD-compatible format, which, you're right, is mpeg.
To change the images to the correct aspect-ration for tv (pal, in my case), I did
montage -geometry 720x576 -background black -quality 100 inputimage.jpg convertedimage.jpg
If there are borders to cover, e.g. for a portrait image, these will be black (-background parameter). If you want to do this for a whole batch of images, try a little more complex shell command
for i in *.JPG; do montage -geometry 720x576 -background black -quality 100 $i conv-$i; done
This will get every *.JPG file in the current directory (think of case matters!), convert it and write the newly generated image to the file conv-(original-image-name). Hence you keep the original, but also have the target.
Now we need to convert the jpeg to a proper mpeg-stream. This is done with the command
jpeg2yuv -n 25 -I p -f 25 -j conv-image.jpg |mpeg2enc -f 8 -o image.m2v; mplex -f 8 -o image.mpg image.m2v silence.mp2
Edit: the above is all one line.
This makes a 1 second yuv-stream (25 frames/second [-f 25], 25 [-n 25] frames total) of the image using progressive interleave (-I p). The second part encodes this yuv-stream to an mpeg stream, using the DVD-format [-f 8], putting the results in the file image.m2v (as this is video only, so far). Finally, we add some audio (silence.mp2) to the stream, again, using the DVD-format [-f 8]. As you would have guessed, silence.mp2 is a mp2 with silence. You can generate one yourself like this
arecord -f dat -twav -d 1 silence.wav
mp2enc -r 48000 -o silence.mp2 < silence.wav
I had some trouble piping the m2v directly into mplex, so I did the step with the intermediary m2v as a file. Use the same logic with the for-loop above for generating some more files in one step. -
I do this with VirtualDub. Open the single frame of video then go to the Video -> Frame Rate dialog. In the "Source rate adjustment" section enable "Change frame rate to (fps):" and set the rate to 1/duration (in seconds). Doing simply this will get you a single frame that lasts for the duration of the audio. For example, for a 180 second duration enter 0.005555 (1/180).
Some players might have problems with that though. You can change the output frame rate by enabling the "Convert to fps" option in the "Frame rate conversion" section. Pick a frame rate your are happy with (15, 23.975, 25, etc) and VirtualDub will duplicate the one source frame enough times fill out the running time at the desired rate. Combining that with some inter-frame compression codec like Divx or Xvid will get you a reasonably sized file. -
I’m not sure this is what you had in mind. I just tried it with Avisynth using ImageWriter filter and combined with it some music. Then I load it into VirtualDub and save it as avi.
TS -
ffmpeg -loop
http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html
doing what oldcpu posted is great for short slide shows, but the process is long and tedious. IMO mpeg2enc is higher quality than ffmpeg, but ffmpeg is 5x quicker.Linux _is_ user-friendly. It is not ignorant-friendly and idiot-friendly.
Similar Threads
-
Dazzle dvc100 w studio 12 does it capture AVI 1 or AVI 2 or DV-AVI
By st711 in forum Capturing and VCRReplies: 1Last Post: 10th Dec 2009, 17:30 -
avs (avi to avi) ends up out of sync ... winavi output file too big
By mandy in forum Video ConversionReplies: 1Last Post: 21st Aug 2009, 05:56 -
ffmpeg choppy audio from large avi but not small avi source file
By cybertheque in forum Capturing and VCRReplies: 9Last Post: 13th Oct 2008, 15:38 -
ffmegX v0.09w and converting avi videos into avi.ff.avi videos
By paddymick in forum ffmpegX general discussionReplies: 2Last Post: 2nd Nov 2007, 23:10 -
How To Split Single DV AVI file into Multiple DV AVI files using Time Stamp
By insysnet in forum Camcorders (DV/HDV/AVCHD/HD)Replies: 2Last Post: 23rd Aug 2007, 12:49