[FFmpeg-user] embedding subtitles missing features when apply fonts?

Sub Phil phil4000n at gmail.com
Mon May 25 19:09:21 CEST 2015


Hi,

I want to embedded srt subtitle with colours, do I miss something in the
CLI or is it not fully implemented into ffmpeg?

The separed files - video and srt - do play as expected into SMplayer.

Thanks.


My srt file being:
00:00:04,000-->00:00:04,800
<font color="blue">Ought to be BLUE</font>

00:00:08,000-->00:00:09,100
<font color="blue">Red???</font>


G:\>ffmpeg -i "in.mp4" -f srt -i "in.srt" -c copy -c:s mov_text out.mp4
ffmpeg version N-72168-gf8598ce Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fo
ntconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass
--enable-libbluray --enable-libbs2b --ena
ble-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme
--enable-libgsm --enable-libilbc --enable-lib
modplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-l
ibtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --
enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxavs --enable-libxvid --enable-l
zma --enable-decklink --enable-zlib
  libavutil      54. 23.101 / 54. 23.101
  libavcodec     56. 39.100 / 56. 39.100
  libavformat    56. 33.101 / 56. 33.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 16.101 /  5. 16.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.33.101
  Duration: 00:00:09.99, start: 0.018005, bitrate: 474 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 /
0x31637661), yuv420p, 636x360 [SAR 1:1 DAR 53:30
], 453 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
stereo, fltp, 96 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #1, srt, from 'in.srt':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Subtitle: subrip
[mp4 @ 0000000002fca440] Codec for stream 0 does not use global headers but
container format requires global head
ers
[mp4 @ 0000000002fca440] Codec for stream 1 does not use global headers but
container format requires global head
ers
Output #0, mp4, to 'out.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.33.101
    Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv420p,
636x360 [SAR 1:1 DAR 53:30], q=2-31, 453 kb/
s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz,
stereo, 96 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Stream #0:2: Subtitle: mov_text ([8][0][0][0] / 0x0008)
    Metadata:
      encoder         : Lavc56.39.100 mov_text
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #1:0 -> #0:2 (subrip (srt) -> mov_text (native))
Press [q] to stop, [?] for help
[mp4 @ 0000000002fca440] Packet with invalid duration -22528 in stream 0
frame=  205 fps=0.0 q=-1.0 Lsize=     581kB time=00:02:16.00 bitrate=
 35.0kbits/s
video:454kB audio:117kB subtitle:1kB other streams:0kB global headers:0kB
muxing overhead: 1.471361%

G:\>


More information about the ffmpeg-user mailing list