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.srt \
-map 0:v -map 0:a -map 1 -map 2 \
-c:v copy -c:a copy -c:s srt \
-metadata:s:s:0 language=eng -metadata:s:s:1 language=ger \
Since the ...
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 sampling rate?
MediaInfo reports what is played by a decoder, depending of its capabilities:
- if your decoder is able to play an HE-AAC stream, the stream will ...
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.
First, set the "default-flag" to false:
mkvpropedit video.mkv --edit track:s1 --set flag-default=0
Then lookup your player preferences.
In VLC (2.0.8), I ...
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 trick the player into not recognizing a subtitle track? The response was to set the Codec ID to something the player doesn't support. Eureka!
mkvpropedit --edit ...
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 subtitle stream (leaving the original as a secondary stream)? Even if the player is set to display subs, nothing will show up. No need to mess with ID strings.
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
ffmpeg -i 'concat:input1|input2' -codec copy output
Concat Video Filter
ffmpeg -i opening.mkv -i episode.mkv -i ending.mkv \
-filter_complex '[0:0] [0:1] [1:0] [1:1] [2:0] [2:1] concat=n=...
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 would do this by setting the color format to hi444 and -cq 0 (Thanks to Gyan for pointing this out)
If you want the best quality, but also the largest file, you ...
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 encoded at the time of launching the file, will be viewable. To view fragments encoded after that point, you'll have to reload the file/page.
ffmpeg -i input &...
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 issue entirely. Now I can open the file correctly and it appears to be 42 minutes as expected. More information here.
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 more detailed answer.
For a single input mp4 file and single input SRT file, we can keep all streams from both files and merge them into a new mp4 ...
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 solutions that would achieve the same thing is:
mux the subtitle file into the mkv, with mkvmerge. You set a flag so it either plays by default or doesn't. Then you'd ...
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 subtitles if that facility has been turned off in its settings.
For the first facility, try mkvpropedit from MKVToolNix to set the default flag for a subtitle ...
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 options applied. For a live input, FFmpeg will stop the encode when it encounters EOF on the input, so unless you know that, you won't know the output duration. For ...
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
simultaneously from multiple camera angles in a single video stream
Can't be done, at present. Not using open source tools. There may be academic or commercial ...
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 presentation timestamps (PTS) whereas the frames are ordered in the decoding order (DTS). MKV doesn't have explicit DTS.
The snippet of the MKV you showed contains a ...
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, albeit more common FFmpeg version — only for 8-bit colors. (Your original video uses 10-bit colors, and FFmpeg will try use the best 8-bit pixel format in ...
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 ccextractor to get a SRT file, and then proceed with that.
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 video and subtitles.
Check "Enabled" to keep the stream, uncheck to remove it.
Check "Copy" to keep the stream as it is, uncheck to trasnscode it.
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 copy switch. If you don't want to write command line inputs, XMedia Recode is a good, free GUI for ffmpeg (only available for Windows). There's a documentation on ...
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 hevc_nvenc -qp:v 19 -rc:v constqp \
-tune:v hq -preset:v p7 output.mkv
Or better still, the yadif_cuda filter, with NVDEC in use:
ffmpeg -threads 1 -hwaccel nvdec -...
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 pixel or sample aspect ratio. This is an example of non-square pixels, a legacy of analogue video signals and usually seen in digitized forms of NTSC/PAL format ...
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 whoever wrote the printf statements producing the above output meant to say "bits" not "KHz" after the "/".
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 command-line it uses. Or you can try something like this directly:
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 appropriate format, there is no reason that a DVD authoring package should have to re-encode the video. It just needs to take in the stream and rebuild the menu ...
This question is a bit nonsensical as Matroska is only a container format, however I think it does bring up a deeper question on how video files work in general. Matroska doesn't actually define the way anything inside it is encoded or encrypted, it just stores the information that says what was used on the content so it can be decoded.
While Matroska does ...