31 votes
Accepted

Can I set the start number for image sequence output?

The image sequence muxer has a start number option, so ffmpeg -i video.webm -start_number 98 image-%03d.png
Gyan's user avatar
  • 33.1k
14 votes

How to downsample 4k to 1080p using ffmpeg while maintaining the quality?

Convert 4k to 1080 (no change in codec) ffmpeg -i input4kvid.mp4 -vf scale=1920:1080 -c:a copy output1080vid.mp4 Convert h.264 to h.265 (no change in resolution) ffmpeg -i input.mp4 -c:v libx265 -...
KeshavDulal's user avatar
12 votes
Accepted

Big difference in the video file size after the conversion (.mov to .mp4)

Let me explain you from scratch. MOV, MP4, AVI, MKV etc all these are just containers, It is just kind of wrapper which contains audio, video, text, metadata file together as one file. It does not ...
Unstoppable's user avatar
9 votes
Accepted

Apply custom lut via ffmpeg?

You may want to use FFMPEG's lut3d filter. It requires you to provide a look-up table (a *.cube file). For example, if you have an ARRI camera you can generate these files using ARRI Color Tool or ...
Tony Sepia's user avatar
8 votes
Accepted

Does transcoding always mean quality loss?

Generally, H.264 and H.265 (as well as others like VP9) are lossy codecs, at least in their default settings with most encoders. This means that whenever you re-encode from one to another (or even in ...
slhck's user avatar
  • 1,025
7 votes
Accepted

Lossless convert 3gp video to mp4 using ffmpeg

If the codecs of your input file are already h264 and aac for video and audio, respectively, you can just copy without decoding and encoding again. ffmpeg -i input.3gp -c:v copy -c:a copy output.mp4 ...
kamae's user avatar
  • 206
6 votes
Accepted

FFMPEG stop converting from TrueHD to PCM

The WAV header is typically 32-bits. Your output will need 64 bits. ffmpeg -i source.thd -c:a pcm_s24le -ar 48000 -rf64 auto output.wav
Gyan's user avatar
  • 33.1k
6 votes
Accepted

Convert video with ffmpeg to have the same quality

The differences between your "works" and "doesn't work" examples are: resolution framerate Codec Tag Codec Level and you can set these using ffmpeg: ffmpeg.exe -i /temp/input.mp4 -c:v mpeg4 -level ...
Harry's user avatar
  • 176
5 votes
Accepted

Loss of quality while adding subtitle via FFmpeg

As you are hardcoding subtitles, the video (with the subtitles added) will be re-encoded. You can use the CRF rate control method to modulate the quality of the output. So, start with ffmpeg -i ...
Gyan's user avatar
  • 33.1k
5 votes
Accepted

Problem converting TS to MP4 container with ffmpeg

Update: The VLC TS is malformed. First run ffmpeg -i vlc-output.ts -c copy ffmpeg-output.ts and then ffmpeg -i ffmpeg-output.ts -c copy working.mp4 The main thing that looks off is the timebase ...
Gyan's user avatar
  • 33.1k
5 votes

Easily convert & archive a bunch of low res Video CD DAT files MPEG 1/2 to newer better format such as MKV or others?

Using ffmpeg, a free command-line tool, you can convert these DATs to MP4 (or MKV): ffmpeg -i input.dat -c:v libx264 -crf 20 -c:a aac -b:a 128k -movflags +faststart output.mp4 Your VLC output doesn'...
Gyan's user avatar
  • 33.1k
4 votes
Accepted

what graphics card features effect NVIDIA NVENC hardware encoding speed?

There are two main features in NVIDIA NVENC encoding: Video memory if you need to transcode many streams. NVENC SIP - than better this SIP than better encoding performance is. It depends on GPU. You ...
Ivan Kolesnikov's user avatar
4 votes

How can I efficiently convert MOV / MPEG-4 files for long term storage?

Although @stib's advice is sound, I disagree with "to get an appreciable size reduction you would have to throw away a lot of quality". Cameras have to compress on-the-fly, so they use constrained ...
Gyan's user avatar
  • 33.1k
4 votes
Accepted

mplayer/ffmpeg How to set caca filter's output size

Found. Caca library is driven mostly by environment variables rather than filter params. export CACA_GEOMETRY=200x78 mplayer -vo caca $INPUT
Ondra Žižka's user avatar
4 votes
Accepted

ffmpeg to convert and merge 3 videos to a single widescreen video

Quality-wise, it's better to use the original MOVs, but if the MP4-based stacking looks ok, that's the final arbiter. ffmpeg -i left.mov -i centre.mov -i right.mov -filter_complex "[0:v:0][1:v:0][2:...
Gyan's user avatar
  • 33.1k
3 votes
Accepted

How to double video frames without any duplicate frames

Use ffmpeg -i in.avi -r 50 -filter:v "setpts=0.5*PTS" out.avi or ffmpeg -i in.avi -r 50 -filter:v "setpts=N/50/TB" out.avi If you want to interpolate new frames, use ffmpeg -i in.avi -r 50 -...
Gyan's user avatar
  • 33.1k
3 votes
Accepted

Converting a Video from 1600*1200 to 1920*1080

Using ffmpeg, ffmpeg -i input.mp4 -vf "scale=1920:1080:flags=lanczos,setsar=1" output.mp4 This will stretch the video to 1920x1080. ffmpeg -i input.mp4 -vf "scale=-1:1080:flags=lanczos,setsar=1,pad=...
Gyan's user avatar
  • 33.1k
3 votes
Accepted

Video metadata: What is "Video delay" used for?

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 ...
Gyan's user avatar
  • 33.1k
3 votes

Audio issue on concatenation of TS segments

Don't use the concat demuxer. Create a single ts file by concatenating the ts segments as a first step. Then run it through ffmpeg. i.e. cat 1.ts 2.ts >all.ts ffmpeg -i all.ts -c copy all.mp4
SlimSCSI's user avatar
  • 1,070
3 votes
Accepted

Convert variable framerate ~60 FPS to constant 60 FPS losslessly

To start with: your version of Handbrake is old. Version 1.0.3 came out very recently, it's got some improvements over that older version. Second, CQ0 is not actually "lossless." It's aiming for "...
ivkowalenko's user avatar
3 votes
Accepted

Do I have any sort of loss converting an M4V file to MKV?

Your command ffmpeg -i "path/to/file.m4v" -c:v copy -c:a copy "path/to/file.mkv" does do a lossless copy since no recompression occurs. You have to note all warning or error messages during the ...
Gyan's user avatar
  • 33.1k
3 votes
Accepted

Transcode 5.1 audio in ffmpeg leads to incorrect audio mapping in output

FFmpeg assumes that the input's 5.1 channel mapping is the same as the one it uses. To correct that, use the channelmap filter to remap, add: -af "channelmap=4|0|1|2|3|5:5.1" (I based it off the ...
Gyan's user avatar
  • 33.1k
3 votes

How to convert a 720° ".ts" video recorded with an AllieCam360?

FFmpeg can see both views as separate video streams. You can remux the file to MP4 simply by using ffmpeg -i input.ts -c copy -map 0 output.mp4 Hopefully, your video editor can work with distinct ...
Gyan's user avatar
  • 33.1k
3 votes

Video conversion

If you're up for using the command line, the best tool hands-down is ffmpeg. It can convert pretty much any video format out there into pretty much any other video format, it's free, open source, and ...
stib's user avatar
  • 13.7k
3 votes
Accepted

Reverting Loss from .MOV (MPEG-4 Compression)

No, there is no way to recover information lost during any encoding steps - they are discarded forever. The only way to avoid this is to use lossless encoding. That said, there are various algorithms ...
Dr Mayhem's user avatar
  • 2,315
2 votes

How to digitise old NTSC home videos for highest quality (with PAL player)?

The 2020 and beyond answer: for whatever reason, the "SCART2HDMI" adapters floating around on eBay and Amazon, include electronics that used to be included in professional VCRs and TV studio ...
Prof. Falken's user avatar
2 votes

Unable to hardcode subtitles in FFmpeg on Mac to mov

It appears that the subtitles file did not have --> but a –> with the – corresponding to the en dash that was placed in the file, which was edited by hand externally. It seems like the en dash ...
Konrad's user avatar
  • 163
2 votes
Accepted

avconv: What are the mpegvideo private options?

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. ...
Gyan's user avatar
  • 33.1k
2 votes

Converting a Video from 1600 * 1200 to 1200 * 900

Use ffmpeg with -vf scale=1200:900 option. For example ffmpeg -i input.mp4 -vf scale=1200:900 -c:a copy output.mp4
kep0p's user avatar
  • 21
2 votes
Accepted

Tool for cutting video

You can use ffmpeg, a command-line tool to do this. If you want equal-sized splits, use ffmpeg -i input -segment_time 30 -f segment -force_key_frames expr:gte(t,n_forced*30) -reset_timestamps 1 a%...
Gyan's user avatar
  • 33.1k

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