ffprobe显示h264流的比特率为0.0或N / A [英] ffprobe shows bitrate of 0.0 or N/A for h264 stream

查看:1667
本文介绍了ffprobe显示h264流的比特率为0.0或N / A的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个11分钟的.mkv文件,带有h264视频流,占用了184MB的空间。我想减小这个文件的大小。我想我可以减少比特率。但ffprobe不输出任何。事实上,它表示文件的长度是从比特率计算出来的,因此可能不准确,但在摘要或[FORMAT]条目中没有比特率:

 > ffprobe -show_format file.mkv 
[matroska,webm @ 0x7f8e8084b200]从bitrate估计持续时间,这可能不准确
从'file.mkv'输入#0,matroska,webm:
持续时间:00:11:11.59,开始:0.000000,比特率:N / A
流#0.0:视频:h264(高),yuv420p,1280x720 [PAR 1:1 DAR 16:9],29.97 fps,29.97 tbr ,1k tbn,59.94 tbc(默认)
流#0.1:音频:aac,48000 Hz,5.1,s16(默认)
[FORMAT]
...
bit_rate = 0.000000
[/ FORMAT]

谢谢。



编辑:我的理解是H.264是一个协议。因此,根据ffprobe文档,我无法确定h264编解码器采用什么实现方式。如果有人知道,我将不胜感激。

解决方案

文件大小/假定持续时间=比特率。 (184 MB * 8192 [将MB转换为千比特])/ 671秒=〜2246千比特/秒。当然,这是整个文件的平均比特率,而不仅仅是视频流。



如果要定位特定的输出文件大小,例如100 MB,并且想要音频占用高达128 kb / s:(100 MB * 8192)/ 671秒= 1220 kb / s总比特率 - 128 kb / s所需音频比特率= 1092 kb / s视频比特率。



实际输出文件的最终结果可能有所不同。


I have a 11-minute .mkv file with a h264 video stream, taking up 184MB of space. I would like to reduce the size of this file. I figured I could just reduce the bit-rate. But ffprobe doesn't output any. In fact, it says the length of the file is calculated from the bitrate and thus could be inaccurate, but there's no bitrate either in the summary or in the [FORMAT] entry:

> ffprobe -show_format file.mkv
[matroska,webm @ 0x7f8e8084b200] Estimating duration from bitrate, this may be inaccurate
Input #0, matroska,webm, from 'file.mkv':
  Duration: 00:11:11.59, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: h264 (High), yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)
    Stream #0.1: Audio: aac, 48000 Hz, 5.1, s16 (default)
[FORMAT]
...
bit_rate=0.000000 
[/FORMAT]

Thank you.

EDIT: My understanding is that H.264 is a protocol. As such, I cannot tell, based on the ffprobe documentation, what implementation the h264 codec uses. If anyone knows that, I'd be grateful.

解决方案

file size / assumed duration = bitrate. (184 MB * 8192 [converts MB to kilobits]) / 671 seconds = ~2246 kilobits per second. Of course this is the average bitrate of the whole file, and not just the video stream.

If you want to target a specific output file size such as 100 MB and want the audio to take up to 128 kb/s: (100 MB * 8192) / 671 seconds = 1220 kb/s total bitrate - 128 kb/s desired audio bitrate = 1092 kb/s video bitrate.

Final results of the actual output file may vary.

这篇关于ffprobe显示h264流的比特率为0.0或N / A的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆