I have a mp4 file that has only video data without moov atom. I have parsed the SPS, PPS. I'm trying to decode the video frames and NALU in this data. When I process each byte of this data to find NALU, I'm getting a false NALU because in RBSP data there are some bytes which are similar as NALU header (0x65, 0x01, 0x21, 0x61). The video data is in AVCC format, not in Annex B so I cannot find the start code to know the starting of the NALU. Is there anything with i can compare the NALU size to find out that it is a valid NALU or not?
how to differentiate between valid and invalid NALU in AVCC?
471 views Asked by Mohammad Azam At
1
There are 1 answers
Related Questions in VIDEO
- Media player stops about every 5 minutes
- Video Format is not supported or source is unavailable. - Opera
- How to get text and other elements to display over the Video in Tkinter?
- Can I use local resources for mp4 playback?
- Merge (concat) all video file present in '43. DP (Part1)' and put it into '43. DP (Part1)' and give name merged (concat) file to folder name
- Google Chrome is consuming a lot of CPU on a video call?
- How do I automate a video download with Selenium and Python (Meta Quest Store Trailer Download)
- Safari skipping 5 seconds into react-player video - anyone have experience with this?
- Why is toDataURL() returning blank image? (with p5 video)
- How do I circular crop using matlab?
- Cannot find 'IsacCodec' in scope
- playing multiple videos with libvlcsharp on multiple monitors
- Video controls are hidden behind input feature?
- Anyone around Good at both Javascript and Youtube api?, I am using lite-youtube js and I am confused in adding an eventlistener for onStateChange
- videos are resizing themselves while scrolling
Related Questions in VIDEO-PROCESSING
- How to extract video embedded subtitle from a video URL and show in a text widget in flutter?
- MediaMetadataretriver getFrameAtTıme is not working
- How to convert frame features and frame mask as a single variable data?
- How do I Circle Crop a video?
- Splitting a video into pieces
- Video compositon with moviepy, 'can't sync to MPEG frame' error
- Image-Processing using Action Camera through Wi-fi in raspberry pi 4
- cv2.VideoWriter_fourcc(*'mp4v') outputs seem to be corrupted
- How to record audio and video using gstreamer in c code
- 10 bit Video Processing in Python with OpenCV
- Retrieving VUI after AVC/HEVC decoding from *.yuv file?
- OpenCV video transparency too slow, video lagging, can i speed it up?
- Is it possible to get video frames with flutter media_kit?
- Libmpeg2 decoding errors
- Finding overlapping portion of two videos with slightly different start and end times
Related Questions in H.264
- Android mediacodec avc/h264 encoder always produces 1MB output buffer size
- Video Emulation solution
- Exoplayer does not play h264 mpeg-4 avc (part 10) codec in Android
- Client side H.264 (MP4) video compression/encoding
- Gstreamer Serial communication between 2 devices
- Decode h264 frame using android hardware accelerated decoder in gstreamer
- FFMPEG C Library: Encoding h264 stream into Matroska .mkv container creates corrupt files
- Adding h264 frames to mp4 file
- H264 data changing after serial communication in Python
- Extend Frame Size and Re-Encoding Video to be Blu-Ray Compliant with ffmpeg and tsMuxer
- Is there min size of IMFSample when ProcessInput?
- RTSP server on live555 start send client on I-Frame (h264)
- Python Handling H264 Frames for Live Stream from Eufy Server
- MediaCodec Async mode with NDK not triggering callback functions
- GstAppSink: Sharing between two pipelines
Related Questions in MPEG-4
- Structure of MPEG-4 "©xyz" box
- MPEG 4 video cannot display in html
- Encode and stream raw audio over RTP/RTSP using FDK-AAC
- Are extra null-bytes allowed after NALUs when not inside an Annex-B bytestream
- How to play mp4 movie with DirectShow
- In mpeg-4 part 10, is the video resolution stored in a header in the video codecs or within each frame?
- OpenCV and OpenH264: H264 File is Larger than MPEG-4 File
- Detect H.264 frame type in an mp4 container
- Embedding a video to HTML that does not have the .mp4 filename extension
- how to differentiate between valid and invalid NALU in AVCC?
- Why is this MPEG-4 compression of GIF creating weird results?
- frame appears 0.000057 second before pts_time using ffmpeg
- FIFO pipe / buffer to convert data of variable length to fixed size length
- How to speed up timeline scrubbing with FFMPEG?
- Calculating bitrate box bufferSizeDB value for AAC track in MP4 file
Related Questions in NALU
- transcoding part anexB bitstream
- FullCalendar in GWT : How to refresh calendar while keeping events
- Is it necessary to transmit predicted block of intra-prediction of H.264 or H.265 to decoder side?
- Transmux two videos to side by side without reencoding
- How many h264 packets could make up a complete frame(yuv/rgb)
- how to differentiate between valid and invalid NALU in AVCC?
- Invalid NAL unit size for MP4 created from NALU with 3-byte start code (0x000001)
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?
Popular Tags
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)
I guess you have MP4 'mdat' atoms with some h.264 payload data in each one. Or maybe you have RFC 6184 payload data. You didn't say.
You should look at the first 'mdat' atom to look for your SPS and PPS NALUs.
That 'mdat' atom probably looks something like this.
In other words, each NALU in the 'mdat' starts with a four-byte length, then the NALU. It can also be a three-byte or two-byte length (two-byte is pretty doggone useless). RFC 6184's definition of Single Time Aggregation Units calls for four-byte lengths.
If the stream is in annexB, each NALU starts with either
00 00 01or00 00 00 01rather than a length.SPS and PPS NALUs don't have a fixed size. And they're hard to parse because their contents are coded using a variable-length scheme called exponential Golomb coding. So your best bet, if you possibly can, is to find their boundaries and treat them as opaque, but variable-length, chunks of bytes.
I put together some Javascript to parse SPS and PPS NALUs because I had a similar problem to yours.