FFMPEG (ii)-Universal multiplexer

Source: Internet
Author: User
FFMPEG (ii)-Universal multiplexer
One: Technical points
As mentioned in the previous article, the reuse structure of the MP4 type differs from other types, such as mp4,mov,flv, where the H264 data does not contain descriptive information such as SPS,PPS, to reduce overhead,
The same is true for AAC data, which requires converting the previous 7-byte Adts header to a two-byte frame length.
FFmpeg provides something called the filter filters to do this. For this, some filter is listed below to implement some conversion functions, the function can see the name
H264_mp4toannexb
Mp3decomp
Mp3comp
Mov2textsub
Mjpegadump
Mjpeg2jpeg
Imxdump
Dump_extra
Aac_adtstoasc
This paper mainly uses AAC_ADTSTOASC this filter to complete the relevant MUX function


Second: there are problems


Above will have the problem of the place enumerated, this demo exists problem is av_read_frame read out of the packet inside Pts,dts if really do audio and video synchronization, you need to fill in, I temporarily did not find a better method, this demo can basically achieve audio and video synchronization, But a long time will appear some error, if there is an expert, can be three kinds of synchronization methods common, hope to communicate:
1: Sync audio to video
2: Sync video to Audio
3: Synchronize both to the external clock
Exchange Please add qq:379969650
Demo Address: http://download.csdn.net/detail/zhuweigangzwg/5343063

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.