Questions tagged [ffmpeg]

FFmpeg is a free software project that produces libraries and programs for handling multimedia data. The most notable parts of FFmpeg are libavcodec, an audio/video codec library used by several other projects, libavformat, an audio/video container mux and demux library, and the ffmpeg command line program for transcoding multimedia files.

Filter by
Sorted by
Tagged with
6 votes
2 answers
2k views

FFmpeg graph2dot tool

In FFmpeg Filters Documentation is the section 3 graph2dot is this about graph2dot program: The graph2dot program included in the FFmpeg tools directory can be used to parse a filtergraph ...
MarianD's user avatar
  • 1,494
6 votes
1 answer
9k views

ffmpeg concat introduces a/v sync problem

I have one 2-hour video file and want to add a 10-second title sequence to its start. The long file has perfect a/v sync from start to finish. However, when I use ffmpeg -f concat -i mylist.txt -c ...
trinkner's user avatar
  • 163
6 votes
1 answer
13k views

How do i put the image behind video by using FFmpeg?

I have one video (400x300) and an image (1280x300). pls show me how can i put this image behind the video like that: i've try, but not working T-T
OYAKHILOME JOSHUA's user avatar
6 votes
2 answers
8k views

ffmpeg "Stream specifier matches no streams", but it exists

In ffmpeg, I have the following filter_complex: color=c=Chartreuse:s=1920x1080:d=8640.059,setpts=PTS-STARTPTS[t]; [1:v] trim=start=114.149:end=124.149,setpts=PTS-STARTPTS [v0]; [t][v0]overlay=0:0:...
Simon Labrecque's user avatar
6 votes
1 answer
9k views

ffmpeg: how to convert to DNxHR in Windows 10?

I have installed ffmpeg version 3.2.2 from the ffmpeg.org download page. When I enter ffmpeg formats, I see dnxhd but not dnxhr. What do I need to do to be able to manipulate dnxhr? I have ...
Patrick Kenny's user avatar
6 votes
4 answers
25k views

Batch conversion into a new folder with ffmpeg

I'm trying to batch encode 45 video files, and copy the encoded files into an existing subfolder called "encode" I've used the suggested code from this question (https://stackoverflow.com/questions/...
d13's user avatar
  • 671
6 votes
2 answers
3k views

restart ffmpeg job from failure

Is there a common technique or some sort of strategy for restarting a failed transcoding job from where it had left off when it crashed (or stopped for whatever reason)? For example, if I have a 2 ...
tonyl7126's user avatar
  • 181
6 votes
2 answers
27k views

ffmpeg thread_queue_size warning: What does this mean?

*Edit: changing the render to -preset veryfast will no longer display the warning message. I also noticed that the video itself for the versions where the warning displayed had the last few minutes ...
kite's user avatar
  • 513
6 votes
1 answer
21k views

How to precisely trim video with ffmpeg? -ss and -t are off by more than a half second

To put this plainly, -ss and -t don't work very well or even consistently. I'm trying to take a single input file1 and only encode from a certain start point, -ss, and for only a certain time, -t. I'...
user3643's user avatar
  • 2,164
6 votes
1 answer
11k views

FFMPEG output is blocky

I'm attempting to extract the individual frames from a raw AVC video stream. I'm doing this via the following ffmpeg command: ffmpeg -q 1 -i video_test.avc -f image2 frames/frames_%04d.jpg The ...
CadentOrange's user avatar
6 votes
1 answer
16k views

How to decode the PTS timestamps and extract the video frames

I want to extract the video frames and get the PTS timestamp for each one of them. I have an input MPEG-2 TS file and I prefer to use some open source tool like ffmpeg or something similar. The ...
Georgi Stoyanov's user avatar
6 votes
2 answers
7k views

How to combine ffmpeg vf commands for resizing and color correction?

I'm currently using the following batch script to run an ffmpeg command: @echo off title Convert videos to Mp4 h.264 with FFMPEG. echo This script will find all video files of a given extension then ...
user3643's user avatar
  • 2,164
6 votes
1 answer
5k views

Finding the place where a video loops

I got a video of a fireplace, the video is 3 hours long. I can see that it is looping as the logs keep burning forever. My guess is that it is looping in the region of 5-15minutes. Is there some ...
Zalon's user avatar
  • 63
6 votes
1 answer
6k views

Finding frames in video that match an image

I'm trying to find frames in a video that match a certain input image. I'm currently using this command: ffmpeg.exe -i video.mp4 -loop 1 -i image.jpg -an -filter_complex "blend=difference,blackframe=...
ilitirit's user avatar
  • 165
6 votes
1 answer
23k views

green screen to transparent with ffmpeg

ffmpeg does a very good job of getting rid of a green screen, with a command like this: ffmpeg -f lavfi -i color=c=black:s=606x1080 -i input.mp4 -filter_complex "[1:v]...
Bob Woodley's user avatar
6 votes
1 answer
5k views

ffmpeg: can I crop using vf while also using filter_complex at the same time?

I have an ffmpeg command using -vf to square crop a video: ffmpeg -i input.mp4 -vf \ "crop='if(gte(iw,ih),ih,iw):if(gte(ih,iw),iw,ih)', scale=720x720" \ -an -c:v libx264 -profile:v high -level 4.1 \ -...
awidgery's user avatar
  • 217
6 votes
1 answer
4k views

Merge two transparent webm videos with FFmpeg

I'm trying to merge two transparent webm videos together while keeping their transparency using ffmpeg. Main video: https://s3.amazonaws.com/medlike/logo.webm Overlay video: https://s3.amazonaws....
DaviBenNun's user avatar
6 votes
1 answer
2k views

How do I speedup encoding of a video that has just 1 static frame with ffmpeg and lib264 library?

I'm making mp4 (libx264 + aac) videos that have just one static image throughout the whole video. It's basically a narrated text with a nice background. The question I've is how could I speed up ...
bodacydo's user avatar
  • 271
6 votes
0 answers
3k views

CRF for 'visually lossless' for libx265 [duplicate]

The ffmpeg wiki page for H.264 states that: Consider 18 (CRF) to be visually lossless or nearly so: it should look the same or nearly the same as the input but it isn't technically lossless. ...
R4D4's user avatar
  • 161
6 votes
1 answer
969 views

Trying to sync audio in mpeg2 video whose video freezes first 8 seconds in playback

So I have a handful of old mpeg2 (.mpg) files with the following profiles as provided by ffmpeg (the timecodes on each are different): Stream #0:0(eng): Video: mpeg4 (Advanced Simple Profile) (mp4v / ...
roy's user avatar
  • 163
5 votes
3 answers
18k views

Concat two video files with fade effect using FFmpeg

Is there any way to concat two video files with a fading effect using FFmpeg? Something like this: ffmpeg -f concat -i input.txt -c copy "--with:fade:out-in" output.ogg
mlibre's user avatar
  • 153
5 votes
1 answer
46k views

RTMP server using ffmpeg

I'd like to use a Teradek Cube connected to a broadcast camera to push to a server running ffmpeg with an open RTMP port, and have ffmpeg re-stream that feed to a decoder using RTMP or RTSP. ...
WarmTaunTaun's user avatar
5 votes
2 answers
25k views

ffmpeg - video conversion with multiple audio tracks

I am converting an mkv h.264 video to HEVC. The file has two audio tracks. How can I copy all audio tracks? I used this command (from a .bat file): ffmpeg -i "!original!" -c:v libx265 -preset medium ...
koca2000's user avatar
5 votes
2 answers
10k views

Use ffmpeg to create a video from a few images

I trying to create a video using FFmpeg from a few images. I tried several ffmpeg commands but I can't repeat each image for several frames, instead, each image is one frame size and the video result ...
Aracem's user avatar
  • 155
5 votes
3 answers
6k views

FFMPEG slow / fast motion part a video anywhere

am trying to cut a part of Video Here is the code i have tried Let's say i have 6 seconds video and i want to slow down 2:5 seconds video that 3 second video First approach after searching is, Cut ...
Muhammad Umar's user avatar
5 votes
1 answer
9k views

ffmpeg - video with timer

I am currently working with the drawtext and drawbox filters to recreate a similar video appearance to what is shown below in the image. I am trying to see of a possible ways to add a count down timer ...
Code_Ed_Student's user avatar
5 votes
1 answer
10k views

Realtime time overlay with ffmpeg

I'm using the following ffmpeg command to create an H.264 encoded MPEG transport stream from a single png file with a text overlay. ffmpeg -re -loop 1 -i smpte-color-bars-1080p.png -vf drawtext="...
Fat Monk's user avatar
  • 265
5 votes
1 answer
14k views

Changing the input frame rate of a series of images in FFmpeg

I am attempting to animate a series of PNG images at 30 frames per second (and add an audio track) with FFmpeg. On the command line, I specify the input and output frame rates as 30 fps. ffmpeg....
Oddthinking's user avatar
5 votes
1 answer
2k views

FFmpeg read, ignoring remaining -vf options: Use ',' to separate filters

Getting error "read, ignoring remaining -vf options: Use ',' to separate filters" My code: ffmpeg -i "/root/nisar/a.mp4" \ -map 0:0 -map 0:0 -map 0:0 -map 0:0 -map 0:0 -map 0:1 \ -c:v:0 libx264 -b:...
Nisarbabu's user avatar
5 votes
2 answers
4k views

How to extract each video scene with FFmpeg

I'm trying to detect scenes and save them as individual files with FFmpeg. I found this long command somewhere, but it fails with a good detection. I change the scenecut value, but I don't see any ...
Tina J's user avatar
  • 353
5 votes
3 answers
10k views

Configure CQP (CRF) for h264_nvenc

Encoding on CPU can be done via: ffmpeg -i input.mp4 -vcodec h264 -crf 23 -acodec copy h264.mp4 GPU's alternative for the codec is h264_nvenc. How can I pass the same options to it? I googled and ...
Qwertiy's user avatar
  • 193
5 votes
1 answer
13k views

Container format requires global headers

Using this FFmpeg: ffmpeg-20160127-git-9079e99 With this file, if I run this command: ffmpeg -i Miaow-02-Hidden.m4a -c copy outfile.m4a I get this message: [ipod @ 0000000000694500] Codec for ...
Zombo's user avatar
  • 1
5 votes
1 answer
9k views

ffmpeg transcoding H264 interlaced and keep interlacing via H264_NVENC codec

I have the following interlaced H264 file: Stream #0:0[0x335]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first), 720x576 [SAR 16:11 DAR 20:11], 25 fps, 50 tbr, 90k ...
Ivan Kolesnikov's user avatar
5 votes
1 answer
4k views

ffmpeg - resize and crop

I want to know how to use the scale filter to take an image that is 2154x1136 and scale it down exactly 89.04% such that the image sits in a 1920x1080 frame, with full image left and right and black ...
pirxx's user avatar
  • 51
5 votes
1 answer
605 views

Adding audio to picture: video too long even when using -shortest

I am trying to combine an audio (.wav) file and picture file (.png) into a video file. The video's length should be the same length as the input audio. Also, the output video should be youtube-...
Pixelchai's user avatar
  • 151
5 votes
1 answer
10k views

ffmpeg hardcoded subtitles from the top, bigger, with thicker stroke, on a dark background

I found this page (I can't comment or answer there so here's a new question): Render srt subtitles to video? with this line which works fine: ffmpeg -i input.mp4 -filter:v subtitles=subtitle.srt -c:...
JazzTp's user avatar
  • 51
5 votes
2 answers
4k views

How match this broadcast standards with Premiere and ffmpeg

I have to export an MXF file for a program that have certain limitations: Conform to SMPTE 274M, “1920 x 1080 Scanning with no visible video impairment such as blocking errors or pixelization ...
user3450548's user avatar
  • 1,616
5 votes
1 answer
2k views

ffmpeg flash frames last still image in concat sequence

I want to concat several pictures into a video. Each picture must have its own duration. I use the most recent windows build for ffmpeg (20170204) and the guide from http://trac.ffmpeg.org/wiki/...
gisly's user avatar
  • 153
5 votes
2 answers
10k views

NVENC_HEVC Encoding making my files larger

I got a new Nvidia GPU to speed up my video encoding. I am working with x264 files to x265 and wanted to go faster. Using the library libx265 I am getting about 85fps when working on a file that is ...
Alan's user avatar
  • 191
5 votes
3 answers
10k views

FFMpeg concat demuxer corrupted output (freezed video on some concatenated parts)

I have big videos with different types of properties and trying to collect some part of these videos by ffmpeg. I use this command to cut specific parts: scale video >> scale png >> pad ...
Eftekhari's user avatar
  • 151
5 votes
1 answer
346 views

Top and tail GoPro video based on volume

I'm thinking of using ffmpeg to automate a simple video task. I have lots of action videos that go like this, quiet/boring -> loud/exciting -> quiet/boring. Allowing for a few seconds at the start ...
Spud's user avatar
  • 51
5 votes
2 answers
7k views

ffmpeg: white padding is light grey but not white

I want to generate 16:9 thumbnails from videos with white padding but the resulting picture has grey padding instead of white. This is the command line (input here is a jpg but the effect is the same ...
Sebastian Annies's user avatar
5 votes
1 answer
8k views

Is it safe to use the yuva420 pix_format option with ffmpeg to encode webm videos?

I am encoding png image sequences to both webm and mp4 formats using ffmpeg. My goal is to achieve perceptually lossless videos, with the smallest file size I can reasonably achieve. The webm videos ...
Framerate's user avatar
5 votes
1 answer
6k views

How to concatenate multiple videos with fades (from- and to-black) in-between?

I recently had the following problem: I wanted, using ffmpeg, to concatenate several videos (with audio), adding black clips (with null audio) between them , and lastly fade the videos from those ...
TedGrassman's user avatar
5 votes
3 answers
9k views

ffmpeg Cut a media preserving all streams but also all metadata, timecodes and everything else

Today I wanted to obtain a ts file cut preserving everything, so I tried with this command: ffmpeg -i "original.ts" -map 0 -c copy -t 00:30:0.0 -threads 1 "cutted.ts" The resulting file have ...
user3450548's user avatar
  • 1,616
5 votes
3 answers
3k views

creating a lossless mp4 screencast

I'm trying to create a screencast for playback on the web. Would like to use h.264, webm, and ogg. The source files are in the Apple Animation codec, and they look perfectly accurate. However when I ...
ben's user avatar
  • 51
5 votes
2 answers
3k views

How can I make a slideshow with ffmpeg?

I have a certain number of pictures that I want to repeat until the melody ends. The problem is that when I make settings it does not work. the process goes on forever ffmpeg -pattern_type glob -...
Иван Иванов's user avatar
5 votes
1 answer
6k views

How should I encode my 4K video stream?

I'm capturing uncompressed 4K video from my Sony A7R II via a video capture device, and am using ffmpeg to save the video. My problem is I don't know what codec to use. The two options I tried are: ...
Dmitri Nesteruk's user avatar
5 votes
1 answer
6k views

ffmpeg drawtext text parameter expressions

I am trying to write text on a video in such a way that the text "writes itself" - letter by letter. To do this I was able to do something like this: -vf "[in]drawtext=text='a':fontfile='/Windows/...
eof's user avatar
  • 83
5 votes
3 answers
2k views

Converting GIMP curves files to Photoshop (.acv) for ffmpeg

I've seen a number of scripts for converting Photoshop .asv .acv files to a GIMP friendly format. Does anyone know if such a tool exists to do the opposite, i.e. converting a GIMP curve file to .asv ....
moorej's user avatar
  • 273

1 2
3
4 5
43