Media tool with support for multiple codecs, filters, and containers. Include the full, uncut console output if you have problems with an FFmpeg command.

learn more… | top users | synonyms

4
votes
2answers
3k views

Can ImageMagick make thumbnails from video?

I'm trying to extract thumbnails from video via ImageMagick. I found some samples from their official site, but it makes GIF, not PNG. I want a solid thumbnail though. Can it create the same output ...
4
votes
1answer
1k views

What lossy audio formats are more (or less) “efficient”?

This question is related to the answers I got to this question. The bitrate-efficient format (see the question's most voted answers and their comments thereunder) would be one that assures a good ...
4
votes
3answers
11k views

Rotate a video file 90 degrees using Ubuntu

I want to use Ubuntu and preferably standard packages such as ffmpeg to rotate a .3gp video file by 90 degrees in any direction. Preferably a command line or Python script. How can I do that?
4
votes
3answers
6k views

Synchronizing audio and video using MP4Box / ffmpeg to concatenate files

I have two H.264 encoded MPEG-4 files that I need to concatenate. I have been using MP4Box for this task by first ensuring the files are encoded identically (even went so far as to compare output from ...
4
votes
1answer
1k views

Processing YouTube video in ffmpeg

I'm using ffmpeg for taking screenshots from video. Is it possible to take screenshots from YouTube video without downloading video to hard drive?
4
votes
3answers
8k views

Which codecs are most suitable for playback with Windows Media Player on Windows XP?

I need to encode a short video in a format that can be played with windows media player on windows xp without installing any additional codecs. For the recoding process I'm using ffmpeg. I've already ...
4
votes
2answers
2k views

FFMPEG extract intra-frames I,P,B frames

Is there a way to extract the intra-frames and preserve them as-is from FFMPEG or similar program? I know you can extract frames to a sequence of JPEG images using -f image2. But those are full images ...
4
votes
1answer
929 views

ffmpeg: isolate one audio channel

How can I use ffmpeg to isolate one channel from an audio file? I have a stereo audio file, and I need the output to be the contents of the right channel in a mono audio file. While I'm sure it's ...
4
votes
1answer
3k views

FFmpeg settings for YouTube and Facebook video uploads

Can any FFmpeg experts share their preferred settings for video conversion to both YouTube and Facebook? For Youtube I am following these guidelines and my video size is 480P @ 24 fps Audio Codec: ...
4
votes
1answer
3k views

ffmpeg: images to 29.97fps mpeg2, audio not sync

I have spent a lot of time on this issue. Hope someone can help. I want to convert 3147 images + ac3 audio file into an mpeg2 video at 29.97fps (about 1m45s). My command: ~/ffmpeg/ffmpeg/ffmpeg ...
4
votes
1answer
690 views

How can I find out how big my encoded file will be?

I am converting a video using the following command: ffmpeg -i "input.avi" -vcodec mpeg4 -r 15 -sameq "output.avi" However I'm only interested in the file size of output.avi. Is there a command I ...
4
votes
1answer
1k views

FFMPEG image sequence with various durations

Let's say I have an mp3 file of 1 minute length. And I have 20 png images. I want to combine these images and an audio into a video file, but I do not want each image to last 3 seconds on screen, I ...
4
votes
1answer
6k views

Add audio to video using ffmpeg

I'm trying to add sound to a video using ffmpeg, but for some reason, when I play the resulting file, it doesn't have any sound. I also tried doing it with an aac audio file, as well as leaving out ...
4
votes
1answer
5k views

Use DivX settings to encode to mp4 with ffmpeg

I'm used to use VirtualDub to encode a video to AVI container with DivX-codec (and MP3 for audio). Now I'm planning to use ffmpeg to encode videos to MP4 container with h264-codec. What I've figured ...
4
votes
3answers
7k views

Is it possible to use ffmpeg to trim off X seconds from the beginning of a video with an unspecified length?

I need to trim the just the first 1 or 2 seconds off of a series of FLV recordings of varying, unspecified lengths. I've found plenty of resources for extracting a specified duration from a video ...
4
votes
1answer
5k views

FFMPEG: Convert m4a files to mp3 without significant loss of information / quality. Automated bitrate

I have a load of audio files (about 1000) which I want to convert from m4a to mp3 so I can use play them on a CD player which has a USB port. I tried doing something simple like: ffmpeg -i FILE.m4a ...
4
votes
1answer
455 views

FFmpeg corrupts iTunes files

I am trying to create .m4a files to play in my car, which has a USB interface. Files downloaded from this website work fine as is. However for example if I remux them using ffmpeg -i infile.m4a -c ...
4
votes
2answers
3k views

Extracting wav from mp4 while preserving the highest possible quality

I went through the documentation and I can extract a wav file from an mp4 file with the command: ffmpeg -i my_video.mp4 output_audio.wav However, how can I control the quality of the wav file? ...
4
votes
1answer
671 views

ffmpeg's select-filter generates unwanted black frames

I want to cut a video by frames with ffmpeg. What I came up with so far is ffmpeg -i P2.mp4 -vf "fps,setpts='PTS-STARTPTS',select='gte(n\,20)*lte(n\,30)',crop='600:430:100:650',scale='280:-1'" ...
4
votes
2answers
2k views

Streaming Desktop using FFMPEG in windows

How to stream Desktop using FFMPEG in windows?? I have tried ffmpeg -list_devices true -f dshow -i dummy and after that this to stream ffmpeg -f dshow -i video="Chicony USB 2.0 Camera" -r 30 ...
4
votes
1answer
1k views

Why does the quality of this video suck when converted with ffmpeg as opposed to mencoder?

Here's the command line that I'm using for both and the output. Any ideas? The bitrate of the two videos is comparable: both around 1500Kbps. ffmpeg command: ffmpeg -y -i aud.mp4 -acodec copy -i ...
4
votes
1answer
4k views

Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height

When i tried to merge an avi file with a wav file it shows the error "Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height". I will ...
4
votes
1answer
599 views

Splitting video in multiple episodes with ffmpeg

I need to cut one video into multiple pieces with ffmpeg. When I cut just one episode ffmpeg -i 001.mp4 -vcodec copy -acodec copy -ss 00:00:00.000 -t 00:00:25.500 -strict -2 out1.mp4 or ffmpeg -i ...
4
votes
1answer
2k views

Is there a way to disable or hide output thrown by FFmpeg?

I went through the documentation but couldn't find a solution. I'm hoping there is some kind of argument that will tell FFmpeg to not show the output in the console. The output that I'm referring to ...
4
votes
1answer
773 views

Embedding artwork with FFmpeg during FLAC to ALAC conversion

How does one embed artwork during FLAC → ALAC conversion? ffmpeg -i track.flac -acodec alac track.m4a transfers metadata but not artwork.
4
votes
4answers
12k views

How to specify audio and video bitrate

I have a mov file with the following media information: Stream 0 Type: Video Codec: H264-MPEG-4 AVC (part 10)avc1 Language: English Resolution: 1280x720 Frame rate: 24 Stream 1 Type: Audio Codec: ...
4
votes
1answer
1k views

FFmpeg - unable to play stream

I used the following command to attempt to stream from a file with ffmpeg: ffmpeg -re -i GunGrave\ -\ 03\ -\ Rain.webm -c copy -f asf rtmp://127.0.0.1:8090/test.asf This produced the following ...
4
votes
2answers
4k views

FFMPEG not resizing a video properly

I am trying to use FFMPEG to resize a video using -s 480x272. Unfortunately something is causing FFMPEG to output a video with 483x272. For those curious this is the command I am using: ffmpeg -i ...
4
votes
1answer
79 views

Detect truncated mp3 or ogg files

I recently had a hard disk failure and could not rescue all my music files. Since I didn't have enough storage available to do a full backup of the disk, I tried to cp as many tracks as possible, but ...
4
votes
1answer
977 views

Resize and lower the bitrate of mp4

I wanted to execute the following command: x264 --level 30 --profile baseline --bitrate 900 --keyint 30 -o test.mp4 video01.mp4 --vf resize:720,480 But I get following output(error) raw [error]: ...
4
votes
1answer
2k views

What does the video output stream details from ffmpeg mean?

When you run ffmpeg -i with the video file as input parameter, ffmpeg returns some details of the stream type, like codec, bitrate and resolution. What does the other data mean - "tbr", "tbn" and ...
4
votes
2answers
2k views

How do you splice out a part of an xvid encoded avi file, with ffmpeg? (no problems with other files)

Im using the following command, which works for most files, except what seems to be xvid encoded ones /usr/bin/ffmpeg -sameq -i file.avi -ss 00:01:00 -t 00:00:30 -ac 2 -r 25 -copyts output.avi So ...
4
votes
1answer
870 views

How to convert 1080p to 1080i video using ffmpeg

I am using ffmpeg, trying to convert 1080p to 1080i. I know that -vf tinterlace should do that, but I don't know the exact syntax of use. Currently I'm trying this: ffmpeg -i <input file.mp4> ...
4
votes
2answers
623 views

Best way to repackage ripped DVD to mpg

I have a bunch of DVDs that I've already ripped into a VIDEO_TS directory containing .IFO and .VOB files. I have a cheap primitive video player that will accept .mpg files. I've tried two different ...
3
votes
4answers
7k views

How to get video duration in seconds?

How can I get video duration in seconds? What I've tried: ffmpeg -i file.flv 2>&1 | grep "Duration" Duration: 00:39:43.08, start: 0.040000, bitrate: 386 kb/s mediainfo file.flv | grep ...
3
votes
2answers
6k views

Using FFMPEG to add subtitles to a M4v video file

I am having troubles adding subtitles to a video file using ffmpeg. I am using this command: ffmpeg -i movie_input.m4v -newsubtitle subtitles.srt -acodec copy -vcodec copy movie_output.m4v I found ...
3
votes
2answers
2k views

How to add my logo for the first 30 seconds in a video with ffmpeg?

I'm trying to add my logo for the first 30 seconds in a video with ffmpeg. I have a video called d1.mp4 and a logo called logo.png. When the video starts, the watermark should be at the top left or ...
3
votes
1answer
4k views

How do I translate HandbrakeCLI options to FFmpeg options?

I have a bunch of commandline settings that work for handbrake, but sometimes on some videos (I have no idea why) handbrake throws "Out of memory exception". I was wondering if I can find the same ...
3
votes
3answers
679 views

Information about ffmpeg command line options

I have seen the use of ffmpeg in the command line, with the option -strict -2, or -strict experimental. I went to the command line documentation of ffmpeg, but I could not find information about this ...
3
votes
5answers
11k views

How do I enable LAME support for ffmpeg?

This isn't a duplicate. I am Debian 6 Squeeze and installed ffmpeg using apt-get. I didn't compile it from source. Later I installed lame from http://www.rarewares.org/. But when I try to use ffmpeg ...
3
votes
1answer
6k views

Converting video from 1080p to 720p with smallest qualiti loss using ffmpeg

I stack with my high quality movie: 1080p with 60fps. The trouble is lags while playing. I tried to convert it to 720p with ffmpeg: ffmpeg -i MyMovie.mkv -r 60 -s hd720 MyMovie_720p.mkv But I ...
3
votes
2answers
18k views

FFmpeg command to rotate an MP4 file by 90º

Can I rotate (save, reencode) a .mp4 file with ffmpeg? The only thing I found was on the mailinglist saying -vfilters "rotate=90" but ffmpeg says that "there are no vfilters". I tried -vf, it says ...
3
votes
3answers
3k views

Clarification for ffmpeg input option with image files as input

I have some images and I'd like to make an animated gif with ffmpeg. The images have names as: 837_1.png 838_1.png ... I'm trying to unserstand the -i command line option of ffmpeg but I am ...
3
votes
1answer
5k views

Using ffmpeg to make a movie from png files

I have 277 800x600 png files with filenames with the format island_sizes-CSH(II)-###.png where ### is a number starting with 084 and ending at 360. I'm doing ffmpeg -i island_sizes-CSH\(II\)-*.png ...
3
votes
2answers
3k views

Add 1 second of silence to audio through FFmpeg

I have an AC3 5.1 audio file to which I would like to insert x seconds of silent audio at the beginning. This has nothing to do with video muxing, so itsoffset is useless since it seems to only work ...
3
votes
3answers
13k views

Live streaming using FFMPEG

This is rather a simple question, but I cannot find the answer. I need to stream from a capture device to a server, and then have FFMPEG on the server re-code the stream suitable for HLS. But how do ...
3
votes
1answer
2k views

Converting MP3 to AAC and outputting to stdout

ffmpeg.exe -i s.mp3 -f aac - This is the command I run but it doesn't recognize the format AAC. Requested output format 'aac' is not a suitable output format pipe:: Invalid argument However when ...
3
votes
3answers
844 views

How to apply audio track to a mute h264/mp4-video losslessly?

I have a MP4/h.264-video with no sound. With ffmpeg or similar, how can I apply an audio track to that MP4-file without degrading the quality of the video (i.e. without recoding the video-track)? I'd ...
3
votes
1answer
6k views

How to merge audio and video files with FFmpeg?

This is a question, similar to this one. I've tried following ffmpeg command: ffmpeg -i "video.mpg" -i "audio.mp3" -t 00:01:35.13 -vcodec copy -acodec copy result.with.sound.mpg And I've got some ...
3
votes
1answer
12k views

How To Check My Current Version of FFMPEG

I have FFMPEG installed on 2 different servers. On one of the servers, i run into an issue every time i try to convert m4v files where ffmpeg just processes the file indefinitely. When I take the ...