how to add subtitles to the video itself

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
robby_stark
New Cone
New Cone
Posts: 6
Joined: 13 Aug 2014 04:39

how to add subtitles to the video itself

Postby robby_stark » 19 Sep 2014 01:29

basically I'd like the subtitles (which I have in a separate srt file) to become part of the video itself, so I can put my video on a USB key and watch it on another device, while still displaying the subtitles.

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: how to add subtitles to the video itself

Postby mederi » 19 Sep 2014 20:22

Do you mean transcoding of a file with burning/hardcoding subtitles into the picture or you mean remuxing of the file to insert subtitle track in appropiate container (.avi, .mkv, ...)?

robby_stark
New Cone
New Cone
Posts: 6
Joined: 13 Aug 2014 04:39

Re: how to add subtitles to the video itself

Postby robby_stark » 20 Sep 2014 21:39

the first one... I think.

what I have is a .mp4 file and a corresponding .srt file, and vlc is able to display the subtitles. my ps3, however, is incapable to read the .srt file so what I want is to use vlc to somehow make the subtitles part of the .mp4 file. then I can copy my video on a usb key and read it on my playstation

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: how to add subtitles to the video itself

Postby mederi » 21 Sep 2014 14:58

PS3: .mp4{H.264?, AAC?} + .srt => you need to transcode/reencode
You could use AVIAddXSubs tool with ffmpeg to convert your .mp4 file to divx file with incorporated XSUB track supported by PS3.

In VLC-2.1.5 go to Media > Stream > Open Media dialog: File tab: [ Add... ] button to add your .mp4 file;
then [ Stream ] button > Stream Output dialog:
Source page:
[ Next > ] button

Destination setup page:
New destination [ File ] [ Add ] button > File tab: [ Browse... ] button to browse to destination file, then [ Next > ] button

Transcoding option page:
[ Create a new profile ] icon/button > Profile edition dialog:
Profile Name [ mp4 for PS3 ];
Encapsulation tab: (o) MP4/MOV;
Video codec tab: [v] Video, [ ] Keep original video track, Encoding parameters tab: Codec [H-264]
Audio codec tab: [v] Audio, [v] Keep original audio track << you probably do not need to transcode the audio
Subtitles tab: [v] Subtitles, [v] Overlay subtitles on the video
[ Create ] button, then select the new profile [ mp4 for PS3 ], then [ Next > ] button

Option setup page:
Delete "scodec=dvbs," option in the transcoding chain! Only "soverlay" option does the trick. The subtitles are loaded automatically (.srt file of the same name like the .mp4 file).

Finally press the [ Stream ] button.

Or use some other tool: Handbrake.

robby_stark
New Cone
New Cone
Posts: 6
Joined: 13 Aug 2014 04:39

Re: how to add subtitles to the video itself

Postby robby_stark » 22 Sep 2014 02:46

thank you, that did it

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: how to add subtitles to the video itself

Postby mederi » 12 Oct 2014 19:58

Ticket #12338
Streaming, Converting wizards: Burning/hardcoding subtitles into the video
https://trac.videolan.org/vlc/ticket/12338

ewillyc
New Cone
New Cone
Posts: 1
Joined: 04 Apr 2015 23:27

Re: how to add subtitles to the video itself

Postby ewillyc » 04 Apr 2015 23:33

Hello, Mederi you tried this in windows right?
I´m using a Mac, with VLC 2.1.5 and the UI looks different, I can´t find some of the options that you are saying.
Once I go to the subtitles I check the Subtitles box and the Overlay subtitles on the video box too, but there is no option to browse my .SRT file.
Then... I get stuck in the "Option setup page" because I don´t know where to find this option.
Any suggestions?

Thanks

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: how to add subtitles to the video itself

Postby mederi » 05 Apr 2015 19:07

VLC can load subtitles automatically if your subtitle file is named according to video ("video.avi" + "video.srt") but the open file dialog allows you to select a different one.

Media > Convert/Save...
Media > Stream...
In Windows you need to select the "Stream..." wizard with detailed settings in several steps to a desired result. The final step contains the transcoding string where you can manually adjust the used options and their values before clicking the start button ([Stream]).

I do not know Mac OS X but according to some youtube video:
File > Convert/Stream...
File > Streaming/Exporting Wizard...
Which menu option is similar to "Media > Stream..." wizard where you could keep the "soverlay" and remove the "scodec" option?

Otherwise ask in section for OS X: VLC media player for OS X Troubleshooting
https://forum.videolan.org/viewtopic.php?f=12&t=123982
https://forum.videolan.org/viewtopic.php?f=12&t=122644

gamekommander
New Cone
New Cone
Posts: 2
Joined: 20 Nov 2015 10:46

Re: how to add subtitles to the video itself

Postby gamekommander » 20 Nov 2015 10:50

Dumb question... how do you know it's "working"? I followed your instructions to the letter but nothing appears to happen after I click "Stream" and no file appears to have been created in the destination folder I specified.

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: how to add subtitles to the video itself

Postby mederi » 22 Nov 2015 13:07

Use the streaming wizard (Media > Stream...), select input video file ("Add..." or drag&drop), click "Stream" button, select destination file ([File] "Add"), activate transcoding, select/create/edit appropriate transcoding profile (disable "Keep original video track" => you are transcoding the video!, enable "Subtitles" and "Overlay subtitles on the video"), next > edit "Generated stream output string" to delete "scodec" and to keep "soverlay" option there (:sout=#transcode{vcodec=h264,soverlay}:file{dst=H:\output.mp4} :no-sout-all), press "Stream" and VLC should start to transcode it => running time and progress bar/slider or video is playing if you ticked to "show video locally". VLC-2.2.1-win32 on Windows XP tested and working. If you get buggy output, then you rather use some dedicated tool (HandBrake?).

gamekommander
New Cone
New Cone
Posts: 2
Joined: 20 Nov 2015 10:46

Re: how to add subtitles to the video itself

Postby gamekommander » 24 Nov 2015 08:07

DVB Codec on the subtitle page? Still having no luck.... Handbrake wont overlay it either because it's not showing up in the preview. I've gotten them to appear in VLC by manually adding them. After deleting "scodec" my output string looks like:

:sout=#transcode{vcodec=h264,vb=800,scale=Auto,soverlay}:file{dst=F:\\file.mp4,no-overwrite} :sout-keep

I also tried deleting the "(vb=800..." up until soverlay and changing the "sout-keep" to match the end in the example you just gave

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: how to add subtitles to the video itself

Postby mederi » 24 Nov 2015 12:30

VLC can load subtitles automatically if you name it according to video file and put it in the same location (video.avi, video.srt) and then really the "soverlay" without the "scodec" option does the trick.
If HandBrake is not hardcoding subtitles, then try Avidemux (subtitles video filter).

plautdietsch
New Cone
New Cone
Posts: 1
Joined: 12 Apr 2020 13:36

Re: how to add subtitles to the video itself

Postby plautdietsch » 12 Apr 2020 13:39

Thank you so much for posting this!

Do you have any idea how to control the quality/size of the hardcoded file? The new file ranges from being 33% bigger to 33% smaller.
PS3: .mp4{H.264?, AAC?} + .srt => you need to transcode/reencode
You could use [url=http://aviaddxsubs.blogspot.sk/]AVIAddXSubs[/url] tool with ffmpeg to convert your .mp4 file to divx file with incorporated XSUB track supported by PS3.

In VLC-2.1.5 go to Media > Stream > Open Media dialog: File tab: [ Add... ] button to add your .mp4 file;
then [ Stream ] button > Stream Output dialog:
Source page:
[ Next > ] button

Destination setup page:
New destination [ File ] [ Add ] button > File tab: [ Browse... ] button to browse to destination file, then [ Next > ] button

Transcoding option page:
[ Create a new profile ] icon/button > Profile edition dialog:
Profile Name [ mp4 for PS3 ];
Encapsulation tab: (o) MP4/MOV;
Video codec tab: [v] Video, [ ] Keep original video track, Encoding parameters tab: Codec [H-264]
Audio codec tab: [v] Audio, [v] Keep original audio track << you probably do not need to transcode the audio
Subtitles tab: [v] Subtitles, [v] Overlay subtitles on the video
[ Create ] button, then select the new profile [ mp4 for PS3 ], then [ Next > ] button

Option setup page:
Delete "scodec=dvbs," option in the transcoding chain! Only "soverlay" option does the trick. The subtitles are loaded automatically (.srt file of the same name like the .mp4 file).

Finally press the [ Stream ] button.

Or use some other tool: Handbrake.

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: how to add subtitles to the video itself

Postby mederi » 13 Apr 2020 16:40

First of all you should check properties of a source/input file then you should decide target/output parameters. MediaInfo tool can help you https://mediaarea.net/en/MediaInfo
Check following discussion about x264/x265 encoding: https://forum.videolan.org/viewtopic.php?f=2&t=152988


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 37 guests