问题标签 [ffprobe]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
5 回答
20026 浏览

java - 使用 FFProbe 获取视频 fps

我是 ffprobe 的新手,我的目标是获取视频 fps 并存储到 java 程序中。我的代码存储 xml 文件,但我想直接存储 int fps=30;

这是我的代码。

0 投票
1 回答
217 浏览

python - 在 python 3.4.2 中,此代码抛出 TypeError: Type str does not support the buffer API

TypeError:类型 str 不支持缓冲区 API

在 python3.4.2 中运行此代码时

0 投票
1 回答
986 浏览

ffmpeg - 使用 ffprobe 进行剪切检测

我正在尝试使用ffprobe. 我使用以下命令:

它工作得很好,毫无疑问。但现在我只想检测特定范围内的削减。假设从 3 到 8 秒。我怎么能那样做?

我尝试使用-read_intervals 3%8,但它给了我一个错误:

命令-read_intervals %+3(从一开始到第 3 秒读取)有效,但以奇怪的方式 - 它检测到第 4 秒(我猜是超过)的剪切。

所以我很困惑。这些“间隔”是什么以及如何使用它们?是否可以在常规秒内设置范围?

以防万一这是我的测试剪辑https://yadi.sk/i/nd-c12mYeQ2nb

0 投票
1 回答
6088 浏览

ffmpeg - ffprobe中pkt_duration和pkt_duration_time的区别

当我在带有参数的 HLS 流中执行下一个 ffprobe 命令以以平面格式显示特定流视频中的帧并使用“pkt”模式进行 grep 时,它会返回以下信息:

带有_time模式的信息和没有它的信息有什么区别?

我认为 pkt_duration 以微秒为单位,而 pkt_duration_time 以秒为单位。这是真的?

0 投票
0 回答
83 浏览

c++ - Determining if a file is media playable

I am seeking a tool with which I can use with the MFC CreateProcess() command to determine whether a file is media playable file or not. I am not permitted to compare file extension with an 'allowable' set such as mp3, mp4, avi etc - it has to be done deterministically with tools such as ffprobe, DirectShow.

I have experimented with ffprobe which when applied to media files gives certain information such as start time, duration, codec name, format name etc. All this is usually very useful when I need to exclude non-playables such as text files, Word documents etc.

Unfortunately ffprobe sometimes returns information suggesting that the file I pass to it is media playable when it is not. For example a Windows .dmp file is returning a MP3 codec_name!

Is anyone aware of other strategies I could use in order to determine a file's media-playability?

0 投票
1 回答
1287 浏览

php - 使用 ffmpeg/ffprobe 使用 php 创建波形 json

我的服务器上有许多 ogg 和 opus 文件,需要根据需要生成 json 波形数字数组(示例如下)。

最近我发现了基于节点的波形实用程序,它使用 ffmpeg/ffprobe 来渲染 JSON 波形,并且效果很好。我不确定是否让节点进程不断运行是解决我的问题的最佳解决方案。

由于 ffmpeg 似乎能够处理我可以扔给它的任何东西,我希望坚持使用 ffmpeg 解决方案。

我有三个问题:

1) 是否有 php 等价物?我发现了一对生成 PNG 图像但没有生成 JSON 波形数字数组的一对

2) 使用基于节点的解决方案而不是基于 php 的解决方案有什么显着优势(假设有基于 php 的解决方案)?

3) 有没有办法使用 CLI ffmpeg/ffprobe 生成 json-waveform ?我看到了所有的 -show_ 选项(-show_data、-show_streams、-show_frames),但看起来并没有产生我想要的东西。

json-waveform 需要采用以下格式:

[ 0.0002、0.001、0.15、0.14、0.356 ....]

谢谢你们。

0 投票
1 回答
2332 浏览

python-3.x - python中的RTMP流监控

我没有使用 python 的经验,但我在网上找到了这个:
https
: //gist.github.com/sinkers/d647a80fdb180b4cc3a6 假设它适用于当前版本的 ffmpeg (ffprobe),我试着稍微修改一下代码,因此它不会登录到 Amazon SNS 来发送消息。只需在流关闭时打开一个音频文件,使用以下命令(我在此站点上找到)就可以了:

os.system("开始 /sound/xyz.mp3")

我试图做这做那,但我似乎无法成功。我安装了 3.x。

我知道这可能很傻,但是我需要输入相对文件位置还是绝对文件位置?对于 ffprobe 和声音文件,它是 C:\... 还是正确的格式和路径是什么?

任何解决此问题的帮助将不胜感激。

0 投票
2 回答
785 浏览

php - FFMPEG 检索持续时间不适用于 MOV 文件

所以我在 php 中对文件运行 ffprobe 命令并获取输出(以获取持续时间、时间等)

其中 $location 是文件位置 + 文件名。现在这个命令 100% 完美地适用于 .mp4 / .avi / 我尝试过的所有其他文件。除了 .mov,当使用 .mov 时,我的“输出”变量为空。有没有办法解决这个/改变这个?

0 投票
1 回答
37436 浏览

ffmpeg - ffmpeg 命令行将输出写入文本文件

我正在使用这个脚本在 ffmpeg 中进行镜头检测。

我需要将输出写入文本文件才能读取 ac 程序的输出。我怎样才能做到这一点?任何帮助表示赞赏。

0 投票
1 回答
4989 浏览

audio - 基于 ffmpeg 输出的音频文件的比特率是多少?

是 40kb/s 下Format,还是 16kb/s 下Stream?格式和流之间有什么关系?下面的输出是在 iPhone 上使用 Core Audio 生成的文件,带有音频单元。输出格式由AudioStreamBasicDescription描述符指定

更新: 输出ffprobe -v error -show_format -show_streams 123_1429602551009.051025.m4a