Git Product home page Git Product logo

Comments (8)

h4tr3d avatar h4tr3d commented on June 14, 2024

since m_raw->codecpar doesn't seem to contain valid data, while m_raw->codec has it, but the former is chosen by preprocessor directive.

Stupid FFmpeg upstream make warning on access to the m_raw->codec

Additionally I don't see code where you set the width/height/pix_fmt fields of AVStream's codec/codecpar.

For input streams it filled by FFmpeg. For output streams it filled by FFmpeg too using codec parameters (as I know). I try to check ASAP.

from avcpp.

leavittx avatar leavittx commented on June 14, 2024

Thanks, that would be awesome! You think the problem is with the ffmpeg version? (also see #22)

from avcpp.

h4tr3d avatar h4tr3d commented on June 14, 2024

I think that FFmpeg deprecate API but still use it internally in some codecs/formats and not fully migrate to new one, but annoying warning is added... It currently safe to use old API: it will be removed completely only in FFmpeg 4.

from avcpp.

leavittx avatar leavittx commented on June 14, 2024

I'm using libx264 in my project. Guess it should be updated to use the new API already!

api2-decode-encode-video.cpp still seem to be unworkable due to unset dimensions and probably some additional stuff I haven't found out yet. Do you need any additional info from my side?

from avcpp.

JegernOUTT avatar JegernOUTT commented on June 14, 2024

I have same problems with Stream::mediaType() method. How can I manually switch to the old ffmpeg / avcpp API? Is there any #define macros or cmake variables in cmake files?

from avcpp.

h4tr3d avatar h4tr3d commented on June 14, 2024

Guys, could you please check 8b8255d?

from avcpp.

ShikinChen avatar ShikinChen commented on June 14, 2024

codecpar->codec_type is AVMEDIA_TYPE_UNKNOWN, because avformat_new_stream func param codec not use on FFmpeg 5.0,codecpar->codec_type is avcodec_parameters_alloc() , no param on codecpar

from avcpp.

h4tr3d avatar h4tr3d commented on June 14, 2024

@ShikinChen, sounds like initialization sequence must be reworked completely from the AvCpp side for the new versions of the FFmpeg. Thanks a lot for this notice pointing:

/**
 * Add a new stream to a media file.
 *
 * When demuxing, it is called by the demuxer in read_header(). If the
 * flag AVFMTCTX_NOHEADER is set in s.ctx_flags, then it may also
 * be called in read_packet().
 *
 * When muxing, should be called by the user before avformat_write_header().
 *
 * User is required to call avformat_free_context() to clean up the allocation
 * by avformat_new_stream().
 *
 * @param s media file handle
 * @param c unused, does nothing
 *
 * @return newly created stream or NULL on error.
 */

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.