Opened 11 years ago

Last modified 9 years ago

#2933 new enhancement

flv captions

Reported by: Carl Eugen Hoyos Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: flv sub
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

http://ffmpeg.gusari.org/viewtopic.php?f=16&t=1013
A user provided two flv samples that are said to contain "captions" made with Captionate that can be shown with JWplayer and Flash Professional Extension.

$ ffmpeg -i NSF_CT_001.flv
ffmpeg version N-55966-gfdd1aaf Copyright (c) 2000-2013 the FFmpeg developers
  built on Sep  3 2013 00:31:26 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  libavutil      52. 43.100 / 52. 43.100
  libavcodec     55. 31.100 / 55. 31.100
  libavformat    55. 15.100 / 55. 15.100
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 82.102 /  3. 82.102
  libswscale      2.  5.100 /  2.  5.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
[flv @ 0x2c90080] Stream discovered after head already parsed
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       : 6627143
    audiosize       : 1877740
    datasize        : 4116
    metadatacreator : Manitu Group Captionate 2
  Duration: 00:01:53.03, start: 0.000000, bitrate: 602 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

Change History (3)

comment:2 by al3x, 9 years ago

More info on: http://www.buraks.com/captionate/docs/receive.html and http://flash.flowplayer.org/documentation/events/clip.html

Demuxer support implemented in 3727cd5416788df8e4a54dbde903de858de7de7b.

According to captionate documention there might be subs for multiple streams:

	nets.onCaption = function(captions,speaker){
		trace('onCaption event at '+nets.time);
		trace(' Speaker index: '+speaker);
		for (n=0;n<captions.length;n++){
			str=captions[n];
			trace(' Caption for track '+n+' > "'+str+'"');
	}

	nets.onCaptionInfo = function(info){
		trace('onCaptionInfo event at '+nets.time);
		speakers=info.speakers;
		for (n=0;n<speakers.length;n++){
			obj=speakers[n];
			trace(' Speaker '+n+' > '+
			' name: "'+obj.name+'"'+
			' data: "'+obj.data+'"' );
		}
		tracks=info.tracks;
		for (n=0;n<tracks.length;n++){
			obj=tracks[n];
			trace(' Track '+n+' > '+
			' displayname: "'+obj.displayname+'"'+
			' type: "'+obj.type+'"'+
			' languagecode: "'+obj.languagecode+'"'+
			' targetwpm: '+obj.targetwpm+
			' data: "'+obj.data+'"' );
			}
		}

	}

comment:3 by Carl Eugen Hoyos, 9 years ago

Linebreaks don't work for the given sample, see:
http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/192746
The mentioned patch was applied in 87f90be4 and before.

Note: See TracTickets for help on using tickets.