I'm using the H264 encoder from Media Foundation (MFT).
I extracted the SPS and PPS from it, because I need it for smooth streaming.
The MSDN says that the number of bytes used for the length field that appears before each NALU can be 1, 2, or 4. This is all in network byte order. As you can see, the first 4 bytes in the buffer are 0, 0, 0, 1. If we apply any of the possible lengths, we will get nothing. If the number of bytes used for length is 1, then the length is zero, if it is 2, the length is zero again. If it is 4, the length of first NALU is 1?! And, that's not correct.
Does anybody know how should I interpret this SPS and PPS concatenated together??

SPS and PPS (aka dwSequenceHeader) in Media Foundation's H264 encoder
7.8k Views Asked by user1764961 At
1
There are 1 best solutions below
Related Questions in H.264
- Realtime/zero-latency video stream: what codec parameters to use?
- Including SPS and PPS in a raw h264 track
- How to get width and height from the H264 SPS using ffmpeg
- VLC in Raspberry Pi won't play h264 video file
- Converting mkv to h264 FFmpeg
- Convert JPEGs to H264 and stream to my server
- H.264 decoding error log from RTSP stream
- How to extract key-frames closest to given frame numbers from H264 video with ffmpeg
- Configure MediaCodec with the proper MediaFormat from a raw H.264 byte buffer
- Record and play h.264 video in memory using Jcodec
- forcing VLC to play h264 video file
- Decoding a h264 (High) stream with OpenCV's ffmpeg on Ubuntu
- What video encoder gives best performance on an Android device for given quality?
- Demux H264 from (already recorded) raw RTSP stream on HDD
- Color Banding Playing Live Raw H.264 Stream In Android
Related Questions in VIDEO-ENCODING
- When converting mkv to mp4, the audio is lost
- Record and play h.264 video in memory using Jcodec
- How to save a video to file using sampleBuffer, captureOutput in Swift 3?
- Scalable video encoding?
- x264: Encoded videos need lots of CPU to play
- API's for Android 4.4 screen recording?
- DVB live streaming to android without encoding
- How to find the frame type(i frame,p frame, b frame)?
- IOS 7 base64 video encoding
- Encoding yuv frames to video file in java
- ffmpeg concat with video using image background
- Can ffmpeg extract the motion vectors from VP9 videos?
- Why do we need to pause the thread after appendPixelBuffer:withPresentationTime:?
- Encoding frames to video with ffmpeg
- Why MP4 generated through FFmpeg API can't be played in the Windows Media Player?
Related Questions in MS-MEDIA-FOUNDATION
- Get all supported FPS values of a camera in Microsoft Media Foundation
- How to create IMFSample for WindowsMediaFoundation H.264 encoder MFT
- Media Foundation set video capture frame rate using PROPVARIANT structure
- Use Windows message loop to receive an event in a library I'm writing
- Video Processor MFT (Media Foundation) missing under Windows 7 Pro 64bit
- Windows Store App DLL 32bit and 64bit
- How to write in-memory PCM data by using IMFSinkWriter?
- Network media sink in Microsoft Media Foundation
- How can i properly configure ASF media sink in Media Foundation
- Source reader and custom non-seekable byte stream
- Timeout error occurred for capturing an image from photo stream in IMFSourceReaderCallback::OnReadSample?
- Media Foundation MP4 Encoding: IMFSinkWriter doesn't accept PCM input
- Media Foundation webcam video H264 encode/decode produces artifacts when played back
- custom MFT in windows phone app
- Using IMFSourceReader to open a video file
Related Questions in SMOOTH-STREAMING
- ExoPlayer: "Internal runtime error" on certain PlayReady-protected assets
- Decoding h264 in mp4 fragment from IIS Smooth Streaming
- Sending some non-encrypted fragments in a PlayReady stream
- Encoding videos for web and mobile using Azure Media Services
- Wowza + Live Streaming + Windows Phones?
- Samsung Smart TV, PlayDRM and HLS
- RTP to Live Smooth Streaming
- OSMF serial composition with smooth streaming media element
- Guessing values in real time based on previous values
- How to broadcast time-synchronized text streams using IIS Smooth Streaming?
- Playing a part of video using SMIL on iPad
- How to play smooth streaming video in Chromecast?
- SPS and PPS (aka dwSequenceHeader) in Media Foundation's H264 encoder
- How to play H264 stream with SilverLight?
- There is no way to encode video smooth streaming
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The answer here is simple: the data is valid and formatted according to Annex B, prefixed by start codes
00 00 00 01and not run length encoding.H.264 extradata (partially) explained - for dummies
More details on H.264 spec - freely available for download. Page 326 starts with "Annex B - Byte stream format".