[FFmpeg-user] How to use ocr filter

nicolab robelt2525 at gmail.com
Sat Sep 19 02:52:52 CEST 2015


>On 9/17/15, Moritz Barsnick <[hidden email]> wrote:

>> On Thu, Sep 17, 2015 at 15:12:17 +0000, Paul B Mahol wrote:
>>> On 9/17/15, nicolab <[hidden email]> 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"

Thanks! I can output ocr text.

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

https://www.ffmpeg.org/ffprobe.html

>> Moritz
>> _______________________________________________
>> ffmpeg-user mailing list
>> [hidden email]
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user

>_____________________________________________
>ffmpeg-user mailing list
>[hidden email]
>http://ffmpeg.org/mailman/listinfo/ffmpeg-user



-----
https://twitter.com/nico_lab
http://nico-lab.net/
--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/How-to-use-ocr-filter-tp4672454p4672491.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list