4

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.

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

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

blackgreen
  • 34,072
  • 23
  • 111
  • 129
RicardoE
  • 1,665
  • 6
  • 24
  • 42
  • This [`ScreenVideo2`](http://code.google.com/p/red5/source/browse/java/server/trunk/src/org/red5/server/stream/codec/ScreenVideo2.java?r=4276)? It seems server-side. How are you getting the screen-shots & sound from the client to the server? – Andrew Thompson Apr 16 '12 at 20:40
  • nope, this [ScreenVideo2](http://code.google.com/p/red5-screenshare/source/browse/trunk/org/redfire/screen/ScreenCodec2.java): the screenshots are taken with the clasic Robot and encoded with this, and audio is taken from a TargetDataLine and then processed into AAC, then I use flazr to send those to the server but I do it sequencially, but it should be muxed into one. – RicardoE Apr 16 '12 at 20:47

2 Answers2

1

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

The central core of the script is something like:

Records the screen:

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

Record a window:

#!/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
Peter Toft
  • 565
  • 7
  • 19
0

Xuggler can do that for you. I'm not exactly sure if it's working in Applets. It is able to encode frames by using ffmpeg in the background. It's actively developed right now and has good support via its mailing list.

DerMike
  • 15,594
  • 13
  • 50
  • 63