-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Description
Thanks you for your working hard to release v1.5.6. I tested and found an issue:
Ver 1.5.6 (release version)
Issue: FFmpegFrameGrabber.grab could not grab frames
Test code:
try {
FFmpegLogCallback.set();
FFmpegFrameGrabber g = new FFmpegFrameGrabber("t.mpg");
g.start();
int count_frame = 0;
while (true) {
Frame frame = g.grab();
if (frame == null) {
break;
}
count_frame++;
}
g.stop();
System.out.println("Number of frames: " + count_frame);
} catch (FFmpegFrameGrabber.Exception e) {
e.printStackTrace();
}
Output:
Error: [mp3float @ 0x7fe47316aa00] Header missing
Warning: [mpegts @ 0x7fe471a4d400] DTS 9000 < 12600 out of order
Info: Input #0, mpegts, from 't.mpg':
Info: Duration:
Info: 00:00:14.05
Info: , start:
Info: 0.086122
Info: , bitrate:
Info: 768 kb/s
Info:
Info: Program 1
Info: Stream #0:0
Info: [0x12d]
Info: : Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bottom first), 352x288 [SAR 12:11 DAR 4:3]
Info: ,
Info: 25 fps,
Info: 25 tbr,
Info: 90k tbn,
Info: 50 tbc
Info:
Info: Side data:
Info:
Info: cpb:
Info: bitrate max/min/avg: 500000/0/0 buffer size: 147456
Info: vbv_delay: N/A
Info:
Info: Stream #0:1
Info: [0x12e]
Info: : Audio: mp3 ([3][0][0][0] / 0x0003), 44100 Hz, mono, fltp, 128 kb/s
Info:
Error: [mp3float @ 0x7fe470204200] Header missing
org.bytedeco.javacv.FFmpegFrameGrabber$Exception: avcodec_send_packet() error -1094995529: Error sending an audio packet for decoding. (For more details, make sure FFmpegLogCallback.set() has been called.)
at org.bytedeco.javacv.FFmpegFrameGrabber.grabFrame(FFmpegFrameGrabber.java:1414)
at org.bytedeco.javacv.FFmpegFrameGrabber.grab(FFmpegFrameGrabber.java:1280)
at abc.Test.main(Test.java:23)
Disconnected from the target VM, address: '127.0.0.1:60978', transport: 'socket'
Process finished with exit code 0
OS: Mac and Centos
Test video:
t.mpg.zip