vrecord icon indicating copy to clipboard operation
vrecord copied to clipboard

Show decoded caption data in Caption viewer

Open iamdamosuzuki opened this issue 1 year ago • 2 comments

I would like to have the option to view the decoded caption data in the Caption Viewer mode, rather than the raw hex values.

iamdamosuzuki avatar Jun 28 '24 17:06 iamdamosuzuki

Hmm, I'm not sure how to get ffmpeg to do this, cc'ing @richardpl for advice.

Currently the caption values as accessible in their hexadecimal form via the metadata filter (as used at https://github.com/amiaopensource/vrecord/blob/e933bd84d62a0bd5edaa8891f6a20557c116443b/vrecord#L551) and then output to a file. Then a function processes that metadata output from those hex values into an scc (https://github.com/amiaopensource/vrecord/blob/e933bd84d62a0bd5edaa8891f6a20557c116443b/vrecord#L265-L340, this is borrowed from sccyou).

To get onscreen captions for a live input, then the output of the metadata filter would need to be sent back to ffmpeg as an additional input. I see that ffmpeg has an 608 decoder but I'm uncertain how to accept that as an input as there's no -f rawdata -c eia608 options.

dericed avatar Jul 01 '24 17:07 dericed

You could write .scc files and use .scc demuxer from libavformat, if you instead need realtime/stream solution than its more complex.

richardpl avatar Jul 01 '24 20:07 richardpl