ffmpeg用于屏幕截图? [英] ffmpeg for screen capture?

查看:59
本文介绍了ffmpeg用于屏幕截图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个 Applet 可以捕获屏幕和来自计算机麦克风的声音,然后将屏幕截图编码为 ScreenVideo2,并将声音编码为 AAC.

So I have an Applet that captures the screen, and sound from the computer's microphone, the screenshots are then encoded to ScreenVideo2, and the sound is encoded to AAC.

如何使用 ffmpeg 逐帧进行多路复用,然后将混合后的输出发送到 wowza 媒体服务器?

How can I use ffmpeg to mux this, frame by frame, and then send the muxed output to a wowza media server?

如果用 ffmpeg 无法完成,您能提供任何建议吗?

if it cant be done with ffmpeg, can you kindly provide any suggestions?

推荐答案

哪个操作系统?在 Linux 下,您可能需要考虑 http://kde-apps.org/content/show.php/FDesktopRecorder?content=147844

which OS? Under Linux, you might want to consider http://kde-apps.org/content/show.php/FDesktopRecorder?content=147844

脚本的核心是这样的:

录制屏幕:

ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s $(xwininfo -root | \
  grep 'geometry' | awk '{print $2;}') -i :0.0 -acodec flac -vcodec libx264 \
  -vpre lossless_ultrafast -threads 0 -y output.mkv

录制一个窗口:

#!/bin/sh INFO=$(xwininfo -frame) WIN_GEO=$(echo $INFO | \
  grep -oEe 'geometry [0-9]+x[0-9]+' | \
  grep -oEe '[0-9]+x[0-9]+')WIN_XY=$(echo $INFO | \
  grep -oEe 'Corners:\s+\+[0-9]+\+[0-9]+' | grep -oEe '[0-9]+\+[0-9]+' | \
  sed -e 's/\+/,/' ) ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 \
  -s $WIN_GEO -i :0.0+$WIN_XY -acodec flac -vcodec libx264 \
  -vpre lossless_ultrafast -threads 0 -y output-single.mkv

这篇关于ffmpeg用于屏幕截图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆