Questions tagged [libavcodec]

libavcodec is a free software/open source LGPL-licensed library of codecs for encoding and decoding video and audio data.

509 questions
5
votes
2 answers

Wrong OpenGL Texture Format Type for CL/GL-Interop?

I'm trying the OpenCL-OpenGL interop for textures on my Geforce 330M with CUDA Toolkit 4.0. I want to capture a frame, use that data as an input image (Image2D) to a OpenCL Kernel. The Kernel should manipulate the data and write it to an Image2DGL,…
rdoubleui
  • 3,554
  • 4
  • 30
  • 51
5
votes
1 answer

Encode buffer captured by OpenGL in C

I am trying to use OpenGL to capture the back buffer of my computer's screen, and then H.264 encode the buffer using FFMPEG's libavcodec library. The issue I'm having is that I would like to encode the video in AV_PIX_FMT_420P, but the back buffer…
M. Ying
  • 197
  • 2
  • 15
5
votes
1 answer

Create mp4 file from raw h264 using a pipe instead of files

I have a raw h264 file that I can display with VLC, on a mac: open -a VLC file.h264 I can convert this to mp4 with the command line ffmpeg -f h264 -i file.h264 -c:v copy file.mp4 But what I really want to do is something like: cat file.h264 |…
Charlie Burns
  • 6,994
  • 20
  • 29
5
votes
1 answer

How do I pre-allocate the memory for libavcodec to write decoded frame data?

I am trying to decode a video with libav by following the demo code: here I need to be able to control where the frame data in pFrame->data[0] is stored. I have tried setting pFrame->data to my own buffer as follows: // Determine required buffer…
gurugulu
  • 101
  • 8
5
votes
0 answers

Initializing hwaccel_context in libavcodec

I am trying to get hardware accelerated video working using libavcodec. I am using the hw_decode.c example as a starting point and am unable to get it to work. both AVCodecContext->hwaccel and AVCodecContext->hwaccel_context are NULL I belive some…
dloman
  • 142
  • 5
5
votes
0 answers

FFmpeg(C/libav) VPX to mpeg2video stream cannot be reproduce in VLC

I am currently trying to transcode a VPX(VP8/VP9) video to a mpeg2video and stream it over UDP with mpegts. I have initialized all of the contexts and the streams and as long as I stream it to ffplay it works, if I send the stream to VLC or another…
caiomcg
  • 501
  • 10
  • 23
5
votes
1 answer

libavcodec, how to transcode video with different frame rates?

I'm grabbing video frames from the camera via v4l, and i need to transcode them in mpeg4 format to successively stream them via RTP. Everything actually "works" but there's something I don't while re-encoding: the input stream produces 15fps, while…
ubik
  • 595
  • 5
  • 16
5
votes
2 answers

Encoding RGB frames using x264 and AVCodec in C

I have RGB24 frames streamed from camera and i want to encode them into h264 ,i found that AVCodec and x264 can do so, the problem is x264 as default accepts YUV420 as input so what i wrote was a program which convert RGB frames to YUV420 .that was…
gamemn02
  • 73
  • 1
  • 8
5
votes
0 answers

FFmpeg / libavcodec: Encoding with x264 ignores bitrate setting

I am trying to write a video using the FFmpeg libraries. So far I can successfully encode videos with the .avi extension, but when I use the .mp4 extension the application ignores completely the bitrate option I specify. Here's a snippet of the code…
Fasteno
  • 305
  • 3
  • 12
5
votes
2 answers

avcodec_open2 error -542398533 : "Generic error in an external library"

I am encountering an error when trying to open the codec with avcodec_open2(). I have tried the same code without any problems if I specify avi instead of h264 in the av_guess_format() function. I don't know what to make of it. Has anyone else…
bot1131357
  • 877
  • 8
  • 25
5
votes
0 answers

Transcoding videos with LibAvFormat for playback on iOS devices

I’m trying to transcode a video on my iOS app using FFMpeg/LibAv. What I’m trying to accomplish is to transcode a video in order to resize each frame and possibly lower the bitrate in order to save valuable MB in the device. The resulting video…
user361526
  • 3,333
  • 5
  • 25
  • 36
5
votes
0 answers

Screen capture with libavcodec/ffmpeg, and write it to mp4 file

I'm trying to (programatically) record the screen with DirectShow screen driver. I wrote some quick and (very) dirty code to try to get that to work (http://pastebin.com/ZJuhZRCz) based on ffmpeg examples but I have lots of trouble figuring out what…
Drakkainen
  • 1,142
  • 11
  • 25
5
votes
5 answers

Unmet dependency when installing vlc on ubuntu 14.04

Spent around 4hrs now still can't figure out what is the issue here. Here is terminal dump : machine@machine:~$ sudo apt-get install vlc Reading package lists... Done Building dependency tree Reading state information... Done Some packages…
NoobEditor
  • 15,563
  • 19
  • 81
  • 112
5
votes
4 answers

How to decode AAC using avcodec_decode_audio4?

I changed in my code avcodec_decode_audio3 to avcodec_decode_audio4 and added the frame handling. But now I cannot decode AAC frames anymore. Why does avcodec_decode_audio4 return -22 (invalid argument)? Following the answer below, does this have…
user2212461
  • 3,105
  • 8
  • 49
  • 87
5
votes
2 answers

Files created with a direct stream copy using FFmpeg's libavformat API play back too fast at 3600 fps

I am working on a libavformat API wrapper that converts MP4 files with H.264 and AAC to MPEG-TS segments suitable for streaming. I am just doing a simple stream copy without re-encoding, but the files I produce play the video back at 3600 fps…
Chris Ballinger
  • 796
  • 8
  • 20