Comments (9)
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.
'-11' means EAGAIN. You can try to make access again, something like:
if (ec) {
if (ec == av::make_ffmpeg_condition(-EGAIN)) {
continue;
}
...
}
from avcpp.
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.
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.
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.
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.
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.
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.
@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)
- Broken with FFmpeg 5.1 HOT 2
- CMake: INTERFACE_LIBRARY targets may only have whitelisted properties. HOT 2
- FFmpeg 5.1: fix channel_layout API HOT 1
- Is this project still alive? HOT 1
- Spelling Mistake in Content - "insormation" should be "information" in README HOT 1
- Broken Link in CONTRIBUTING.md - 404 Error
- `api2-decode-encode-video.cpp` example and correct stream tear-down sequence HOT 3
- Decoded frames have invalid PTS
- Copy a stream without transcoding HOT 3
- Take into account the filter size when calculating the delay HOT 1
- Memory leak (duplicate initialization) of all `CodecContext2` derived classes
- Error when using code from api2-remux.cpp sample. HOT 9
- It seems that ffmpeg7.0 is not supported? HOT 4
- About GPU decoding and encoding HOT 8
- How to just use avcpp to write externally compressed data into an output stream? HOT 1
- Missing lookup for dependency Threads
- Why are all the video frames in the output marked as I-frames? HOT 1
- How to decode a buffer of h264 data?
- Can you provide an example of encoding image sequence into video file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avcpp.