Using FFMPEG To Record Video & Sound in Puppy

Audio editors, music players, video players, burning software, etc.
Message
Author
User avatar
Barkin
Posts: 803
Joined: Fri 12 Aug 2011, 04:55

#16 Post by Barkin »

Lobster wrote:I have added a front end to the script
- tested in Slacko
should work in Lucid, Wary, Racy and other Puppy's with ffmpeg
Just tested your GUI in Lucid puppy 525, kernel 2.6.33.2 , it works.

[ For the uninitiated the video is saved in the same directory as the app ].

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#17 Post by Lobster »

Thanks Barkin - edited my post to include a youtube tutorial on how the front end program was created
http://youtu.be/gUwMCMjVXL8
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Barkin
Posts: 803
Joined: Fri 12 Aug 2011, 04:55

#18 Post by Barkin »

Lobster wrote:Thanks Barkin - edited my post to include a youtube tutorial on how the front end program was created
http://youtu.be/gUwMCMjVXL8
The audio in your youtu.be video is only in my left ear.

[ It's not due to the pup-rec app as that gives me stereo when I used it to record my desktop ]

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#19 Post by Lobster »

That is convenient - you can listen to music of your choice with your right ear . . . :wink:
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
antiloquax
Posts: 405
Joined: Fri 27 Jan 2012, 09:17

#20 Post by antiloquax »

I am currently using Racy 5.2.9 and I am getting an error:

Code: Select all

unknown input format: 'x11grab'
:oops:
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.

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#21 Post by pemasu »

Dont be ashamed. Install the new version of ffmpeg.
http://bkhome.org/blog/?viewDetailed=02756

# ./configure --prefix=/usr --cpu=i486 --enable-shared --enable-gpl --enable-nonfree --disable-ffplay --enable-x11grab --enable-small --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libdc1394 --enable-libfaac --enable-libfreetype --enable-libmp3lame --enable-libschroedinger --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-zlib --enable-postproc --disable-debug --enable-bzlib --enable-version3 --enable-libtheora --enable-swscale --enable-network --enable-libcdio

User avatar
antiloquax
Posts: 405
Joined: Fri 27 Jan 2012, 09:17

#22 Post by antiloquax »

pemasu wrote:Dont be ashamed. Install the new version of ffmpeg.
http://bkhome.org/blog/?viewDetailed=02756
Thanks for this pemasu!


Edit
Didn't work though! Could I be missing some libraries I wonder?
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.

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#23 Post by pemasu »

What error do you get in console.
If I suspect that something is missing but I cant get grap of it...I test with strace command system calls output, in console: strace ffmpeg +the+options+for+ffmpeg
I have managed to solve some really strange missing files problems this way.

Dpup Exprimo launched gtkdialog apps 2.5 times slower than in other puppies.
strace some-gtkdialog-app showed that there was system call to the gconv-modules.cache and that call was unanswered. File not found with every location search. I installed that file and boom...gtk-dialog-apps started to behave.

User avatar
antiloquax
Posts: 405
Joined: Fri 27 Jan 2012, 09:17

#24 Post by antiloquax »

Here's the console output.
Attachments
pup_rec.png
(12.79 KiB) Downloaded 1478 times
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.

User avatar
antiloquax
Posts: 405
Joined: Fri 27 Jan 2012, 09:17

#25 Post by antiloquax »

I've tried running with strace (not too sure what I am doing, but I tried to make a ffmpeg command similar to that in the script).
Edit I think the problem is with x264. I don't know how to fix it. I installed the x264 package from the repos, but that didn't help.
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.

bill
Posts: 490
Joined: Wed 28 May 2008, 15:32

Using FFMPEG To Record Video & Sound in Puppy

#26 Post by bill »

Fine job on your recgui.zip Lobster.Works a treat in Slacko 5.3.1
Unfortunately it is a no go in Puppy Studio 3.3
The line in pup_rec, /usr/local/lib/gegl-0.1/ff-load.so was not available
because this directory structure in Studio3.3 is
/usr/local/lib/gegl-0.0/NO ff-load.so
I made a directory gegl-0.1 and installed ff-load.so.Still no joy.
so then I installed complete gegl-0.1 in 3.3 but still no luck.Not saving
video1.I turned my attention in 3.3 to rs and this was the message.Using
./rs this message appeared at the bottom" Unknown input format:'x11grab'
What this means is not clear to me but it has been fun anyway. Thanks
for all your effort and I guess now it is more Google search time. :wink:
cheers [/img]
Attachments
UnknownFormatx11grab.jpg
(139.92 KiB) Downloaded 1523 times

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#27 Post by Karl Godt »

For get X11grab to work i had to compile --with-pic .

x11grab showed up as configured but did not work for me either configured otherwise ,
ffmpeg version 0.7.11, Copyright (c) 2000-2011 the FFmpeg developers
built on Jan 13 2012 23:04:34 with gcc 4.4.3
configuration: --disable-yasm --enable-sram --enable-pic --enable-zlib --enable-bzlib --enable-gpl --enable-x11grab
http://www.murga-linux.com/puppy/viewtopic.php?p=596152#596152

User avatar
Tman
Posts: 808
Joined: Sat 22 Jan 2011, 21:39
Location: Toronto

#28 Post by Tman »

Here is a pet with a modification of Karl Godt's code from this thread:
http://www.murga-linux.com/puppy/viewtopic.php?t=75139

If the pet does not work, it means that the installed ffmpeg does not support x11grab.
Attachments
ffmpeg_vidcap-0.4.pet
(1.49 KiB) Downloaded 2134 times

User avatar
the-jub
Posts: 31
Joined: Thu 10 Nov 2011, 03:51
Location: England

#29 Post by the-jub »

Just tested this pet in precise 5.5 and it works great :D
Found the script in /usr/bin and had a little look at it in geany. Its amazing, wish I could bash like that...

Just about to add this to the wikka.
er.. I should write my pc specs here, I'm forever forgetting my video card specifics :roll:

Pelo

Xvidcap is based on FFMPEG

#30 Post by Pelo »

I was very suprised that FFMPEG is able to record screencast
Sure, FMPEG does it but how ?
Xvidcap 1.1.7 xvidcap 1.1.6 or Pup-record do that
Record my desktop too
FFMPEG vidcap requires X11 grab, but it is a new item ( i did not know it).

Wednesday : FFMPEG vidcap tested and it works fine.
Attachments
puprec.zip
very basic, look for the pet xvidcap in puppyrus repository
(3.08 KiB) Downloaded 502 times
Last edited by Pelo on Wed 05 Jun 2013, 18:17, edited 1 time in total.

Pelo

vidcap is absolutely perfect !

#31 Post by Pelo »

vidcap is absolutely perfect ! tested on precise 5.4.3 retro. Colors are pure, as the screen. sound working. What more is asked ? Nothing.
After deeper tries :
nevertheless, the file is big, we cannot modulate duration and filmed zone. But it is a good alternative.

User avatar
ozboomer
Posts: 135
Joined: Wed 04 May 2005, 21:22
Location: Melbourne, Australia

#32 Post by ozboomer »

Further to this discussion...

I'm watching a streaming video with sound in Firefox (try this with any YouTube video.. but it can be any number of flash-based streams)... and I can see the video Ok and hear the audio Ok.

Using a derivative of the original script ffmpeg command (and I want to be able to use just ffmpeg for this job), I can capture the video but I can't capture the audio. All that is contained in the audio output stream is silence.

The modified command (to simply try and grab the audio):

Code: Select all

ffmpeg -f alsa -ac 2 -i hw:0,0 test.mp3
To ensure I'm looking at the right audio capture device, I've looked at the output from arecord -l (small 'ell'), viz:-

Code: Select all

**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: VT1708S Analog [VT1708S Analog]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
card 2: Alpha [Lexicon Alpha], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Now, if I supply an audio signal into the "mic in" on the PC, the above command works a treat, which is what I'd expect -- hw:0 is a hardware device, so inputs via hardware should work Ok.

...but when a streaming video is playing and I want to capture the audio from THAT, there has to be something 'software-wise' that I can finger into to capture the audio. Maybe there's something I need to look at in alsamixer or retrovol...?

Any other thoughts?! I'm using Slacko 5.6.4, BTW...

Once I get the 'audio' component working Ok, I should be able to capture the video AND audio by combining a couple of 'input' streams through ffmpeg, methinks..

Thanks for any forthcoming suggestions.


John

Pelo

'ready for Use '

#33 Post by Pelo »

developers give Puppy passengers 'ready for Use ' Simple Screen Recorder, the best one, in my opinion for versions Precise, Slacko, and newer, click here
nevertheless, do it yourself remains a pleasure for linux lovers, :? but FFmpeg removed from last Ubuntu Pupies. SSR will do it, remember :!:
Xvidcap will do the job, whatever the Puppy, old or new Toutou 4.12
Attachments
toutou412.jpg
The best quality, dependencies all included.
(62.49 KiB) Downloaded 142 times

Pelo

FFMPEG official site : magic formulas

#34 Post by Pelo »

FFMPEG official site
Merci Skamilinux (Puppy team hungary)
Ezt most csak hirtelen megláttam egy másik Linux oldalon és gondoltam gyorsan megosztom, mert ez még nekem is kell!

User avatar
s-kami
Posts: 138
Joined: Thu 30 Apr 2009, 11:56
Location: Hungary
Contact:

#35 Post by s-kami »

Tahr puppy 6.0.6 64 bit UEFI and slacko 6.9.9.9 32 bit- not work

Use -qscale 0 instead of -sameq 0

My code works:
root# cat felvesz.sh
#!/bin/sh
#ffmpeg -s:1280x800 -r 30 -f x11grab -f alsa -ac 2 -i hw:0 output.mkv
#ffmpeg -s 1280x800 -r 25 -f x11grab -f alsa -ac 2 -i hw:0 output.mkv

#ffmpeg -f x11grab -r 25 -s 1280x800 -i :0.0 -f alsa -ac 2 -i hw:0 -qscale 0 teszt_out.mp4

ffmpeg -f alsa -ac 2 -i hw:0,0 -f x11grab -r 25 -s 1280x800 -i :0.0 -qscale 0 test.mp4
Attachments
test_ffpeg.jpg
(158.94 KiB) Downloaded 101 times
[b]Hungarian Puppy Linux HQ[/b]
[url]http://skamilinux.hu[/url]
[img]https://skamilinux.hu/phpBB3/styles/prosilver/theme/images/site_logo.gif[/img]

Post Reply