[FFmpeg-user] How to use ocr filter

Paul B Mahol onemda at gmail.com
Thu Sep 17 17:39:53 CEST 2015


On 9/17/15, Moritz Barsnick <barsnick at gmx.net> wrote:
> On Thu, Sep 17, 2015 at 15:12:17 +0000, Paul B Mahol wrote:
>> On 9/17/15, nicolab <robelt2525 at gmail.com> wrote:
>> > When I using ocr filter, how to output ocr text file ?
>
>> drawgraph accepts only floats values.
>>
>> ffplay ~/img.png -vf
>> "ocr,split[ocr][o1],[ocr]lutyuv=y=0:u=128:v=128,drawtext=fontcolor=white:x=10:y=10:text=%{metadata\\:lavfi.ocr.text}[o2],[o1][o2]vstack"
>
> Whatever you're doing, Paul, isn't outputting to text file, as nicolab
> requested. ;-)
>
> I think ffprobe is the correct approach. It can output - as text - the
> metadata which the ocr filter inserts.
>
> I can't test, since none of my binaries has ocr support, but probably
> something like:
>
> $ ffprobe -show_frames -f lavfi -i "movie=img.png,ocr"
>
> and some additional options for selecting the correct fields.
>
> ffmpeg also has an output format "ffmetadata", that might help as well
> (but I guess it contains _all_ metadata, and fields can't be selected
> or filtered).

ffprobe -show_entries frame_tags=lavfi.ocr.text -f lavfi -i "movie=img.png,ocr"

>
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list