Dear Video Help community,
I am trying to burn subtitles into a video using linux command line tools like ffmpeg or mencoder.
Source files are mp4 encoded using h264 video and aac audio, I am aiming to keep the same codecs / quality as the original files. Also, the resulting video needs to play in all video players (like Windows Media Player).
The following line produces a file with burned subtitles, but I am only able to play it using mplayer or VLC.
mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg4 -oac mp3lame -lameopts abr:br=128 -subcp utf8 -sub video_orig.srt video_orig.mp4 -o video_proc_mpeg4_mp3.mp4
After some reading I found out mencoder's muxer is broken and this needs to be fixed with another tool like ffmpeg, so I tried with:
ffmpeg -y -i video_proc_mpeg4_mp3.mp4 -vcodec copy -acodec copy video_proc_mpeg4_mp3_ffmpeg.mp4
Which gives me the following error: [mp4 @ 0x1b56e80] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 480609 >= 480609
My second attempt was to re-encode the video with ffmpeg using h264 and aac
ffmpeg -i video_proc_mpeg4_mp3.mp4 -vcodec libx264 -vpre ipod320 -crf 22 -acodec aac -strict experimental -ab 128k -y video_proc_h264_aac_ffmpeg.mp4
Which produced a file that plays in all players but the video is now choppy.
I also tryed adding the subtitles while copying the original audio and video codecs
mencoder -of lavf -oac copy -fafmttag 0x706D -ovc copy -subcp utf8 -sub video_orig.srt video_orig.mp4 -o video_proc_x264_aac.mp4
This produced an identical quality file, buy with no burned subtitles
So my question is how could a get a video with similar size / quality / codecs with burned subtitles using mencoder / ffmpeg or any other console tool. Please feel free to ask any additional information you may need.
+ Reply to Thread
Results 1 to 1 of 1
Similar Threads
-
how can i mux to mp4 from h264/aac using ffmpeg
By DKhanh in forum Video ConversionReplies: 3Last Post: 24th Aug 2013, 11:50 -
VirtualDub gives error when i encode mp4 h264/aac file with same codec
By soshipurpleskies in forum Video ConversionReplies: 2Last Post: 13th Aug 2012, 04:54 -
MKV [h264/aac] to mp4 conversion problems...
By DestructoEH in forum Video ConversionReplies: 6Last Post: 12th May 2009, 19:19 -
.ts file convert to h264/aac with hardcoded subtitles
By akiraku in forum Video ConversionReplies: 4Last Post: 25th Apr 2009, 08:49 -
How to create .mp4 file by using raw .h264 and .aac files for JW Player
By hakkinen in forum Newbie / General discussionsReplies: 2Last Post: 10th Mar 2009, 20:49