Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong stream size and bitrate of the video track #271

Open
HolyGit12 opened this issue Jan 12, 2025 · 3 comments
Open

wrong stream size and bitrate of the video track #271

HolyGit12 opened this issue Jan 12, 2025 · 3 comments

Comments

@HolyGit12
Copy link

HolyGit12 commented Jan 12, 2025

After encoding with auto-encode the resulting video has the wrong stream size (header). It seems to be the data from the source file.
The video bitrate is also wrong.
I attach what mediainfo is reporting:

General
Format : Matroska
Format version : Version 4
File size : 412 MiB
Duration : 36 min 4 s
Overall bit rate : 1 596 kb/s
Frame rate : 29.970 FPS
Writing application : Lavf61.7.100
Writing library : Lavf61.7.100
ErrorDetectionType : Per level 1

Video
ID : 1
Format : AV1
Format/Info : AOMedia Video 1
Format profile : [email protected]
Codec ID : V_AV1
Duration : 36 min 4 s
Bit rate : 4 995 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 29.970 (30000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 0)
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.080
Stream size : 1.26 GiB
Writing library : Lavc61.19.100 libsvtav1
Default : Yes
Forced : No
Color range : Limited

@HolyGit12
Copy link
Author

I guess that the wrong data are part of the global (?) tags:

<Simple>
  <Name>BPS</Name>
  <String>4995221</String>
</Simple>
<Simple>
  <Name>NUMBER_OF_FRAMES</Name>
  <String>64878</String>
</Simple>
<Simple>
  <Name>NUMBER_OF_BYTES</Name>
  <String>1351683311</String>
</Simple>

@mr44er
Copy link

mr44er commented Feb 25, 2025

It seems to be the data from the source file.

Yes, that is the metadata from the source file.

Try this:
ffmpeg -i outputold.mkv -map_metadata -1 -c copy outputnew.mkv

@Dropforged
Copy link

@HolyGit12, I had a similar issue. I had my presets defined to preserve/carry forward existing metadata so as not to loose valuable information - at least, that was the idea. So I had the same problem with inaccurate headers (kbps, etc). I took me a while to figure out why it was happening

Much thanks @mr44er , I'll run this against my library. I wasn't going to re-transcode all those sources again before I corrected the issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants