Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-14-2015, 01:52 PM   #1
LQ Newbie
Registered: Dec 2014
Posts: 4

Rep: Reputation: Disabled
Need suggestions to loop a video converted from an animated gif


I have an animated gif file which I converted into a video. The video plays for one second. How can I loop it to play for 15 seconds. here is what I have tried.

ffmpeg -i 3.gif -loop input -t 15  -c:v mpeg4 -b:v 1000k out.avi
Old 01-14-2015, 11:25 PM   #2
LQ Newbie
Registered: Dec 2014
Posts: 17

Rep: Reputation: 1
I believe the -loop input option is used mainly to convert a single image to a video file.

I suggest converting the gif file to an avi or mpg file as these two video formats are easier to concatenate together.

for i in {1..15}; do printf "file '%s'\n" out.avi >> mylist.txt; done

ffmpeg -f concat -r 10 -i mylist.txt -c copy final_version.avi
The first code will append 15 lines of file 'out.avi' to the text file mylist.txt.

In the second code, ffmpeg will concatenate all files in the mylist.txt list together to make the final version.

The -r is the rate in frames per second. You'll have to experiment with the numbers to get the desired effect.

Last edited by CriticalAlert; 01-14-2015 at 11:58 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Animated Gif Viewer? milkycow Linux - Software 5 01-06-2014 01:54 PM
Playing animated gif with mplayer and loop? patrick295767 Linux - General 2 11-26-2013 12:01 AM
LXer: How to convert video to animated gif image on Linux LXer Syndicated Linux News 0 11-22-2013 06:50 PM
animated gif to .mpv frieza Linux - Software 1 12-05-2007 06:09 PM
Animated Gif Editor??? m3s3lf Linux - Software 1 11-04-2004 07:27 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:24 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration