Questions tagged [h.264]
H.264/MPEG-4 Part 10 or AVC (Advanced Video Coding) is a standard for video compression
2,755
questions
-1
votes
0
answers
21
views
Encode NV12 frames to h264 using x264enc (appsrc and appsink)
I am trying to encode NV12 frames to h264 files. For that I found a following code that is encoding raw frames to jpeg using jpegenc. The code works fine with jpeg encoder after some minor changes for ...
0
votes
1
answer
30
views
Extracting NALUs in MP4 files with audio
I am developing a WinForms application in VB.NET where I need to parse an MP4 file (specifically, MP4 Version 1 based on ISO_IEC_14496-12; and the H.264/AVC codec), extract frames as images, and store ...
0
votes
0
answers
34
views
How to Read Byte Array of H.264 frames into EMGUCV
This is my first Question to SO so please excuse while i try and provide the correct information.
I Have a video capture card in a PC Running windows 7 (I have been told that the card cannot run on ...
0
votes
1
answer
27
views
when muxing h264 to mp4 (isobmff format), Endian processing method
If video data muxing to mp4 file, video raw data -> mdat
A typical MP4 layout:
[MDAT size in 4 bytes] --> [MDAT header in 4 bytes "m","d","a","t"] then ...
0
votes
1
answer
38
views
How to perform motion compensation on two jpeg pictures?
Now I have several JPEG images taken in a burst, and I want to use motion compensation technology on them to reduce the difference between them.Is there any ready-made code that can be used, ...
0
votes
0
answers
16
views
AVSampleBufferDisplayLayer h264 on a real device intermittent playback
I get h264 in Data format. The video plays well on the simulator. And on a real device intermittently with a hang. I don't use decompression.
class H264Decoder {
var sampleBufferCallback: ((...
0
votes
0
answers
73
views
First/single frame encoded with ffmpeg/libavcodec library cannot be immediately decoded
I'm using libavcodec library and h264 codec to prepare the video stream on one end, transmit the encoded frames to the other PC and there decode it.
What I noticed after receiving very first packet (...
0
votes
0
answers
40
views
Issue with MoviePy: Writing corrupted video files with h264 codec
I'm encountering an issue with MoviePy where it's producing corrupted video files using the h264 codec. In my code, I have specified that I want to use the latest version of FFmpeg:
change_settings({&...
-2
votes
0
answers
36
views
Visual Glitches When Decoding H.264 Using FFMPEG
I'm using ffmpeg to decode a video stream from a camera that uses H.264 codec, but I frequently get visual bugs like this one.
This is my ffmpeg command. I am using python to start ffmpeg using ...
2
votes
1
answer
45
views
In Video Does Sample Means mdat data?
I use isobmff Library for Muxing.
(https://github.com/MPEGGroup/isobmff)
I make h264(avc) to mp4 file. (muxing)
when I muxing, I use ISOAddMediaSamples this function.
In Video, Does Sample Means only ...
0
votes
1
answer
54
views
how to use the H264 video encoder with ffmpeg / opencv2?
I am on ubuntu 22.04.
I installed ffmpeg with apt.
I am creating a video from some image files using python/opencv2 (installed via pip)
When I use:
cv2.VideoWriter_fourcc(*"mp4v")
the video ...
0
votes
3
answers
57
views
do you need remove emulation prevention bytes of H.264 stream in AVCC or HVCC format?
There are mainly two formats of H.264(H.265) stream, Annexb and AVCC(HVCC), in Annexb, we need to add emulation prevention bytes to escape start code, I want to know wheather emulation prevention ...
0
votes
1
answer
31
views
How to set frequency of sps and pps in libav
I am streaming a raw h264 on webrtc. The problem I am facing is that the video only have 2 or 3 sps and pps packets in the very start of the file.
So whenever a viewer joins in the middle of the ...
0
votes
0
answers
53
views
How to receive a decode_slice_header error as a return value from ffmpeg libav?
I'm working on an MCU that decodes user h264 video stream using libav v5.1. I use WebRTC and RTP protocol to establish connection and transfer packets over the Internet. When network is congested I ...
0
votes
0
answers
31
views
what is stream type value of video? (isobmff)
Now I am using https://github.com/MPEGGroup/isobmff this repo for isobmff library.
what is stream type value of video? (isobmff)
when i make new Audio sampleDescription,
objectTypeIndication = 0x40; /*...
0
votes
0
answers
21
views
Using isobmff github. Make fmp4 file
Using isobmff github. I am trying to Make Avc to fmp4 file.
Now I am using
Link : https://github.com/MPEGGroup/isobmff
this C Library for isobmff.
I want to Make fmp4 file and There is similar case of ...
0
votes
0
answers
21
views
Send synchronized data alongside video with gstreamer via upd (rtph264pay)
I stream video from machine A to B using GStreamer:
x264enc -> rtph264pay -> udpsink
Every now and then I also need to transmit a few bytes of user data that need to be synchronized with the ...
0
votes
0
answers
44
views
Opening UDP H.264 video stream on Android
I'm trying to open and display a UDP video stream encoded as H.264 on an Android device. Right now I'm using ExoPlayer somewhat successfully with mp4 files, but it fails on the stream from my Jetson ...
0
votes
0
answers
24
views
Using MediaCodec, is it possible to QueueInputBuffer to enquee a buffer that contains more than one NALU?
I am decoding a live streaming of H264, it's working so far, but sometimes I got an accumulation of some H264 NAL units and I've seen that the input buffer I got from MediaCodec has enough room for ...
-1
votes
1
answer
73
views
FFmpeg: What re-encoding settings can be used to achieve results similar to Google Drive's video processing?
Context:
I have a large collection of videos recorded by my phone's camera, which is taking up a significant amount of space. Recently, I noticed that when I uploaded a video to Google Drive and then ...
0
votes
0
answers
142
views
AVCodec h264_v4l2m2m hardware decoding unable to find device
Using a custom compiled FFmpeg:
$ ./ffmpeg -codecs | grep h264
ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
...
0
votes
0
answers
32
views
RTP h.264 stream switcher
I need to switch between two (or more) RTP streams. So I created silly example on Python, which reads from a UDP sockets RTP packets and sends packets from one of the sources to a destination. Then, ...
0
votes
0
answers
24
views
Is there any way of setting audio and video codec type in webrtc android application? I want to use aac and h264. Below is my code
PeerConnectionFactory.InitializationOptions initializationOptions =
PeerConnectionFactory.InitializationOptions.builder(context)
.createInitializationOptions();
...
0
votes
0
answers
62
views
how to decode AVTP h264 packets in wireshark
I got a AVTP packet data from vehicle`s side mirror camera.
protocol is H264(AKA codec) and transported by FU-A.
enter image description here
I want to decode these data to stream. Before, I refered ...
0
votes
0
answers
62
views
decode H264 B frame without timeStamp
I use videoToolBox to decode H264 and use metal to render it.
I found the B frames in the raw stream, but when I watch out the value of the callback function presentTimeStamp.valid, it returns false.
...
1
vote
1
answer
75
views
Gstreamer (-sharp)-- how to add my custom sink to splitmuxsink
I want to add my custom sink for splitmuxsink, namely I want to split h264 stream from ip camera into chunks by 10 seconds, but I want it in some controlled by me buffer. Smth like pipeline below but ...
3
votes
1
answer
154
views
How to Manually Process Muxing h264 to mp4?
The project I'm currently working on involves capturing screen frames on Windows via the Desktop Duplication API as raw BGRA format pixel data, and then encoding these frames into h264 format.
At this ...
1
vote
1
answer
92
views
Issue with decoding H264 frames using appsrc in GStreamer
I am currently facing an issue while attempting to decode H264 frames using the appsrc element in GStreamer. I have constructed the following pipeline within my application:
appsrc name=mysource ! ...
0
votes
0
answers
76
views
FFMPEG ignores encoding level parameter
I need to be able to encode video to a specific profile-level-id in accordance to a negotiated session via WebRTC. I can readily change the profile via code, however, I have not been able to change ...
0
votes
0
answers
123
views
How to convert a Wireshark capture to H.264 video file?
I have a wireshark capture in pcapng format containing an RTSP H.264 stream that I would like to convert to a playable video file.
Important: the platform is Windows
What I've tried without success:
...
0
votes
0
answers
110
views
FFmpeg: h264 output broken
When I try to encode anything (no -c copy) using the h264 codec, the output is broken in the sense that it can't be played by any standard player (like Windows Media Player). VLC works mostly fine, ...
0
votes
0
answers
42
views
Wrong video duration when trying to make screen capture with libav\ffmpeg
I am performing screen capture using libav/c++ with the gdbigrab InputFormat and saving the transcoded video with h.264 to an .mp4 container. Despite doing all the necessary conversions from pts/dts ...
1
vote
1
answer
128
views
How to decode stream of h264 bytes from udp socket to video file
I am currently developing an Android application that streams live video to a server using the libstreaming package. I am able to send the data to my laptop UDP socket, which has a type of an array of ...
0
votes
0
answers
64
views
How can I save MediaCodec encoded bytes in AVI/MKV format using FFmpegFrameRecorder and AVPackets?
I have encoded bytes from android MediaCodec.getOutputBuffer(index) and I want to use it directly to save it in avi/mkv format files.
To do this with FFmpegFrameRecorder I guess I have to create ...
0
votes
0
answers
41
views
How can I implement h264 video stream encapsulation in flv format and push it using WebSocket in iOS using native lightweight code?
As the title, I am an iOS developer now, but I know nothing about the packaging of flv format, but there are no similar code cases in the community. Some are just some heavy third-party libraries ...
3
votes
1
answer
219
views
Offset from the start of the “mdat” box to the first frame
As a personal programming challenge, I have decided to write an MP4 decoder without using external libraries. To achieve this, I am using VB.NET with the .NET Framework 4.8.1 as a WinForms application,...
0
votes
1
answer
137
views
avcodec_open2 returns -22 "Invalid argument" trying to encode AV_CODEC_ID_H264
I'm trying to use libavcodec to encode h264 video but avcodec_open2 returns -22 "Invalid argument" and I can't figure out why. Here is my code, which is mostly a copy from the encode example ...
0
votes
1
answer
58
views
Converting image sequences to h264 video in objective-c results in AVFoundationErrorDomain
Converting image sequences to h264 encoded mp4 file with objective-c.
My code works well for one image file.
But if there are more images ,images are the screen captured and png formatted images, I ...
0
votes
0
answers
56
views
How do I use gstreamer to listen to AVTP packets and decode H264 data?
I am trying to use gstreamer to listen to AVTP packets from an interface and decode H264 data from it.
I have packets coming through an interface eno1, I ran this command0
gst-launch-1.0 avtpsrc ...
2
votes
1
answer
203
views
kVTVideoDecoderBadDataErr when using VTDecompressionSessionDecodeFrame and H264 NAL units
My code can successfully extract all the NAL units of a H264 stream, that is packed into an Avi-File. I can also parse the SPS, PPS and the NAL unit types 1 and 5. I then extract a whole GOP (group of ...
2
votes
1
answer
125
views
How many frame need to be decoded before output callback is invoked in webcodec(avc1.640028)
When I invoked
VideoDecoder.decode(
new EncodedVideoChunk(sample)
);
once in a tick of requestAnimationFrame, I noticed the output callback is also invoked roughly in each ...
0
votes
0
answers
55
views
Find frame number in H264 stream
I am writing a parser for a H264 stream (that is illegaly put to an avi file). I made some progress and I also can parse the frames itself to decode them (using VideoToolbox from Apple). That works so ...
1
vote
1
answer
78
views
OpenCV output file empty
I want to display 12 videos in a format of 4:3 in one video. The below code runs without errors but the output file is always empty. I have tried following encoder formats:
fourcc = cv2....
0
votes
0
answers
81
views
How to wrap raw h264 stream into mp4 file?
I'm getting a raw h264 stream from a hardware encoder and want to save it as an mp4. All I found so far about that were libs to convert or reencode a stream, but that's not what I want. I just want to ...
0
votes
1
answer
194
views
How to Stream H265 Multicast Video Using Gstreamer?
I have a script that stream video on petalinux as multicast with H.264, but when I changed settings for H.265, I think I still encode with H.264 (wireshark protocol says H.264).
Here is my sender ...
0
votes
0
answers
163
views
H.264 Macroblock extraction
From my cursory understanding of the H.264 spec, it seems that the video is chunked into macroblocks with different frame types. The macroblocks themselves are 16x16.
Question:
Is it possible to read ...
1
vote
1
answer
212
views
FFmpeg c api create encoder for AV_CODEC_ID_H264 crash on Windows
I'm using ffmpeg (version 5.1.2) to clip a mp4 video per frame so I need to decode and encode it. However, when I'm creating the encoder for its video stream, the program always crashes at the call to ...
0
votes
0
answers
39
views
Is it necessary to transmit predicted block of intra-prediction of H.264 or H.265 to decoder side?
I am wondering is it necessary to transmit predicted block of intra-prediction of H.264 or H.265 to decoder side.
During intra-prediction, the encoder estimates all possible mode for given block size, ...
0
votes
0
answers
94
views
How to force Windows Media Foundation h264 encoder to use complete bandwidth in CBR mode
I'm trying to use Windows Media foundation to encode a video with the h264 codec.
The video should be encoded in constant bit rate mode with a high bitrate. I'm trying to get a video output in very ...
0
votes
0
answers
102
views
Reading FFmpeg bytes from named pipes, extracted NAL units are bad/corrupted
I'm trying to read .mp4 file wtih ffmpeg and read bytes from the named pipe which I then want to package to RTP stream and send those packets over WebRTC.
What I learned is that H264 video consists of ...