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?
451 Views Asked by Mohammad Azam At
1
There are 1 best solutions below
Related Questions in VIDEO
- ToLower vs ToLowerInvariant
- Passing This(of my main form) to a class that handles direction change/and language change c#/Winforms
- Date not binding with model for specific culture
- How to make a Windows Phone 8.1 TimePicker inherit from the system regional format?
- Resource file not being picked up when using ASP.NET expression
- DateTime get the letters representing day, month, year from the currentculture
- Most suitable method to override on mvc base controller for setting culture
- Opposite method to toLocaleDateString
- Client want ASP.NET application in URDU
- Handling decimal parameters in webapi
Related Questions in VIDEO-PROCESSING
- ToLower vs ToLowerInvariant
- Passing This(of my main form) to a class that handles direction change/and language change c#/Winforms
- Date not binding with model for specific culture
- How to make a Windows Phone 8.1 TimePicker inherit from the system regional format?
- Resource file not being picked up when using ASP.NET expression
- DateTime get the letters representing day, month, year from the currentculture
- Most suitable method to override on mvc base controller for setting culture
- Opposite method to toLocaleDateString
- Client want ASP.NET application in URDU
- Handling decimal parameters in webapi
Related Questions in H.264
- ToLower vs ToLowerInvariant
- Passing This(of my main form) to a class that handles direction change/and language change c#/Winforms
- Date not binding with model for specific culture
- How to make a Windows Phone 8.1 TimePicker inherit from the system regional format?
- Resource file not being picked up when using ASP.NET expression
- DateTime get the letters representing day, month, year from the currentculture
- Most suitable method to override on mvc base controller for setting culture
- Opposite method to toLocaleDateString
- Client want ASP.NET application in URDU
- Handling decimal parameters in webapi
Related Questions in MPEG-4
- ToLower vs ToLowerInvariant
- Passing This(of my main form) to a class that handles direction change/and language change c#/Winforms
- Date not binding with model for specific culture
- How to make a Windows Phone 8.1 TimePicker inherit from the system regional format?
- Resource file not being picked up when using ASP.NET expression
- DateTime get the letters representing day, month, year from the currentculture
- Most suitable method to override on mvc base controller for setting culture
- Opposite method to toLocaleDateString
- Client want ASP.NET application in URDU
- Handling decimal parameters in webapi
Related Questions in NALU
- ToLower vs ToLowerInvariant
- Passing This(of my main form) to a class that handles direction change/and language change c#/Winforms
- Date not binding with model for specific culture
- How to make a Windows Phone 8.1 TimePicker inherit from the system regional format?
- Resource file not being picked up when using ASP.NET expression
- DateTime get the letters representing day, month, year from the currentculture
- Most suitable method to override on mvc base controller for setting culture
- Opposite method to toLocaleDateString
- Client want ASP.NET application in URDU
- Handling decimal parameters in webapi
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 # Hahtags
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?
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 01
or00 00 00 01
rather 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.