[FFmpeg-devel] Insert subtitle text file to video

hce webmail.hce
Tue Oct 14 06:33:54 CEST 2008


Hi,

Can the ffmpeg command line in Linux be used to insert a subtitle text
file (sub.txt) into a video file av.mp4? If so, would you please give
an command line example?

I've tried following command and gotmerrors in CentOS 5.2:


$ ffmpeg -i tennis.mp4 -i subtitle.txt -vcodec copy -acodec copyan
-vcodec copy -scodec copy testsubtitle.mp4 -newsubtitle

built on Aug 26 2008 09:55:22, gcc: 4.1.2 20071124 (Red Hat 4.1.2-42)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tennis.mp4':
 Duration: 00:01:00.71, start: 0.000000, bitrate: 638 kb/s
   Stream #0.0(eng): Video: mpeg4, yuv420p, 320x240 [PAR 1:1 DAR
4:3], 29.97 tb(r)
   Stream #0.1(eng): Audio: aac, 24000 Hz, stereo, s16
subtitle.txt: Unknown format

Thank you.




More information about the ffmpeg-devel mailing list