| |

VerySource

 Forgot password?
 Register
Search
View: 1174|Reply: 9

Help: How do I programmatically get bit rate information for MPEG1 files

[Copy link]

1

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-1-22 11:20:01
| Show all posts |Read mode
I now want to get the bitrate of the mpeg1 file. But I don't know much about the mpeg1 file organization format.
Some files can be obtained. The rule is that the fifth byte after the start of the file video sequence (00 00 01 B3) takes an 18-bit value, and then multiplies this value by 400. But this rule does not apply to all files.
Thank you for your suggestions!
Reply

Use magic Report

0

Threads

15

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

Post time: 2020-2-15 11:15:02
| Show all posts
The length of each frame of video compression is not fixed, which is very different from audio!
So you can only calculate the bit rate of the video by yourself, calculate the length of each frame, and then calculate it yourself!
25 frames or 30 frames per second, adding up the length of so many consecutive frames, can't it be divided?
Reply

Use magic Report

1

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-2-21 19:30:01
| Show all posts
Then how to obtain the length of each frame, is there a mark on the size of each frame of data in the file, or do you need to count the number of data bits per frame yourself.
Reply

Use magic Report

0

Threads

15

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

Post time: 2020-2-23 15:30:01
| Show all posts
The number of data bytes every two 00 00 01 xx is not the frame length?
If in fact avi and other formats, the length of each frame can be obtained in the file!
Reply

Use magic Report

1

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 Canada

 Author| Post time: 2020-2-24 18:00:02
| Show all posts
Number of data bytes per two 00 00 01 xx? Please also explain in detail. please.
How to locate the 00 00 01 xx data. If you search the file content directly, it may be other data. What data is used to identify the "frame length" in the file? Logo, followed by the horizontal and vertical dimensions of the video, then the Aspect Ratio, and then the frame rate)
Reply

Use magic Report

0

Threads

15

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

Post time: 2020-3-2 14:00:01
| Show all posts
00 00 01 b3 Isn't it the beginning of the frame?
Isn't the data between every 2 frame headers just one frame of data?
Reply

Use magic Report

1

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-3-4 19:30:01
| Show all posts
This doesn't seem to work. I have tried a mpeg1 file at 25fps and the data from the first frame to the 26th frame is 1119.789kb. The bit rate of this file obtained by other tools: 458 Kbps.
What kind of data is there in the middle from one 00 00 01 b3 frame to another 00 00 01 b3 frame? It seems that it is not one of them, so the data is counted in the bit rate.
Reply

Use magic Report

0

Threads

15

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

Post time: 2020-3-7 18:00:01
| Show all posts
Hey, there might be audio data in it, right?
I mean you have to analyze him out frame by frame!
Reply

Use magic Report

1

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-3-8 18:45:01
| Show all posts
I don't know what data is in it. I don't know if the audio data is in it. ÷
Do you have file structure information inside the frame
Reply

Use magic Report

1

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-3-18 03:15:01
| Show all posts
From one 00 00 01 b3 frame sequence start flag to another 00 00 01 b3 frame sequence start flag, there is an I frame and multiple B or P frames in the middle
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list