Hot answers tagged

23 votes
Accepted

ffmpeg: how to add several subtitle streams

Whenever's there's multiple inputs fed to ffmpeg, and you need one more than video/audio/subtitle stream sent to the output, -map statements are needed. ffmpeg -i $movie.mov -i $sub_en.srt -i $sub_de....
user avatar
  • 30k
8 votes
Accepted

How to DISABLE--NOT REMOVE subtitle tracks from an MKV file from the command line?

I gave up and contacted the author of mkvpropedit to ask if it was possible to do what I wanted to do. The first answer I got was 'No'. But I persevered and asked if there was any setting that will ...
user avatar
  • 299
7 votes
Accepted

Why does AAC have two Sampling rates?

tracks show two different sampling rates. (...) Can anyone explain what this means? I always thought one audio track can only have one sampling rate. Is this just a different way of describing one ...
user avatar
7 votes

How to DISABLE--NOT REMOVE subtitle tracks from an MKV file from the command line?

What player are you using? Unless you have the "forced" flag set, it's a player option whether subtitles are displayed automatically or not and in which language if you have several subtitle tracks. ...
user avatar
  • 507
6 votes

How to DISABLE--NOT REMOVE subtitle tracks from an MKV file from the command line?

While your self-selected answer will work, it requires modifying the file again when you do want the subtitles. Why not just create an empty but syntactically valid SRT file and mux that as the first ...
user avatar
  • 30k
6 votes
Accepted

Convert mkv to mp4 (or webM) with the output file viewable in the process

This is possible for MP4, with a caveat. The command below will generate a fragmented MP4, which you can view in a browser while the conversion is taking place. However, only the fragments completely ...
user avatar
  • 30k
5 votes

Join multiple M4V to one file (maybe MKV?)

If you have ffmpeg installed, see this article that basically says to create a file that has all of the names, or to use the following command Concat Protocol ffmpeg -i 'concat:input1|input2' -...
user avatar
  • 197
5 votes
Accepted

How to convert 10-bit H.265 videos to H.264 without losing quality

it looks like the Video is encoded in 4000 kbit/s, instead of a Rate Factor (RF). But that isn't the issue here. The issue is: while 264 does support lossless encoding, it not widely compatible! (you ...
user avatar
3 votes
Accepted

Trim audio stream to video stream length

One should use the avformat library flag to stop muxing with the shortest stream. ffmpeg -i file.mp4 -map 0 -c copy -fflags +shortest -max_interleave_delta 1G -movflags +faststart out.mp4
user avatar
  • 30k
3 votes
Accepted

I have a .mkv video file I need to use but it is apparently infinite

So I've found the issue to be related to inconsistent framerates. I found that running the video through ffmpeg with ffmpeg -i yourfile.mkv -c:v copy -c:a copy -r 30 newfile.mkv actually fixed the ...
user avatar
3 votes

Is it possible to encode MP4 video with VP9 codec?

ffmpeg v4.0.2 or higher can encode/transcode VP9 in mp4. Commandline (when transcoding): ffmpeg -i INPUT.MKV -c:v libvpx-vp9 OUTPUT.MP4 Commandline (when remuxing (Super fast)): ffmpeg -i INPUT.MKV -c:...
user avatar
3 votes

MKVToolNix equivalent for .MP4's

I just went through a very similar use-case working with TS files. MoritzLost has the key point but as ffmpeg options can be quite difficult to sort out when you are first getting started, here is a ...
user avatar
  • 131
2 votes

Burn ASS subtitle onto MKV without any quality loss

The only way to do it with literally zero mathematical quality loss is to make a gigantic output file with a lossless codec. (e.g. utvideo, FFV1, or x264 in lossless mode (--qp 0). A better ...
user avatar
  • 2,608
2 votes
Accepted

How to display subtitles as default in an MKV file

There are two aspects to your query - 1)setting one of the subtitle streams as the default and 2)automatically displaying it during playback.I'm not aware of a method to force a player to display ...
user avatar
  • 30k
2 votes
Accepted

How to calculate the length of the video file that was encoded so far?

Short answer is No. Longer answer is, it depends. If you're encoding a file, then generally the output is the duration of the input, unless there's speed change or trim filters or -ss, -to, -t ...
user avatar
  • 30k
2 votes

Is there any way to efficently compress multiangle recordings?

The name for this feature is Multiview Video Coding (MVC): an stereoscopic video coding standard for video compression that allows for the efficient encoding of video sequences captured ...
user avatar
  • 30k
2 votes

Editing/Changing Cluster Timecode Element in mkv files (Amazon Kinesis Video)

MKV frame timestamps are relative to the start of the cluster. The cluster timestamps, however can be absolute or relative to the beginning of the "presentation". The frame timestamps are the ...
user avatar
  • 21
2 votes
Accepted

How to stop ffmpeg from interlacing when converting from m2ts to mkv

The source is interlaced. To deinterlace it, you can use the yadif filter. To use it with the default values: ffmpeg -i input.m2ts -vf yadif=parity=auto output.mkv
user avatar
  • 30k
2 votes
Accepted

Identify H.265 from the OSX Command Line?

You can use ffprobe for this ffprobe file.mkv -show_entries stream=codec_name -select_streams v:0 -of compact=p=0:nk=1 -v 0 For H.265/HEVC, this will print hevc; for H.264, h264 .
user avatar
  • 30k
1 vote
Accepted

How can I merge five mkv files I've created in OBS Studio?

This is absolutely not a problem. You can do this with MKVToolNix (specifically with it's GUI, since that is what you have requested). I am on Debian GNU/Linux, if you use something different, your ...
user avatar
  • 800
1 vote

FFmpeg does not preserve colors after resizing

Ad 1: Try adding the -pix_fmt yuv420p10le option (e.g. before -vf). Or only -pix_fmt + for using the same pixel format as the input video has. If it doesn't help, you obviously have an inappropriate,...
user avatar
  • 1,342
1 vote
Accepted

FFmpeg can't convert eia_608 subtitles: "Data Ignored since exceeding screen width"

It's a warning, not an error. The subs are still converted. The EIA-608 standard specifies a maximum of 32 characters per line and the ffmpeg decoder is enforcing that. A workaround is to use ...
user avatar
  • 30k
1 vote

Is it possible to encode MP4 video with VP9 codec?

FFmpeg, a command-line app, can write VP9 streams in MP4s. Get a static daily/snapshot binary from https://ffmpeg.zeranoe.com/builds/ Basic command is ffmpeg -i in.mov -c:v vp9 out.mov
user avatar
  • 30k
1 vote

MKVToolNix equivalent for .MP4's

dmMediaConverter is very similar to MKVToolnix. It is just a ffmpeg gui, so it can save in any format. To replicate the described MKVToolnix use, select "Convert", then "Add files", selecting both ...
user avatar
  • 121
1 vote
Accepted

MKVToolNix equivalent for .MP4's

Muxing a file simply means to extract individual streams out of existing container files or mix existing streams together into a new container file. For MP4, this can be done with ffmpeg and the -c ...
user avatar
  • 5,382
1 vote

How to stop ffmpeg from interlacing when converting from m2ts to mkv

You can try deinterlacing it at the decoding step with the following command, via the CUVID deinterlacer: ffmpeg -hwaccel cuvid -c:v h264_cuvid -deint 2 -drop_second_field 1 \ -i input.m2ts -c:v ...
user avatar
1 vote
Accepted

What are display and pixel width reported by mkvinfo?

The pixel values refer to the actual number of samples stored per frame. The display values refer to the dimensions that the player should render the video at. The ratio of 853/704 = 1.212 is the ...
user avatar
  • 30k
1 vote

Why does AAC have two Sampling rates?

I suspect that your MediaInfo parser is mis-reporting. Sampling rates are usually described both in terms of frequency and bit depth. It is quite common to have 48kHz at 24 bits. I suspect that ...
user avatar
1 vote

How to split a large mkv file into parts with the *.srt subtitle file separated accordingly?

Add the subtitles to your large mkv file first. Then mkvmerge will split the file with the subtitles automatically. To add the subtitles, the easiest is to use mkvmerge-GUI. It will also show you the ...
user avatar
  • 507
1 vote

How do I author a playable DVD from an MKV file containing MPEG2 video, audio, subtitle and chapter streams?

DVD requires more than just the video and audio data streams. It also needs all the menu and table of contents data to instruct the player on how to play the stream. As long as the stream is in an ...
user avatar
  • 19.2k

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