How to determine where the first keyframe of a MP4 file is located

Source: Internet
Author: User

Recently the company in the country double monitoring a video mp4 on-demand, later usability has not been very good, download detailed data analysis under, found that a lot of 5s even if the failure of the situation, asked the two people said is because 5s did not load the first keyframe so failed

Here's the problem:

1. Where is the first keyframe in this 256M mp4 file, which means the user needs to download a video to start playing

2. Knowing the size position of the first keyframe, what kind of network can the user need to load the first keyframe within 5s to count the success

MP4 file is out of the box, how to Know MP4 's first keyframe, and then asked the company's video Daniel, he gave a video parsing tool that can analyze the details of the MP4 to find out the position of the first keyframe

The first keyframe is the pos+size size of the first key_samples of the parsed file, such as:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6E/BA/wKiom1WD2FjzLaeVAAJPcA0VW-4682.jpg "title=" QQ picture 20150619165212.jpg "alt=" Wkiom1wd2fjzlaevaajpca0vw-4682.jpg "/>

From pos+size add up is 1190986 bytes, that is, Chabudu 1163kb Place, if the user wants 5s load into, need to 1163/5=232kb/s, the net speed is 2mb/s, later analysis CDN Log, found a lot of failure of the user network is not in line with 2mb/ s, inform the customer of the situation, OK


Note:

MP4 Analysis Tool accessories do not let upload, need to contact me

Usage is:./mp4_reader.reader-f h264_800k_mp4.mp4-o mp4info.txt-d SK

Last look at Mp4info.txt, you can see the top.

This article is from "Linux open Source-Continuous summary ..." Blog, be sure to keep this source http://fantefei.blog.51cto.com/2229719/1663658

How to determine where the first keyframe of a MP4 file is located

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.