h.264

ffmpeg: make a copy from a decoded frame (AVFrame)

家住魔仙堡 提交于 2019-12-10 10:28:33
问题 I want to make a backup frame (AVFrame) from a special frame(let's say pic ). So, I have written AVFrame* bkf = avcodec_alloc_frame(); memcpy(bkf,pic,sizeof(AVFrame)); bkf->extended_data = pic->extended_data; bkf->linesize[0] = pic->linesize[0]; memcpy(bkf->data, pic->data, sizeof(pic->data)); bkf->reordered_opaque = pic->reordered_opaque; bkf->sample_rate = pic->sample_rate; bkf->channel_layout = pic->channel_layout; bkf->pkt_pts = pic->pkt_pts; bkf->pkt_pos = pic->pkt_pos; bkf->width = pic-

Html5 Video and Flash Approach

老子叫甜甜 提交于 2019-12-10 10:08:44
问题 Looking into HTML5 video tag, and researching which browsers support which video file types, and my initial thought is things just got harder than just using flash. I am wondering if there is some skeleton code (combined with development approach for videos) that someone has figured out to do the following: If flash is available, use it If not, try html5 video ogg format If that doesn't work, try html5 video h.264 format If that doesn't work, try html5 video webM format Based on what I am

How to encode Video from Web-Camera into H.264 in C#? [closed]

天大地大妈咪最大 提交于 2019-12-10 09:35:35
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . How do you encode video from Webcam into H.264 in C#? What do I need MSDN if there is any help on this. Open Source Libs/wrappers for encoding/decoding. Tutorials and blog articles on How to do it. Some examples of of how to encode into 3GP or FLV or something else with low file size would be more than

How can i know the duration of any h264 file?

牧云@^-^@ 提交于 2019-12-10 08:24:30
问题 I have one file in which only h264 frames are there in form of NAL unit. So now is there any method so i can count the duration of that file? I dont know how many frames are there in file. I have only file size. PS: All i want to do is in C language and on Linux platform. 回答1: Your question is meaningless, that's why someone down vote you. Container file First, there is no such a thing as H264 file . There can be a container file (MP4, AVI, MKV) that holds the H264 encoded video. That

Forcing Mpeg2Demultiplexer to use ffdshow to render H264 Digital TV Video

巧了我就是萌 提交于 2019-12-10 00:42:33
问题 I spend a lot of time trying to make DTVViewer sample of DirectShow work unfortunately with no success. The video format of DVBT network is H264 and I found that the IntelliConnect behavior of IFilterGraph prefers to use Mpeg2 Video format. For those who want to see the code, here it is. If you do not know anything about DirectShow I shared my experience with this code. And the most probably problem is described in step 5 and 6 of the tutorial. The code for helper function which connects

How to fill 'extradata' field of AVCodecContext with SPS and PPS data?

此生再无相见时 提交于 2019-12-09 13:20:55
问题 Here is the problem: When decoding H264 stream with ffmpeg , I can obtain raw data of SPS and PPS but I have no idea how to fill them into the extradata field of AVCodecContext . Without extradata , I can't decode frames properly. Every time I call avcodec_decodec_video2 , the return value is positive but the got_picture flag is always zero . Can anyone kindly help me with this issue? The stream I am dealing with looks like this: [0x67]...[0x68]...[0x61]...[0x61]... ....... [0x61]...[0x67]...

GOP setting is not honored by Intel H264 hardware MFT

岁酱吖の 提交于 2019-12-09 12:22:05
问题 Problem statement: Intel hardware MFT is not honoring the GOP setting, resulting in more bandwidth consumption in realtime applications. The same code works fine on Nvidia hardware MFT. Background: I'm trying to encode NV12 samples captured through DesktopDuplication APIs to video stream using MediaFoundation H264 hardware encoder on Windows10 machine, stream and render the same in real-time over LAN. Initially, I was facing too much buffering at the encoder as the encoder was buffering up to

Media Foundation webcam video H264 encode/decode produces artifacts when played back

不打扰是莪最后的温柔 提交于 2019-12-09 11:12:27
问题 I have a solution, where I encode video (YUY2) samples from a webcam with Media Foundation's h264 encoder. Then I send it via TCP connection to another application that decodes the stream with Media Foundation's h264 decoder back to YUY2 format. After decoding, the video samples/images are presented at the screen using DirectX. The problem is that between key-frames the video image gets increasing amount of artifacts. Artifacts disappear when a key-frame is received. I dropped the TCP

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 understand header of H264

怎甘沉沦 提交于 2019-12-09 06:49:39
问题 My NAL unit looks like this: 00 00 00 01 67 42 00 1F E6 20 0A 00 B6 60 22 00 00 03 00 02 00 00 03 00 79 C0 00 00 10 FD D0 00 00 40 16 43 F4 A4 18 00 00 03 02 1D 97 00 00 1A B3 F1 FA 52 05 00 00 00 01 68 How can I understand what is the data in RBSP? Like payload size and what parts of the data signifies it. 回答1: In the H264 format the byte stream is organised into many NAL unit. In order to understand where a NAL unit starts a three-byte or four-byte start code, 0x000001 or 0x00000001, is