Closed Haprst closed 2 months ago
Is the CLI ffmpeg program able read that file?
I'm closing this issue. It turned out that the problem is somewhere else entirely, and although I haven't yet figured out how to fix it, the actual problem has no relationship to what I reported here.
OpenCVFrameConverter.ToIplImage converterIpl = null; FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(videoFile); try { grabber.start(); } catch (Exception e) { System.out.println("ERROR: Cannot start grabber"); System.exit(0); }
In JavaCV, this code reads my H.264/AVC file. This works fine, but subsequent processing is too slow. So using the commercial AVS Video Converter, I converted the file from 1920x1080 to 1280x720. The source and destination files both display correctly on Media Player.
In JavaCV, the source file works, but the destination file fails immediately with the message ERROR: Cannot start grabber. Since the source file works but the destination file using the same codec doesn't work, I believe the error must be in the additional parameters. In the source file that works, the only information I have is -VideoCodec: H.264/AVC -FrameRate: 30 fps -Bitrate: 4953 kbps -FileType: mp4 -Audio Codec: -
For the destination file that fails I have more detailed information: -VideoCodec: H.264/AVC -FrameRate: 30 fps -Bitrate: 3500 kbps single pass level 3.1 -FileType: mp4 iso v.2 -No audio
The AVS Video Converter offers 3 other FileType options and an unlimited set of Bitrates, but I have no idea which of these options I should choose. I'd prefer not to write my own video converter or try every AVS possibility, so I'm looking for advice. Thank you in advance.
The source file is 192 MB and the destination file is 135 MB, both far too large to include on Github.