如何从 AVI 中提取视频图层?

发布于 2024-10-06 12:24:38 字数 264 浏览 0 评论 0原文

我有一台 Fujifilm FinePix Real 3D W3,它可以创建 Fujifilm 所谓的 3D-AVI 文件。有一些程序可以将这些 3D-AVI 文件分割成单独的左右电影,但它们涉及在 Windows 上使用基于 GUI 的软件。

我宁愿使用像 ffmpeg 这样的命令行工具,这样我就可以自动化该过程。有人对如何做到这一点有任何建议吗?

我在论坛上听说 3D-AVI 文件只是两个视频层上的左右 AVI。我在 ffmpeg 文档中看不到任何有关如何提取这些层的内容。

I have a Fujifilm FinePix Real 3D W3, and it creates something Fujifilm calls 3D-AVI files. There are pograms to split these 3D-AVI files into separate left-and-right movies, but they involve using GUI-based software on Windows.

I would rather use a command-line tool like ffmpeg, so that I can automate the process. Does anybody have any suggestions on how to go about doing this?

I've heard on forums that the 3D-AVI file is simply left and right AVIs on two video layers. I couldn't see anything in the ffmpeg docs on how to extract these layers.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

淡淡離愁欲言轉身 2024-10-13 12:24:38

我可以使用以下命令执行此操作:

ffmpeg -i nfr.avi -ar 22050 nfr.left.flv -map 0.2 -map 0.1 nfr.right.flv -map 0.0 -map 0.1

并且您可以对 avi 执行 ffprobe 来找出应映射哪些流。

I was able to do this with this command:

ffmpeg -i nfr.avi -ar 22050 nfr.left.flv -map 0.2 -map 0.1 nfr.right.flv -map 0.0 -map 0.1

And you can do ffprobe on the avi to find out what streams should be mapped.

等待我真够勒 2024-10-13 12:24:38

谢谢——七年后这仍然是一个很好的起点。

关键点是“-map ...”标志!我能够使用以下命令完成分割:

ffmpeg -i $1 \
-c:v mpeg4 -vtag xvid \
-qscale:v 3 -ar 48000 -c:a libmp3lame -b:a 128k $1.left-audio.avi -map 0:2 -map 0:1 \
-qscale:v 3 -an $1.right.avi -map 0:0

其中 $1 是输入文件;音频(-c:a xxx)和视频(-c:v xxx)编解码器可以随意选择。

仅左侧文件获取音频流;我想稍后将它们并排组合起来。

Thank you - it's still a good starting point 7 years later.

The critical points are the '-map ...' flags! I was able to get the splits done using this command:

ffmpeg -i $1 \
-c:v mpeg4 -vtag xvid \
-qscale:v 3 -ar 48000 -c:a libmp3lame -b:a 128k $1.left-audio.avi -map 0:2 -map 0:1 \
-qscale:v 3 -an $1.right.avi -map 0:0

Where $1 is the input file; and the audio (-c:a xxx) and video (-c:v xxx) codecs can be chosen ad lib.

Only the left file gets the audio stream; I wanted to combine them side-by-side later on.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文