- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
ffmpeg -f image2 -r 15 -i images/img%03d.jpg -vcodec libx264 video.mp4
我在 php 中使用 exec 运行这段代码。
我没有得到输出。 video.mp4 是空白的。
但是如果我将这个commade修改成这样,
ffmpeg -f image2 -i i.jpg -vcodec libx264 -t 15 video.mp4
视频播放 15 秒。
我试过-r 1/15。它也不起作用。我哪里做错了?
<?php
$command = "/usr/bin/ffmpeg -f image2 -r 15 -i images/img%03d.jpg -vcodec libx264 video.mp4";
exec($command);
?>
images文件夹有img001.jpg img002.jpg ... img005.jpg
Array
(
[0] => ffmpeg version N-48645-gf3c9d8d Copyright (c) 2000-2013 the FFmpeg developers
[1] => built on Jan 9 2013 04:08:32 with gcc 4.7 (Debian 4.7.2-5)
[2] => configuration: --extra-cflags=-I../static/include --extra-ldflags='-L../static/lib -static' --enable-gpl --enable-version3 --enable-static --disable-shared --disable-debug --enable-runtime-cpudetect --disable-x11grab --enable-libmp3lame --enable-libx264 --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxavs --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --disable-ffserver
[3] => libavutil 52. 13.100 / 52. 13.100
[4] => libavcodec 54. 86.100 / 54. 86.100
[5] => libavformat 54. 59.106 / 54. 59.106
[6] => libavdevice 54. 3.102 / 54. 3.102
[7] => libavfilter 3. 32.100 / 3. 32.100
[8] => libswscale 2. 1.103 / 2. 1.103
[9] => libswresample 0. 17.102 / 0. 17.102
[10] => libpostproc 52. 2.100 / 52. 2.100
[11] => Input #0, image2, from 'images/img%03d.jpg':
[12] => Duration: 00:00:45.00, start: 0.000000, bitrate: N/A
[13] => Stream #0:0: Video: mjpeg, yuvj420p, 200x300 [SAR 1:1 DAR 2:3], 0.07 fps, 0.33 tbr, 0.07 tbn, 0.07 tbc
[14] => [libx264 @ 0x3283080] using SAR=1/1
[15] => [libx264 @ 0x3283080] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[16] => [libx264 @ 0x3283080] profile High, level 1.2
[17] => [libx264 @ 0x3283080] 264 - core 129 r2230 1cffe9f - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[18] => Output #0, mp4, to 'videos/video.mp4':
[19] => Metadata:
[20] => encoder : Lavf54.59.106
[21] => Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuvj420p, 200x300 [SAR 1:1 DAR 2:3], q=-1--1, 16384 tbn, 0.07 tbc
[22] => Stream mapping:
[23] => Stream #0:0 -> #0:0 (mjpeg -> libx264)
[24] => Press [q] to stop, [?] for help
[25] => Input stream #0:0 frame changed from size:200x300 fmt:yuvj420p to size:200x300 fmt:yuvj444p
[26] => frame= 3 fps=0.0 q=-1.0 Lsize= 43kB time=00:00:15.00 bitrate= 23.2kbits/s
[27] => video:42kB audio:0kB subtitle:0 global headers:0kB muxing overhead 1.912722%
[28] => [libx264 @ 0x3283080] frame I:1 Avg QP:18.97 size: 13250
[29] => [libx264 @ 0x3283080] frame P:2 Avg QP:18.68 size: 14368
[30] => [libx264 @ 0x3283080] mb I I16..4: 0.8% 81.4% 17.8%
[31] => [libx264 @ 0x3283080] mb P I16..4: 0.0% 84.8% 15.2% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip: 0.0%
[32] => [libx264 @ 0x3283080] 8x8 transform intra:83.7%
[33] => [libx264 @ 0x3283080] coded y,uvDC,uvAC intra: 96.4% 99.2% 97.6%
[34] => [libx264 @ 0x3283080] i16 v,h,dc,p: 0% 0% 100% 0%
[35] => [libx264 @ 0x3283080] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 18% 13% 5% 8% 11% 8% 10% 7%
[36] => [libx264 @ 0x3283080] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 14% 9% 7% 9% 13% 8% 7% 7%
[37] => [libx264 @ 0x3283080] i8c dc,h,v,p: 45% 17% 26% 12%
[38] => [libx264 @ 0x3283080] Weighted P-Frames: Y:0.0% UV:0.0%
[39] => [libx264 @ 0x3283080] kb/s:7.46
)
最佳答案
尝试使用
-循环 1
和
-r 1/4
然后看看你得到了什么
关于php - FFMPEG - 图像到视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14296703/
我正在尝试使用 ldash 等选项和 http_opts ,正如 dash muxer 文档所描述的,但 FFmpeg 无法识别它们。我正在使用最新发布的 ffmpeg v4.2.2 版本。我在 ff
假设我们有许多想要与 -vcodec 副本(或等效语法)合并的视频记录。无需重新编码,不会损失质量。并且很少有记录(minor set),有另外的编解码器,参数等等。所以我们可以使用 ffprobe
有没有办法安装 ffmpeg 没有root访问权限?使用 ./configure 无法做到这一点来自 git 克隆 git://source.FFmpeg.org/fFFmpeg.git 最佳答案 是
在应用程序中直接使用 FFmpeg 与使用 Ffmpeg 命令行有什么区别? 最佳答案 没有:FFmpeg 命令行只是一个使用 FFmpeg API 的应用程序。当然,在使用该应用程序时,您仅限于已实
我正在使用以下命令对文件(下面的媒体信息)进行编码: ffmpeg -i AHomeMovie.mkv -map 0 -c copy -c:v libx264 -preset veryslow -cr
我正在制作一张圣诞贺卡,我需要将视频嵌入到右侧(边框内)的卡片中,并在左侧显示一些文本。 为简单起见,假设我有一个带有透明孔的盒子。我想在那个洞里显示视频。 我正在使用 ffmpeg-python很高
我正在使用 laravel ffmpeg 为视频创建缩略图,但是当我运行代码时,它返回给我 Call to undefined method FFMpeg\FFMpeg::fromDisk() 我不知
我为我的 nvidia 下载了 cuda 驱动程序 但它仍然不使用我的 GPU,它仍然使用 cpu。 我怎样才能让它使用GPU。 我也听说过硬件加速,但那不起作用。 它必须是 h.264 最佳答案 你
尝试剪切视频的多个部分时,我遵循此问题的解决方案 Cut multiple parts of a video with ffmpeg .但问题是,如果我剪切多次(比如大约 20 次或更多),视频和音频
所以我最近开始在我打算在商业上分发的应用程序中实现 ffmpeg。而且我很难理解整个许可过程。 我见过的最常回答的问题似乎是关于 x264,它需要 x264.org 的付费许可才能在商业上使用它(对吗
我使用 ffmpeg 更改视频文件的分辨率,转换到另一个位置后,视频持续 0 秒,但最初持续 2 分钟 我的ffmepg代码: ffmpeg -i input.mp4 -filter:v scale=
如上: FFMPEG 不支持在没有第三部分库的情况下加载外部过滤器是否有特定原因? (像弗莱0r) 我必须重新编译整个包来添加一个新的过滤器! 最佳答案 只有开发人员可以肯定地回答,但我会冒安全风险和
我收到了一个编码器,我需要用 FFMPEG 编译,我是新手,所以我不知道如何用 ffmpeg 添加/编译它。编码器是JSV,我的服务器是ubuntu 14.04。 我已经开始阅读这篇 https://
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许在 Stack Overflow 上提出有关通用计算硬件和软件的问题。您可以编辑问题,使其成为
我正在制作一个利用 ffmpeg 重新混合和转码视频文件的程序。我想使用 ffmpeg -codecs和 ffmpeg -formats (或通过 ffmpeg 可用的任何其他命令)来检查我可以在哪些
这个问题在这里已经有了答案: ffmpeg moving text drawtext (1 个回答) 3年前关闭。 我正在使用此命令使用 ffmpeg 将文本从一个地方移动到另一个地方 ffmpeg
为什么 ffmpeg/ffprobe 为流和整个文件提供不同的比特率值? 当我使用 ffprobe 分析 mp3 文件时,它会在第一行和第二行给出不同的比特率。 有谁知道,有什么区别? // File
如何在ffmpeg中使用drawtext在视频上绘制多色文本? 示例:我想突出句子中的专有名词, “XYZ公司股价上涨91%” 高亮 XYZ 白色 黄色 用绿色突出显示 91% 如果您有任何其他方法不
我想让我的不和谐机器人播放音乐,但我不断收到“找不到 FFMPEG”错误。 我的机器人主要是由 ping 制成的,所以我不会上传那部分。音乐代码应该是这个。 const Discord = requi
我需要帮助在 ffmpeg drawtext 过滤器中正确/(完全)显示德语变音符号“äüö”。我现在不能说我的无能是由于缺乏 ffmpeg 专业知识或机器配置,还是两者兼而有之。非常感谢您的意见。
我是一名优秀的程序员,十分优秀!