Home/News | About | Download | Documentation | Forum | Bug Reports | Contact | Donations | Consulting | Projects | Legal | Security | FATE


How to add captions to an FLV file?

Discussions about problems encountered using ffmpeg.
Forum rules
FFmpeg is in a state of perpetual development and we do not currently have the person power to backport fixes to official releases. As such, if you wish to query or report a bug, you must try with the latest development branch revision of FFmpeg to confirm the issue still exists. The latest FFmpeg can be downloaded from here: http://www.ffmpeg.org/download.html

How to add captions to an FLV file?

Postby badassmexican » Sat Jul 27, 2013 2:10 am

Hi,

I have a flv video that has captions. When I look at the info I see this as the caption stream: Stream #0:2: Data: none
We used Captionate for that. I was able to get an SRT file to hardcode the captions on the video but you can't make them go away. How do I get captions onto a stream of an FLV?

I've been trying this:

Code: Select all
ffmpeg -i NSF_CT_001.flv -i NSF_CT_001.srt -map 0:0 -c copy -map 0:1 -c copy -map 1:0 -c srt NSF_CT_001_muxed.flv



output

Code: Select all
ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers
  built on Apr 18 2013 12:29:25 with Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/1.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=cc --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-aacenc --enable-libass --enable-ffplay --enable-libspeex --enable-libschroedinger --enable-libfdk-aac --enable-libopus --enable-frei0r --enable-libopenjpeg --extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.1/include/openjpeg-1.5 '
  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, flv, from 'NSF_CT_001.flv':
  Metadata:
    creationdate    : Thu Jun 20 16:55:42 2013
    lasttimestamp   : 113
    lastkeyframetimestamp: 112
    audiodelay      : 0
    canSeekToEnd    : false
    videosize       : 6613595
    audiosize       : 1860432
    datasize        : 7714
  Duration: 00:01:53.03, start: 0.000000, bitrate: 601 kb/s
    Stream #0:0: Video: vp6f, yuv420p, 480x360, 614 kb/s, 29.97 tbr, 1k tbn, 1k tbc
    Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
[srt @ 0x7fa7aa013600] Estimating duration from bitrate, this may be inaccurate
Input #1, srt, from 'NSF_CT_001.srt':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Subtitle: subrip
File 'NSF_CT_001_muxed.flv' already exists. Overwrite ? [y/N] y
Codec type 'subtitle' for stream 2 is not compatible with FLV
Output #0, flv, to 'NSF_CT_001_muxed.flv':
  Metadata:
    creationdate    : Thu Jun 20 16:55:42 2013
    lasttimestamp   : 113
    lastkeyframetimestamp: 112
    audiodelay      : 0
    canSeekToEnd    : false
    videosize       : 6613595
    audiosize       : 1860432
    datasize        : 7714
    encoder         : Lavf54.63.104
    Stream #0:0: Video: vp6f ([4][0][0][0] / 0x0004), yuv420p, 480x360, q=2-31, 614 kb/s, 1k tbn, 1k tbc
    Stream #0:1: Audio: mp3 ([2][0][0][0] / 0x0002), 44100 Hz, stereo, 128 kb/s
    Stream #0:2: Subtitle: srt
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #1:0 -> #0:2 (subrip -> srt)
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument



Here's the output for the one that has captions by Captionate:

Code: Select all
ffmpeg -i 08NG11967.flv
ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers
  built on Apr 18 2013 12:29:25 with Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/1.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=cc --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-aacenc --enable-libass --enable-ffplay --enable-libspeex --enable-libschroedinger --enable-libfdk-aac --enable-libopus --enable-frei0r --enable-libopenjpeg --extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.1/include/openjpeg-1.5 '
  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[flv @ 0x7ff9b1822800] Stream discovered after head already parsed
Input #0, flv, from '08NG11967.flv':
  Metadata:
    creationdate    : Fri May  4 18:11:38 2012
    lasttimestamp   : 102
    lastkeyframetimestamp: 97
    audiodelay      : 0
    canSeekToEnd    : false
    videosize       : 6415441
    audiosize       : 1689402
    datasize        : 3284
    metadatacreator : Manitu Group Captionate 2
  Duration: 00:01:41.69, start: 0.000000, bitrate: 637 kb/s
    Stream #0:0: Video: vp6f, yuv420p, 480x360, 614 kb/s, 29.97 tbr, 1k tbn, 1k tbc
    Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
    Stream #0:2: Data: none
At least one output file must be specified



Thanks,
Joel
Last edited by badassmexican on Mon Jul 29, 2013 8:55 pm, edited 2 times in total.
badassmexican
 
Posts: 6
Joined: Fri Jul 26, 2013 10:19 pm

Re: How to add captions to an FLV file?

Postby llogan » Mon Jul 29, 2013 6:36 pm

Please use the [CODE] tags to format the text so it's easier to read and see the difference between ffmpeg commands/console outputs and your comments.
llogan
 
Posts: 823
Joined: Fri Jan 25, 2013 9:47 pm
Location: Alaska

Re: How to add captions to an FLV file?

Postby badassmexican » Mon Jul 29, 2013 7:57 pm

Hmmm.... is there a closing tag for [CODE] I'm missing?
badassmexican
 
Posts: 6
Joined: Fri Jul 26, 2013 10:19 pm

Re: How to add captions to an FLV file?

Postby llogan » Mon Jul 29, 2013 8:43 pm

See the help on code. Or highlight your text and press the "Code" button above the text box.
llogan
 
Posts: 823
Joined: Fri Jan 25, 2013 9:47 pm
Location: Alaska

Re: How to add captions to an FLV file?

Postby badassmexican » Mon Jul 29, 2013 8:56 pm

Got it. Thanks.
badassmexican
 
Posts: 6
Joined: Fri Jul 26, 2013 10:19 pm

Re: How to add captions to an FLV file?

Postby llogan » Mon Jul 29, 2013 9:17 pm

Thanks.

Can you provide a sample file from Captionate?
llogan
 
Posts: 823
Joined: Fri Jan 25, 2013 9:47 pm
Location: Alaska

Re: How to add captions to an FLV file?

Postby badassmexican » Mon Jul 29, 2013 9:42 pm

Here's one.

NSF_CT_001 . flv

(Of course remove the spaces in the file extension)
Last edited by badassmexican on Tue Jul 30, 2013 1:09 am, edited 1 time in total.
badassmexican
 
Posts: 6
Joined: Fri Jul 26, 2013 10:19 pm

Re: How to add captions to an FLV file?

Postby llogan » Mon Jul 29, 2013 10:26 pm

What can play the videos from Captionate and show the captions?
llogan
 
Posts: 823
Joined: Fri Jan 25, 2013 9:47 pm
Location: Alaska

Re: How to add captions to an FLV file?

Postby badassmexican » Mon Jul 29, 2013 11:33 pm

We use an old version of a player by thePlatform. I googled a bit and I think old versions of JWplayer can play them also.
Last edited by badassmexican on Tue Jul 30, 2013 1:09 am, edited 1 time in total.
badassmexican
 
Posts: 6
Joined: Fri Jul 26, 2013 10:19 pm

Re: How to add captions to an FLV file?

Postby badassmexican » Tue Jul 30, 2013 12:22 am

badassmexican
 
Posts: 6
Joined: Fri Jul 26, 2013 10:19 pm

Next

Return to ffmpeg

Who is online

Users browsing this forum: No registered users and 3 guests