burning srt into mp4

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
manit123
Posts: 16
Joined: Thu Oct 25, 2012 12:30 pm

burning srt into mp4

Post by manit123 »

I am using 0.9.9.5530 32bit version.
I have an mp4 video & synchronised srt file . I want to combine them to make a video which has subtitles burned into frame (nobody can turn it off).
I read https://trac.handbrake.fr/wiki/Subtitles which tells me to make vobsub or ssa to avoid passthrough .
I used Setup_SubtitleCreator_v2_3rc1.exe to make sub,idx file from srt.
I find that on pressing 'add' button in subtitles section I get source as 'foreign audio scan' which is not editable .
What should I do to add those vobsub in video ?
BTW , my output container is mp4 & I get m4v file as destination.
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: burning srt into mp4

Post by TedJ »

Mux your source file and vobsubs into an intermediate MKV file with mkvmerge or MKVToolNix, then feed that file into HandBrake.
Smithcraft
Veteran User
Posts: 2697
Joined: Thu Jan 22, 2009 8:04 pm

Re: burning srt into mp4

Post by Smithcraft »

Handbrake uses the m4v extension when you use features that are not quite supported by the MP4 container. You can just change it to .mp4 yourself, and you can also set a preference to make it use mp4.

SC
manit123
Posts: 16
Joined: Thu Oct 25, 2012 12:30 pm

Re: burning srt into mp4

Post by manit123 »

Do you mean there is no way to give input subtitle as ssa file or sub,idx file pair ?
manit123
Posts: 16
Joined: Thu Oct 25, 2012 12:30 pm

Re: burning srt into mp4

Post by manit123 »

I muxed video(mp4) & subtitle file(srt) and got output mkv.
On selecting it as source , I get 2 sources in subtitles where 'burn in' attribute of 'foreign audio scan' can be ticked. Also '1 unknown (UTF8)' source can be marked as default. Tried both combinations but the resultant file analysis is

Code: Select all

C:\Users\cdot>"d:\SUMEET\for all\media\ffmpeg\bin\ffmpeg.exe" -i "d:\trying to b
urn\unknown-default.mp4"
FFmpeg version SVN-r23607, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jun 15 2010 04:09:35 with gcc 4.4.2
  configuration: --target-os=mingw32 --enable-runtime-cpudetect --enable-avisynt
h --enable-gpl --enable-version3 --enable-bzlib --enable-libgsm --enable-libfaad
 --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libspeex --ena
ble-libmp3lame --enable-libopenjpeg --enable-libxvid --enable-libschroedinger --
enable-libx264 --extra-libs='-lx264 -lpthread' --enable-libopencore_amrwb --enab
le-libopencore_amrnb --enable-librtmp --extra-libs='-lrtmp -lpolarssl -lws2_32 -
lwinmm' --arch=x86 --cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' -
-enable-memalign-hack
  libavutil     50.19. 0 / 50.19. 0
  libavcodec    52.76. 0 / 52.76. 0
  libavformat   52.68. 0 / 52.68. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.20. 0 /  1.20. 0
  libswscale     0.11. 0 /  0.11. 0

Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (18
0000/1) -> 1000.00 (1000/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd:\trying to burn\unknown-default.mp4':

  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    encoder         : HandBrake 0.9.9 2013052900
  Duration: 00:00:19.62, start: 0.000000, bitrate: 1085 kb/s
    Stream #0.0(und): Video: h264, yuv420p, 640x298 [PAR 23691:23680 DAR 159:74]
, 928 kb/s, 30 fps, 1k tbr, 90k tbn, 180k tbc
    Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 151 kb/s
    Stream #0.2(und): Subtitle: tx3g / 0x67337874, 0 kb/s
At least one output file must be specified
I do not want a subtitle stream in output file but want subtitle text to be burned in video frame permanently . What should I do ?
Smithcraft
Veteran User
Posts: 2697
Joined: Thu Jan 22, 2009 8:04 pm

Re: burning srt into mp4

Post by Smithcraft »

Post the encode log not the file analysis.

SC
Deleted User 11865

Re: burning srt into mp4

Post by Deleted User 11865 »

Won't change the fact that HandBrake can't burn-in SRT subtitles.
GregiBoy
Veteran User
Posts: 908
Joined: Sat Feb 12, 2011 9:23 pm

Re: burning srt into mp4

Post by GregiBoy »

Mux the SSA file into the MKV, not the SRT, then process with Handbrake.
manit123
Posts: 16
Joined: Thu Oct 25, 2012 12:30 pm

Re: burning srt into mp4

Post by manit123 »

While adding ssa to mp4 video in mkvmerge , I get
Command line used:

"c:\Program Files (x86)\MKVToolNix\mkvmerge.exe" --output-charset UTF-8 --identify-for-mmg "D:\trying to burn\do.ssa"

Output:

Error: File D:\trying to burn\do.ssa has unknown type. Please have a look at the supported file types ('mkvmerge --list-types') and contact the author Moritz Bunkus <moritz@bunkus.org> if your file type is supported but not recognized properly.
Smithcraft
Veteran User
Posts: 2697
Joined: Thu Jan 22, 2009 8:04 pm

Re: burning srt into mp4

Post by Smithcraft »

Maybe just use the GUI?

SC
manit123
Posts: 16
Joined: Thu Oct 25, 2012 12:30 pm

Re: burning srt into mp4

Post by manit123 »

finally i was able to burn subtitles into video using ffmpeg-20131010-git-996c734-win32-static obtaind from http://ffmpeg.zeranoe.com/builds/
The command that worked was
d:\ffmpeg-20131010-git-996c734-win32-static\bin\ffmpeg.exe -i d:\trying_to_burn\video\ETRG.mp4 -acodec libmp3lame -vcodec libx264 -vf "subtitles=etrg.srt" d:\trying_to_burn\video\go-ffmpeg.mp4
Post Reply