My input source is PNG image (image.png) and MP3 audio (audio.mp3). Currently I loop PNG input to make the video and stream-copy the audio, into the final video (final.avi):
if the image for example is 1024x768, the encoding speed is sub 1FPS! I want to improve the total encoding time by first encoding 5 frames (1 keyframe with the following 4 frames), and then loop copy that video stream into final AVI, say 5 minute video. How can I achieve this?Code:ffmpeg -loop_input -f image2 -i image.png -r 1 -vcodec flv -i audio.mp3 -acodec copy -g 10 -qscale 2 -cmp 3 -subcmp 3 -mbd 2 -flags trell final.avi -shortest
Thanks in advance!
+ Reply to Thread
Results 1 to 3 of 3
-
-
Use Mencoder.
Concatenating / appending is super easy with Mencoder, check out the following example (for linux or mac):
Code:mencoder -oac copy -ovc copy -o 'output_filename.avi' 'clip1.avi' 'clip2.avi' 'clip3.avi'
For more on appending clips with Mencoder (including a script example) check out this post:
http://backstar.com/blog/2009/11/10/append-videos-with-mencoder/
Explaining Avidemux scripting is really not in the scope of this reply, but basically you'd just need to use a simple Javascript loop. For example (this will concatenate a clip of 1000 frames 100 times):
Code:for(var f = 0; f < 100; f++) { app.addSegment(0,0,1000); }
- open the clip you want to repeat in Avidemux
save the project file
open the project file with a text editor
add the for... code around the app.addSegment() part of the code
delete the markerA=; and markerB=;
save the project file
open the project file in Avidemux
save the video
That might seem like a lot, but trust me, it's much easier than appending the same file 1000+ times, and much quicker than letting ffmpeg take its sweet time to convert every frame from the original image.
EDIT: oh yeah, then you'll have to mux the audio and video. you can do this with a whole lot of programs, but i'd suggest using ffmpeg if you're willing to deal with the command line (which you probably are if you followed the above instructions) - open the clip you want to repeat in Avidemux
Similar Threads
-
Encode with FFMPEG with multiple input files...
By RogerTango in forum Video ConversionReplies: 3Last Post: 20th Jun 2011, 01:12 -
VLC Loop Video
By pepegot1 in forum Software PlayingReplies: 3Last Post: 19th Oct 2010, 01:32 -
FFmpeg/Mencoder Loop watermarking
By BLACKRiVAL in forum LinuxReplies: 0Last Post: 5th Aug 2010, 17:26 -
FFMPEG with YUV4MPEGPIPE input problem
By Karnalta in forum Video ConversionReplies: 0Last Post: 26th Mar 2010, 04:30 -
FFMPEG and input A/R
By nic2k4 in forum Video ConversionReplies: 1Last Post: 14th Nov 2007, 19:39