avcodec | of encoder/decoder/render/player | Messaging library

 by   ireader C Version: Current License: MIT

kandi X-RAY | avcodec Summary

kandi X-RAY | avcodec Summary

avcodec is a C library typically used in Messaging applications. avcodec has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

of encoder/decoder/render/player
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              avcodec has a low active ecosystem.
              It has 156 star(s) with 89 fork(s). There are 18 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 3 open issues and 3 have been closed. On average issues are closed in 3 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of avcodec is current.

            kandi-Quality Quality

              avcodec has 0 bugs and 0 code smells.

            kandi-Security Security

              avcodec has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              avcodec code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              avcodec is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              avcodec releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of avcodec
            Get all kandi verified functions for this library.

            avcodec Key Features

            No Key Features are available at this moment for avcodec.

            avcodec Examples and Code Snippets

            No Code Snippets are available at this moment for avcodec.

            Community Discussions

            QUESTION

            How to convert from GL_RGB to AVFrame
            Asked 2022-Apr-11 at 12:53

            For my project I need to convert a RGB (GL_RGB) Image generated by glReadPixels into a AVFrame. I've googled it and found just examples of the other way around. But in this case I need from GL_RGB to AVFrame.

            Here's my code:

            Here's how I set my codec:

            ...

            ANSWER

            Answered 2022-Apr-10 at 16:29

            The second argument of sws_scale is an array of pointers: const uint8_t *const srcSlice[]

            Instead of pointer cast: (const uint8_t * const *)&rgb, place rgb pointer inside an array of pointers:

            Source https://stackoverflow.com/questions/71808856

            QUESTION

            ffmpeg copy codec outputs in slowmotion
            Asked 2022-Apr-08 at 00:16

            i have the following scenario that is driving me crazy:

            i have a capture device. Here the ffprobe on it:

            ...

            ANSWER

            Answered 2022-Apr-08 at 00:16

            *.mjpeg is a raw stream format. FFmpeg documentation states of raw muxers: "They do not store timestamps or metadata." So, instead try storing the data in an mp4 container:

            Source https://stackoverflow.com/questions/71783986

            QUESTION

            VLC huge buffering times over rtp for local H264 stream
            Asked 2022-Mar-15 at 12:45

            I'm outputting an H264 stream, encoded by my application using ffmpeg. I can display it using ffplay, but when trying to view the stream in VLC, I only get the first frame, or it looks like that's the case.

            The messages output shows that it is "buffering", taking around a minute to get to 100% when the frame updates. When using ffplay, the latency is about 50-100ms at worst.

            I am sending to rtp://127.0.0.1:6666?pkt_size=1316 with the format rtp_mpegts. I am new to this and it's highly likely I haven't set the frame up completely correctly. The process is (minus declarations and error checking)

            ...

            ANSWER

            Answered 2022-Mar-15 at 12:45

            The problem with my approach above was that it was based on the ffmpeg example encode_video.c with some bits for stream output borrowed from google.

            Thanks to @rotem I started putting together a standalone executable and stumbled on the example muxing.c in the ffmpeg examples.

            This let me find the steps I was missing: set the stream index on the packet, and rescale the time:

            Source https://stackoverflow.com/questions/71472463

            QUESTION

            Bundling FFMPEG using CMAKE and RPATH
            Asked 2022-Mar-10 at 19:59

            As the title explains, I am trying to bundle FFMPEG with my executable application.

            However, I can't seem to figure out the runtime loading of the FFMPEG shared libraries. I'm not sure what is incorrect:

            • RPATH/RUNPATH of main project and FFMPEG libraries.
            • The CMake install steps.
            • Or just my entire approach (most likely).

            This is a CMake project and in hope of finally finding a "standard solution", I am going to include everything needed to reproduce this issue.

            CMakeLists.txt: ...

            ANSWER

            Answered 2022-Mar-10 at 19:59
            Reproducing the Issue

            To try to reproduce your problem, I actually discarded all CMake stuff and just compiled main.cpp from the command line. I think you'll agree that the root of the issue is in the ffmpeg build.

            Source https://stackoverflow.com/questions/71423110

            QUESTION

            I want third-party software to use the FFmpeg codecs but the file names don't match
            Asked 2022-Feb-24 at 04:59
            Software and file versions FFmpeg

            I have the latest release of FFmpeg, version 5.0-full_build-www.gyan.dev, which is a compiled executable for Windows. I downloaded "ffmpeg-release-full-shared.7z," which includes dlls in \bin.

            Audacity

            I have the latest release of Audacity, 3.1.3, which I installed using the 64-bit installer.

            In Audacity's Preferences > Libraries, there is an option to use FFmpeg's libraries. Under Help > Diagnostics > Show log, Audacity seems to be looking for one of three versions of avformat-NN.dll: avformat-58.dll, avformat-57.dll, or avformat-55.dll

            ...

            ANSWER

            Answered 2022-Feb-24 at 04:59

            The numbers 56..etc refer to the version number of the individual libraries that are a part of the FFmpeg project. So, avcodec-59 is major version 59 of libavcodec.

            1. Yes, you can have parallel installations without issue, provided you can set custom search paths for the client application.

            2. I suspect these clients are using libavcodec to export to major codecs. Those are generally mature, so older versions should be fine.

            3. That's correct. Across major versions, the API and ABI will likely have changed.

            4. Depends on what API calls they're using. A new decode/encode API was introduced some years ago but the old one was kept for compatibility, so clients could transition over gradually. In v59, those old calls were removed. So, if they did transition, then yes.

            Source https://stackoverflow.com/questions/71244096

            QUESTION

            ffmpeg avcodec lib crashed on ff_hevc_sao_edge_filter_32_8_avx2()
            Asked 2022-Feb-22 at 08:56

            I'm using avcodec to decode some hevc clip on linux, the avcodec lib is built from source package ffmpeg-4.3.1 with command:

            ...

            ANSWER

            Answered 2022-Feb-22 at 08:56

            I do decoding like below:

            Source https://stackoverflow.com/questions/71153141

            QUESTION

            How to use ws_scale to scale slice by slice of yuv image
            Asked 2022-Feb-17 at 22:48

            I have a YUV420 image. I want to split image into two slices (height/2) and scale(yuv->rgb) them separately using ws_scale (may be in different threads). For example

            ...

            ANSWER

            Answered 2022-Feb-17 at 22:48

            It looks like the slicing feature works only when the same SwsContext is used for both slices.

            In case we want to use individual context for each slice, we have to configure each SwsContext as if there are two individual images.

            The fist context may "scale" the top half, and the second context may "scale" the bottom half.

            • The image size for both contexts applies height/2.
            • The fist context gets pointers to source and destination data of the top half.
            • The second context gets pointers to source and destination data of the bottom half (both source and destination pointers are advanced).

            For YUV420p input, the solution is going to work only if height is a multiple of 4.

            Here is the relevant part of the code:

            Source https://stackoverflow.com/questions/71145533

            QUESTION

            FFMPEG metadata not work with segment format
            Asked 2022-Feb-11 at 10:03

            I'm trying to add rotation metadata to the video recorded from RTSP stream. All works fine until I try to run recording with segment format. My command looks like this:

            ...

            ANSWER

            Answered 2022-Feb-11 at 10:03

            I found out it has been resolved in

            https://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=a74428921f8bfb33cbe0340bfd810b6945e432d2#patch1

            and it works fine in ffmpeg 5.0. You can also apply this patch to 4.4.

            Source https://stackoverflow.com/questions/71020015

            QUESTION

            How to decode AAC network audio stream using ffmpeg
            Asked 2021-Dec-27 at 09:09

            I implemented a network video player (like VLC) using ffmpeg. But it can not decode AAC audio stream received from a IP camera. It can decode other audio sterams like G711, G726 etc. I set the codec ID as AV_CODEC_ID_AAC and I set channels and sample rate of AvCodecContext. But avcodec_decode_audio4 fails with an error code of INVALID_DATA. I checked previously asked questions, I tried to add extrabytes to AvCodecContext using media format specific parameters of "config=1408". And I set extradatabytes as 2 bytes of "20" and "8" but it also not worked. I appreciate any help, thanks.

            ...

            ANSWER

            Answered 2021-Dec-27 at 09:09

            Did you check data for INVALID_DATA?
            You can check it according to RFC

            RFC3640 (3.2 RTP Payload Structure)

            AAC Payload can be seperated like below
            AU-Header | Size Info | ADTS | Data

            Example payload 00 10 0c 00 ff f1 60 40 30 01 7c 01 30 35 ac

            According to configs that u shared
            AU-size (SizeLength=13)
            AU-Index / AU-Index-delta (IndexLength=3/IndexDeltaLength=3)

            The length in bits of AU-Header is 13(SizeLength) + 3(IndexLength/IndexDeltaLength) = 16.
            AU-Header 00 10

            You should use AU-size(SizeLength) value for Size Info

            AU-size: Indicates the size in octets of the associated Access Unit in the Access Unit Data Section in the same RTP packet.

            First 13 (SizeLength) bits 0000000000010 equals to 2. So read 2 octets for size info.
            Size Info 0c 00

            ADTS ff f1 60 40 30 01 7c
            ADTS Parser

            ID MPEG-4
            MPEG Layer 0
            CRC checksum absent 1
            Profile Low Complexity profile (AAC LC)
            Sampling frequency 16000
            Private bit 0 Channel configuration 1
            Original/copy 0
            Home 0
            Copyright identification bit 0
            Copyright identification start 0
            AAC frame length 384
            ADTS buffer fullness 95
            No raw data blocks in frame 0

            Data starts with 01 30 35 ac.

            Source https://stackoverflow.com/questions/69821876

            QUESTION

            Why FFMPEG screen recorder output shows green screen only?
            Asked 2021-Dec-17 at 22:43

            I am writing a screen recorder using FFMPEG lib but in output it is showing only a video with green screen. My code is below

            ...

            ANSWER

            Answered 2021-Dec-17 at 22:43

            The green video is a result of encoding frames filled by zeros in YUV color space (pixel with Y,U,V value equals 0,0,0 is displayed as green colored pixel).

            You are configuring sws_getContext, but you are not using it.

            After decoding the grabbed video frame, the result is a frame with BGRA pixel format.
            We should convert the frame from BGRA to YUV420p pixel format, and write the result to the output encoder.

            When executing your code sample, I have encountered some strange behavior.
            I tried to fix the code, using code snippets from the following post.

            Note:

            • I am still learning how to use the C interface of FFmpeg.
              There are implementation details that I am not sure about.
              Some polishing is still required...

            Updated code:

            Source https://stackoverflow.com/questions/70390402

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install avcodec

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/ireader/avcodec.git

          • CLI

            gh repo clone ireader/avcodec

          • sshUrl

            git@github.com:ireader/avcodec.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Messaging Libraries

            Try Top Libraries by ireader

            media-server

            by ireaderC

            sdk

            by ireaderC

            3rd

            by ireaderC