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
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
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
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
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
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
3answers
4k views

Concatenate multiple WAV files using single command, without extra file

I want to concatenate multiple WAV files into a single WAV file using FFMPEG. I have used the following command and it generates the required file. Command: ffmpeg -f concat -i mylist.txt -c copy ...
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
658 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
424 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
2k 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
640 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
3k 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
548 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
716 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
1answer
3k views

Screen Casting using ffmpeg (too fast)

I can use ffmpeg to make screen casts: ffmpeg -f x11grab -s 1280x800 -i :0.0 -c:v libx264 -framerate 30 -r 30 -crf 18 out.mkv However the output comes out to be too fast paced. It also happens with ...
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
68 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
960 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
834 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
599 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
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
3k 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
641 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
5k 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
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
3answers
816 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
11k 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 ...
3
votes
3answers
11k views

Extracting “one of every 10 frames” in a video using VLC or FFmpeg

I am trying to extract "exactly 1 frame of every 10" frames of a video (i.e. extract 1 , leave 9 then repeat) for scientific purposes. The video is 105 frames, 3.5 seconds, 29.97fps (h.264, .mov, ...
3
votes
1answer
7k views

how do I convert .iso to .mp4 without mounting with ffmpeg

The problem is - I want to convert .iso with dvd to .mp4 (h264/ac3), but I cannot mount it via mount -o loop, because I'm on a virtual machine that doesn't allow to do that. Googling doesn't help. ...
3
votes
1answer
134 views

How can I use an audio file without having to re-encode it to output an audio stream with the same format?

I have two input files, a still image that's going to repeat itself as frames and an audio file. How can I use the audio file without having to re-encode it to output an audio stream with the same ...
3
votes
1answer
2k views

FFmpeg: can't capture audio from microphone

I use FFmpeg under Windows 7 to stream live video. There are no problems with the camera, but for some reason I can't capture sound from the microphone (I've tested it, it works fine). I use the ...
3
votes
1answer
3k views

How to get time stamp of closest keyframe before a given timestamp with FFmpeg?

I want a FFmpeg seeking command that fast and accurate. I found this. The solution is that we apply -ss for both input (fast seeking) and output (accurate seeking). But: If the input seeking is not ...
3
votes
2answers
2k views

Add silence to the end of an MP3

Do any of you know of a way of adding silence of a fixed duration to the end of an MP3, in Linux? For example using MEncoder, FFmpeg, etc? It needs to be command line as it will be scripted and ...
3
votes
1answer
2k views

Can FFMPEG convert mp3 files into m4a in full, i.e. with both audio and video streams (jpeg cover) copied?

I use Zeranoe build of ffmpeg. It converts mp3 files into m4a files just fine, as far as the audio stream is concerned, but I can't figure out a way to keep the songs album cover jpeg, which ffmpeg ...
3
votes
3answers
353 views

Why doesn't this for loop work?

This is on Ubuntu 12.04 I'm trying to figure out how to get ffmpeg to do a batch conversion of FLACs to MP3, recursively. If I cd into a directory and use for f in *.flac; do ffmpeg -i "$f" -c:a ...