Hot answers tagged

4

Use ffmpeg -i file1.avi -i file2.avi -filter_complex "[0][1]vstack" -t 10 joined.avi This will stack the videos vertically and play the first 10 seconds of each. Remove the -t option if the videos are longer and you wish to extend the output. This command also uses the default parameters to encode the video i.e. codec will be MPEG4 Part 2 (Xvid..). If ...


3

You can use ffmpeg, a free command-line tool, to do this. The basic command is ffmpeg -i input.mov -vf "setpts=(PTS-STARTPTS)/30" -crf 18 output.mov The 30 indicates the factor by which the video will be sped up.


3

Use [0:v]scale='if(gt(a,4/3),-1,320)':'if(gt(a,4/3),240,-1)',setsar=1,crop=320:240[v0c] The scale filter expressions for x and y check the aspect ratio of the input and if greater than 4:3, set the value to the 2nd argument, and if not, to the third argument. The -1 means that the original aspect ratio should be preserved e.g. scale=-1:400 applied to a ...


3

Your audio is PCM, but you're trying to streamcopy to AAC, which won't work. To extract the audio to WAV, use ffmpeg -i DSCN5008.AVI -acodec copy -y a.wav To transcode the audio to AAC, use ffmpeg -i DSCN5008.AVI -acodec aac -y a.aac Note that AAC isn't lossless. But FLAC is a lossless and compressed codec. ffmpeg -i DSCN5008.AVI -acodec flac -y ...


3

Short answer is No. Longer answer is, it depends. If you're encoding a file, then generally the output is the duration of the input, unless there's speed change or trim filters or -ss, -to, -t options applied. For a live input, FFmpeg will stop the encode when it encounters EOF on the input, so unless you know that, you won't know the output duration. For ...


2

Private options are switches/flags only applicable to specific encoders or decoders, and ignored by anything else. To see the available private options for an encoder, use avconv -h encoder=name e.g. avconv -h encoder=flv For LibAV, these are the private options available for the MPEG-1 & 2 encoders. { "mpv_flags", "Flags common for all ...


2

It's possible. Use ffmpeg -loop 1 -i image.png -f lavfi -t 5 -i anullsrc -i video.mp4 -i music.wav \ -filter_complex "[0]trim=duration=5,fps=N[pre];[3]showwaves=WxH:r=N[b]; \ [b][0]overlay=shortest=1[post]; \ [pre][1:a][2:v][2:a][post][3]concat=n=3:v=1:a=1[v][a]" \ -map [v] -map [a] out.mp4 The image and video have to be ...


2

MKV does not store a frame rate in its container. So ffmpeg/vlc looks at the default duration of a frame instead. It sees 33.333ms and does the math, which is where your weird number comes from. Source: https://github.com/mbunkus/mkvtoolnix/wiki/Wrong-frame-rate-displayed To test this out, you can run ffprobe with -show_frames. I think you'll find the ...


2

Using ffmpeg, ffmpeg -i video.avi -vf field=top top%d.png and ffmpeg -i video.avi -vf field=bottom bottom%d.png


2

First, setup a color filter of the same height, and then add it to the hstack -filter_complex "color=black:5x240[c];[v1][c][v2]hstack=inputs=3:shortest=1[videoout]" See the options for the color filter here. Alternate method is -filter_complex "[0]pad=iw+5:ih:color=black[0v];[0v][v2]hstack[videoout]"


2

Use ffmpeg -i video.mp4 -filter_complex \ "[0]scale=iw*sar:ih,setsar=1,scale=-1:960,crop=960:960,split[left][right]; \ [left][right]hstack[sbs]" -map "[sbs]" -map 0:a? out.mp4


2

It's rather a powershell-specific question than FFmpeg, but here you go: ffmpeg -i <input> <some_encoding_options> -f mp4 "my_filename_"$(get-date).ToString("yyyy-MM-dd_HH-mm")".mp4" Change the parameter of ToString to whatever you want, you can find more info about PS date formatting syntax here. A little cheatsheet (all of these have ...


1

Streaming formats maintain timestamps for each frame, whether audio or video, which govern when the player ought to present them. Those non-zero big start times usually occur when a snippet is cut out from a longer video and the tool used does not reset the timestamps. Although if this FLV was recorded on its own, then it's strange. In any case, running the ...


1

Using the mask image below, you can use ffmpeg to crop and output a MP4 with the visual content bounded in the same elliptical shape as the mask ffmpeg -i input.mp4 -loop 1 -i 360mask.png \ -filter_complex "[0]split[a][b]; \ [a]crop=iw/2:1522:0:300,crop=iw*0.8:ih*0.8,scale=960:-1,pad=960:960:0:150[l]; \ ...


1

Use -vf loop=parameters filter, see fine documentation. Note that this currently will put all video frames in memory.


1

Use ffmpeg -re -stream_loop -1 -i file.flv -c copy -f flv rtmp://x.y.z This option is buggy when the input it is applied to is filtered with another input, like in an overlay. For a single input - output chain, it works fine.


1

As mentioned by @Mulvya, I think the issue is the "slow" preset. One option is encoding a compressed stream that is also lossless. For example, the x264 encoder can do this using "-preset ultrafast -qp 0". This will probably result in failing your 3rd requirement (compatibility), but since it's lossless, you can transcode later onto cheap spinning disks. ...



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