Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 19 Apr 2014, 02:32
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Using FFMPEG To Record Video & Sound in Puppy
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [32 Posts]   Goto page: 1, 2, 3 Next
Author Message
Icyos


Joined: 28 Jun 2011
Posts: 92
Location: UK

PostPosted: Wed 11 Jan 2012, 04:46    Post subject:  Using FFMPEG To Record Video & Sound in Puppy  

Hi All

Hope someone can help me can anyone please post the code for recording audio & video in any Puppy using FFMPEG from the command line, I can get it to work in Ubuntu but not in Puppy, I have managed to record video only in MacPup but no sound.

Must be easy but I cannot find any reference to it on the forums, many thanks all.

By using the following I can record video ONLY, can someone please add the audio bit please.

#!/bin/sh
var="$(xrandr | grep '*')"
IFS=" "
set -- $var
ffmpeg -f x11grab -s $1 -r 25 -i :0.0 -sameq /root/test.mpg

Thanks all so much.

_________________
Come to me TUBE : Icyos Puppy Linux YouTube
Puppy Slacko 5.31 Addict - Use With Caution.
icyos@hotmail.co.uk - MSN Me
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
zigbert


Joined: 29 Mar 2006
Posts: 5562
Location: Valåmoen, Norway

PostPosted: Wed 11 Jan 2012, 11:19    Post subject:  

I have seldom seen a ffmpeg compile for Puppy including x11grab.
Could it be the size ???? I don't know


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
Icyos


Joined: 28 Jun 2011
Posts: 92
Location: UK

PostPosted: Wed 11 Jan 2012, 15:03    Post subject:  

Hi

The above when pasted into a terminal window records video no problem I just need to add sound and the -i pulse command dont work for me which is used in Ubuntu, wonder if -i alsa may work???

_________________
Come to me TUBE : Icyos Puppy Linux YouTube
Puppy Slacko 5.31 Addict - Use With Caution.
icyos@hotmail.co.uk - MSN Me
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
Barkin


Joined: 12 Aug 2011
Posts: 604

PostPosted: Wed 11 Jan 2012, 15:18    Post subject:  

I saw something in the Audacity manual which may give a clue ...

Quote:
It is not necessary to use Audacity to record sounds playing on the computer. You can capture the sound from the application producing it before it reaches the sound device, which avoids capturing unwanted system sounds. This solution can be used even if there is no sound device. Note: this solution may not work on a system using PulseAudio but you can use PulseAudio Volume Control instead.

First you need to create (or edit if it exists) ~/.asoundrc file. Do it with your favorite plain text editor. Note: ~ is your home directory so change that to /home/john or whatever if you are not working in a Linux shell.


Code:
pcm.teeraw {
   type empty
   slave.pcm "tee:default,'/tmp/out.raw',raw"
   # 48000 S16_LE 2ch (aplay -t raw -f dat)
}


Now tell the application you are trying to record from to use the "teeraw" ALSA device for playback

http://wiki.audacityteam.org/wiki/Recording_audio_playing_on_the_computer#Using_the_ALSA_PCM_file
Back to top
View user's profile Send private message 
postfs1


Joined: 27 Mar 2010
Posts: 831

PostPosted: Wed 11 Jan 2012, 17:01    Post subject:  

Arrow http://ffmpeg.org/ffmpeg.html#alsa-1

Arrow http://ffmpeg.org/ffmpeg.html

_________________
  • I don't know why laboratories are named a hospitals.
  • The alive personage is like a tea bag with granules of unknown density inside, at that one the packet was made of organic material and was placed in the evaporated liquid or liquid.

Back to top
View user's profile Send private message 
Icyos


Joined: 28 Jun 2011
Posts: 92
Location: UK

PostPosted: Thu 12 Jan 2012, 00:37    Post subject:  

Hi All

Well I am delighted to tell you all I have cracked it this subject is now solved after 2 days I can finally use FFMPEG from the command line to make my screencasts in any version of PUppy.

Thanks everyone again I so love Puppy and this community.

_________________
Come to me TUBE : Icyos Puppy Linux YouTube
Puppy Slacko 5.31 Addict - Use With Caution.
icyos@hotmail.co.uk - MSN Me
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
Barkin


Joined: 12 Aug 2011
Posts: 604

PostPosted: Thu 12 Jan 2012, 03:55    Post subject:  

Icyos wrote:
Well I am delighted to tell you all I have cracked it this subject is now solved after 2 days I can finally use FFMPEG from the command line to make my screencasts in any version of PUppy.


I for one would be delighted to learn of this solution, can you tell us about it ?
Back to top
View user's profile Send private message 
Icyos


Joined: 28 Jun 2011
Posts: 92
Location: UK

PostPosted: Thu 12 Jan 2012, 04:15    Post subject:  

Really aww bless you well i could tell you but I would have to kill you...........giggles sorry I am so happy i could burst, the problem was finding a universal command for ffmpeg which i could use for making me screencasts as I hate running puppies from virtual box, as most puppy distros come with ffconvert (ffmpeg) already installed as standard its the perfect soloution.

However unlike the Ubuntu operating system you cannot include the -i pulse bit in the command line as it wrecks it all.

So after messing around with all possible options and spending time on the ffmpeg help pages I finally got it right, through luck more than anything else, I can now use FFMPEG in all me screencasts and recordmydesktop and xvidcap are needed no more woop.

Oh yea I suppose you want the code.......giggles.............here it comes enjoy.

#!/bin/sh
var="$(xrandr | grep '*')"
IFS=" "
set -- $var
ffmpeg -f alsa -ac 2 -i hw:0,0 -f x11grab -s $1 -r 25 -i :0.0 -sameq /root/test.avi

Just bash that in to your terminal and ffmpeg will start recording your desktop and sound at the same time, to end the recording just press CTRL+C.

I am so happy I could go bang Smile

_________________
Come to me TUBE : Icyos Puppy Linux YouTube
Puppy Slacko 5.31 Addict - Use With Caution.
icyos@hotmail.co.uk - MSN Me
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
Barkin


Joined: 12 Aug 2011
Posts: 604

PostPosted: Thu 12 Jan 2012, 05:26    Post subject:
Subject description: No joy :¬(
 

The code you put in your first post ("test.mpg") did enable me to record the desktop, with error messages, but the code in your last post ("test.avi") just generated error messages (attached). I'm using 525 kernel 2.6.33.2
red error messages with ''test,mpg'' recording of desktop.jpg
Description  successful recording of desktop "test.mpg", generated red error messages.
jpg

 Download 
Filename  red error messages with ''test,mpg'' recording of desktop.jpg 
Filesize  112.49 KB 
Downloaded  399 Time(s) 
Monster error message.png
Description  screengrab of urxvt, failed ''test.avi''
png

 Download 
Filename  Monster error message.png 
Filesize  80.25 KB 
Downloaded  385 Time(s) 
Back to top
View user's profile Send private message 
Icyos


Joined: 28 Jun 2011
Posts: 92
Location: UK

PostPosted: Thu 12 Jan 2012, 05:47    Post subject:  

Hi yes the reason is you have a ?-f remove the question mark please and you will be fine.

#!/bin/sh
var="$(xrandr | grep '*')"
IFS=" "
set -- $var
ffmpeg -f alsa -ac 2 -i hw:0,0 -f x11grab -s $1 -r 25 -i :0.0 -sameq /root/test.avi

Please use above code as is I have tried this on slacko 5.31 & Racy 5.2.2 I will try 5.25/5.28 today, I do assure you it works if you check me youtube site you will see todays video is made with ffmpeg.

_________________
Come to me TUBE : Icyos Puppy Linux YouTube
Puppy Slacko 5.31 Addict - Use With Caution.
icyos@hotmail.co.uk - MSN Me
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
Barkin


Joined: 12 Aug 2011
Posts: 604

PostPosted: Thu 12 Jan 2012, 12:25    Post subject:  

Icyos wrote:
... remove the question mark please and you will be fine.

Jesus H. tap-dancing Christ, it works !

and the frame-rate is a lot faster (smoother) than the video captured with the “test.mpg” code in your first post.

Thank you very much Icyos.
Rubic Cube Sim (converted to MP4 (with lower frame rate )).zip
Description  MP4 video of desktop in ZIP file. Quarter resolution and half frame rate to reduce file size.
zip

 Download 
Filename  Rubic Cube Sim (converted to MP4 (with lower frame rate )).zip 
Filesize  270.26 KB 
Downloaded  395 Time(s) 
Back to top
View user's profile Send private message 
Icyos


Joined: 28 Jun 2011
Posts: 92
Location: UK

PostPosted: Thu 12 Jan 2012, 15:23    Post subject:  

Giggles..................you are so welcome and yes it is smooth isnt it and it comes as standard in most Puppy distros, you really cant beat a Pup.

Anymore issues just let me know till then enjoy.

_________________
Come to me TUBE : Icyos Puppy Linux YouTube
Puppy Slacko 5.31 Addict - Use With Caution.
icyos@hotmail.co.uk - MSN Me
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
bill

Joined: 28 May 2008
Posts: 474

PostPosted: Tue 13 Mar 2012, 08:21    Post subject: Using FFMPEG To Record Video & Sound in Puppy  

Topic of your code at : http://www.murga-linux.com/puppy/viewtopic.php?search_id=1576094798&t=75113

Hello icyos,I am running 3.3 Lucid Puppy Version :Lupu-520 Kernel :2.6.33.2 Alsa HDA NVidia Realtek ALC888
I lucked out with no problems installing the bash vidcap.sh but on execution I received the following screen :
Might you be able to tell me where I took the wrong turn ? Thanks in advance bill-Texas USA
581x558.jpg
 Description   Details
 Filesize   235.21 KB
 Viewed   1673 Time(s)

581x558.jpg

Back to top
View user's profile Send private message 
bill

Joined: 28 May 2008
Posts: 474

PostPosted: Mon 19 Mar 2012, 17:54    Post subject: Using FFMPEG To Record Video & Sound in Puppy
Subject description: Work in progress
 

For anyone doing Bash script for ffmpeg/alsa and get error message"cannot set
channel count to 1" hw:0,0 input/output error try changing hw:0,0 to plughw:0,0
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Mon 19 Mar 2012, 20:56    Post subject:  

I have added a front end to the script
- tested in Slacko
should work in Lucid, Wary, Racy and other Puppy's with ffmpeg
Files recorded are incremented automatically

Here is a youtube tutorial for Puppy hacker school students, truants and future and present tutors
http://youtu.be/gUwMCMjVXL8
recgui.zip
Description 
zip

 Download 
Filename  recgui.zip 
Filesize  938 Bytes 
Downloaded  598 Time(s) 

_________________
Puppy WIKI

Last edited by Lobster on Tue 20 Mar 2012, 06:30; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 3 [32 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0756s ][ Queries: 13 (0.0073s) ][ GZIP on ]