libavcodec

How to choose between openH264 and x264 decoder

心不动则不痛 提交于 2019-12-09 13:39:50
问题 I'm using the dev build from zeranoe.com which has OpenH264 and libx264 in it. How can i choose between these two Decoders to compare the decoding speed ? avcodec_find_decoder(AVCodecID.AV_CODEC_ID_H264); only gives me the name "h264" but which decoder is it ? And tries to force a specific decoder failed, like: codec = avcodec_find_decoder _by_name("x264"); codec = avcodec_find_decoder _by_name("libx264"); Which other options i have to improve the decoding speed of avcodec_decode_video2 for

JavaFX Media Player crashes when opening MP3s even though libav 53 libraries are present?

谁说我不能喝 提交于 2019-12-09 07:35:27
Building a java 8 (oracle) application that uses the JavaFX media player under linux. Needing MP3 support I identified that I needed to ensure that libavformat53 and libavcodec53 were installed on the system. Now even though they are installed on the system and all the relavent .so files are linked and in the right locations. JavaFX still crashes when opening MP3s. Any ideas why this is still occurring? Research Digged deeper into the issue found target system I was installing on already had libav 55 libraries on it. Using strace I saw that java was trying to load version 55 of the libraries

FFMpeg encoding RGB images to H264

萝らか妹 提交于 2019-12-09 06:49:46
问题 I'm developing a DirectShow filter which has 2 input pins (1 for audio, 1 for video). I'm using libavcodec/libavformat/libavutil of FFMpeg for encoding the video to H264, audio to AAC and mux it/stream using RTP. So far I was able to encode video and audio correctly using libavcodec but now I see that FFMpeg seems to support RTP muxing too. Unfortunatelly, I can't find any example code which shows how to perform H264 encoding and RTP muxing. Does anybody know good samples? 回答1: Try checking

How to publish selfmade stream with ffmpeg and c++ to rtmp server?

不羁岁月 提交于 2019-12-08 14:22:32
Have a nice day to you, people! I am writing an application for Windows that will capture the screen and send the stream to Wowza server by rtmp (for broadcasting). My application use ffmpeg and Qt. I capture the screen with WinApi, convert a buffer to YUV444(because it's simplest) and encode frame as described at the file decoding_encoding.c (from FFmpeg examples): /////////////////////////// //Encoder initialization /////////////////////////// avcodec_register_all(); codec=avcodec_find_encoder(AV_CODEC_ID_H264); c = avcodec_alloc_context3(codec); c->width=scr_width; c->height=scr_height; c-

Create a copy of an AVPacket structure

て烟熏妆下的殇ゞ 提交于 2019-12-08 14:03:26
I'd like to make a copy of an AVPacket so that I can decode it later, when I like. The AVPacket is from the audio stream. av_dup_packet doesn't seem to work. AVPacket copy constructor does not work. Creating my own copy constructor causes memory corruption. A way to copy an AVPacket structure: (that works) AVPacket newPacket(oldPacket); newPacket->data = reinterpret_cast<uint8_t*>(new uint64_t[(oldPacket->size + FF_INPUT_BUFFER_PADDING_SIZE)/sizeof(uint64_t) + 1]); memcpy(newPacket->data, oldPacket->data, oldPacket->size); The reason is that certain decoders use optimizations that require

Picture size 0x10 is invalid | video codec is not opened.What should be the reason?

拥有回忆 提交于 2019-12-08 10:42:55
问题 Right now am using RTMPStreamPublisher to publish the video at wowzaserver from iphone application. i have downloaded some demo code from this GitHub Project https://github.com/slavavdovichenko/MediaLibDemos/tree/master/RTMPStreamPublisher. Now this sample is working great..but when i tried to create my own project with the same implementation then its giving me some error...am sure that there is not any kind of missing library or framework issue.. i had checked everything is same in my

JavaFX Media Player crashes when opening MP3s even though libav 53 libraries are present?

五迷三道 提交于 2019-12-08 06:32:27
问题 Building a java 8 (oracle) application that uses the JavaFX media player under linux. Needing MP3 support I identified that I needed to ensure that libavformat53 and libavcodec53 were installed on the system. Now even though they are installed on the system and all the relavent .so files are linked and in the right locations. JavaFX still crashes when opening MP3s. Any ideas why this is still occurring? 回答1: Research Digged deeper into the issue found target system I was installing on already

How to disable libav autorotate display matrix

不打扰是莪最后的温柔 提交于 2019-12-06 15:08:40
I have a video taken from my mobile in portrait mode. Here is the dumped info about the video: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.MOV': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt creation_time : 2017-05-04 02:21:37 Duration: 00:00:06.91, start: 0.000023, bitrate: 4700 kb/s Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 90 kb/s (default) Metadata: creation_time : 2017-05-04 02:21:37 handler_name : Core Media Data Handler Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 4602 kb/s, 29.98 fps,

FFMPEG with C++ accessing a webcam

限于喜欢 提交于 2019-12-06 08:50:56
问题 I have searched all around and can not find any examples or tutorials on how to access a webcam using ffmpeg in C++. Any sample code or any help pointing me to some documentation, would greatly be appreciated. Thanks in advance. 回答1: I have been working on this for months now. Your first "issue" is that ffmpeg (libavcodec and other ffmpeg libs) does NOT access web cams, or any other device. For a basic USB webcam, or audio/video capture card, you first need driver software to access that

Decoding mJPEG with libavcodec

回眸只為那壹抹淺笑 提交于 2019-12-05 06:29:08
问题 I am creating video conference application. I have discovered that webcams (at least 3 I have) provide higher resolutions and framerates for mJPEG output format. So far I was using YUY2, converted in I420 for compression with X264. To transcode mJPEG to I420, I need to decode it first. I am trying to decode images from webcam with libavcodec. This is my code. Initialization: // mJPEG to I420 conversion AVCodecContext * _transcoder = nullptr; AVFrame * _outputFrame; AVPacket _inputPacket;