Here it is assumed that the video has a video and an audio track.Code:FFmpeg.exe -i "your_movie_with_full_path.mp4" -i "your_srtsubtitle_with_full_path.srt" -map 0:0 -map 0:1 -map 1:0 -c:v copy -c:a copy -c:s mov_text output.mp4
The colors refer to command parts that belong together.
The codec mov_text is necessary because the mp4 container cannot contain srt directly.
If the destination was e.g. mkv, you could use copy instead of mov_text.
+ Reply to Thread
Results 991 to 1,020 of 2186
-
-
Thank you, but it does not work the way I hope. The commands you provided adds the srt sub but removes dvdsubs and only keeps the first audio stream. I need to add the srt file while retaining all the streams (1 video stream, 3 audio streams, and 3 dvdsub streams) of the original file, just like I can with Clever FFmpeg-GUI. Thanks.
-
Then use
Code:FFmpeg.exe -i "your_movie_with_full_path.mp4" -i "your_srtsubtitle_with_full_path.srt" -map 0 -map 1:0 -c copy -c:s:3 mov_text output.mp4
-map 0 uses all streams from input 1
-c copy uses the source codecs for all streams
-map 1:0 uses the first stream from input 2
-c: s:3 mov_text uses the mov_text codec for the fourth subtitle stream.
The input and stream counter starts with 0. -
Works perfectly. Thank you so much. Now I try to convert from mkv to mp4 with re-encoding while keeping everything, but I can't make it work. Can you help again, please?
trying to convert from mkv to mp4 with re-encoding:
ffmpeg -i "input.mkv" -vcodec libx264 -map 0 -acodec copy -c:3 mov_text "output.mp4"
error message:
Automatic encoder selection failed Default encoder for format mp4 (codec none) is probably disabled -
Hi ProWo,
Just a minor thing. Browsing for sourcefiles in your GUI, h265, eac3 (and other) files don't show up with the lower-right type-window set at its default "Video & Audio Files (*.asf;*.flv etc...)". I think not all supported filetypes are added here.
[Attachment 78844 - Click to enlarge]
Where setting the windows to "All Files (*.*)" does make the streams show, making them able to be selected.
Would you care to correct this? I'm running version 3.2.6.
[Attachment 78845 - Click to enlarge] -
-
Last edited by davidt1; 5th May 2024 at 17:50.
-
The command line is different for every movie.
You have to learn yourself if you want to do it manually.
The most important thing is to understand how to handle the individual streams.
You should first familiarize yourself with
-map
and stream identifier
first.
Google for:
ffmpeg mapping
ffmpeg stream identifiers. -
How do I use the tool to remux DVDs and Blu-Rays?
Also, made the 1000th post here. Yay! -
-
Newest beta (v3.2.6.01), online now.
Added: Keyframe check on cutting.
More info of subtitle type on subtitle burn in.
Automatic pixel format settings with HDR10/HLG sources.
wmv3 muxing.
Fixed: Bug in subtitle burn in with picture based subtitles.
Changed: Filter removed on file search (request by Ennio).
Removed first keyframe delay field (cut section).
Default settings for dynaudnorm filter.
Extraction of DVD and DVB subtitles to mkv. -
-
-
-
-
Last edited by ProWo; 31st May 2024 at 10:53.
-
Hi , using v3.2.6.01 i got this, pressing the button cut, i dont have O: unit.
-
-
Newest beta (v3.2.6.02), online now.
Fixed: Disappearing bug.
Video encoding filterchain bug.
Bug in multiplex grid with preprocessed and batch streams.
Bug in ffmpeg path (thx Ndidi for the hint).
Changed: HDR info in file analysis and app.
Improved: automatic settings on HDR conversions. -
Got this error while converting MKV to MP4 with two webvtt subs.
[Attachment 79616 - Click to enlarge] -
Adding webvtt sub to MKV and muxed as MKV. Subtile is displayed on the left side of the screen and is not removable. It should be in the middle of the screen and movable. I can replicate this behavior with ffmpeg if I use -c
copy. If I use -c
srt or -c
webvtt, the subtitle behaves correctly.
[Attachment 79617 - Click to enlarge] -
@davidt1
I did some tests and found that the webvtt codec is incompatible with the mp4 container.
I will therefore block the muxing of webvtt to mp4 in the next beta.
Muxing webvtt subtitles into the mkv container with clever FFmpeg-GUI works fine here. The subtitle is centered, just as it should be.
Please post one of your webvtt subtitles here so I can reproduce your problem. -
With
Code:-c mov_text
Last edited by ProWo; 5th Jun 2024 at 06:01.
-
Hi!
I tried recently to demultiplex an MP4 file and got a strange result - the length of the video was only two and a half minutes instead of the full length of the movie. The length of the audio file was correct. Strangely enough, I tried to do the same with another well-known tool, MKVToolNix, and the result was the same. I tried then avidemux and this time I got what I wanted. Something seems to be wrong with these tools. I wrote this because I would like to help make these applications better. -
-
Similar Threads
-
GUI for ffmpeg x265 encoder
By david55 in forum Video ConversionReplies: 15Last Post: 11th May 2025, 09:15 -
New small GUI for FFmpeg
By ProWo in forum Video ConversionReplies: 29Last Post: 24th Feb 2024, 02:06 -
Best GUI for ffmpeg encoding
By usta in forum Video ConversionReplies: 25Last Post: 17th Jan 2019, 11:23 -
GUI for FFMpeg amf?
By Micky in forum Video ConversionReplies: 0Last Post: 14th Jan 2018, 07:45 -
dmMediaEncoder v1.8.0 - crossplatform FFMPEG GUI
By mdalacu in forum Video ConversionReplies: 38Last Post: 29th Sep 2015, 00:19