[Libav-user] embedded text subtitles

Gonzalo Garramuño ggarra13 at gmail.com
Sun Apr 30 23:43:23 EEST 2017


I was wondering if there's any way to read and display embedded text 
subtitles (like .srt) in a movie file (mov or mp4) with ffmpeg.  As a 
reference, the movie I am trying opens with subtitles in vlc.

I tried the following, with no success:

$ ffplay movie.mov -vf "subtitles=movie.mov"

I get:

ffplay version N-85266-g1229007 Copyright (c) 2003-2017 the FFmpeg 
developers
   built with gcc 6.3.0 (GCC)
   configuration: --disable-static --enable-shared --enable-gpl 
--enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxv
-libmfx --enable-nvenc --enable-avisynth --enable-bzlib 
--enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv 
--enable-libass
bbluray --enable-libbs2b --enable-libcaca --enable-libfreetype 
--enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enabl
e --enable-libopencore-amrnb --enable-libopencore-amrwb 
--enable-libopenh264 --enable-libopenjpeg --enable-libopus 
--enable-librtmp --enabl
  --enable-libsoxr --enable-libspeex --enable-libtheora 
--enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc 
--enable-libvorbis -
vpx --enable-libwavpack --enable-libwebp --enable-libx264 
--enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg 
--enable-lzma
lib
   libavutil      55. 59.100 / 55. 59.100
   libavcodec     57. 90.100 / 57. 90.100
   libavformat    57. 72.100 / 57. 72.100
   libavdevice    57.  7.100 / 57.  7.100
   libavfilter     6. 83.100 /  6. 83.100
   libswscale      4.  7.100 /  4.  7.100
   libswresample   2.  8.100 /  2.  8.100
   libpostproc    54.  6.100 / 54.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'AnimSchool Animation Student 
Showcase 2015-OMYtIlwH3DY.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 512
     compatible_brands: qt
     encoder         : Lavf56.40.101
   Duration: 00:02:52.78, start: 0.000000, bitrate: 3315 kb/s
     Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 
1280x720 [SAR 1:1 DAR 16:9], 3252 kb/s, 24 fps, 24 tbr, 12288 tbn, 4
ult)
     Metadata:
       handler_name    : DataHandler
       encoder         : Lavc56.60.100 libx264
     Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 
stereo, fltp, 63 kb/s (default)
     Metadata:
       handler_name    : DataHandler
[Parsed_subtitles_0 @ 0000000002b4bd40] Shaper: FriBidi 0.19.6 (SIMPLE)
[Parsed_subtitles_0 @ 0000000002b4bd40] Unable to locate subtitle stream 
in movie.mov
Error initializing filter 'subtitles' with args 'movie.mov'

-- 
Gonzalo Garramuño



More information about the Libav-user mailing list