h.264

Decode h264 video stream to get image buffer

一笑奈何 提交于 2020-02-02 07:14:45
问题 I followed this post to decode my h264 video stream frames. My data frames as bellow: My code: NSString * const naluTypesStrings[] = { @"0: Unspecified (non-VCL)", @"1: Coded slice of a non-IDR picture (VCL)", // P frame @"2: Coded slice data partition A (VCL)", @"3: Coded slice data partition B (VCL)", @"4: Coded slice data partition C (VCL)", @"5: Coded slice of an IDR picture (VCL)", // I frame @"6: Supplemental enhancement information (SEI) (non-VCL)", @"7: Sequence parameter set (non-VCL

Decode h264 video stream to get image buffer

[亡魂溺海] 提交于 2020-02-02 07:13:25
问题 I followed this post to decode my h264 video stream frames. My data frames as bellow: My code: NSString * const naluTypesStrings[] = { @"0: Unspecified (non-VCL)", @"1: Coded slice of a non-IDR picture (VCL)", // P frame @"2: Coded slice data partition A (VCL)", @"3: Coded slice data partition B (VCL)", @"4: Coded slice data partition C (VCL)", @"5: Coded slice of an IDR picture (VCL)", // I frame @"6: Supplemental enhancement information (SEI) (non-VCL)", @"7: Sequence parameter set (non-VCL

Decode h264 video stream to get image buffer

限于喜欢 提交于 2020-02-02 07:13:05
问题 I followed this post to decode my h264 video stream frames. My data frames as bellow: My code: NSString * const naluTypesStrings[] = { @"0: Unspecified (non-VCL)", @"1: Coded slice of a non-IDR picture (VCL)", // P frame @"2: Coded slice data partition A (VCL)", @"3: Coded slice data partition B (VCL)", @"4: Coded slice data partition C (VCL)", @"5: Coded slice of an IDR picture (VCL)", // I frame @"6: Supplemental enhancement information (SEI) (non-VCL)", @"7: Sequence parameter set (non-VCL

Set attributes via ICodecAPI for a H.264 IMFSinkWriter Encoder

北城以北 提交于 2020-02-02 06:12:14
问题 I am trying to tweak the attributes of the H.264 encoder created via ActivateObject() by retrieving the ICodecAPI interface to it. Although I do not get errors, my settings are not taken into account. Code runs under Windows 10. I copy the code I use to create the IMFSinkWriter and retrieve the ICodecAPI below. Error handling not shown, but no error are produced. I have read this thread which implies that tweaking the encoder used by IMFSinkWriter may not be possible, but since there's no

Set attributes via ICodecAPI for a H.264 IMFSinkWriter Encoder

和自甴很熟 提交于 2020-02-02 06:11:09
问题 I am trying to tweak the attributes of the H.264 encoder created via ActivateObject() by retrieving the ICodecAPI interface to it. Although I do not get errors, my settings are not taken into account. Code runs under Windows 10. I copy the code I use to create the IMFSinkWriter and retrieve the ICodecAPI below. Error handling not shown, but no error are produced. I have read this thread which implies that tweaking the encoder used by IMFSinkWriter may not be possible, but since there's no

Encoding a D3D Surface obtained through Desktop Duplication using Media Foundation

喜夏-厌秋 提交于 2020-01-28 06:20:58
问题 I want to encode Desktop Duplication API frames to send over the network after encoding them with Media Foundation. I'm stuck with a E_NOTIMPL error when I call IMFTransform::ProcessInput, leaving me a little in the dark. These are the steps I've done up until now, I'm detailing them because it took me days to gather everything from the scarce scattered info across the web, so if it's resolved it will hopefully help others. Everything below is met with an S_OK: I'm obtaining the surface

Encoding a D3D Surface obtained through Desktop Duplication using Media Foundation

China☆狼群 提交于 2020-01-28 06:16:07
问题 I want to encode Desktop Duplication API frames to send over the network after encoding them with Media Foundation. I'm stuck with a E_NOTIMPL error when I call IMFTransform::ProcessInput, leaving me a little in the dark. These are the steps I've done up until now, I'm detailing them because it took me days to gather everything from the scarce scattered info across the web, so if it's resolved it will hopefully help others. Everything below is met with an S_OK: I'm obtaining the surface

ffmpeg: how to save h264 raw data as mp4 file

混江龙づ霸主 提交于 2020-01-22 16:07:06
问题 I encode h264 data by libavcodec. ex. while (1) { ... avcodec_encode_video(pEnc->pCtx, OutBuf, ENC_OUTSIZE, pEnc->pYUVFrame); ... } If I directly save OutBuf data as a .264 file, it can`t be play by player. Now I want to save OutBuf as a mp4 file. Anyone know how to do this by ffmpeg lib? thanks. 回答1: You use avformat_write_header , av_interleaved_write_frame , avformat_write_trailer and friends. Their usage is shown in the muxing example of FFmpeg. See a similar topic: Raw H264 frames in

ffmpeg API h264 encoded video does not play on all platforms

此生再无相见时 提交于 2020-01-22 12:56:34
问题 Edit: In the previous version I used a very old ffmpeg API. I now use the newest libraries. The problem has only changed slightly, from "Main" to "High". I am using the ffmpeg C API to create a mp4 video in C++. I want the resulting video to be of the profile "Constrained Baseline", so that the resulting video can be played on as much platforms as possible, especially mobile, but I get "High" profile every time, even though I hard coded the codec profile to be FF_PROFILE_H264_CONSTRAINED

Using VLC imem to play an h264 video file from memory but receiving error “main stream error: cannot pre fill buffer”

China☆狼群 提交于 2020-01-21 05:34:15
问题 I have an h264 video file that is loaded into memory, and I attempt to play it with imem using the parameter "imem-cat=4" so that vlc will use an access module to demux the video, and vlc starts and receives my imem parameters successfully: [0x7f38a0000e28] access_imem demux debug: Using get(0x404e1d), release(0x404e91), data(0x7fff5b4a9430), cookie("IMEM") This category also means I don't have to provide DTS and PTS. The imem module for VLC isn't well documented, but I've found hints in