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
PLAYMPEG(1)						      General Commands Manual						       PLAYMPEG(1)

NAME
plaympeg - MPEG audio (MP3) and video (MPEG-1) player SYNOPSIS
plaympeg [options] file ... DESCRIPTION
plaympeg is an MPEG audio and video player that uses the SDL MPEG Player Library. It can play back MPEG audio (layer 1, 2 and 3), MPEG video (MPEG-1) and MPEG system (audio and video combined) files. MPEG-2 video files (as found on DVDs) are not supported. The video player works best on a 16 bit color depth X11 display, it works on other color depths with reduced speed as well. You'll need a CPU with 300 MHz or more to play back an MPEG system stream with 25 frames per seconds (fps) at full speed. OPTIONS
--help Show short usage information --noaudio Don't play the audio stream (if available) --novideo Don't play the video stream (if available) --fullscreen Play the MPEG video stream in fullscreen mode (this requires root privileges or a setuid plaympeg binary) -2, --double Play the MPEG video stream at double size -l, --loop Play the stream (audio or video) over and over again -v N, --volume N Set the volume of the audio stream to N% (N in the range of 0 to 100) -s S, --scale S Play the MPEG video stream at S size SEE ALSO
SMPEG home page at http://www.lokigames.com/development/smpeg.php3 AUTHOR
The SDL MPEG Player Library was written by Karl Robillard and Sam Lantinga of Loki Entertainment Software. Please report any bugs and/or fixes to smpeg@lokigames.com. This manual page was written by Stefan Gybas <sgybas@debian.org> for the Debian GNU/Linux system, but may be used elsewhere under the GPL. PLAYMPEG(1)