我在我的mac上安装了ffmpeg和ffprobe (macOS塞拉利昂),并且我已经将他们的路径添加到PATH中。我可以从终点站查到。
我试图使用ffprobe获取视频文件的宽度和高度,使用以下代码:
import subprocess
import shlex
import json
# function to find the resolution of the input video file
def findVideoResolution(pathToInputVideo):
cmd = "ffprobe -v quiet -print_format json -
我成功地创建了一个JSON文件,该文件由ff探针创建,其中包含关于MKV容器中的视频流的基本信息。通过jq-win64.exe "[.format.duration]" %%~ni.mkv.json,从文件中正确读取电影的持续时间,jq回显["1:36:55.184000"]。现在,我希望将此值存储在脚本的全局变量中,以便进一步处理。我尝试了几种方法,但每种方法都会导致错误和/或使%duration%空着。我试过了。
for %%i in (*.mkv) do (
SETLOCAL ENABLEDELAYEDEXPANSION
fo
我通过执行安装了sudo apt-get install ffmpeg
在终端上,当我运行/usr/bin/ffprobe -help时,它正常运行,但它不是从我的包中运行的。相反,我得到了标题中的异常:Your FFProbe version is too old and soes not support '-help'
我使用的是laravel,我已经安装了这个包
我哪里出问题了?
使用ffprobe获取流详细信息时出现Input buffer exhausted before END element found错误。ffprobe给出了请求的信息,但错误包含在输出中,并创建了无效的JSON。
ffprobe -loglevel error -select_streams v:0 -show_entries stream=width,height:stream_tags=rotate -of json testVideo.mp4
{
[aac @ 0x7fc06201cc00] Input buffer exhausted before END element foun
我有一个脚本,它调用ffprobe,解析其输出,并将其输出到控制台。
以下是它的精简版本,没有解析代码和命令行选项:
"""Invoke ffprobe to query a video file and parse the output"""
def ffprobe(fname):
import subprocess as sub
import re
p = sub.Popen(['ffprobe', fname], stderr=sub.PIPE)
stdout, stderr = p.com
从函数sync_lister()输出控制台
20203.161 ms
19930.7166 ms
21279.1429 ms
18988.5079 ms
17724.5125 ms
11358.8549 ms
36164.6077 ms
20183.306099999998 ms
14238.174599999998 ms
20383.551 ms
Process finished with exit code 0
很好,这就是我所期望的。现在我想把这个放在一个工人池里,让它达到4倍的速度。
我以为我做到了,而且做得对。为什么我没有输出?
运行async_lister()时没有控制台输出,应
当我将应用程序提取为apk并在真正的Android设备上进行测试时,它崩溃了,但当我以debug运行它时,它工作得很好。错误的原因是pub.dev --> video_editor库。我从Firebase得到了这个错误输出: Caused by java.lang.UnsatisfiedLinkError:
Bad JNI version returned from JNI_OnLoad in "/data/app/com.projectName--b7nYjATxtDAUxnuC_rpnQ==/base.apk!/lib/armeabi-v7a/libmobileffmpeg
我正在做一个验证码解译器,我需要使用ffmpeg,虽然没什么用。Windows 10用户。
第一次运行代码时警告:
C:\Users\user\AppData\Roaming\Python\Python310\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg
这是从GitHub获得的,我包括了代码(至少我认为我这么做了)。
require_once '/FFMpeg/FFProbe.php'; require_once '/FFMpeg/FFMpeg.php';
代码返回这个奇怪的错误,我似乎在他们的GitHub回购页面上找不到解决方案。
Fatal error: Class 'Doctrine\Common\Cache\ArrayCache' not found in /FFMpeg/FFProbe.php on line 204
为什么会发生这个错误,或者我是不是很蠢?
编辑#1:当我使用他们在
我试图让在Docker的AlpinLinux3.7.3上使用ffprobe和ffmpeg解码器。
错误是:
/usr/lib/python3.6/site-packages/pydub/utils.py:198: RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work
warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", R
我已经在我的PC上使用pip ffprobe命令安装了ffprobe,并从安装了ffmpeg。
但是,我仍然在运行列出的代码时遇到问题。
我尝试使用下面的代码,但没有成功。
SyntaxError: Non-ASCII character '\xe2' in file GetVideoDurations.py
on line 12, but no encoding declared; see
http://python.org/dev/peps/pep-0263/ for details
有人知道哪里出问题了吗?我没有正确引用目录吗?是否需要确保.py和视频文件位于特定位置?
我想从Windows上用youtube-dl下载的视频中提取音频。我让youtube-dl正常工作,但无法提取音频。此问题是由于未安装正确的音频代码造成的。
当我尝试提取音频时,它告诉我以下内容:
WARNING: unable to obtain file audio codes with ffprobe
youtube-dl手册上写着:
-x -extract-audio convert video files to audio-only files (requires ffmpeg or avconv and ffprobe or avprobe)
如何安装ffprobe或ffmp