All Questions
Tagged with ffmpeg compression
80
questions
69
votes
3
answers
73k
views
Why does preset "veryfast" in FFmpeg generate the most compressed file compared to all other presets?
The FFmpeg wiki says that the best compression rate is by preset "veryslow".
But when I am trying it with my video then preset veryfast provides the best compression in my case.
The following is the ...
28
votes
3
answers
49k
views
FFMPEG / libx264: How to specify a variable frame rate but with a maximum?
Instead of providing a fixed frame rate to FFMPEG/libx264 (-r/-framerate), I would like to specify a variable frame rate with a MAXIMUM value, and allow libx264 to down the frame rate as it sees fit. ...
17
votes
4
answers
15k
views
Can compressed videos be decoded back to their uncompresed original format?
The following is mentioned in the ffmpeg documentation.
ffmpeg calls the libavformat library (containing demuxers) to read
input files and get packets containing encoded data from them...
...
17
votes
1
answer
26k
views
Producing lossless video from set of .png images using ffmpeg
I have a set of .png images that I would like to animate into a movie using ffmpeg on macOS, but when I look at the video produced the quality is always compressed and the resulting video has ...
12
votes
1
answer
5k
views
Using a lossless video codec for archiving (monochrome) scientific video data
Basic question: what is a suitable codec for storing/archiving scientific video data in a lossless manner?
I am trying to help my research group out with storing/archiving some videos recorded with a ...
10
votes
1
answer
4k
views
How can I compress video by taking advantage of its static content?
I have an HD video that is a presentation, so it consists mostly of still images. It's a 50 minute, 200MB MP4 file, downloaded from YouTube.
Is there a way to take advantage of the static nature of ...
9
votes
1
answer
34k
views
What archive compression makes .mp4 files the smallest?
Is there an archive-based compression format that is known to make the smallest .mp4 videos?
I did a test 1080p 0:12 duration video with the only archival formats I know about:
(python3) Joshs-MBP:...
8
votes
1
answer
12k
views
Using ffmpeg + MPDecimate to get rid of exact duplicate frames (i.e. losslessly)
According to the documentation, mpdecimate will "Drop frames that do not differ greatly from the previous frame in order to reduce frame rate."
I would like to be able to remove only exact ...
8
votes
2
answers
15k
views
What ffmpeg settings to get the best possible video resolution/framerate that my webcam is capable of?
I want to record the best possible video file (in terms of resolution/framerate/colors) from my webcam.
Right now I am using this command:
ffmpeg -f v4l2 -framerate 25 -video_size 640x480 -i /dev/...
6
votes
1
answer
8k
views
ffmpeg video compression: Desaturating colors / losing color information
I'm trying to compress some 4K videos (resolution: 3840x2160) that I've recorded with my Nexus 5X (running LineageOS).
My first attempt:
./ffmpeg -i VID_20190908_145514.mp4 -c:a copy -crf 23 -vf "...
4
votes
1
answer
5k
views
Best image compression for low bit depth, grayscale images?
I am trying to compress many (up to 2,500) small (300x200 px) grayscale images so the file size is as small as possible. Currently, my bit depth is 4 (16 shades of gray). Image source is surveillance ...
4
votes
1
answer
1k
views
Recursively compress mp4 files (actually ts) with ffmpeg in the same subfolder
I have a root directory which haves a lot of folders, and inside those more folders. There are no real structure, just a bunch of folders with some having a mp4 file inside. I would like to compress ...
3
votes
2
answers
5k
views
Lossless screen video capturing
Can you capture/record a video playing on the screen using a recording software(or your custom code) such that every pixel is recorded and there is no loss of information ?
3
votes
1
answer
2k
views
How to compress gif effectively to reduce size?
We use gifs for our blog extensively. We used to embed tenor nano gifs(90px height maintaining aspect ratio, used for GIF previews and shares on mobile) in it. Now we wanted to create our own gifs and ...
2
votes
2
answers
7k
views
How to compress a video to VVC(h266) or Versatile video Coding
I have a h264 video. I want to compress it to Versatile Video Coding(h266) by using ffmpeg. Can anyone tell me how to do it by using ffmpeg or any other way.