Using FFMPEG To Record Video & Sound in Puppy
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.
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.
I saw something in the Audacity manual which may give a clue ...
http://wiki.audacityteam.org/wiki/Recording_audio_playing_on_the_computer#Using_the_ALSA_PCM_fileIt 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.
Now tell the application you are trying to record from to use the "teeraw" ALSA device for playbackCode: Select all
pcm.teeraw { type empty slave.pcm "tee:default,'/tmp/out.raw',raw" # 48000 S16_LE 2ch (aplay -t raw -f dat) }
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
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
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
- Attachments
-
- red error messages with ''test,mpg'' recording of desktop.jpg
- successful recording of desktop "test.mpg", generated red error messages.
- (112.49 KiB) Downloaded 1189 times
-
- Monster error message.png
- screengrab of urxvt, failed ''test.avi''
- (80.25 KiB) Downloaded 1066 times
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.
#!/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.
Using FFMPEG To Record Video & Sound in Puppy
Topic of your code at : http://www.murga-linux.com/puppy/viewto ... 98&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
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
Using FFMPEG To Record Video & Sound in Puppy
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
channel count to 1" hw:0,0 input/output error try changing hw:0,0 to plughw:0,0
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
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
- 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
- Attachments
-
- recgui.zip
- (938 Bytes) Downloaded 1657 times
Last edited by Lobster on Tue 20 Mar 2012, 10:30, edited 1 time in total.
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
Thanks Barkin - edited my post to include a youtube tutorial on how the front end program was created
http://youtu.be/gUwMCMjVXL8
http://youtu.be/gUwMCMjVXL8
The audio in your youtu.be video is only in my left ear.Lobster wrote:Thanks Barkin - edited my post to include a youtube tutorial on how the front end program was created
http://youtu.be/gUwMCMjVXL8
[ It's not due to the pup-rec app as that gives me stereo when I used it to record my desktop ]
- antiloquax
- Posts: 405
- Joined: Fri 27 Jan 2012, 09:17
I am currently using Racy 5.2.9 and I am getting an error:
Which is a shame, because I wanted to use this ...
Great video by the way Lobster!
Code: Select all
unknown input format: 'x11grab'
Which is a shame, because I wanted to use this ...
Great video by the way Lobster!
My System:Arch-Arm on RPi!
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.
"[url=http://murga-linux.com/puppy/viewtopic.php?t=76049l]RacyPy[/url]" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
[url=http://raspberrypy.tumblr.com/]RaspberryPy[/url]: Lobster and I blog about the RPi.