问题标签 [avconv]

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 投票
1 回答
178 浏览

bash - 批量 avconv 在列表中途重新编码视频

由于我有一台运行 Linux 的低端计算机,我经常需要重新编码高清视频,降低质量以便能够在我的机器上观看它们。一个典型的案例是当我下载一个系列的几集时,我无法一次将它们全部转换,我需要在系列中途开始重新编码。

我通常使用这条线将单集转换为较低质量:

如果我要一次批量转换它们,我会使用类似的东西:

encoded子目录在哪里。

但是如果我需要在第 5 集开始重新编码怎么办?

我不知道。

0 投票
1 回答
772 浏览

video - avconv“选择”过滤器不丢弃第一帧

我正在尝试使用 avconv 的“选择”过滤器对视频进行分段,以仅从输入文件中提取特定范围的帧。例如,假设我有一个名为 input.mp4 的 60fps 视频文件,有 3000 帧(即 50 秒),然后我运行

我期望的是 output1.mp4 有 input.mp4 的前 2000 帧(持续约 33 秒),而 output2.mp4 有最后 1000 帧(持续约 17 秒)。

我通过运行计算帧数

并检查分配给“框架”的值。

我实际得到的是 output1.mp4 有 2000 帧并持续约 33 秒,但 output2.mp4 有 2999 帧,并且仍持续整整约 50 秒。当我打开 output2.mp4 时,我注意到视频的前 2000 帧实际上只是输入的第 2000 帧的重复,即前 2000 帧似乎被正确过滤,但被第一个接受的帧取代.

这不是pts问题。我使用 avprobe 检查数据包的数量及其相关点:

我看到实际上有 2999 个数据包。

我究竟做错了什么?

附带问题:

  • 假设我做错了什么,为什么 output2.mp4 包含 2999 而不是完整的 3000?
  • 无论我在过滤器中使用“gte”还是“gt”功能,行为都不会改变。为什么会这样?
0 投票
1 回答
353 浏览

python - 如何使用 avconv 和 python 将不同帧速率的两个不同图像序列组合成视频?

我有两组图像,我可以毫无问题地分别与 avconv 组合(使用 -r 具有不同的速率)一组为 -r .20(将一个图像扩展到五秒的视频),另一组以常规帧速率设置为以正常速度组装视频。

当我尝试将这些单独的 avi 文件与 avconv 或 avimerge 组合时,生成的视频只有第一个视频的帧速率(-r .20)

有没有办法将这两个序列结合起来,并且两个序列都在它们导出的帧速率中?

这是我在这里整理的草率代码:

#
0 投票
1 回答
1205 浏览

ffmpeg - 在 libav 中“rtmp://url live=1”不像在 FFmpeg 中那样工作

我正在尝试播放通过 Red5 服务器流式传输的实时 rtmp 流。使用的命令是
ffmpeg -i "rtmp://IP/live/1234 live=1" -f flv rtmp://IP/live/1234_56
上面的实时流式传输命令适用于 Window OS 上的 ffmpeg。但是无法流式传输以下命令的实时 rtmp 视频在 libav 上运行,Ubuntu 操作系统使用 avconv 工具。

avconv -i "rtmp://IP/live/1234 live=1" -f flv rtmp://IP/live/1234_56

即使我使用 *rtmp_live* AVOption 来播放直播流或替换 live=1 参数,如下
所示 - avconv -i "rtmp://IP/live/1234 rtmp_live" -f flv rtmp://IP/live/1234_56

但是这个命令不起作用。请告诉我如何通过 avconv 工具使用 rtmp_live 或 live=1

提前致谢。

0 投票
1 回答
688 浏览

avconv - 哪个选项可以让 avconv 将视频转换为从 0 而不是 1 开始的图像?

我需要将视频转换为图像。一项要求是索引从 0 开始。执行以下命令。

但是,生成的图像索引从 0001.png 开始,而不是 0000.png。

哪个选项将指定起始编号?

0 投票
1 回答
767 浏览

linux - 将 arecord 与 aconv 一起使用时不受欢迎的 DELAY

arecord -f cd -D 默认:CARD=Intel -| avconv -i pipe:0 -acodec libmp3lame -aq 128k g3-$dt-$$.mp3

我正在尝试通过我的笔记本电脑 MIC 进行录音。在开始录制之前有一个不受欢迎的暂停。

我尝试了 strace -f 我看到了这个

向上滚动

我也手动执行此操作.. 将其保存到文件中,然后在文件上运行 avconv;那要快得多(立即完成)。

可能是什么问题呢。

0 投票
1 回答
165 浏览

avconv - 为什么视频大于其帧的总和

我尝试用 1000 个 PNG 文件制作视频,总大小为 25.3MB。当我使用我发现的无损视频编码命令时, avconv -i Images%04d.png -c:v huffyuv output.avi 我的视频竟然有 630MB。这怎么可能,我该如何避免呢?

0 投票
1 回答
50 浏览

avconv - avconv:如何跳过无法在 php 脚本中打开的文件

所以给一些背景。服务器有 3000 个奇怪的文件。我制作了一个脚本,可以对文件进行排序并将它们转换为 mp4 和 webM。

然而,主要问题是某些文件已损坏、损坏并引发致命错误。我已经尝试了一些调查

但据我所见,这会向控制台显示大量文本,我无法轻易隐藏exec() passthorugh(),这也很难解析。

这是我唯一的选择,还是有 avconv 经验的人对此有任何经验?

0 投票
1 回答
318 浏览

mp4 - 使用 avconv 将 MOV 转换为 MP4 时出错

我用:

转换正确完成并顺利播放 PC / MAC,但视频无法在移动设备上播放。

有没有人有同样的问题?如何解决?

0 投票
1 回答
17458 浏览

c - avconv complains "non monotonically increasing dts to muxer in stream" when piping from libx264 on 14.04

I have a piece of code that takes a stream of images and writes them to a file using x264 to encode and avconv. The relevant bits are as follows

I've left out error checking for clarity, but no error is ever returned. Indeed, until I upgraded my system to 14.04, this code worked perfectly (and continues to work perfectly for colleagues who've yet to upgrade).

Only now running Ubuntu 14.04, I get this output from avconv

Despite the error, out.i_dts does monotonically increase over the whole duration of the video (it's always equal to in.i_pts).

My general assumption is that newer versions of avconv are more strict with the parameters of the input stream, so while my choice of parameters may have worked before, they do not work now.

Another curiousity, which might be related, is avconv detecting that the stream is 25 FPS, even though x264 is configured with an input FPS of 30.

Edit: Some further information, the same dts error (2>=2) happens regardless of the initial pts (with the output dts matching as expected).