ffmpeg or mplayer for avi conversion?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ffmpeg or mplayer for avi conversion?
# 1  
Old 03-28-2008
ffmpeg or mplayer for avi conversion?

I need to output a summary of a video as an animated gif. Ideally, I would have 8 equally-spaced frames from the video, and play them back one at a time, each for 0.25 seconds. So I'd have a 2 second animated gif.

This is what I have so far:

Code:
#!/bin/bash
mplayer "$@" -vo gif89a:output="$@".gif:fps=1 -vf scale=640:480 -endpos 8 -really-quiet

As you can see, I'm taking eight frames from the first eight seconds of video. What can I use to take eight frames from $timeOfVideo/7 time periods. Note that I'm dividing the time of the video by 7, not 8, so that I will have the first and last frames of the video in the gif.

My second problem is shortening the duration that each frame is shown. Currently, each frame is shown for 1 second. How can I reduce that to 0.25 seconds?

I am starting to think that ffmpeg is a better tool for the job, however, surprisingly I cannot find relevant examples in Google. Can ffmpeg do what I need? Can mplayer, for that matter? Something else?

Thanks in advance.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Debian

How to play avi files Raspberry Pi?

Raspberry Pi B 2014-01-07 Raspbian fully up to date. Installed and configured motion for surveillance. It works just fine and creates .avi files and .jpeg. Installed Mplayer trying to run it from desktop was not successful. I did try to do a command line by executing sudo mplayer... (6 Replies)
Discussion started by: oldcity
6 Replies

2. UNIX and Linux Applications

Burn avi to cd with k3b

Is there a way to burn avi to cd with k3b? When I tried the disc became unusable. I tried to open the disc on 2 different computers with no luck. (0 Replies)
Discussion started by: cokedude
0 Replies

3. UNIX and Linux Applications

Help in converting VOB file to AVI

Hello to all in forum, Somebody could help me saying me which command or application can I use to convert correctly a VOB file of more than 5 GB in size. I have the VIDEO_TS folder with the files: - VTS_01 - Stream Information.txt - VTS_01_0.IFO - VTS_01_1.VOB The Stream Information... (4 Replies)
Discussion started by: Ophiuchus
4 Replies

4. UNIX and Linux Applications

fix broken avi index

I need some recommendations on programs to fix broken avi index. Please tell me what your experiences have been with the program. Which programs work and which ones don't work. (1 Reply)
Discussion started by: cokedude
1 Replies

5. Linux

convert avi to cellphone friendly 320x176 mp4 file...ffmpeg to the rescue :)

found a few ffmpeg posts and after a few unsuccessful attempts, I have found a solution :) to encode an avi to to an nokia e71 recognized mp4 format: ffmpeg -y -i inputFILE.avi -acodec aac -ab 72k -s 320x176 -aspect 16:9 -vcodec h264 -b 300k -qcomp 0.6 -qmin 16 -qmax 51 -qdiff 4 -flags +loop... (2 Replies)
Discussion started by: mr_manny
2 Replies

6. UNIX and Linux Applications

Convert .mp4 to .avi

Hello, I need software to convert multimedia files. What is the good software? I was looking for it on the web, but I did not find any special. Thanks... (1 Reply)
Discussion started by: feliks
1 Replies

7. Solaris

Playing AVI in solaris 8

how to play avi file in solaris8 ??... it is not opening in realplayer 7 ..... i also dont have the root login ...plz help !!! (2 Replies)
Discussion started by: coolguyshail
2 Replies

8. UNIX for Advanced & Expert Users

help wanted kernel avi

Hello there! Slightly off topic maybe, but maybe someone can help us. For a videoshow which will be called reality 6.1 we need a video file from a unix kernel that is compiling. Does anyone know how to capture this, or does anyone have such a vid? cheers, iuno (www.iuno.nl) (2 Replies)
Discussion started by: iuno
2 Replies
Login or Register to Ask a Question
FFMPEGTHUMBNAILER(1)					      General Commands Manual					      FFMPEGTHUMBNAILER(1)

NAME
ffmpegthumbnailer - fast and lightweight video thumbnailer SYNOPSIS
ffmpegthumbnailer [options] DESCRIPTION
Ffmpegthumbnailer is a lightweight video thumbnailer that can be used by file managers to create thumbnails for your video files. The thumbnailer uses ffmpeg to decode frames from the video files, so supported videoformats depend on the configuration flags of ffmpeg. OPTIONS
-i<s> : input file -o<s> : output file -s<n> : thumbnail size (use 0 for original size) (default: 128) -q<n> : image quality (0 = bad, 10 = best) (default: 8) (only for jpeg) -c<s> : override image format (jpeg or png) (default: determined by filename) -t<n|s> : time to seek to (percentage or absolute time hh:mm:ss) (default: 10%) -a : ignore aspect ratio and generate square thumbnail -f : create a movie strip overlay -h : display this help AUTHOR
Written by Dirk Vanden Boer. REPORTING BUGS
Report bugs to <http://code.google.com/p/ffmpegthumbnailer/issues/list> COPYRIGHT
Copyright (C) 2008 Dirk Vanden Boer <dirk.vdb@gmail.com> This is free software. You may redistribute copies of it under the terms of the GNU General Public License (version 2 or later) <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law. FFMPEGTHUMBNAILER(1)