Android-VideoStreamDecodingSample | sample project demonstrates how to use FFmpeg | Video Utils library
kandi X-RAY | Android-VideoStreamDecodingSample Summary
kandi X-RAY | Android-VideoStreamDecodingSample Summary
This sample code demonstrates how to use FFmpeg for video frame parsing and to use the MediaCodec for hardware decoding. It will help to parse video frames and decode the raw video stream data from DJI Camera and output the YUV data.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Android-VideoStreamDecodingSample
Android-VideoStreamDecodingSample Key Features
Android-VideoStreamDecodingSample Examples and Code Snippets
Community Discussions
Trending Discussions on Android-VideoStreamDecodingSample
QUESTION
When sending h264 data for frame decoding, it seems like a common method is to first call av_parser_parse2 from the libav library on the raw data.
I looked for documentation but I couldn't find anything other than some example codes. Does it group up packets of data so that the resulting data starts out with NAL headers so it can be perceived a frame?
The following is a link to a sample code that uses av_parser_parse2:
I would appreciate if anyone could explain those library details to me or link me resources for better understanding.
Thank you.
...ANSWER
Answered 2018-Jun-25 at 13:32DJI's video transmission does not guarantee the data in each packet belongs to a single video frame. Mostly a packet contains only part of the data needed for a single frame. It also does not guarantee that a packet contains data from one frame and not two consecutive frames. Android's MediaCodec need to be queued with buffers, each holding the full data for a single frame. This is where av_parser_parse2() comes in. It gathers packets until it can find enough data for a full frame. This frame is then sent to MediaCodec for decoding.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Android-VideoStreamDecodingSample
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page