FFMPEG generates grey frames when ripping images for OCR purposes

Steps to reproduce

-Process a lecture with segmentable video
-Note that you get no OCR'd text (at least with the demo media)

What's happening is that FFMPEG is spitting out grey frames rather than the expected image, along with this error:
[mpeg2video @ 0x30f9da0] warning: first frame is no keyframe

This appears to mean that we can only rip keyframes! The default ripping profile works fine on frame 0, but I have no been able to find another frame in the reference media which works.

Workaround:
Set the frame ripping point after the input file on the ffmpeg commandline. This:
profile.text-analysis.http.ffmpeg.command = -strict unofficial -y -ss #{time} -i #{in.video.path} -r 1 -vframes 1 -f image2 -pix_fmt rgb24 #{out.dir}/#{out.name}#{out.suffix}
becomes
profile.text-analysis.http.ffmpeg.command = -strict unofficial -y -i #{in.video.path} -ss #{time} -r 1 -vframes 1 -f image2 -pix_fmt rgb24 #{out.dir}/#{out.name}#{out.suffix}

I would just commit this change, except the second one is much less efficient. Basically, FFMPEG is playing back the video from the beginning for each frame that's ripped. This becomes extremely problematic with larger media.

Status

Assignee

Greg Logan

Reporter

Greg Logan

Severity

Incorrectly Functioning With Workaround

Tags (folksonomy)

None

Components

Fix versions

Affects versions

1.3.1
1.3
1.4.0

Priority

Blocker