LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-03-2011, 11:19 AM   #1
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Download helper screen capture with ffmpeg?


The sort of add on for Firefox 'download helper' now has a new screen capture thing, in case it won't download the video from a particular site. You click the red button and a purple boundary appears round the video frame. I assume this is the basic function of the thing; it then provides the geometry of the purple frame to the program you've given it to capture the video.

By default the program it uses is 'recordmydesktop'. I've tried using this but get sound from the laptop's internal microphone, not the video. Tried 'pavucontrol' to remedy this but it says (wrongly) that no program is recording, so can't put things right.

So tried using ffmpeg: http://img845.imageshack.us/img845/7...loadhelper.jpg

Assume the stuff in curly brackets is what download helper supplies. Sometimes works perfectly but with B.BC. i-player only get the top left hand corner of the video and it is stretched somewhat horizontally.

Any thoughts at all apreciated.
 
Old 07-03-2011, 12:23 PM   #2
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 2,527

Rep: Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614
Here is some info on screencasting. I've never tried that Firefox extension. What is that
extension named?

http://www.linuxquestions.org/questi...n-them-885959/
http://www.linuxquestions.org/questi...torial-880858/
http://verb3k.wordpress.com/2010/01/...asts-on-linux/
 
1 members found this post helpful.
Old 07-03-2011, 02:17 PM   #3
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215

Original Poster
Blog Entries: 2

Rep: Reputation: 49
Quote:
Originally Posted by teckk View Post
Here is some info on screencasting. I've never tried that Firefox extension. What is that
extension named?
Thanks, 'DownloadHelper'.
 
Old 07-03-2011, 09:30 PM   #4
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215

Original Poster
Blog Entries: 2

Rep: Reputation: 49
Tried the following ploy as a precursor to getting the dimensions of the image right.

Changed DownloadHelper's preferrences to: http://imageshack.us/photo/my-images...screencap.jpg/

Where the shell script is:
Code:
#! /bin/bash
# Filename downloadHelperBbcIplayer.sh
# Try to get the Firefox thing DownloadHelper to work better for i-player.

/usr/local/bin/ffmpeg `echo "-f alsa -ac 2 -f pulse -f x11grab -s cif -y -b 128k -r 25 -i :0.0+"$1","$2" -s "$3"x"$4" "$5`
#exit (0)
This stops the red button working for democracynow.org a thing it used to work perfectly before. But i-player works just as before, as you would expect, *except there is no sound*.

I do not have a computing degree like many of the people on the internet and this sort of thing completely mystifies me. There is no reason to it and you come up against this sort of thing again and again.

What I mean is democracynow.org should work the same as before, i.e. correctly, because apparently nothing has changed. Ditto i-player - which is now sans sound.

(For completeness it has to be stopped manually by terminating ffmpeg.)

Last edited by lugoteehalt; 07-03-2011 at 09:33 PM.
 
Old 07-04-2011, 10:34 AM   #5
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 2,527

Rep: Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614
Found some more threads on this.

http://ubuntuforums.org/archive/inde...t-1392026.html
Quote:
Q: How can I control PulseAudio input? (e.g. capture application audio instead of mic)
A: Install “pavucontrol“. Start recording with ffmpeg. Start pavucontrol. Go to the “Recording” tab and you’ll find ffmpeg listed there. Change audio capture from “Internal Audio Analog Stereo” to “Monitor of Internal Audio Analog Stereo“.
Now it should record system and application audio instead of microphone.

This setting will be remembered. The next time you want to capture with FFmpeg, it will automatically start recording system audio. If you want to revert this, use pavucontrol again to change back to microphone input.

Quote:
/usr/local/bin/ffmpeg `echo "-f alsa -ac 2 -f pulse -f x11grab -s cif -y -b 128k -r 25 -i :0.0+"$1","$2" -s "$3"x"$4" "$5`
#exit (0)
You may have to specify the alsa device to get the sound, I've seen this done several different ways.
Code:
ffmpeg -f alsa -i hw:0,0....
Code:
ffmpeg -f alsa -i plughw:0 -f x11grab....
Code:
ffmpeg -f alsa -i pulse....

http://www.commandlinefu.com/command.../sort-by-votes
http://verb3k.wordpress.com/2010/01/...asts-on-linux/

Let me know what you find out. A lot of interest in this I think.

Edit: html tags
 
1 members found this post helpful.
Old 07-10-2011, 11:10 AM   #6
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215

Original Poster
Blog Entries: 2

Rep: Reputation: 49
Bit embarassing. Just had made some elementary errors in ffmpeg flags, i.e. should be -i pulse not -f pulse and -s cif is what was telling it to get the wrong area to capture, it should be ommited.

Fixing that makes it work. But it has poorish image quality. Got some sort of bug with ffmpeg, or compiled it wrongly, so difficult to sort this out. But the principle of it works anyway.
 
Old 07-13-2011, 06:15 PM   #7
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215

Original Poster
Blog Entries: 2

Rep: Reputation: 49
For the record. Some people are as incompetant as me.

This configuration works quite well: file extension: ogv; executable: /usr/local/bin/ffmpeg; arguments: -f alsa -ac 2 -i pulse -f x11grab -b 2048k -s {width}x{height} -y -r 25 -i :0.0+{x},{y} {file}; stop capture: /usr/bin/killall; arguments: -3 /usr/local/bin/ffmpeg

It gives a fair image quality, i.e. fiddling about will give something usefull.

The point is it is very point and click friendly: You just connect to the video on firefox, hover the pointer over the red button, and click and the thing gets recorded. Otherwise you have to put the coordinates of the video's frame in manualy, which certainly defeats me.

EDIT: ffmpeg has to be compiled by yourself to include X11grab, etc. As in the link above.

Last edited by lugoteehalt; 07-13-2011 at 06:22 PM.
 
Old 08-01-2011, 04:37 AM   #8
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215

Original Poster
Blog Entries: 2

Rep: Reputation: 49
Quote:
Originally Posted by teckk View Post
You may have to specify the alsa device to get the sound, I've seen this done several different ways.
Code:
ffmpeg -f alsa -i hw:0,0....
Code:
ffmpeg -f alsa -i plughw:0 -f x11grab....
Code:
ffmpeg -f alsa -i pulse....
What works for me is
Code:
ffmpeg -f alsa -i default
May need to fiddle about with 'pavucontrol' when ffmpeg is running to get the sound comming to/from the right thing, etc..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running Xvidcap (for screen capture ) + audacity (for audio capture) simultaneously vikram_cvk Linux - Software 2 05-20-2011 04:26 AM
V4L video capture: ffmpeg syntax question borepstein Linux - Server 1 03-31-2011 01:09 AM
help trying to capture display with ffmpeg x11grab dissociative Slackware 4 04-21-2010 10:44 PM
Download Helper W/FF 3.0.14 mogrady Linux - Software 0 09-13-2009 04:30 AM
How can I download ffmpeg from CVS? dhanar_10 Linux - Newbie 4 02-21-2006 08:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration