Code Monkey home page Code Monkey logo

Comments (9)

mmomtchev avatar mmomtchev commented on August 28, 2024

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.

from avcpp.

h4tr3d avatar h4tr3d commented on August 28, 2024

'-11' means EAGAIN. You can try to make access again, something like:

if (ec) {
  if (ec == av::make_ffmpeg_condition(-EGAIN)) {
    continue;
  }
  ...
}

from avcpp.

ywangwxd avatar ywangwxd commented on August 28, 2024

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.

from avcpp.

h4tr3d avatar h4tr3d commented on August 28, 2024

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.

from avcpp.

ywangwxd avatar ywangwxd commented on August 28, 2024

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?

from avcpp.

ywangwxd avatar ywangwxd commented on August 28, 2024

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.

from avcpp.

ywangwxd avatar ywangwxd commented on August 28, 2024

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.

from avcpp.

ywangwxd avatar ywangwxd commented on August 28, 2024

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.

from avcpp.

h4tr3d avatar h4tr3d commented on August 28, 2024

@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?

from avcpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.