29
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....
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' -...
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 ...
4
votes
Accepted
Loop video for the duration of audio
To merge an audio stream with a repeated video stream
ffmpeg -stream_loop -1 -i 20s.ts -i 120s.mp3 -map 0:v:0 -map 1:a:0 -shortest -c copy output.mp4
-stream_loop -1 : to loop infinity of video input ...
4
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 ...
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:...
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 ...
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
3
votes
Accepted
Using FFMPEG to convert an MKV with multiple subtitles, audio tracks and chapters to a plain mp4
There are multiple questions; I'll try to answer them separately for simplicity.
First of all, converting from mkv to mp4:
The easiest way would be something like this ffmpeg -i input.mkv output.mp4
...
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 ...
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
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 .
2
votes
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 ...
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
...
2
votes
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 ...
2
votes
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 ...
2
votes
How can we keep the subtitle track when converting from MKV to MP4 with ffmpeg?
You can find detailed answer on your question here
Basically you need to add "-map" parameter to your command.
ffmpeg -i myMovie.mkv -c copy -map 0:v:0 -map 0:a:0 -map 0:s:0 myMovieMP4.mp4
-...
2
votes
Is it possible to embed a thumbnail in a .mkv file?
I was also going down this rabbit hole and found that there's an option -attach filename that's more specific to mkv files. It's at the end of the "Main Options" section of the manual: https:...
2
votes
Why has transport stream (TS) a much bigger file size than mkv?
The short answer: container overhead.
MKV (and to a lesser extent, MP4/ISOBMFF) are very "flexible" containers, and basically adapt to whatever you're trying to shove into them, provided the ...
1
vote
How can I merge five mkv files I've created in OBS Studio?
In case you will be unable to use MKVToolsNix for whatever reason, there is an older tool which is able to append files quite well: AVIDemux.
The process is trivial. Start the program and open your ...
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 ...
1
vote
FFmpeg does not preserve colors after resizing
There is already a solution here. But I will try to summarize it in brief.
You need to specify the correct flags for color properties of the original file. Your original file (as probably many other ...
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,...
1
vote
Linux mkv packages for VLC
It is not an issue. VLC has many built-in codecs. MKV is not in them. So VLC rely on libmatroska to manipulate MKV. As VLC cannot know if you have it installed, it gives a warning. Check if ...
1
vote
Can I use Apple Compressor software to convert mkv files to mp4
No Compressor does not take .mkv files. At least not my 4.5.1 version.
1
vote
Why aren't chapters being added to my m2ts using tsmuxer?
M2TS as a format / container is not able to store chapter information itself. On Blu-Ray disks, the chapter data is stored in the playlist files. Therefore you won't see chapters when you just load an ...
1
vote
Widely compatible video format with lossless audio
To my knowledge, the only lossless audio format with really wide compatibility is plain old linear PCM.
As container format, MP4 is the most wide-spread.
1
vote
Widely compatible video format with lossless audio
According to Mozilla Developers MPEG-4 containers can include FLAC audio. Ditto for OGG containers.
1
vote
Accepted
Is it possible to remove a border from a Webm video losslessly?
See here https://www.webmproject.org/docs/container/ under section Track. There you find PixelCropBottom, PixelCropTop, PixelCropLeft and PixelCropRight - all of which are supported. These parameters ...
1
vote
Removing streams in HEVC H.265 MKV file?
In the syntax -map 1:a:24, 1 stands for the input file index. Counting starts from 0, so 1 refers to the 2nd input file but the command only has one input. a stands for stream type, and in this case, ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
mkv × 63ffmpeg × 26
video × 14
mp4 × 13
subtitles × 11
conversion × 9
encoding × 6
video-editor × 4
audio × 4
h.264 × 3
vlc × 3
metadata × 3
handbrake × 3
streaming × 2
file-formats × 2
software × 2
linux × 2
dvd × 2
avi × 2
tracks × 2
thumbnails × 2
matroska × 2
editing × 1
video-quality × 1
software-recommendation × 1