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

5
votes
0answers
157 views

Get webrtc-like latency with ffmpeg?

I've been using this between Chrome and my phone: http://www.webrtc.org/demo And the latency is really good - less than 1 second. I've been trying to replicate that on my computer with no success. ...
5
votes
1answer
1k views

Convert png sequence to x264 with ffmpeg

I am trying to convert a series of pngs into an mp4 video. I am using ffmpeg, and want to encode the video with the H.264 codec. Using the command ffmpeg -y -r 30 -b 1800k -i _tmp%04d.png -vcodec ...
5
votes
1answer
455 views

How to properly concaternate two audio files together?

I ripped two Blu-rays and I'm trying to combine the audio from both into one file. I've decoded it from DTS-HD MA to Wave64, and I used avisynth to remove the black screen audio (4 seconds) from the ...
4
votes
2answers
10k views

Concat two mp4 files with ffmpeg without losing quality

i have now a problem with concatenating of 2 videos using ffmpeg. So, i am encoding the source mp4 files to ts with ffmpeg -i output1.mp4 -scodec copy -vbsf h264_mp4toannexb i0.ts but the file ...
4
votes
2answers
9k views

How many instances of FFmpeg commands can I run in parallel?

I tired running 8 commands in parallel to fully utilize the CPU and speed up Video conversions, something like this: ffmpeg -i input.mp4 -t 60 -f mp4 /mnt/a.mp4 > /dev/null 2>&1 & ...
4
votes
1answer
13k views

How can I convert a series of PNG images to a video for YouTube?

I have a sequence of PNGs (here is one specimen) which I turn into a video with ffmpeg: ffmpeg -r 10 -i image%03d.png -s 1380x720 -c:v libx264 -qscale 10 -r 30 basf_merck_libx264.mp4 With ...
4
votes
1answer
5k views

FFmpeg (MacPorts) - libfaac missing, need new audio encoder

I am so confused. I am trying a quite simple FFMpeg command to transcode a movie file to a x264/AAC mp4 file via the command line (for Vimeo upload). (Mountain Lion/Macports) ffmpeg -i INPUT.AVI ...
4
votes
2answers
7k views

Why is converting WMV to MP4 so slow?

I am trying to convert a video from WMV to MP4 with FFmpeg but it takes couple of hours. If I try to convert it to AVI it only takes about 10-15 minutes. ffmpeg version ffmpeg version ...
4
votes
2answers
10k views

What's the difference between FFmpeg's “-vcodec copy” and “-sameq”?

What is the difference between using -vcodec copy and -sameq with FFmpeg? Do they do the same thing?
4
votes
1answer
7k 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 ...
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
2k views

Convert AVI into H.264 that works inside an HTML5 Video tag

I would like to convert an existing black and white AVI into an H.264 video that works inside an HTML5 video tag. I'm currently using this ffmpeg command: ffmpeg -i file.avi -y -c:v libx264 ...
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
1answer
4k 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 ...
4
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 ...
4
votes
1answer
2k 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
2answers
3k 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
4k 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
4k views

x264 encoding speed, what should my expectations be?

I am running Ubuntu 10.10 (maverick) on an HP Pavillion dv3 with core2duo 2.29 GHz, NVidia Geforce G105M (512MB) with CUDA and 4GB RAM. I have the latest versions of ffmpeg and x264. I recognise that ...
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
749 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
3answers
8k 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
7k 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
816 views

How to merge video flv and audio wav file in ffmpeg

I want to merge an audio .wav with a video .flv using ffmpeg Please suggest me how to achieve this. i am using this command on ubuntu 12 : ffmpeg -i recod_audio.wav -i recod_ideo.flv -acodec ...
4
votes
1answer
2k views

Lossless universal video format

I am trying to find the most suitable lossless video format for 1280x720 25fps video. The video has 4 minutes. Sound will be 320 kbps mp3, that is not a big deal. Ideal conditions: Lossless (can be ...
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
1answer
535 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
4k 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
720 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
4answers
14k 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

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
5k 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
685 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
870 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
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
93 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
1k 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
0answers
172 views

Combine/concatenate multiple MP4 files, making each file into a chapter

I am looking to use handbrake to combine 43 short mp4 files into one larger file. However, I want to ensure that the start of each file is recognized as a chapter. I'd be using vlc to play the file.
4
votes
1answer
1k 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
663 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
7k 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
3k 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
2answers
8k views

What is the right way to calculate 1080p 720p 360p 240p quality?

I'm working on a video hosting project and I would like to know if I'm converting my videos quality the right way. my equation is: newY=(y/x)*newX so 1080p is: 1080x460 than 720p 720x306 ...