Open ywangwxd opened 6 months ago
Are you using the latest release or a git checkout? I fixed a number of small problems related to these examples very recently. Try compiling a vanilla ffmpeg 6.1 and try transcoding file to file, if this doesn't work, then there is a problem.
'-11' means EAGAIN. You can try to make access again, something like:
if (ec) {
if (ec == av::make_ffmpeg_condition(-EGAIN)) {
continue;
}
...
}
I git pull the latest commit from the master branch. The last commit is Dec 21. As I said, if I use ffmpeg command line to transcoe, it is working. Does this mean there is no problem with the rockchip-mpp backend?
Are you using the latest release or a git checkout? I fixed a number of small problems related to these examples very recently. Try compiling a vanilla ffmpeg 6.1 and try transcoding file to file, if this doesn't work, then there is a problem.
Are you sure, I found return code <0 is error in the document.
In common way - you are right. But there is cases, when, for example, data is not ready yet but system work properly and you should just a wait a little. EBUSY, EAGAIN just a way say it.
In any case, HW can just stuck and maybe some proper configuration is needed in additional to generic SW setup.
Are you sure, I found return code <0 is error in the document.
In common way - you are right. But there is cases, when, for example, data is not ready yet but system work properly and you should just a wait a little. EBUSY, EAGAIN just a way say it.
In any case, HW can just stuck and maybe some proper configuration is needed in additional to generic SW setup.
The original code is something like this
while (Packet pkt = ictx.readPacket(ec)) {
//some other code here
VideoFrame frame = vdec.decode(pkt, ec);
//some other code here
}
You mean I should do a while in the while? eg, do a while loop after each packet or do it on the read packet & decode together?
Are you sure, I found return code <0 is error in the document.
In common way - you are right. But there is cases, when, for example, data is not ready yet but system work properly and you should just a wait a little. EBUSY, EAGAIN just a way say it. In any case, HW can just stuck and maybe some proper configuration is needed in additional to generic SW setup.
The original code is something like this
while (Packet pkt = ictx.readPacket(ec)) { //some other code here VideoFrame frame = vdec.decode(pkt, ec); //some other code here }
You mean I should do a while in the while? eg, do a while loop after each packet or do it on the read packet & decode together?
I have tried doing a for loop on VideoFrame frame = vdec.decode(pkt, ec); but it never stops after get -11 return value.
Are you sure, I found return code <0 is error in the document.
In common way - you are right. But there is cases, when, for example, data is not ready yet but system work properly and you should just a wait a little. EBUSY, EAGAIN just a way say it. In any case, HW can just stuck and maybe some proper configuration is needed in additional to generic SW setup.
The original code is something like this
while (Packet pkt = ictx.readPacket(ec)) { //some other code here VideoFrame frame = vdec.decode(pkt, ec); //some other code here }
You mean I should do a while in the while? eg, do a while loop after each packet or do it on the read packet & decode together?
Neither of the two approaches work. But if I use ffmpeg command line to do anything, decode or transcode. It is working. With the vallina ffmpeg compiled, this is no problem.
An update again. I have tried the example code of decode_video.c in the official ffmpeg repo under /doc/examples. This example program is working with ffmpeg-mpp. So it is highly possible that there is some problem with api2-decode here.
@ywangwxd , could you please send me a sample of the problematic video? Also, issue are mpp related only? Does video successfully processed by the software decoder?
I compiled ffmpeg with rockchip mpp. I have tested ffmpeg command to transcode a rtsp stream to a video file, it is working well. But if I use api2-decode or api2-decode-encode-video, neither of them success.
This is the final part of the screen message. It seems that the decoder get many empty frame. The final error is hard to understand.