New answers tagged

1

Use ffmpeg -i video.mp4 -filter_complex \ "[0:a]aformat=channel_layouts=mono,showwavespic=s=600x200,colorkey=black, \ colorchannelmixer=rr=156/255:gg=244/255:bb=47/255[fg]; \ color=s=600x200:color=#44582c,drawgrid=width=iw/10:height=ih/5:color=#9cf42f@0.1[bg]; \ [bg][fg]overlay=format=rgb,crop=600:40:0:80" -frames:v 1 output-cropped.png


0

This repo gives you the package: sudo add-apt-repository ppa:mc3man/trusty-media then sudo apt-get update sudo apt-get install ffmpeg


1

There are several ways to do this. hstack & vstack This method uses hstack to horizontally stack video1 and video2, then vstack to vertically stack video0 on top of them. ffmpeg -i video0 -i video1 -i video2 -filter_complex \ "[1:v][2:v]hstack[bottom];[0:v][bottom]vstack" output If you need to scale to match sizes If you need to scale any of the ...


0

Create a mosaic out of several input videos https://trac.ffmpeg.org/wiki/Create%20a%20mosaic%20out%20of%20several%20input%20videos


0

For Windows users that want a batch file. gifenc.bat: set start_time=5 set duration=60 set palette="c:\temp\palette.png" set filters="fps=15,scale=-1:-1:flags=lanczos" ffmpeg -v warning -ss %start_time% -t %duration% -i %1 -vf "%filters%,palettegen" -y %palette% ffmpeg -v warning -ss %start_time% -t %duration% -i %1 -i %palette% -lavfi "%filters% [x]; [x][...


1

You can use null muxer to test it. As stated in Null - FFmpeg The null muxer does not generate any output file. It is mainly useful for testing or benchmarking purposes. This page provides a command line to check this out: To test decoding and demuxing (using null muxer): ffmpeg -i input -f null - If your video is too short, you can try ...


0

No libx264 support You're attempting to use the encoder libx264 but your ffmpeg was not configured to support this encoder. Your configure line is blank, but it requires --enable-libx264 & --enable-gpl to use libx264. The easiest way to fix this is to download a static build of ffmpeg: it will support libx264. No "loss of quality" Filtering requires ...


1

Let's assign the relative time of the start of the first audio as t=0. So, if the first audio recording started at 16:59:23 and the third recording started at 17:14:13, then the third's relative start time is 14:50. With that in mind, the basic command structure is ffmpeg -i first.mka -i second.mka -i third.mka -i fourth.mka -filter_complex ...


1

.aac is a raw AAC bitstream and holds no metadata. Output to .m4a or maybe even .mp4.


0

Use the command below. ffmpeg -i in.mp4 -i image.png \ -af "pan=stereo|c0<c0+c2|c1<c1+c3,aeval=val(0)|val(1),volume=1.6" \ -filter_complex "[1]geq=r='r(X,Y)':a='0.5*alpha(X,Y)'[a];[0][a]overlay" out.mp4 The a='0.5*alpha(X,Y)' sets the alpha i.e. opacity. The geq filter doesn't autodetect whether the input is RGB or YUV and takes its cue from the ...


0

Yes, I get the overflow error here too. Since your blend finishes within a second, you can use the command below to avoid the error ffmpeg \ -loop 1 -t 40 -i img/01.png \ -loop 1 -t 40 -i img/02.png \ -filter_complex "\ [0:v]trim=duration=1[a]; \ [1:v][a]blend=all_expr='A*(if(gte(T,0.9),1,T/0.9))+B*(1-(if(gte(T,0.9),1,T/0.9)))':shortest=1[b1v]; \ [0:v][b1v][...


1

Use this instead, ffmpeg -i input.mov -vf alphaextract,format=yuv420p output.mov


0

You're using a filter, and filtering requires re-encoding, so you can't use -vcodec copy to stream copy the video. If you want the "same quality" then you'll need to use a lossless encoder: ffmpeg -i video.mp4 -i image.png -filter_complex overlay -c:v libx264 -crf 0 -c:a copy -movflags +faststart output.mp4 The resulting file may be huge: this is ...


0

I found an answer which worked perfectly for me, and the quality is almost intact: ffmpeg -i input_320x240.avi -vf crop=<w>:<h>:<x>:<y> output_300x220.avi w = Output width h = Output height x = X co-ordinate of output image in the input image y = Y co-ordinate of output image in the input image


0

Basic syntax is ffmpeg -i movie -loop 1 -i watermark \ -filter_complex "[0][1]overlay=x:y:enable='between(t,60,90)'" \ output.mp4


1

The tile filter is when one wants to Tile several successive frames together. To stack two frames horizontally, use ffmpeg -i a.jpg -i b.jpg -filter_complex [1]scale=120:-1[b];[0][b]hstack output.jpg


0

Here's the method using current versions of FFmpeg. It relies on the concat demuxer not rescaling the PTS of inputs after the first file, but simply applying a fixed offset. Let's say you have a 30 fps stream with a timescale of 15360 (typical of FFmpeg output). That means frame 0 has PTS 0 and frame 30 has PTS 15360. This would become a 45 fps stream if we ...


0

For the scenario mentioned in the question, use ffmpeg -i audio1 -i audio2 -filter_complex \ "[0]atrim=0:10[s1]; [0]atrim=10:20,asetpts=N/SR/TB,volume=0.1[s2]; [0]atrim=20,asetpts=N/SR/TB[s3]; [1]atrim=duration=10,adelay=10000|10000[v2]; [s1][s2][s3]concat=n=3:v=0:a=1[b]; [b][v2]amix[a]" -map [a] ...


1

I just had to -c copy. Had forgotten about it: Put all your new clips in a new folder (webm as a suggestion) and inside that folder, create another folder named new and do this ffmpeg -i input.webm -c copy new\output.webm For an automated process do this: for %i in ("*.webm") do ffmpeg -i %i -c copy new\%~ni.webm This will repeat the -c copy command to ...


1

Use ffmpeg -i input.mp4 \ -filter_complex "[0]reverse[r];[0][r]concat,loop=5:250,setpts=N/25/TB" output.mp4 In loop=5:250, 5 is number of loops, 250 isframe rate x double length of clip. The setpts is applied to avoid frame drops, and the value 25 should be replaced with the framerate of the clip.


2

In your code, you didn't quote the complex filter even though it is quoted in the raw command. It should be something like: String cmd = new String("-i {filepath}{filenameRaw}.mp4 -i {filepath}{filenameRaw}.mp4 -i {filepath}{filenameRaw}.mp4 -i {filepath}{filenameRaw}.mp4 -filter_complex \"[0:v][1:v]hstack[top]; [2:v][3:v]hstack[bottom]; [top][bottom]vstack\...


1

Do this :This is for cross fade with two videos ffmpeg -i big_buck.mp4 -i big_buck.mp4 -an -filter_complex " [0:v]trim=start=0:end=4,setpts=PTS-STARTPTS[firstclip]; [1:v]trim=start=1,setpts=PTS-STARTPTS[secondclip]; [0:v]trim=start=4:end=5,setpts=PTS-STARTPTS[fadeoutsrc]; [1:v]trim=start=0:end=1,setpts=PTS-STARTPTS[fadeinsrc]; [fadeinsrc]format=...


1

The input and output pads should be clearly labelled and used. ffmpeg -ss 6 -i input.mp4 -ignore_loop 0 -i logo.gif -filter_complex \ "[0:v]crop=in_w-2*28:in_h-2*25[base];[base][1:v]overlay=15:H-h-25:shortest=1" \ -codec:v libx264 out.mp4


1

Use ffmpeg -y -i with_out_sound.mp4 -filter_complex \ "[0:v]crop=206:169:32:121,boxblur=10:enable='between(t,2,10)'[fg]; \ [0:v]crop=206:169:62:100,boxblur=10:enable='between(t,12,20)'[fg1]; \ [0:v[fg]overlay=32:121:enable='between(t,2,10)'[tmp]; \ [tmp][fg1]overlay=62:100:enable='between(t,12,20)'[tmp2]" -map [tmp2] with_blur.mp4 The result of the ...


0

Easy convert to AAC for Zeranoe Windows Builds ffmpeg -i input.mp3 -c:a aac -b:a 128k output.m4a Use "aac" instead of libfaac or libfdk_aac: https://trac.ffmpeg.org/wiki/Encode/AAC "FFmpeg can support three AAC-LC encoders (aac, libfaac, libfdk_aac) and one HE-AAC(v1/2) encoder (libfdk_aac). The licenses of libfaac and libfdk_aac are not compatible with ...


1

Use -nostdin option in ffmpeg. From FFmpeg documentation: Enable interaction on standard input. On by default unless standard input is used as an input. To explicitly disable interaction you need to specify -nostdin. Disabling interaction on standard input is useful, for example, if ffmpeg is in the background process group. Roughly the same ...


0

Use ffmpeg -y -i with_out_sound.mp4 -filter_complex \ "[0:v]boxblur=10:enable='if(between(t,2,10)+between(t,12,20),1,0)'[bg]; [0:v]crop=206:169:32:121[fg1];[0:v]crop=206:169:42:100[fg2]; [bg][fg1]overlay=32:121:enable='between(t,2,10)'[tmp]; [tmp][fg2]overlay=42:100:enable='between(t,12,20)'[tmp2]" -map [tmp2] with_blur.mp4 You can add multiple ...


0

You are probably right that ffmpeg is probably reading from your input, who knows why, so simply redirect that command to read from /dev/null, ie add to the ffmpeg line </dev/null.


1

FFmpeg is a time-based media processor and as such strives to maintain temporal relation of the input unless instructed otherwise. The framerate option for the x11grab device sets the grabbing frame rate. If there are fewer or greater frames supplied each second, then ffmpeg will duplicate or drop the difference, respectively.


0

It plays properly with OpenMPT. You have several choices of how to utilize it: The stable release on the download page is a GUI program for Windows users for playback and converting. There is a multi-platform cli tool: openmpt123 for playback and converting. Plugins are available for various players: Winamp, XMPlay, Kodi, foobar2000, Audacious, qmmp, etc. ...


1

It's been so long since it was asked that probably nobody will care, but just in case someone stumbles upon this question, it's perfectly possible (as of now, I don't know whether it was back then) to capture the screen using ffmpeg in Mac OS X using the "avfoundation" device. To get a list of available sources: ffmpeg -f avfoundation -list_devices true ...


0

Plays fine in Potplayer and AIMP. FFmpeg & VLC both use Modplug as demuxer, so the culprit here is Modplug, possibly its incomplete support for preamp. I suggest using the Convertor included with AIMP.


0

The problem is probably that you are not speeding up the audio track so the new video stays as long as the original one. Either delete the audio track with the -an option or speed it up accordingly with the ‚Äčatempo audio filter.


1

ffmpeg.exe -f concat -safe 0 -i "D:\Clips\concatepath.txt" -c copy "D:\Clips\ConcatinatedVideo.mp4" Where concatepath.txt file is containing all videos path. Here is an example file 'D:\Clips\video1.mp4' file 'D:\Clips\video2.mp4'


0

You have to specify the stream index. ffmpeg -i "a.mkv" -vf subtitles="a.mkv":si=1 -acodec copy "a.mp4" To omit the first audio stream. ffmpeg -i "a.mkv" -vf subtitles="a.mkv":si=1 -acodec copy -map 0 -map -0:a:0 "a.mp4"


0

You can try the aresample filter and the framerate option for the input. -rtbufsize 1500M -f image2pipe -framerate 25 -i pipe:.bmp \ -rtbufsize 500M -f dshow -i audio="Stereo Mix (Realtek High Defini" \ -af aresample=async=1 -c:v libx264 -r 25 -acodec pcm_s16le -ac 2 -ar 48000 C:\\test.avi


2

128 kbps is probably the default bitrate. Use ffmpeg -i input.mp3 -af "atempo=1.2" -b:a 192k output.mp3


0

The tee muxer is intended for use when you wish to encode only once and re-use the encoded packets. When your various outputs can't use the same encoding output, the tee muxer isn't of use. So, ffmpeg -fflags +genpts -i http://www.example.com/video.avi \ -map 0:v -map 0:a -c:v copy -c:a copy video.avi \ -map 0:v %06d.jpg You may want to add ...


0

Use ffmpeg -i my_movie_with_bad_volume.mp4 \ -filter_complex "[0]dynaudnorm[a]" \ -map 0:v -map "[a]" -map 0:a \ -c:v copy -c:a:1 copy output.mp4


0

Possibly phase cancellation. You duplicated the input left audio channel into the left and right channels of the output, then inverted the phase of the right channel. Your mobile may be downmixing to mono, resulting in phase cancellation, therefore resulting in no audio. This is just speculation because you did not provide much info.


2

It is now available for Jessy as a backport: https://packages.debian.org/jessie-backports/ffmpeg Add something like this to /etc/apt/sources.list (with your preferred mirror): deb http://ftp.uk.debian.org/debian jessie-backports main Then apt-get update apt-get install ffmpeg


1

It is now available for Jessy as a backport: https://packages.debian.org/jessie-backports/ffmpeg Add something like this to /etc/apt/sources.list (with your preferred mirror): deb http://ftp.uk.debian.org/debian jessie-backports main Then apt-get update apt-get install ffmpeg


1

You have to use the enable option: ffmpeg -i D:\ffmpeg\base_video.mp4 -i D:\ffmpeg\top_video.avi -filter_complex \ "[0:0][1:0]overlay=enable='between(t\,45,50)'[out]" \ -shortest -map [out] -map 0:1 \ -pix_fmt yuv420p -c:a copy -c:v libx264 -crf 18 D:\ffmpeg\final_video.mp4 To delay the start of the top video, use the setpts ...


1

You have to use the eif function ffplay -vf \ "drawtext=fontfile=/Library/Fonts/Microsoft/Arial.ttf: \ text='%{eif\:trunc(n/3600/24)\:d\:2}\:%{eif\:trunc(n/60/24)\:d\:2}\:%{eif\:trunc(mod(n*24\,60))\:d\:2}: \ box=1:x=(w-tw)/2:y=h-(2*lh)" \ video.265 This produces a HH:MM:SS output, and expects a 24 fps video stream.


1

An aggregation of Ehsan's answer with fletom's comment that works for me, thanks to both. ffmpeg -i input.avi -acodec mp3 -vcodec copy out.avi


2

This is called the vignette effect and ffmpeg has a namesake filter for it. ffmpeg -i video -vf vignette output You can adjust the falloff using the angle parameter ffmpeg -i video -vf vignette=angle=PI/4 output If you want to use an image as a mask, ffmpeg -i video -loop 1 -i image -filter_complex \ "[1][0]blend=c0_mode=multiply:shortest=1" ...


2

The standard way is ffmpeg -ss 05:22 -t 0:37 -i input.mp4 -c copy -avoid_negative_ts make_zero output.mp4 Because x265 uses temporal compression, FFmpeg may include frames before and after the cut-point, which are needed to decode the specified range. The avoid_negative_ts does some housekeeping to make sure that the output plays nice with most players. ...


1

Is there anything displayed if you run npm get prefix ? (For example's sake, I'll say "/usr/local" is returned after running the command) If anything is returned after running the above command, check what your PATH environment variable is set as by running echo $PATH (Again for example's sake, I'll say "/usr/bin:/bin:/usr/sbin:/sbin" is returned after ...


0

Use the pad filter. ffmpeg -i main.mp4 \ -vf "movie=bg.mp4,hue=s=0[bg];[in]scale=iw/2:-1,pad=iw+20:ih+20:10:10:color=yellow[m]; \ [bg][m]overlay=shortest=1:x=(W-w)/2:y=(H-h)/2[out]" -c:v libx264 completed.mkv This creates a 10-pixel yellow border around the smaller video. iw+20 and ih+20 create a padded canvas which is 20 pixels bigger ...


0

You have two possibilities: use the -t parameter to stop at the desired end point Use a concat input: A very short correct clip (e.g. 1 Frame black) and then the defective clip. With a concat input, ffmpeg will use the timestamps from the first input, then adapt the following timestamps to seamlessly append to it. You might also want to use the -c copy ...



Top 50 recent answers are included