[FFmpeg-user] Export raw (binary) subtitle data
Johannes Bauer
dfnsonfsduifb at gmx.de
Mon Jun 5 20:35:34 EEST 2017
Hi Moritz,
On 05.06.2017 15:59, Moritz Barsnick wrote:
> On Sat, Jun 03, 2017 at 15:33:22 +0200, Johannes Bauer wrote:
>> Subtitle word 'pie~ejpgnlekkjgijeiliojpeeeicko' too long!
>
> Hmm, it looks like their display duration isn't defined correctly,
> perhaps. (That's an mplayer message, not libav*).
Oh, I thought it maybe was the actual length of the word that it
complained about.
>> Is there a way to export the raw binary subtitle data just the way it's
>> interleaved within the video to a file using ffmpeg? If so, I'd greatly
>> appreciate any pointers.
>
> I don't use it myself, but I just tried, and this gives you
> *something*, by playing a copy of the subtitle stream into a file by
> using the raw data muxer:
>
> $ ffmpeg -i 06031028_0041.MOV -map 0:s -c copy -f data 06031028_0041.mov_text.dat
Yes! This seems to be what I'm looking for!
> You would need to understand what raw mov_text looks like, in order to
> build your own parser. ;-)
Yup, I'll try to get reversing right away.
> Alas, the timestamps also get lost - they're not partof the payload.
> You may need to parse them out differently (e.g. from ffprobe or from
> the SRT conversion).
Hmmm, yes, unfortunate. I was hoping to get that information as well,
but I think that every line corresponds to one occurence -- so I can put
everything back together.
Thanks so much for your help. I'm really curious to see if I can figure
this out.
One thing made me wonder, however: What if the binary data contained
'\n'? Then it probably would cause me some grief, wouldn't it? Some
binary dump format (e.g. timestamp duration base64-encoded) would be
ideal to avoid this. But I'm happy with what I have now :-)
Thanks again!
Cheers,
Joe
More information about the ffmpeg-user
mailing list