Hot answers tagged

9

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 \ $output.mkv Since the ...


6

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 ...


6

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. ...


5

Both MKV and MP4 are container file formats. Container formats define how actual audio, video, subtitle and other data are structured. MKV is an open standard format, while MP4 comes from the ISO and is based on the QuickTime file format.


5

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 ...


4

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' -codec copy output Or 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=...


4

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 ...


3

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.


3

If you wrote a small script (say in python) you could use the Command line client of the software convert all the videos sequentially. Python has good system calls functionality and make this quite easy.


2

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 ...


2

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 ...


2

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 ...


2

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

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


2

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 .


1

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, 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 ...


1

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 ...


1

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.


1

ffmpeg v4.0.2 or higher can encode/transcode VP9 in mp4. Commandline (when encoding): ffmpeg -i INPUT.MKV -c:v vp9 OUTPUT.MP4 Commandline (when transcoding (Super fast)): ffmpeg -i INPUT.MKV -c:v copy OUTPUT.MP4


1

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


1

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. There's a documentation on the website, simply select ...


1

You can try deinterlace it on decoding step with the following command: ffmpeg -hwaccel cuvid -c:v h264_cuvid -deint 2 -drop_second_field 1 -i input.m2ts -c:v hevc_nvenc -preset slow output.mkv Or keep interlacing with the next command: ffmpeg -i input.m2ts -flags +ildct -c:v hevc_nvenc -preset slow output.mkv


1

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 &...


1

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 ...


1

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 "/".


1

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 ...


1

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: video="your_large_video.mkv" st_en="english.srt" st_fr="french.srt" out="large_video-...


1

I don't know Windows, but I have just gone through this in Mac OS X (Linux Applicable). mkvtoolnix is your friend here, and is available for Windows. I used the GUI to check (a sample of) my files to make sure the audio tracks that I wanted to keep and delete were in the same order in the files. Then I manipulated the options in the GUI to match what I ...


1

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 ...


1

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 ...


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