You are not logged in.

#1 2011-10-03 11:04:36

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,716

FFcast2 - screencast made easy

AUR: https://aur.archlinux.org/packages.php?ID=32158
Github: https://github.com/lolilolicon/FFcast2

Please skip the following announcement and read the fine README.

("the following announcement")

Some of you might have heard of my FFcast script.  Some might even like it.
But I don't and it sucked.  And it just officially died in my hands.

And I'm glad it did.  I'm here to announce the new version 1.0 of FFcast,
a.k.a. FFcast2.  This version of FFcast is rewritten from scratch, and does
not in anyway try to be compatible with the 0.x series.

The main selling point for a user is that FFcast now accepts _all_ ffmpeg
options.  Of all the implications of this flexibility, one might find that
audio recording is now supported by design.

Please test & feedback, thanks!

-- EDIT --

Incidentally, I'd like to see the following responses here:

  • Questions.

  • Bug reports.  If FFcast fails silently, or fails to inform you when
    it should, or dies when it shouldn't, it's a bug.  Please report back
    whenever you find a bug, with the exact command you used, etc.

  • Feature requests.  Feel free to ask, and I will feel free to reject :-)

  • The default set of FFmpeg options you consider the best for most users.

  • Examples of FFmpeg options for specific use cases, e.g. YouTube video.
    I will make a collection of such settings and put it in doc/HOWTO.

  • Any problem you encountered with FFmpeg's screen recording, and how you
    solved the problem- I will also make a collection of those, if the the
    problem is general, reproducible and still relevant.

  • Anything else relevant you think is worth sharing.

Last edited by lolilolicon (2011-10-21 13:27:16)


This silver ladybug at line 28...

Offline

#2 2011-10-03 20:14:53

DrZaius
Member
Registered: 2008-01-02
Posts: 170

Re: FFcast2 - screencast made easy

Thank you for the shiny update.

FFmpeg has some additional x11grab options that may interest you: follow_mouse and show_region. Example. Unfortunately, these options have not been ported to the 0.7 FFmpeg release that Arch currently uses, and I'm not sure if it ever will.


Damned dirty ape.

Offline

#3 2011-10-03 20:44:32

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,716

Re: FFcast2 - screencast made easy

DrZaius wrote:

Thank you for the shiny update.

FFmpeg has some additional x11grab options that may interest you: follow_mouse and show_region. Example. Unfortunately, these options have not been ported to the 0.7 FFmpeg release that Arch currently uses, and I'm not sure if it ever will.

If they must be specified after "-f x11grab" then I have to be interested, otherwise I shouldn't tongue

But yeah, they're indeed useful options- I hope they will become available soon enough.

Oh, now that this has got your attention, IIRC you are quite acknowlegeable WRT those FFmpeg stuff, would you mind sugguesting a decent set of default options for FFcast2?


This silver ladybug at line 28...

Offline

#4 2011-10-05 14:26:02

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,716

Re: FFcast2 - screencast made easy

Hello, FFcast version 1.0d is released, which introduces potential support for alternative screencast command (or "backend" if you will).

For example, you can now use recordMyDesktop like this:

ffcast -w recordmydesktop -- -o cast.ogv

You can then record a window by clicking it.  I find the borders drawn around the selected region helpful.
As with FFmpeg, any recordmydesktop option can be passed.

I will probably add avconv from libav later on. If you want other screencast commands supported, feel free to ask (preferably with an example command line).


This silver ladybug at line 28...

Offline

#5 2011-10-07 11:20:01

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,716

Re: FFcast2 - screencast made easy

Hi, FFcast version 1.0eol is released.  Changes include:

  • When selecting a region (-s), pressing a key does not abort the selection anymore.
    By not grabbing the keyboard, xrectsel works more like xwininfo.
    This also gives the user a chance to prepare/clean up while xrectsel waits for a selection.

  • New -l option lists all supported cast commands.

  • Add support for byzanz-record as cast command.  byzanz-record is said to be good for producing GIFs.
    An untested example follows:

    ffcast -s byzanz-record -- cast.gif -l

    Note, this^ is untested.  Anyone using byzanz-record please acknowledge success, or failure in which case I will remove it.

I also found a bug in recordMyDesktop that it does not allow -x or -y being 0.  I mailed a patch to its current maintainer Martin Nordholts, but he has not responded yet.  Anyway, I can fix FFcast to work around this bad behavior, and probably will, for obvious reasons. (EDIT: workaround implemented in FFcast 1.0f.)

Thanks, enjoy.

Last edited by lolilolicon (2011-10-09 12:32:14)


This silver ladybug at line 28...

Offline

#6 2011-10-20 16:21:24

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,716

Re: FFcast2 - screencast made easy

Hi,

The next release of FFcast will support arbitrary command via format strings.
It's working in my brief tests, but it's 180 lines of changes, so I'd really like feedback from you guys.
Get the newest script via git or grab directly the latest ffcast.bash

The README is not yet updated, but the output of `ffcast -vh' should be sufficient.
Additionally, here is a simplest command showing the newly introduced syntax:

ffcast -s % echo %w %h %x %y %X %Y %d

Test & enjoy.

Last edited by lolilolicon (2011-10-20 16:26:08)


This silver ladybug at line 28...

Offline

#7 2011-10-20 16:39:36

ShoeUnited
Member
Registered: 2008-04-20
Posts: 8

Re: FFcast2 - screencast made easy

Love what you've done and I don't want you to quit.  This is just so damn handy. big_smile


Clyde Have you tried it?  AUR: clyde-git https://aur.archlinux.org/packages.php?ID=34686

...Well?   Have you seen the flippin' chart yet?!  http://omploader.org/vM3p6eg

Offline

#8 2011-10-21 05:22:41

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,716

Re: FFcast2 - screencast made easy

@ShoeUnited Quit? Are you kidding big_smile

Apparently the 180 line change doesn't have an impact as big as it might seem.
Things are looking good so I've released FFcast 1.0rc2.

This release is exciting!  Yes, you already knew that; but the newly introduced format string syntax opens the gate to freedom.

  • FFcast now supports any command line

For example, to use the `-show_region' x11grab option of ffmpeg:

ffcast -s % ffmpeg -f x11grab -show_region 1 -r 25 -s %wx%h -i %d+%x,%y out.mpg

which is (possibly) not possible with the `--' syntax.

The old `--' syntax is still supported, for both convenience and compatibility.
It's recommended to use the format string syntax in wrapper scripts, due to its flexibility and readability.  But be sure to escape the literal `%' characters, e.g. using something like `${var//\%/%%}'.

Last edited by lolilolicon (2011-10-21 05:27:54)


This silver ladybug at line 28...

Offline

#9 2011-10-21 05:41:35

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: FFcast2 - screencast made easy

Hmm, maybe I should replace my .bashrc lines with this.

Offline

#10 2011-10-22 04:48:12

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,716

Re: FFcast2 - screencast made easy

Hello everybody, FFcast 1.0rc3 is released.

I removed the ugly `-vh' long help and wrote a man page instead, for your RTFM pleasure.
If you have any questions, you should read ffcast(1); especially you, Cloudef, becaue you seem to have no idea what FFcast does wink
If you think the man page could use some improvements, please let me know.

Last edited by lolilolicon (2011-10-22 04:55:15)


This silver ladybug at line 28...

Offline

#11 2011-10-22 12:30:47

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: FFcast2 - screencast made easy

Hi, this tool looks very nice.
Feature request: screencast specific monitor. Of course, I can do this by specifying geometry manually, but the option taking a monitor number will make life simpler.

Last edited by Mad Fish (2011-10-22 12:30:58)

Offline

#12 2011-10-22 13:51:24

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,716

Re: FFcast2 - screencast made easy

Mad Fish wrote:

Hi, this tool looks very nice.
Feature request: screencast specific monitor. Of course, I can do this by specifying geometry manually, but the option taking a monitor number will make life simpler.

I haven't tried it, but maybe this will work:

DISPLAY=:0.1 ffcast <args>

If it works, refer to the DISPLAY NAMES section of X(7). Otherwise, I will need further information to see what I can do.

Last edited by lolilolicon (2011-10-22 13:52:11)


This silver ladybug at line 28...

Offline

#13 2011-10-22 13:56:37

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: FFcast2 - screencast made easy

lolilolicon wrote:

I haven't tried it, but maybe this will work:

DISPLAY=:0.1 ffcast <args>

Well ...

$ DISPLAY=:0.1 ffcast
error: invalid root window dimensions: 0x0

Using nvidia blob, so no XRandR (if that matters).

Offline

#14 2011-10-22 14:14:48

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,716

Re: FFcast2 - screencast made easy

OK, I guess your X server display has only one screen number.
I have only one monitor, using nvidia too, but the failure gives error messages from xwininfo, too:

$ DISPLAY=:0.1 ffcast
X Error: 9: Bad Drawable: 0x1b4d9
  Request Major code: 14
  Request serial number: 3
xwininfo: error: No such window with id 0x1b4d9.
error: invalid root window dimensions: 0x0

This error occurs when calling

LC_ALL=C xwininfo -root

Let's see, so you want to capture fullscreen of a specific monitor. How exactly do you do it currently, say, to screencast the second monitor? Can you give me the command you use?
And if you just run `ffcast`, does ffmpeg capture the active monitor or all monitors as one?
I'm also curious, how well does the interactive selection work for you?

Last edited by lolilolicon (2011-10-22 14:18:48)


This silver ladybug at line 28...

Offline

#15 2011-10-22 14:28:36

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: FFcast2 - screencast made easy

lolilolicon wrote:

Let's see, so you want to capture fullscreen of a specific monitor. How exactly do you do it currently, say, to screencast the second monitor? Can you give me the command you use?
And if you just run `ffcast`, does ffmpeg capture the active monitor or all monitors as one?
I'm also curious, how well does the interactive selection work for you?

I have two monitors, both 1920x1080, the primary is the right one.
When I run simply ffcast, it will capture video of 3840x1080 size.
I can currently capture my primary monitor like this:

ffcast 1920x1080+1920+0

Interactive selection with mouse works fine, just as expected.

By the way, how can I improve video quality? (I guess it's described in ffmpeg man page, but that a damn lot to read, so I would rather ask)

Last edited by Mad Fish (2011-10-22 14:30:24)

Offline

#16 2011-10-22 14:38:05

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: FFcast2 - screencast made easy

MONITOR=0; xdpyinfo -ext XINERAMA | sed '/.*head #'${MONITOR}': \([^"][^"]*\).*/!d;s//\1/'

You could use something like that to get Xinerama info of the monitor, as twinview provides the info for xinerama.
Where output is : <resolution> @ <offset>

Last edited by Cloudef (2011-10-22 14:39:20)

Offline

#17 2011-10-22 15:07:40

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,716

Re: FFcast2 - screencast made easy

Mad Fish wrote:

I have two monitors, both 1920x1080, the primary is the right one.
When I run simply ffcast, it will capture video of 3840x1080 size.
I can currently capture my primary monitor like this:

ffcast 1920x1080+1920+0

I see. I have no idea how to get the dimensions of each monitor. I suspect this could be messy due to the variety of video drivers, X configurations, etc. I'm thinking xrandr, xdpyinfo and friends, but unless there's a reliable way to get the monitor dimensions I will not implement this feature.
It's best for the user to write a simple wrapper script around ffcast/ffmpeg if a genral solution is impossible or really painful.
Cloudef's post above should be very helpful for you.

Interactive selection with mouse works fine, just as expected.

Nice!

By the way, how can I improve video quality? (I guess it's described in ffmpeg man page, but that a damn lot to read, so I would rather ask)

I don't know much about ffmpeg, ask #ffmpeg at freenode.


This silver ladybug at line 28...

Offline

#18 2011-10-23 06:36:44

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,716

Re: FFcast2 - screencast made easy

Mad Fish, you have a good idea, let's discuss it in issue #3: https://github.com/lolilolicon/FFcast2/issues/3

If any of you want this feature too, please reply to issue #3 as requested in the issue, thanks.

-- EDIT --

This has been implemented in the xinerama branch, check it out!

Last edited by lolilolicon (2011-10-23 17:23:18)


This silver ladybug at line 28...

Offline

#19 2011-10-24 03:41:35

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,716

Re: FFcast2 - screencast made easy

Finally, FFcast has reached version 1.0!

Two major changes since 1.0rc3:

  • Backward compatibility breakage of the -m option. -m now requires an integer. The default behavior without -m is unchanged; `-m 16' is equivalent to the old `-m'. This gives better control; the trimming of the region can be disabled with `-m 1' for example.

  • New feature as suggested by Mad Fish and Cloudef. Support selecting specific Xinerama heads (physical displays) via the -x option.
    For example, to capture the 1440x900 head of your dual-headed setup:

    $ ffcast -x list
    head #0: 1440x900 @ 0,124
    head #1: 1280x1024 @ 1440,0
    $ ffcast -x 0

    As usual, if there're other selections, they will be combined by union.
    This feature introduces new dependency on xdpyinfo.

FFcast has come a long way since the initial commit. I'm impressed smile

Last edited by lolilolicon (2011-10-24 03:59:41)


This silver ladybug at line 28...

Offline

#20 2012-06-07 10:32:26

masteryod
Member
Registered: 2010-05-19
Posts: 433

Re: FFcast2 - screencast made easy

Thank you lolilolicon, ffcast is suberb!

Offline

#21 2012-09-05 21:37:47

Dirk Sohler
Member
From: Hamburg, Germany
Registered: 2009-10-03
Posts: 109

Re: FFcast2 - screencast made easy

First of all: This is by far the best replacement I found for xvidcap. It’s easy to use, fast, and has almost no influence on system performance and produces nearly lag-free videos.

But I have a question: Is there a way to give ffcast a default X geometry syntax like area to record like 724x396+76+96 for example? I want to record videos in an exactly defined area having an exact width and height.

Offline

#22 2012-09-05 22:13:12

DrZaius
Member
Registered: 2008-01-02
Posts: 170

Re: FFcast2 - screencast made easy

Dirk Sohler wrote:

Is there a way to give ffcast a default X geometry syntax like area to record like 724x396+76+96 for example? I want to record videos in an exactly defined area having an exact width and height.

The most basic command using your geometry would be:

ffcast 724x396+76+96

Damned dirty ape.

Offline

#23 2012-09-06 13:52:38

Dirk Sohler
Member
From: Hamburg, Germany
Registered: 2009-10-03
Posts: 109

Re: FFcast2 - screencast made easy

Oh cool, I totally missed that! Thanks!

Another question: Is there a way to pause and continue recordings without completely stopping the recording?

Last edited by Dirk Sohler (2012-09-07 12:51:38)

Offline

#24 2012-09-17 21:47:12

DrZaius
Member
Registered: 2008-01-02
Posts: 170

Re: FFcast2 - screencast made easy

Dirk Sohler wrote:

Is there a way to pause and continue recordings without completely stopping the recording?

You can try pkill as shown here.


Damned dirty ape.

Offline

#25 2012-10-21 13:32:57

hendry
Member
From: Singapore
Registered: 2009-09-08
Posts: 127
Website

Re: FFcast2 - screencast made easy

Hey guys, I created https://github.com/kaihendry/recordmydesktop2.0 that hopefully helps you guys. Be ideal to merge projects or work together.

Offline

Board footer

Powered by FluxBB