h.264

H264 RTP packet parsing [closed]

两盒软妹~` 提交于 2019-12-03 21:02:58
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I am looking for source code of RTP Payload Format for H.264 Video according to RFC(3984). It would be great if someone can point out it. Also I am looking for wireshark plugin which can show me the packet decoding of h264. Thank you guys in advance. Laurent Etiemble You can start with FFMpeg's source code (under LGPL); the rtp_h264.c contains the code that parse H.264 RTP frame. You should have a

Converting .mkv to h.264 FFmpeg

会有一股神秘感。 提交于 2019-12-03 20:59:12
I would like to convert my .mkv files to .mp4 using FFmpeg. I have tried the following code: ffmpeg -i input.mkv -c:v libx264 -c:a libvo_aacenc output.mp4 But I get the error: Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height. Is there any way to get around this? I have tried setting the bitrate of the audio but the problem seems to persist. Ely I suggest you first check whether your .mkv file already has H.264/AAC streams in the first place. Because if it does, all you have to do is copy the streams and change the container

How to extract elementary video from mp4 using ffmpeg programmatically?

梦想与她 提交于 2019-12-03 20:50:54
I have started learning ffmpeg few weaks ago. At the moment I am able to transcode any video to mp4 using h264/AVC codec. The main scheme is something like that: -open input -demux -decode -encode -mux The actual code is below: #include <iostream> #include <math.h> extern "C" { # ifndef __STDC_CONSTANT_MACROS# undef main /* Prevents SDL from overriding main() */ # define __STDC_CONSTANT_MACROS# endif # pragma comment(lib, "avcodec.lib")# pragma comment(lib, "avformat.lib")# pragma comment(lib, "swscale.lib")# pragma comment(lib, "avutil.lib") #include <libavcodec\avcodec.h> #include

ffmpeg: how to save h264 raw data as mp4 file

旧巷老猫 提交于 2019-12-03 17:35:34
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. Roman R. 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 mpegts container using libavcodec with also writing to a file (different container, same API) See also

extracting h264 raw video stream from mp4 or flv with ffmpeg generate an invalid stream

左心房为你撑大大i 提交于 2019-12-03 17:03:08
问题 I'm trying to extract the video stream from an mp4 or flv h264 video (youtube video) using ffmpeg. The original video (test.flv) play without trouble with ffplay , ffprobe gives an error as follow: ffprobe version N-55515-gbbbd959 Copyright (c) 2007-2013 the FFmpeg developers built on Aug 13 2013 18:06:32 with gcc 4.7.3 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab le-iconv

h264 packetization mode for FUA

空扰寡人 提交于 2019-12-03 16:44:28
We have got into couple of interop issues where, The video mode that is required by couple of endpoints in market are little different and only understands H.264 packetization modes (FUA type) (i.e) FU -A NAL unit type.(while others do not play the video on receiving a fu-a nal type payload) Does anyone know what is this FUA type of packetization mode? How is it different from packetization modes 0,1,2 as defined in RFC3984? Is the video encoder/decoder supports it, how can it be appropriately signalled in SIP SDP session wherein the attributes do not get changed even when traversing through

Can profile-level-id and sprop-parameter-sets be extracted from an RTP stream?

假如想象 提交于 2019-12-03 16:13:45
I'm trying to stream live video from my android phone to a desktop RTSP server on my PC. The streamed video can be played in another device. I'm using H.264 video encoder, so the SDP returned by the server (as the reply of DESCRIBE request) should contain the profile-level-id and sprop-parameter-sets fields. The Spydroid project shows how to extract these info from a dummy file recorded to SD card by parsing it (from the avcC block). But I cannot do it like that. In Spydroid, the media recorder and the RTSP server are on the same device, so the server can always record a test file with the

Developing H264 hardware decoder Android - Stagefright or OpenMax IL?

我们两清 提交于 2019-12-03 15:47:32
I am developing H264 H/W accelerated video decoder for android. So far, I've come around with some libraries MediaCodec , Stagefright , OpenMax IL , OpenMax AL and FFmpeg . After a bit research, I've found that - I found a great resource of using stagefright with FFmpeg, but I can not use FFmpeg as for its license, it is quite restrictive for distributed software. (Or possible to discard FFmpeg from this approach?) I can not use MediaCodec as its a Java API and I have to call it via the JNI from C++ layer which is relatively slow and I am not allowed. I can not use OpenMax AL as it only

Count frames in H.264 bitstream

只谈情不闲聊 提交于 2019-12-03 15:35:46
How to count/detect frames (pictures) in raw H.264 bitstream? I know there are 5 VCL NALU types but I don't know how to rec(k)ognize sequence of them as access unit. I suppose detect a frame means detect an access unit as access unit is A set of NAL units that are consecutive in decoding order and contain exactly one primary coded picture. In addition to the primary coded picture, an access unit may also contain one or more redundant coded pictures, one auxiliary coded picture, or other NAL units not containing slices or slice data partitions of a coded picture. The decoding of an access unit

using FFmpeg, how to decode H264 packets

Deadly 提交于 2019-12-03 13:48:31
问题 I'm new to FFmpeg struggling to decode H264 packets which can be obtained as an array of uint8_t. After many of investigations, I think it should be able to just put the array into an AVPacket like the below AVPacket *avpkt = (AVPacket *)malloc(sizeof(AVPacket) * 1); av_init_packet(avpkt); avpkt->data = ct; // ct is the array avpkt->length =.... and decode by avcodec_decode_video2(). A part of the code is like ... codec = avcodec_find_decoder(CODEC_ID_H264); gVideoCodecCtx = avcodec_alloc