Skip to main content
16 votes

Re-encoding video library in x265 (HEVC) with no quality loss

I've recently gone through the trouble of Transcoding my whole video catalog over to HEVC. I use https://github.com/FallingSnow/h265ize with the following settings. h265ize -v -m medium -q 20 -x --no-...
Ashleigh-Paul Charlesworth's user avatar
12 votes

How to significantly lower a video file size with ffmpeg without quality loss?

I had a pretty good experience with the h265 codec. The output videos were between 2-8x smaller in size, without any noticeable loss in quality. ffmpeg -i input.mkv -c:v libx265 -vtag hvc1 -c:a copy ...
mashuptwice's user avatar
  • 1,484
7 votes

Ffmpeg libx265 vs hevc_nvenc

Update The hardware accelerated encoders do not support Constant Rate Factor (CRF, -crf) to determine size/quality ratio. You can check what the encoder supports, e.g. with ffmpeg -h encoder=...
Roman Riabenko's user avatar
6 votes

Trans-coding hevc / x265 video file using VLC and viewing it on a chromecast

I don't know if you still need it, but I was just dealing with this and maybe it will help someone else. As my sout string I use: #transcode{venc=x264{preset=ultrafast},vcodec=h264,threads=1}:...
Lucas Higa's user avatar
5 votes

Re-encoding video library in x265 (HEVC) with no quality loss

The correct syntax to enable lossless mode for x265 encoder in ffmpeg is -x265-params lossless=1 (you need to append =1). However, for lossless coding there are better codec choices. I found by ...
Display Name's user avatar
5 votes
Accepted

How to merge multiple mp4 files as chapters in a final mp4?

Chapters info is stored in file metadata. Ffmpeg allows to export metadata to file, and load metadata from file. Documentation is here: ffmpeg metadata 1 Now we need to prepare a metadata file, that ...
Ashark's user avatar
  • 1,209
3 votes
Accepted

Speed up video by ffmpeg did not reduce file size

Most of the commands mentioned in that link change the playback speed. In order to reduce the number of frames, you do not necessarily need to change playback speed. The minterpolate filter can reduce ...
Hermann's user avatar
  • 6,914
3 votes

Converting PNG frames to video at 1 FPS

This is a bug in VLC (which still exists in version 3.0.6). After some experiments I realized that VLC crashes for videos with FPS less than 10. So all videos with 10 FPS or more shouldn't be a ...
Mohammed Noureldin's user avatar
2 votes

FFMPEG - Interpolate frames or add motion blur

ffmpeg -i input.mp4 -filter:v "minterpolate=mi_mode=2" output.mp4 is for simple dynamic fast frame interpolation using a little bit of motion blur and calculations.
Official Diamond Clan's user avatar
2 votes

Trans-coding hevc / x265 video file using VLC and viewing it on a chromecast

you can use ffmpeg to turn the video to h264. ffmpeg -i input.mp4 -c:v libx264 -preset slower -crf 28 -c:a copy -maxrate 320 -minrate 20 output.mp4 You can change maxrate minrate preset and the crf ...
Xenon's user avatar
  • 41
2 votes

Split 4 Track WAV file into 2 stereo WAV files

I am guessing that the '4 tracks' are channels of a WAV. There is an easy way to extract each channel from WAV files. Using sox you can try this: sox infile.wav outfile.1.wav remix 1 sox infile.wav ...
Leo's user avatar
  • 151
2 votes

Can I use V4L2 to read a h264 video file input stream instead of a camera stream?

I think what you are looking for is the v4l2loopback device, which basically gives you a virtual /dev/videoX device that shows up as a camera for the tools you may be using. To use it, you need to ...
locutus's user avatar
  • 71
2 votes
Accepted

how to download partial content from remote video url in nodejs?

you can do just what you asked using ffmpeg command line tool like this: ffmpeg -ss [start timestamp] -i [video path or url] -t [duation] [outputname.mp4] or other format in your case, in nodejs you ...
Martin Wittick's user avatar
1 vote

Hardware accelerated lossless recording on a 6700 XT using ffmpeg

Truly lossless encoding can only be done in software I think, but with higher bitrates it may look good enough. Also the ffmpeg wiki says VAAPI is only supported partly for AMD GPUs. But I suspect you ...
user79's user avatar
  • 11
1 vote

Hardware accelerated lossless recording on a 6700 XT using ffmpeg

This was asked yesterday and the answer remains the same: HW video codecs do not support changing the quantization factor, i.e. crf and more so they don't support lossless encoding. From https://trac....
Artem S. Tashkinov's user avatar
1 vote

Arch Linux not playing videos (sometimes)

I’m not exactly sure why this issue happens, but I did figure out how to solve it. The problem is related to PipeWire, a piece of software that handles audio and video on Arch Linux (and other distros)...
Jawad Ahmad's user avatar
1 vote

Correctly drop one field instead of deinterlacing in ffmpeg

The field filter can do this: "Extract a single field from an interlaced image using stride arithmetic to avoid wasting CPU time." ffmpeg -i IN -vf field=type=0,scale=...
Gyan's user avatar
  • 1,065
1 vote
Accepted

ffmpeg with NVenc does not seem to utilize my GPU

If you strictly speaking do not have to use command line for this operation, save yourself much trouble using HandBrake: https://handbrake.fr/ I am transcoding my BluRay library with it, using NVEnc (...
Vlastimil Burián's user avatar
1 vote

How to merge multiple mp4 files as chapters in a final mp4?

These are two steps - concatenation and overlaying chapters. I describe them separately, but they can be combined (see below). 1. Concatenate the Files ffmpeg -f concat -safe 0 -i concat.txt -c copy ...
Suuuehgi's user avatar
  • 1,813
1 vote

Firefox, Chromium on Debian: WebRTC H.264 is not supported

I've encountered the same issue when trying to use go2rtc WebRTC interface with Firefox. It turns out that there's a preference called media.webrtc.hw.h264.enabled that by default disables h.264 ...
Tony's user avatar
  • 11
1 vote
Accepted

ffmpeg re-encoding to h625 with video of Sea Water doubles file size

So my question is, what do you do when the video contains a significant amount of fast moving background artefacts? Leave it be and do not reencode. You could Reduce its resolution or/and framerate ...
Artem S. Tashkinov's user avatar
1 vote

Can "v4l2loopback" be installed/compiled for FreeBSD 13.1?

Apparently it's already built in. From webcamd(8): -c Create device of specified type. Valid values: v4l2loopback For multiple v4l2loopback devices, specify -m v4l2loopback.devices=2
Rob's user avatar
  • 1,829
1 vote

Stream Intel RealSense camera to network using Raspberry Pi 4 with FFMpeg

Actually Intel provides a software to utilize a RPi4 as backend, to make your camera available in your network and directly use all API commands: https://dev.intelrealsense.com/docs/open-source-...
Tomblarom's user avatar
  • 2,237
1 vote

Does ffmpeg support dropping chroma information when encoding dynamic scenes?

This will depend on the specific encoder. For libx264, you can use -x264-params chroma-qp-offset=6 to set a higher quantizer relative to luma. This will be applied throughout the encoding.
Gyan's user avatar
  • 1,065
1 vote
Accepted

Using ffmpeg to Compressed a Two Frame Video

Your question is answered in the ffmpeg examples. You can use something like this: ffmpeg -loop 1 -framerate 1 -i banner.png -i audio.wav -map 0 -map 1 -c:v libx264 -crf 16 -c:a aac -b:a 92k -...
Hermann's user avatar
  • 6,914
1 vote
Accepted

H.264/MPEG-4 from PNG frames: how to, and how to tune compression

ffmpeg As pointed out in the comments, ffmpeg offers a good one-step solution with a simple "quality" parameter: crf, or "constant rate factor" (read this post explaining crf). See this post for ...
Nicola Sap's user avatar
1 vote

Convert image based subtitle to text based subtitle inside MKV file

This also seems to work as an online tool, but you have to wait a bit if there is a queue. To extract the subtitles file, you can use this: ffmpeg -i input.mkv -c copy -map 0:2 sub.sup
IS4's user avatar
  • 223
1 vote
Accepted

IMX6 ADV7180 : no /dev/media0

The media controller needs to have both two IPU activated. Solved by adding in dts : &ipu2 { status = "okay"; };
rbe's user avatar
  • 61
1 vote
Accepted

Accelerating Video Conversion

For MKV or MP4, the default video codec is libx264, which has a set of presets, with different speed and quality tradeoffs. The default preset is medium. You can switch to a faster preset like ...
Gyan's user avatar
  • 1,065
1 vote

Cannot send desktop capture to ffserver?

This should help you: https://organicdesign.nz/Simple_video_streaming_with_ffserver https://www.youtube.com/watch?v=cObC-nNUIwI You should be able to tailor this info to your needs. Like: ffmpeg -r ...
Michael Prokopec's user avatar

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