Tag Info

Hot answers tagged

6

FFmpeg is probably being used more than you believe. I think the BBC uses it for some workflows, there is evidence that Laika and Weta may use it, and there is a fork called FFmbc which is targeted for professional broadcast usage. YouTube probably uses FFmpeg to decode as shown by some unique decoding issues (but this was several years ago that I read ...


5

From http://www.ffmpeg.org/faq.html: If you have large number of pictures to rename, you can use the following command to ease the burden. The command, using the bourne shell syntax, symbolically links all files in the current directory that match *jpg to the ‘/tmp’ directory in the sequence of ‘img001.jpg’, ‘img002.jpg’ and so on. x=1; for i in *jpg; do ...


5

using the scale filter will do it, but there is a bit more to it. ffmpeg -i input.mov -vf scale=720x406 output.mov will create a movie with the required pixel dimensions, but if you look at the output you'll find that it adds information into the metadata so that it will play back at the same aspect ratio as the original, by using non-square pixels. So ...


4

concat filter This method is best if you need to perform additional filtering: Use the trim, atrim, setpts, asetpts, and concat filters: ffmpeg -i input -filter_complex \ "[0:v]trim=60:65,setpts=PTS-STARTPTS[v0]; \ [0:a]atrim=60:65,asetpts=PTS-STARTPTS[a0]; \ [0:v]trim=120:125,setpts=PTS-STARTPTS[v1]; [0:a]atrim=120:125,asetpts=PTS-STARTPTS[a1]; \ ...


4

Re-muxing only Use stream copy mode to just re-mux instead of re-encode: ffmpeg -ss 01:07:29 -i input -codec copy -map 0 -to 01:08:05 fight.avi Using -ss as an input option can be faster than using it as an output option, but it may not be as accurate. -codec copy will stream copy (no re-encoding). Default behavior, if -codec copy is omitted, is to ...


3

One method is to use the overlay video filter. Assuming your video is 640x480, 30 seconds duration, 25 frame rate: ffmpeg -f nullsrc=s=640x480:d=35:r=25 -i video.mp4 -i audio.wav -filter_complex \ "[0:v][1:v]overlay[video]" -map "[video]" -map 2:a -codec:a copy -shortest output.mkv I set the duration of the nullsrc source filter to be 5 seconds longer ...


3

Apparently by default ffmpeg only copies one stream of each type. To tell it to copy all streams, you need -map 0 So, this does it: ffmpeg -i "concat:a01.mxf|b02.mxf" -y -map 0 -c copy result.mxf


3

The main reason is support, usability and control. First, lets clarify that FFMPEG is an encoder, QuickTime Pro is a video utility that happens to include multiple encoders and Final Cut Pro is a non-linear editor and has nothing to do with encoders other than the fact it can output to an encoder (generally QuickTime I believe). For big budget commercial ...


3

The H.264 standard defines maximum bit rates for 1280x720@30fps as between 14.000 and 42.000 kbit/s, depending on the profile (baseline, main, high etc.). It's even higher for higher frame rates. (http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC) Sony Vegas standard rendering templates use bitrates between 2 and 16 Mbps. Youtube recommends bitrates between ...


3

That's way more than h.264 can handle. The maximum resolution for h.264 is 4096×2304 with Level 5.1 or 5.2. http://en.wikipedia.org/wiki/H.264#Levels There are lossless codecs who can theoretically handle this video resolution but it would make no sense to do this. There is no hardware capable of playing videos in this resolution at any acceptable frame ...


3

No this is not possible. Looking at this theoretically disregarding the codec you can not take away information and call it lossless, thats already a terminology problem. Applying a new color space without transcoding is also not possible It's not so easy to say whether this is even possible with certain codecs other than h264, it really depends on how you ...


3

You specify a preset and a quality value at the same time and by that overriding the preset. I would also recommend you don't encode with ffmpeg while capturing as this would be pretty slow on most PCs. The "error" in your ffmpeg commandline is the option -crf 1. CRF is a quality setting of x264 and the lower the value the higher the bitrate of the video ...


3

-preset Use the slowest preset that is fast enough that it does not drop frames. You can see if ffmpeg is dropping frames in the console output (if I recall correctly). Presets are: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow. -crf Use the highest -crf value that still provides an acceptable quality level. Range is 0-51. 0 ...


2

I use it in my professional production chain all the time. Last week I was using it to batch through dozens of videos that needed subtitles burnt-in. It would have taken me weeks of tedious labour with Final Cut, it took me a couple of days burning the srts in with ffmpeg, and I was able to automatically rename the files and compress them for the various ...


2

I struggled with a similar issue on Ubuntu 12.04.3 LTS. I fixed the problem using the static ffmpeg build which is available from http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.latest.tar.gz


2

Although I am not sure if stderr will really help here because of the way that ffmpeg does its reporting, I can recommend the following pattern. Use the -progress [url] flag and parse it with the tool of your choice every 100ms or so. Here is something to get you started that (with a little tweaking) might do what you want: #!/bin/bash touch ...


2

Depending how the content was made, the banding might be introduced when you're converting your content from RGB colorspace to YUV. You can try to make an h264 while keeping RGB colorspace, although I've read it's not easy. Are you able to use another codec?


2

The bands you're referring to could well just be a limitation of the 8-bit colour space. In theory the way to solve this is to use 10- or 12-bit colour space through every stage from rendering, to editing and mastering, through to output and even in the screen or projector. However your final output is probably going to be displayed in an 8 bits per ...


2

I found a helpful post on stackoverflow that addresses this issue: http://stackoverflow.com/a/21400416/377875 Apparently, it's a problem with color space. Something like this works: ffmpeg -i "$1" -i "$2" \ -filter_complex "[1:0] setsar=sar=1,format=rgba [1sared]; [0:0]format=rgba [0rgbd]; ...


2

You can use ffmpeg with the compand audio filter (a port of sox effect filter of same name) to "compress or expand the audio's dynamic range", but admittedly this is one of the more complicated audio filters. Example from the documentation Make music with both quiet and loud passages suitable for listening to in a noisy environment (whatever that means): ...


2

According to the framemd5 muxer documentation: This muxer computes and prints the MD5 hash for each audio and video packet. By default audio frames are converted to signed 16-bit raw audio and video frames to raw video before computing the hash. The output of the muxer consists of a line for each audio and video packet of the form: ...


2

You are re-encoding the video rather than cutting out a portion of the stream. Any re-encode is going to produce quality loss, particularly when you cut the data rate to less than 1/11th of the original data rate. If you want to cut out a portion of the video, you need to use a tool like VirtualDUB to actually extract a portion of the actual video stream ...


2

Your understanding of what an encoder does is incorrect. It doesn't make up images to fill in the time between I frames. It does somewhat the opposite: it takes a full series of complete images and decomposes them so that only the I frames and the differences between them remain. What you're asking for is, in animation terms, called tweening. The linked ...


2

If you copied your command there then your issue is probably -acodec:0 mp. That should be -acodec:0 mp3. You can just use -c:a mp3 to apply the encoding options to all audio tracks at once, no need to apply them for each individually. Other than that your mapping is correct and shouldn't be the issue. Edit: To conclude the discussion in the comments ...


2

Given your are using a VPS this is no suprise (guessing you only have a single core with 1-3GHz) and you won't be able to crunch the conversion down to a few minutes. You can try using -c:v libx264 -presets ultrafast but I'd guess it will still take you about 45-60 minutes to encode. Also remove the -crf option when using a preset. Be advised that the ...


2

Seeing that in the text of your question you have started discussing other utilities, i will assume that you are not interested in sticking with ffmpeg, but rather in getting the job done. In my experience with libav and MTS i have had no problems with the framerate, the files get remuxed perfectly. I have just attempted the following with one of my files: ...


2

It is actually quite easy using a videofilter with select. This is quite sensitive to video changes: -vf "select=gt(scene\,0.0098)" whereas this is not so sensitive: -vf "select=gt(scene\,0.3)" EDIT (added your command) so your command would look like: ffmpeg -f video4linux2 -s 800x600 -r 15 -i /dev/video1 -maxrate 800k \ -minrate 1k -bt 800k ...


2

Why would you want your videos in the .3gp container to begin with? Its a very irrelevant format nowadays, there is practically no device that supports the 3gp container but not MP4 at the same time. Its nothing but a close derivative of MP4, they are very similar container formats holding the same codec. If you want to support a lot of devices using h264 in ...


1

There is no switch to set a file size in percentage but there is the -fs switch. This switch can bet set to let ffmpeg try to get to a specific target file size set in bytes (for example -fs 52428800 to get to 50MB). You can write a script that takes the original file size and calculates your new desired file size depending on your specified percentage value ...


1

The first thing I would try is to add -force_key_frames to your original command, drop the preset and lower the -crf value. The following example sets a key frame every second. ffmpg -i input.mov -c:v libx264 -profile main \ -force_key_frames expr:gte(t,n_forced*1) \ -crf 15 -pix_fmt yuv420p -an output.mp4 As a second resort I would use a series ...



Only top voted, non community-wiki answers of a minimum length are eligible