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
0 votes
0 answers
25 views

Concat a video and an audio using ffmpeg, freezing the last video frame, without re-encoding

I'm trying to concat a video (mp4) and an audio (mp4 or aac) - both cut out using -ss and -t from the same mp4 file. I'd like to basically freeze the last frame from the video and then append the ...
0 votes
0 answers
52 views

ffmpeg - best way to zoom in/out an overlay image by its center without jerky movements

I am trying to use ffmpeg to zoom in & out an image with its center as origin & overlay the animation over a background image. Details: The background image is a 300x250 jpeg file, the button ...
0 votes
0 answers
12 views

How to play video at correct frame rate?

I have a video recorded with fps 15 and when I reply it with mplayer it is replayed way too fast (it has a timestamp in it so you can see it is at least double as fast as normal speed). Even when I ...
0 votes
0 answers
19 views

How to stack two videos with ffmpeg if they might have different size, format, framerate etc?

I have two videos in different formats, sizes, video quality, framerate etc, but I want to stack them as SIMPLE as possible. Does not need to look good, but in the final video I want to see both ...
0 votes
1 answer
436 views

How to remove video streams from .wmv with FFmpeg?

I'm working on a method to programmatically remove video and subtitle streams from video files of various formats and have been having some trouble with most .wmv files. Below is what I believe to be ...
0 votes
1 answer
24 views

Slideshow mp4 from jpg files with ffmpeg

Have an command to make slideshow mp4 from *.jpg files: ffmpeg -r 1/3 -f concat -safe 0 -i <(ls -v *.jpg | sed "s|^|file '$PWD/|") -vf "scale='min(1920,iw)':min'(1080,ih)':...
0 votes
2 answers
937 views

libx264 for ffmpeg on linux

I am running ffmpeg on ubuntu. I tried to set the codec to libx264 but it was not recognised by ffmmpeg. Is there a way too install that codec for use by ffmpeg?
1 vote
1 answer
376 views

ffmpeg: How to avoid "start: 0.033333" when extraction audio from mp4

When extracting audio and video separately from a mp4 and recombining again ffmpeg -accurate_seek -ss 30 -t 10 -i input.mp4 -vn output-audio.mp4 ffmpeg -accurate_seek -ss 30 -t 10 -i input.mp4 -an ...
1 vote
1 answer
317 views

FFmpeg afade produces horrible audio quality

I'm trying to add a video and audio fade in and fade out to my video using the fade and afade filters. I'm using the following command: ffmpeg -i trimmed.mp4 -vf 'fade=in:0:60,fade=out:2940:300' -af '...
0 votes
1 answer
9k views

"Non-monotonous DTS in output stream 0:0 This may result in incorrect timestamps in the output file." error

Adding all mp4 file in the directory with FFMPEG . my usual command: ffmpeg -f concat -safe 0 -i <(for f in ./*.mp4; do echo "file '$PWD/$f'"; done) -c copy output.mp4 This shows below ...
0 votes
1 answer
266 views

Comparing FFprobe to Wave Agent Beta

Wav Agent outputs the following when I drag the same file in, so the data has to be in the file somewhere, and I just don't know how to look for it: WavAgent: StartTC: 13:09:21:18 Now, FFmpeg with ...
0 votes
1 answer
89 views

Final Cut Pro X won't accept similar files

I have two files that I want to import into Final Cut Pro X. They are both clips pulled from the same source file using the same commands. I am using a generated script to extract dozens of clips at a ...
0 votes
1 answer
1k views

ffmpeg: How to burn in the timecode from a stream's metadata

I have a timelapse video from a GoPro and want to overlay the time of the recording on the current frame. For instance, a frame taken at 9am might show 09:00. It seems like the drawtext filter is the ...
0 votes
1 answer
872 views

video overlay on another video with rounded corner, transparency, opacity, scaling, and border all together with FFMPEG in PHP

I am trying to change a video with Rotation, rounded corner, transparent, scaling, and border all with together and overlay on a video; I am trying to do this with FFMPEG in PHP but getting issue in ...
0 votes
0 answers
23 views

How to inject video into a live stream?

When you have two or more live streams, and you want the ability to toggle between the two, such as switching to camera 2's feed on the main screen, how do you do that and what do you need to ...
0 votes
1 answer
14 views

ffmpeg make 1s of 240fps video from 4s of 60fps?

How can I use ffmpeg to create 1 second of 240fps from every 4 seconds of 60fps video? I see only seen questions asking for the opposite. Background Our drone is only able to capture 60fps, but if we ...
2 votes
3 answers
7k views

ffmpeg : Copy all the streams (including cover art) except the first video stream from one MP4 file to another

I want to copy all the streams (including cover art) except the first video stream from one MP4 file to another, here is what I do : $ time ffmpeg -hide_banner -i toto1.mp4 -map 0 -vn -c:v:1 copy -c ...
1 vote
1 answer
32 views

Is there a way to split up an AVCHD file into smaller files (Sony HXR-NX5R)

From an all day event shoot, I have a 13 hour file recorded on a Sony HXR-NX5R camera. Catalyst Browse transferred the 160GB file OK, Premiere imported the file (but choked for quite a while doing so),...
0 votes
1 answer
187 views

How do you convert an mxf file to wav using ffmpeg?

I am using a Mac, I've run this: ffmpeg -i source.mxf -map_channel 0.1.0 -map_channel 0.1.1 \ -af 'volume=volume=6dB:precision=fixed' target.wav but I keep getting 'no such file or directory' ...
1 vote
1 answer
2k views

FFmpeg hardcoded subtitles revert to default font if subtitle is html

Here's how I'm using ffmpeg to hardcode the subtitles: ffmpeg -i tmp/input.mp4 -vf "subtitles=tmp/input.mp4:force_style='OutlineColour=&H80000000,BorderStyle=3,Outline=1,Shadow=0,MarginV=20,...
0 votes
1 answer
377 views

Extreme video stabilization in Linux, again

I have a 3840x2160 MOV file taken with my EM1.II Olympus camera. It is a videoclip of a tiny bird taken in the wild without any aids. Hence, despite the good stabilization feature of the camera, the ...
0 votes
1 answer
136 views

How to ffmpeg encode a video with audio properly synced in Adobe Premiere and Resolve?

I'm trying to use ffmpeg to encode a series of rendered images with a soundtrack. When we import that video into Premiere the audio seems to be 1/2 frame early. When we import that same video in ...
2 votes
1 answer
279 views

How can I programatically identify video frames containing a fixed rectangular area of a certain color?

I have video material containing frames with a rectangular area of uniform color interspersed with other content. I would like to identify these frames, with the intent of removing them. The ...
0 votes
0 answers
15 views

How to turn-off Anti-aliasing when convert video into gif file with ffmpeg

I want to know how can i turn off Anti-aliasing when i convert video into gif file with ffmpeg, Actually i want ouput in 100% pure aliased gif animation. like this sample image Here i try this but ...
5 votes
1 answer
2k views

Largest input image size when encoding a video?

I got a bunch of really large 16 bit videos, approaching 65535×65535 pixels in size. These are essentially high quality timelapse panoramas. I want to convert them to a 7680×4320 movie (8K UHD, 8 bit)....
0 votes
1 answer
1k views

ffmpeg conversion - vp8 with alpha

I'm trying to convert a mov file (with alpha channel) to webm, vp8 with alpha, on windows. ffmpeg -i C0016.mov -s 960x540 -vcodec vp8 -pix_fmt yuva420p -metadata:s:v:0 alpha_mode="1" ...
0 votes
2 answers
9k views

How to add correctly ssa/ass subtitles to video with ffmpeg or VLC

I want to add ssa subtitles to video. I've tried with VLC. If I play the video and add subtitles file VLC shows correctly the ssa subtitles but if I convert/save the same video adding the subtitles ...
0 votes
1 answer
707 views

Combine mp4 video and a RTMP stream into 1 RTMP output stream via ffmpeg

I need a ffmpeg command to first feed a mp4 video into a RTMP output stream, then followed by a RTMP input subsequently; what should be the parameters to get it working?
0 votes
1 answer
430 views

ffmpeg mov_text subtitle too small when converting mkv to mp4

I want to remux a mkv file into mp4. I used the following command. ffmpeg -i "input.mkv" -c:v copy -c:a copy -map 0:0 -map 0:1 -map 0:2 -map 0:3 -c:s mov_text "output.mp4" Problem:...
0 votes
1 answer
36 views

Replicate the behavior of -r option before applying filters

When converting the framerate of a video, ffmpeg offers multiple options one options is -r: ffmpeg -i myvideo.mp4 -r 10 my10fpsvideo.mp4 another option is using filters: ffmpeg -i myvideo.mp4 -...
0 votes
1 answer
884 views

Seeking in large HLS input on ffmepg

I'm trying to create an mp4 clip from an HLS input stream that is over 36 hours long. My ffmpeg command looks more or less like this: ffmpeg -live_start_index 0 -ss 32:22:19.82667 -i https://example....
1 vote
1 answer
158 views

ffmpeg: Changes to FPS only work if I don't include audio in the export, how can I keep audio and choose the FPS value?

How can I export a video to .mjpeg at my selected FPS value (7 FPS for stop motion video) while including audio in the export? I use the -i input command in ffmpeg to include my .ogg audio file: ...
0 votes
0 answers
18 views

Why does setting the bitrate with ffmpeg has no affect on the filesize?

I am trying to lower the bitrate of a video using ffmpeg to 1000 bits/s and 500 bits/s using the commands ffmpeg -i __temp__.mp4 -vf "scale=-2:360" -b:v 1000 out_1000.ts ffmpeg -i __temp__....
0 votes
0 answers
16 views

verify lossless in H.264

i've transcoded an interlaced JPEG2000 video file to H.264 using ffmpeg. following the guidelines, i constructed the following command line: ffmpeg -hide_banner -i $input \ -vf tinterlace=0 \ ...
38 votes
2 answers
259k views

How do I set up and use FFmpeg in Windows?

I understand that FFmpeg is a powerful tool for video file conversions. I see online in many places people suggesting it for solutions or getting help in how to use it. The problem is, I don't even ...
0 votes
1 answer
66 views

ffmpeg - overlay position at the end of the video is wrong

I am trying to move a shape (an image) over a background image to each corner. Here is the video example I generated with ffmpeg. As you can see from the example, at the end of the video the shape is ...
1 vote
0 answers
53 views

FFMPEG - Partial fade effects

I'm having difficulty achieving the desired fading effect for the logo in my video using ffmpeg. I would like to make a 3-second video (here is an example) with: A background image (300x350 jpeg file)...
0 votes
2 answers
3k views

Injecting/embedding/adding/writing metadata to a .mp4 file so it's recognised as 360

I'm working on a library that injects/embeds/writes metadata into a .mp4 file to allow the video to be displayed correctly as a 360 video. The input file is a standard .mp4 file in the equirectangular ...
0 votes
2 answers
477 views

lossless frame extraction from video

I have an mp4 video file with these characteristics: -Encoder: Lavf58.29.100 I want to extract each frame as an image, with the following requirements: one image file is one frame (i.e., account for ...
2 votes
1 answer
2k views

In FFMPEG's H.265 encoder, which CRF value leads to "visually lossless" results?

I am trying to shrink some videos from 1920x1080 to 1280x720 and to achieve a reasonable compromise between video quality and file size. I have decided to give FFMPEG's H.265 encoder a try, and now ...
0 votes
1 answer
171 views

Using ffmpeg audio filter loop instead of stream_loop as stream_loop adds a delay

I want to loop an audio file infinitely. The -stream_loop -1 option adds a small pause / jerk between the loops, as also mentioned in this question with no solution. The same question mentions that ...
1 vote
1 answer
504 views

(ffmpeg - Audio) Two streams, One Channel, Two Languages

I need your help with a command line for ffmpeg that I just started to use. Here's the deal : I have a .MOV file witch contains 18 audio streams (for 7.1). Stream 1 to 10 is for original language ...
0 votes
1 answer
717 views

FFmpeg combine Stream Loop and Filter into one command

I'm currently running two FFmpeg commends: [1] Looping a video for the entire duration of an audio file. ffmpeg -stream_loop -1 -i 1min-loop.mp4 -i 2min-song.mp3 -shortest -map 0:v:0 -map 1:a:0 -y ...
0 votes
1 answer
667 views

How to merge 4 Audio and 1 Video .MXF files in to one h.264 video file on Linux using ffmpeg?

On a recent video shoot, the camera man gave us output as .MXF files. Incidentally, Audio and Video are saved in separate .mxf files. eg: 0007WA00.MXF - Audio (probe) 0007WA01.MXF - Audio (probe) ...
0 votes
1 answer
2k views

How to turn video with spherical, equirectangular projection into an actual "360° video" playable with VLC?

I have a video (MP4/AVC) that is in 2:1 aspect ratio and uses equirectangular projection for a spherical video (often called "360° video"). VLC can play spherical videos since version 3.0.0. ...
1 vote
1 answer
720 views

ffmpeg 4.2.3 freezes in encoding which is extremely slow

I tried to encode some video files, from GOPRO action camera. The whole fuzz is about two specific video files that the video orientation is 180 degree. Therefore, I thought to implement complex ...
0 votes
0 answers
31 views

variable timestamps for audio samples in MP4

Consider the following ffprobe output for a MP4 file. This is an extraction of first 10 frames in the audio stream and its metadata. The audio stream has a sampling rate of 48000, and is encoded with ...
0 votes
1 answer
89 views

restreaming rtsp using ffmpeg delay problem

I have ip and usb cameras. I try restream rtsp from camera using ffmpeg and mediamtx (rtsp simple server). For usb camera it works fine without any delay: mediamtx output: anton@anton:~$ ...
0 votes
0 answers
10 views

Best ffmpeg compression settings for fast seeking of long 4 hour clip

I've got a low-resolution 4 hour clip, and need to do a lot of seeking in the video to write down when stuff happens. Do you have any suggestions for what format/settings would be the most "seek-...
1 vote
1 answer
29 views

Why does VMAF show lower then 100 on same image?

I'm testing ways to compare image similarity using ffmpeg. I'm looking at using SSIM, PSNR and VMAF. For reference, I'm running the comparison with duplicated sources and expect a score of 100%. ...

1
2
3 4 5
43