1
I am trying to "bake in" a custom made subtitle file (Advanced SubStation Alpha) for a short (3:46) video. However, despite trying an assortment of commandline options, VLC seems to always cut off the end of the video. Depending on the parameters, it cuts anywhere from a few seconds up to about 1:05 off.
The basic format of the commands I've tried are as follows:
vlc -v tdcutb.mp4 --run-time 300 --sub-file=tdcutb2.ass \
--sub-track=1 -I rc --sout-transcode-threads 8 --sout \
'#transcode{venc=x264'\
'{crf=15,keyint=50,no-mixed-refs,ref=4,subme=7,weightp=2,me=umh},'\
'vcodec=mp4v,vb=4096,acodec=mpga,ab=128,soverlay}'\
':standard{mux=mp4,dst=tdcutb-sub.mp4,access=file}' vlc://quit
I've fiddled with different --run-time values (as well as omitting it entirely), and various x264 parameters (with/without crf specified using values from 10 to 25, keyint from 10 to 250, ref from 1 to 4, subme from 0 to 7, weightp from 0 to 2). I've also tried adjusting vb.
I have found that lowering keyint tends to get "closer" to full length, but with values < 100 the file size starts getting ridiculous, and it still doesn't go full length. Oddly, decreasing subme seems to help a little, but it doesn't get me full length output either and reduces quality.
FYI I'm running Mac OS X 10.9.4, and VLC media player 2.1.0 Rincewind (revision 2.1.0-0-gedd8835).
EDIT: I've now also tried different encoders (venc=ffmpeg), different codecs (codec=VP80), different muxers (ffmpeg/webm), and they all fail to varying degrees (with the worst offender putting out a 0:39 video). I'm almost certain now that this has something to do with VLC specifically.
EDIT 2: I tried transcoding to WebM first using ffmpeg; I completed this without incident (and the resulting video was the proper length), but when I used VLC to try and bake in the subtitles on the WebM video I got from ffmpeg, it encountered the same issues.