`ffmpeg` is a free software project aimed at producing tools (libraries and programs) for handling multimedia data.

learn more… | top users | synonyms

26
votes
7answers
18k views

How to grep standard error stream (stderr)?

I am using ffmpeg to get the meta info of an audio clip. But I am unable to grep it. $ ffmpeg -i 01-Daemon.mp3 |grep -i Duration FFmpeg version SVN-r15261, Copyright (c) 2000-2008 Fabrice ...
16
votes
3answers
17k views

How can I use ffmpeg to split MPEG video into 10 minute chunks for YouTube upload?

There is often a need in the open source or active developer community to publish large video segments online. (Meet-up videos, campouts, tech talks...) Being that I am a developer and not a ...
12
votes
1answer
29k views

How can I reduce a video's size with ffmpeg?

How can I use ffmpeg to reduce the size of a video by lowering the quality (as minimally as possible, naturally, but I need it to run on a mobile device that doesn't have much available space)? I ...
11
votes
4answers
6k views

How do I merge two *.avi files into one

I have two *.avi files: sequence1.avi sequence2.avi How do I merge these two files using a command-line or GUI?
11
votes
2answers
4k views

How to record my full screen with audio?

If I want to record my desktop, I use: ffmpeg -f x11grab -s `xdpyinfo | grep -i dimensions: | sed 's/[^0-9]*pixels.*(.*).*//' | sed 's/[^0-9x]*//'` -r 25 -i :0.0 -sameq valami.avi But it doesn't ...
9
votes
3answers
3k views

How to get near-perfect screen recording quality?

Someone suggested I direct a copy of the unmodified X display to a file and afterwards convert that file to a general purpose video file. What commands would I use to do this on a Kubuntu system? ...
7
votes
3answers
996 views

Who is doing the job: ffmpeg or the shell?

First part of my question: I read on the ffmpeg documentation (section 3.2 How do I encode single pictures into movies?) the following: To encode single pictures into movies, run the command: ...
7
votes
2answers
11k views

How get the best quality when converting from mp4 to avi with ffmpeg?

When I use this, the quality doesn't look bad. ffmpeg -same_quant -i video.mp4 video.avi In the ffmpeg documentation is written: "Note that this is NOT SAME QUALITY. Do not use this option unless ...
6
votes
3answers
4k views

How can you trim mp3 files using `ffmpeg`?

Here is a Linux audio MP3 puzzle that has been bugging me for awhile: How to trim the beginning few seconds off an MP3 audio file? (I can't get ffmpeg -ss to work with either 00:01 or 1.000 format) ...
6
votes
2answers
3k views

How to convert a VOB file to avi?

I am trying to convert a VOB file copied from a DVD into an avi in Ubuntu 13.10. I tried dvdrip, which failed due to a frame count error or something. I tried acidrip as well, but it always choose an ...
6
votes
4answers
370 views

extracting certain info from output

I'm trying to extract certain info from ffmpeg output. Sample ffmpeg output: configuration: --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver ...
6
votes
2answers
1k views

Converting PNG frames to video at 1 FPS

I have video frames in PNG format at 1 FPS and I'm trying to convert them into a video using ffmpeg. If I do something like this: ffmpeg -i data/input-%4d.png data/output.mp4 I get a video at 25FPS ...
6
votes
1answer
744 views

Is it possible the get the original (best) audio quality when using avconv?

In Feb 2011 I had a similar question: ffmpeg and libmp3lame produces bad audio quality? Now I'd like to know if it is possible to the get the original audio quality from a (flash) video? Every time I ...
5
votes
2answers
250 views

How to input a network file using scp to ffmpeg

My problem is this. I have access to a server that hosts many video files, most of them are very large and not well compressed. I intend to make a reduced quality smaller size copy of these on my ...
5
votes
1answer
6k views

Encode with ffmpeg using avi to mp4

What command lines to use to convert from avi to mp4, but without destroying the framesize and making the file small as the original size or a little bit bigger, and same thing with mp4 to avi? ...
5
votes
2answers
6k views

Downsampling a video with avconv / ffmpeg

I know really little about encoding and using avconv / ffmpeg. I am trying to downsample a video as follows: avconv -i blah_in.avi -s 640x360 -pass 1 blah.avi avconv -i blah_in.avi -s 640x360 -pass 2 ...
4
votes
2answers
3k views

Strange errors when using ffmpeg in a loop

I have a bash script looping through the results of a find and performing an ffmpeg encoding of some FLV files. Whilst the script is running the ffmpeg output seems to be interupted and is outputting ...
4
votes
3answers
18k views

How can I embed subtitles into videos with ffmpeg?

I'm told it's possible to embed subtitles (.srt) into video files (.avi) using ffmpeg, but I can't find any mention of it in the man page. Is this possible? What command do I use?
4
votes
3answers
2k views

Transcoding MJPEG Stream to FLV or MP4

I want to transcode MJPEG stream that comes from IP camera (http://xx.yy.zz.tt:8080/video.cgi) to FLV or MP4 stream under Linux OS so that users can play the file using a web based Flash player such ...
4
votes
2answers
153 views

How to remove silence part from mp3 that is extracted from tv drama

I hear a mp3 that is extracted from some tv dramas as a English exercise. So in that mp3 there are lot of "silence part" in which no one speaks and there is no background music. Is there a way to ...
4
votes
1answer
480 views

Merge two audio sources with x11grab, possible?

Currently I'm running with the following setup. ffmpeg \ -i http://pub1.di.fm:80/di_vocaltrance \ -f x11grab -s 1920x1080 -r 25 -i :0.0 \ -c:v libx264 -preset fast -pix_fmt yuv420p -s 1280x800 \ ...
4
votes
0answers
405 views

How can I prevent ffmpeg intermmittent faulure with `AVC: nal size` error?

I am trying to open the NASA HDTV video stream from ustream.tv directly in vlc. The problem that I have is that it only works sometimes. The command I am using is below: ffmpeg -i ...
4
votes
1answer
5k views

How to splice sections of a video with avconv?

I have figured out so far that you can cut a section from a video with avconv with a command like this (cuts from 1:00-3:00): avconv -ss 00:01:00 -i "input.avi" -t 00:02:00 -c:v libx264 -crf 23 ...
3
votes
2answers
350 views

Interactively concatenate video files

Problem : How to concatenate (join) multiple MP4 video files into one file interactively? There are a lot of programs that do this for two files from the command line. For instance : ffmpeg, ...
3
votes
1answer
2k views

Split video file into pieces with ffmpeg

When you want to extract two minutes of a video file from minute 2 to minute 4, you will use command ffmpeg -i input.mpg -sameq -ss 00:02:00 -t 00:02:00 output.mpg I'd like to split the video into ...
3
votes
2answers
328 views

Save find -exec output to text file

I have a set of videos in the folder. I would like to get the info about this videos using ffmpeg -i command and save the output to file. So I wrote the line: find . -type f -exec ffmpeg -i {} \; ...
3
votes
2answers
3k views

How do I convert a MKV file to H.264/AVC with a resolution of 640x360 using FFMPEG?

I have a MKV video which I want to put in my mobile (a Nokia XM 5800) and based on this I can play H.264/AVC format videos on it. Based on what I have read, the container should be MP4 and I can ...
3
votes
1answer
933 views

FFMPEG video to FLV conversion optimization

Would anyone have any tips on optimizing video to FLV conversion using ffmpeg so I would get a medium quality video which is not very large? I have a video site where users can upload videos which ...
3
votes
1answer
186 views

Need script: latest JPEGs to video, then delete old JPEGs

I have an IP cam which uploads JPEG pictures to an FTP folder on my Arch Linux box whenever it detects movement in the room it is looking in. It uploads a JPEG every second until all motion activity ...
3
votes
3answers
292 views

New source install over existing one

I have Slackware installed on my computer, and I install a lot of software from source. Now I want to install ffmpeg from source just to recompile it with some more options. But I already have ffmpeg ...
3
votes
1answer
1k views

ffmpeg: error while loading shared libraries: libtheoraenc.so.1

When I want to run ffmpeg I get the following error: ffmpeg: error while loading shared libraries: libtheoraenc.so.1: cannot open shared object file: No such file or directory This is output of ls ...
3
votes
1answer
2k views

What settings can I use to maximize FFMpeg performance?

I'm trying to do some screencasting, but since my computer is much too old and slow the video being produced is laggy and the application I'm trying to record becomes unresponsive due to the CPU ...
3
votes
1answer
242 views

Batch conversion of Module files with XMP

I have the following script to convert a big bunch of .MOD and .XM files into Wave format: #!/bin/bash for f in ./XM.* ./MOD.* do xmp $f -d wav -o - | ffmpeg -i - -acodec libmp3lame -ab 320k ...
3
votes
1answer
685 views

How to get lilbmp3lame encoding to work with ffmpeg?

When I am converting an FLV to an AVI one, I always get: Unknown encoder 'libmp3lame' But I've installed it with Ubuntu Software Center. I am using this command: ffmpeg -i video.flv -acodec ...
3
votes
0answers
44 views

How to tape a video running on the screen? (screen capture)

I am trying to capture video and audio from the screen, loudspeakers and microphone. I would like to do that with a command-line command. So far, ffmpeg -f x11grab -r 25 -s 800x600 -i :0.0 ...
3
votes
1answer
559 views

Can't install 32 bit gstreamer-ffmpeg normally, library can't find other 32 bit libs

I'm on Ubuntu 12.04 64 bits and I'm trying to get a game (GTA SA) working in wine, but it keeps crashing. After reading error logs it seems I needed some 32 bit versions of gstreamer, probably to play ...
3
votes
0answers
744 views

Generating a slideshow under linux

Under Windows, one is able to generate a nice slideshow (crossfading between images, applying the Ken Burns effect on each image) on Windows using (Windows) Movie Maker. When I create a slideshow ...
2
votes
2answers
7k views

Mencoder with same quality output

I like mencoder for converting video files because it shows me how much time is remaining to the end of the conversion (in opposite to ffmpeg). mencoder file.wmv -ofps 23.976 -ovc lavc -oac copy -o ...
2
votes
4answers
646 views

how to convert number to time format in shell script?

I want to cut a video into about 10 minute parts like this. ffmpeg -i video.mp4 -ss 00:00:00 -t 00:10:00 -c copy 01.mp4 ffmpeg -i video.mp4 -ss 00:10:00 -t 00:10:00 -c copy 02.mp4 ffmpeg -i video.mp4 ...
2
votes
3answers
1k views

ffmpeg -pattern_type glob — not loading files in correct order

I have a dilemma.. I've had a script for a while now that downloads pictures from a webcam every few minutes. The naming convention just does new_image((len(files(dir))+1) + '.jpg') and that's all ...
2
votes
2answers
4k views

error while compiling ffmpeg: gcc is unable to create an executable file

When I run the ./configure command in ffmpeg source directory I get this error: gcc is unable to create an executable file. If gcc is a cross-compiler, use the --enable-cross-compile option. Only do ...
2
votes
2answers
105 views

Is there any equivalent to the atempo ffmpeg audio filter but for avconv to speed up video(and audio)?

As noted here, we could speedup audio with ffmpeg using ffmpeg -i input.mkv -filter:a "atempo=2.0" -vn output.mkv But on Ubuntu, ffmpeg is replaced by avconv, and the atempo filter is not available ...
2
votes
1answer
219 views

Remove nth frames of a gif (remove a frame every n frames)

I've recorded a .gif of the screen with ffmpeg. I've used gifsicle and imagemagick to compress it a bit, but it's still to big. My intent is making it small by removing, say, a frame every 2 frames, ...
2
votes
1answer
811 views

How to convert a group of video files using FFMPEG?

I have several video files in a directory and I want to convert all of them into other video formats. Is there any way that I can convert all of them in just one go using FFMPEG. I mean without having ...
2
votes
2answers
2k views

Mass deinterlacing with FFmpeg on Debian

I have about 300 videos, on a Debian server, stored in the following manner: /mediaroot/1/m32.mp4 /mediaroot/2/m421.mp4 /mediaroot/n/mx.mp4 They all need to be deinterlaced, and I want to do it ...
2
votes
4answers
3k views

mp3 extraction with avconv or ffmpeg doesn't work properly anymore

Before upgrade to the latest Ubuntu I used the following command to extract mp3 from an avi file: $ for x in *.avi; do ffmpeg -vol 100 -ab 160k -ar 44100 -i "$x" "`basename "$x" .avi`.mp3"; done ...
2
votes
1answer
1k views

Is there a way to demux a h264 video stream from an flv (h264, aac)?

Using ffmpeg to demux an h264 stream from a .flv video always gives me a stream which I cannot remux into a .mp4 container (using either MP4Box from package *gpac), or ffmpeg). Here is the demuxing ...
2
votes
1answer
1k views

Fix error in mp3 file

I have an mp3 file that plays OK on computer but there is a problem to play it on mp3 player. ffmpeg shows this: $ ffmpeg -i file.mp3 [mp3 @ 0x8de72a0] Invalid size in frame , skipping the rest of ...
2
votes
2answers
459 views

No output produced when using winFF

I am using winFF in Ubuntu 10.04. WinFF is a graphical frontend to ffmpeg. Typically, after selecting a file in WinFF, setting my conversion settings and pressing the "Convert" button, a console ...
2
votes
3answers
2k views

installing ffmpeg-php on centos

With the help of this guide, I am trying to install ffmpeg using these commands: # cd ffmpeg-php/branches/ffmpeg-php/ffmpeg-php-0.6.1/ # replace 'PIX_FMT_RGBA32' 'PIX_FMT_RGB32' -- * # phpize # ...