Example code:įfmpeg -i mp4box_mov-text.mp4 -map 0 -c copy -c:s:0 srt mp4box_mov-text_converted-by-ffmpeg-to-srt.mkvįfmpeg -i mp4box_mov-text.mp4 -map 0 -c copy -c:s:0 ass mp4box_mov-text_converted-by-ffmpeg-to-ass.mkv If you convert a subtitle streams of an mp4 file created by MP4Box using ffmpeg to another mp4 file or an mkv file, that subtitle stream working also correctly. Mp4box -add input.mp4#video -add input.mp4#audio -add subtitle_test.srt:lang=de -new mp4box_mov-text.mp4 I used MP4Box 0.4.6 (rev2698) to create a compliant subtitle streams (other versions of MP4Box working also). MP4Box creates fully compliant subtitle streams into mp4 containers working with all these media players! " ASS" subtitle streams into mkv files created by ffmpeg are compatible with most of these players but not with all:įfmpeg -i input.mp4 -i subtitle_test.srt -map 0:v -map 0:a -c copy -map 1 -c:s:0 ass -metadata:s:s:0 language=ger ffmpeg_ass-subtitle.mkv (content of "subtitle_test.srt" see below) Import and encoding of a *.srt subtitle file as " SRT" subtitle stream within an mkv file:įfmpeg -i input.mp4 -i subtitle_test.srt -map 0:v -map 0:a -c copy -map 1 -c:s:0 srt -metadata:s:s:0 language=ger ffmpeg_srt-subtitle.mkv Import and encoding of a *.srt subtitle text file as " mov_text" subtitle stream within an mp4 file:įfmpeg -i input.mp4 -i subtitle_test.srt -map 0:v -map 0:a -c copy -map 1 -c:s:0 mov_text -metadata:s:s:0 language=ger ffmpeg_mov-text.mp4 To force SMPlayer into the "normal subtitle mode" activate the option: -> SMPlayer menu "Options" > "Preferences" > "Subtitles" > "Font and colors" and activate "Enable normal subtitles")Įxamples for incorrect imported/encoded subtitles with ffmpeg: SMPlayer uses as default a new ass library to convert srt subtitles internal to an ass subtitle stream and render that like a normal ass/ssa subtitle. Philips stand-alone Blu-Ray player BDP5180 MPC-HC 1.6.6 (Media Player Classic - Home Cinema) I tested the following media players (Windows versions): (All tested special characters are included in ISO-8859-1) ü/Ü, ß), French, Spanish and so on, imported and encoded with ffmpeg as "mov_text" subtitle stream into an mp4 container or as "srt"-subtitle stream into an mkv container are not compatible with different media players and Blu-Ray stand-alone players! Special characters from languages like German (e.g. Import and encoding of subtitles which containing special characters using ffmpeg from text based *.srt and *.ass-subtitle files into an *.mp4 or *.mkv container does not working correctly! Ffmpeg subtitle encoding of special characters does not working correctly (with special characters of German, French, Spanish, etc.)