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 Thu 17 Apr 2014, 11:40
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
pAVrecord Video/webcam recorder (mpeg4, Theora, x264)
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [34 Posts]   Goto page: 1, 2, 3 Next
Author Message
mcewanw

Joined: 16 Aug 2007
Posts: 2010
Location: New Zealand

PostPosted: Sat 06 Oct 2012, 05:37    Post subject:  pAVrecord Video/webcam recorder (mpeg4, Theora, x264)
Subject description: ver 0.9.2 newest. Can also make Xgrab screencast and webcam jpegs
 

IMPORTANT: The 0.9.2 dotpets have now been fixed/re-uploaded as indicated here: http://www.murga-linux.com/puppy/viewtopic.php?p=659889#659889

I needed to reboot Puppy Precise after installation for some reason, but probably just something else I was doing caused that

NOTE WELL: Please remember to delete your old /root/.pavrecord config directory before installing this.

If pavrecord ever fails to start, its config file is probably corrupted so simply delete your old /root/.pavrecord config directory and pavrecord will automatically rebuild it the next time it is re-started. Its config file is not known to become corrupted in normal use though.

Note well, also, that I have included a version of pAVrecord especially made for Puppy Precise (pavrecord-precise-0.9.0). The ffmpeg (+libavformat extras provided by shinobar) currently provided for Precise require this modified version. But the normal one should be used in Slacko, Dpup Exprimo, or any other non-Precise derived system.

"Some" Puppy versions may need to add ogv as a mime type.

By default, when using Theora for video capture, pavrecord uses -qscale 31 parameter for higher quality. You can overwrite this by entering, for example, -qscale 1, for lowest quality, in the Extra O/P Options entry box.

# Changes:
# Version 0.9.2: Starts in preview mode. Closes retrovol on record or quit.
# Modified Help and button text to explain popping up VU, mixer and preview.
# Version 0.9.1: added video preview to VU/mixer display (use record STOP button or the mixer button to activate)

Notes.

1. This is not an enhanced precord; they are two separate programs specialised for their differing purposes. Tried to re-use as much precord code in it as possible though. For technical reasons, such as audio sync adjustment, pAVrecord records the video and audio track in separate files and then multiplexes them into a single video file at the end. This mechanism also makes it easy to dub the original video track with new audio.

2. I suggest you try recording files to /root as a starter. On my system at least, saving to /mnt/home is very sluggish for some reason or other - maybe because my /mnt/home is an ntfs partition or because it is mounted automatically by puppy in frugal installs. I have no idea except that pAVrecord itself works fine and everything good if recording/saving anywhere outside of /mnt/home (works fine recording to a usb stick even).

3. Pausing recording works but isn't too useful because ffmpeg caches lots of video anyway. Another effect of this is that video and audio will be very much out of sync after pausing a recording.

Setting up pAVrecord Example:

Select Advanced (big) User Interface.

Select Target Directory: /root

Select Record Duration: 0 (for unlimited).
Also set Play Duration to 0.

Enter Audio sync offset (seconds): 1.5

In AUDIO RECORD CONFIGURATION:

Select audio format: ogg_q (or mp3 audio if using MPEG-4 video later)
Select audio quality: 05

In VIDEO RECORD CONFIGURATION:

Select video encoder: Theora (or MPEG-4)
Enter:
inRate(fps) 30,
vINPUTFORMAT video4linux2,
vDEVICE /dev/video0 (if that is your video device),
vWidth 320, vHEIGHT 240.
Leave both Extra I/P Options and Extra O/P Options blank

Select container for combined A and V track: ogv (or avi, if using mp3 audio and MPEG-4 video)

For Combine AV auto, select as true.
For Combine AV del, select as false.
Note that the alternative true for checkbox del causes the separate A and V tracks to be automatically deleted after the final combined AV is produced.

Press Record button to record the A and V tracks (which, with above setting, are auto-combined into final avi container once Record Stop button is pressed).

Three files are saved: the date-stamped video track, the date-stamped audio track and the combined AV video whose name begins pAV followed by date stamp.
-----
To view/hear result:

Method 1: Use button -> to transfer the file name to the play side and press Play button. This method plays the individual video and audio tracks in parallel (allowing you to adjust the Audio sync offset).

Method 2: If audio sync offset set up is already fine, you can simply press the AV Play button (next to Combine AV area) to play final combined AV video in your system's video player (assuming Combine AV auto was selected).

-----

As well as having a GUI interface, pAVrecord can also be used from the commandline. It reads commandline args of the form:

[action][filename][duration] via stdin (e.g. pipe).

For example
Code:

pavrecord [with no args starts GUI version]

pavrecord  rec  /root  anything.avi 10 [records without GUI]

pavrecord  play  /root  out.avi [plays without GUI]

or can use via pipe:

echo  play  /mnt/sda1  out.avi 20 | pavrecord -
[also plays without GUI; here using duration of 20 seconds]

If no outfile or duration parameter is supplied, pavrecord uses previous configuration as defaults.

pavrecord quit
does what you'd expect...

pavrecord --help
for commandline usage


#Earlier Changes:

# Version 0.9.0: changed Audio sync offset method

# Version precise-0.9.0: As above, but also using libvo_aacenc instead of libfaac and using -vcodec mpeg4 -vtag xvid instead of libxvid (because libxvid would have needed extra and variable parameters to work in Precise).

EDIT: pemasu has reported that pAVrecord works well in his Dpup Exprimo 5x3412 (same ffmpeg version number as in Slacko 5.4 beta he tells me), which I'll download and also include in future testing.

When monitoring video recording, depending on your machine amongst other factors, you may experience a delay before the video window appears (it takes ages on my computer with x264 - but it does come eventually...). Also, with Theora, particularly since it is high quality by default, the video and audio may be a bit out of sync and you will need to adjust the value in the Audio sync entry box before recombining the audio and video track. The 1.2 seconds, as provided by default, works perfectly for me with mp3 audio plus MPEG-4 video (Xvid) in an avi container. Puppy Precise 5.3.95.1 doesn't currently have Xvid enabled but you can use ogg_q for audio, Theora for video, in an ogv container for that distribution version release.

# Version 0.8.7: Running from commandline now working.
# includes AAC audio (bit rate and quality modes) and flac lossless
# Fixed scheduling record via Pscheduler.
# Fixed scheduling record via Pscheduler.
# added -qscale 31 parameter for higher quality Theora
(you can overwrite this by entering, for example, -qscale 1, for low quality, in the Extra O/P Options entry box)
# Changed container name to ogv, which is the name for ogg video container recommended since 2007 by the relevant standards people. EDIT: "Some" Puppy versions may need to add ogv as a mime type though.

Developed/Tested and all option working well on Slacko-5.3.3, Slacko 5.4 beta, Dpup Exprimo, and Puppy Precise.

Is only partially working in Wary 5.3 because Wary 5.3 doesn't include ffplay which is used to monitor the video as it is being recorded. ffplay is required because it accepts input via a pipe whilst mplayer does not seem to.
pavrecord_pup4x-0.9.2.pet
Description  For Puppy 4.x series (only tested on Akita)
pet

 Download 
Filename  pavrecord_pup4x-0.9.2.pet 
Filesize  14.46 KB 
Downloaded  705 Time(s) 
pavrecord-precise-0.9.2.pet
Description  For Puppy Precise (and its derivatives) only
pet

 Download 
Filename  pavrecord-precise-0.9.2.pet 
Filesize  14.25 KB 
Downloaded  753 Time(s) 
pavrecord-0.9.2.pet
Description  For Slacko, Dpup Exprimo and others, but not Puppy Precise.
pet

 Download 
Filename  pavrecord-0.9.2.pet 
Filesize  14.21 KB 
Downloaded  765 Time(s) 

Last edited by mcewanw on Thu 25 Oct 2012, 02:30; edited 82 times in total
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2010
Location: New Zealand

PostPosted: Sun 07 Oct 2012, 20:28    Post subject: Screenshots of pAVrecord in action  

Screenshot at the top is pAVrecord in small GUI mode being used in Slacko 5.4 beta.

Next screenshot is pAVrecord being used in Advanced/Config GUI mode on Slacko-5.3.3. Once you have the config set up to your liking you can always return to small GUI mode before beginning to record so that pavrecord occupies very little screen real estate in use.
pavrecord_smallGUI.jpg
 Description   The pAVrecord small GUI during a recording session.
 Filesize   34.02 KB
 Viewed   2162 Time(s)

pavrecord_smallGUI.jpg

pavrecord_configGUI.jpg
 Description   The pAVrecord Config GUI
 Filesize   63.07 KB
 Viewed   2121 Time(s)

pavrecord_configGUI.jpg


_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.

Last edited by mcewanw on Tue 16 Oct 2012, 00:58; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2010
Location: New Zealand

PostPosted: Tue 09 Oct 2012, 01:08    Post subject: pAVrecord Audio/Video recorder 0.8.4 released
Subject description: AAC encoder now included. Scheduling recordings now works.
 

Changes:

Version 0.8.4: ffmpeg Extra i/p options entry box now working.
AAC audio encoding added.
Running from commandline now working.
Fixed scheduling recordings via Pscheduler (Time button activates)
(Be careful if using Pscheduler. By default Pscheduler itself starts entered commands every minute... That is nothing to do with pAVrecord - so you have to remember to set appropriate timings once in the Pschedule application)

Note that I also removed ffmpeg entry box in(fps) since it isn't necessary (and would often not be wanted) and there is always the Extra I/P Options box for any extras that a user does want to add themself.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.

Last edited by mcewanw on Tue 09 Oct 2012, 01:51; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
pemasu


Joined: 08 Jul 2009
Posts: 5458
Location: Finland

PostPosted: Tue 09 Oct 2012, 01:15    Post subject:  

I got this with Version 0.8.4: The selected Attachment does not exist anymore
By the way. Nice work. I havent managed to get my inbuild microphone to work yet. Otherwise really nice work. X11grab also worked with 0.8.3 version.
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2010
Location: New Zealand

PostPosted: Tue 09 Oct 2012, 01:38    Post subject: pAVrecord Audio/Video recorder 0.8.4 released
Subject description: AAC encoder now included. Scheduling recordings now works.
 

pemasu wrote:
I got this with Version 0.8.4: The selected Attachment does not exist anymore
By the way. Nice work. I havent managed to get my inbuild microphone to work yet. Otherwise really nice work. X11grab also worked with 0.8.3 version.


Sorry. I was re-uploading at the time you tried to fetch version 0.8.4. Should be there now.

If you can get your microphone working on any Puppy sound app, it should also work with pAVrecord [I hope I am correct saying that...]. I expect you know anyway. In the program code I select sound card with plughw (rather than just hw) at around line 278.

On my system it is just a matter of opening retrovol in full window mode (which the mixer button in pAVrecord does for you anyway) and setting my Mic1 as the Capture device; clicking on the Mic boost checkbox there; selecting Mic as "Mono output select device" (you would select Mix there if you wanted to record audio being heard from the Internet); and enable the Capture volume control and turn its amplitude up high.

In pAVrecord itself, on my own system at least, I just leave the "select soundcard" card and device checkboxes unchecked (meaning card,device 0,0)

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2010
Location: New Zealand

PostPosted: Tue 09 Oct 2012, 21:28    Post subject: remove old config folder before installing new pAVrec dotpet  

I forgot to say:

You should remove any previous /root/.pAVrecord config folder before installing new versions of pAVrecord. The newer versions contain new config variables, which the old config files wouldn't initialise correctly, such that it probably wouldn't start unless you delete the old config folder before installation.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2010
Location: New Zealand

PostPosted: Tue 09 Oct 2012, 22:07    Post subject: pAVrecord GUI A/Video recorder (mpeg4, Theora, x264) v.0.8.5
Subject description: Version 0.8.5 released
 

Changes:

Version 0.8.5:

Allowed ffmpeg Extended I/P options entry for x11grap and jpeg image selection as well as video.
Internationalised commandline help.

NOTE WELL: To be sure the new version of pAVrecord will start up okay you should completely delete the old config folder /root/.pavrecord before installing the new dotpet. That's because it has some new config variables in the code which wouldn't be correctly initialised by the old config.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2010
Location: New Zealand

PostPosted: Sat 13 Oct 2012, 02:16    Post subject: pAVrecord Video/webcam recorder (mpeg4, Theora, x264)
Subject description: version 0.8.6 released
 

Version 0.8.6: Running from commandline now working.
includes AAC audio (bit rate and quality modes) and flac lossless
Fixed scheduling record via Pscheduler.
Fixed bug with directory selection.

NOTE WELL: To be sure the new version of pAVrecord will start up okay you should completely delete the old config folder /root/.pavrecord before installing the new dotpet. That's because this version has some new config variables in the code which wouldn't be correctly initialised by the old config.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2010
Location: New Zealand

PostPosted: Sun 14 Oct 2012, 00:19    Post subject: pAVrecord version 0.8.7 released
Subject description: Tested working well in Slacko-5.3.3 and Precise 5.3.95.1
 

# Changes:

# Version 0.8.7: Running from commandline now working.
# includes AAC audio (bit rate and quality modes) and flac lossless
# Fixed scheduling record via Pscheduler.
# Fixed scheduling record via Pscheduler.
# added -qscale 31 parameter for higher quality Theora
(you can overwrite this by entering, for example, -qscale 1, for low quality, in the Extra O/P Options entry box)
# Changed container name to ogv, which is the name for ogg video container recommended since 2007 by the relevant standards people. EDIT: "Some" Puppy versions probably needs to add ogv as a mime type though.

Developed/Tested and all options working well on Slacko-5.3.3.
Is only partially working in Wary 5.3 because Wary 5.3 doesn't include ffplay which is used to monitor the video as it is being recorded. ffplay is required because it accepts input via a pipe whilst mplayer does not seem to.

Also tested as working fine, to a large extent, on Puppy Precise (version 5.3.95.1), but not for all encoders since, for example, the ffmpeg currently provided there doesn't seem to include libxvid, libfaac, or libx264. It works well in Precise with ogg audio + theora video in an ogv container however - which is now the default selection when first installed. x11grab and jpeg generation also work in Precise.

For missing options to work in Puppy Precise 5.3.95.1, the ffmpeg there would have to include libx264m libfaac, libvorbis and libxvid in addition to the already provided x11grab, libvorbis, libmp3lame and libtheora etc. NOTE: aac audio could be recorded in Puppy Precise if I changed the aac encoder line to -acodec aac -strict experimental. However, that inbuilt ffmpeg encoder doesn't respond to audio quality parameters, as determined in tests, and also documented on the web - so libfaac is required for aac recording.

Works in Slacko beta 5.4 up to a point, but the audio and video stream mixing doesn't work because the ffmpeg there isn't recognising the standard decoder 'copy', so code like -codec copy is not working with that ffmpeg. Also the arecord VU display isn't outputting correctly in that puppy version i.e. this command doesn't work as it should in Slacko beta 5.4:
Code:

arecord -vvv /dev/null 2>/dev/null

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2010
Location: New Zealand

PostPosted: Mon 15 Oct 2012, 03:10    Post subject: pAVrecord version 0.8.8 released  

# Changes:

# Version 0.8.8: fixed ffmpeg copy option and VU bugfixed. Now works fine in Slacko 5.4 beta too (which has newer ffmpeg version 0.11.x). I'm hopeful it will also now work in Pemasu's Dpup Exprimo 5x3412 (same ffmpeg version he tells me), which I'll download at some stage to check out since pAVrecord is being used there.

By default, when using Theora for video, pavrecord uses -qscale 31 parameter for higher quality. You can overwrite this by entering, for example, -qscale 1, for lowest quality, in the Extra O/P Options entry box.

When monitoring video recording, depending on your machine amongst other factors, you may experience a delay before the video window appears (it takes ages on my computer with x264 - but it does come eventually...). Also, with Theora, particularly since it is high quality by default, the video and audio may be a bit out of sync and you will need to adjust the value in the Audio sync entry box before recombining the audio and video track. The 1.2 seconds, as provided by default, works perfectly for me with mp3 audio plus MPEG-4 video (Xvid) in an avi container. Puppy Precise 5.3.95.1 doesn't currently have Xvid enabled but you can use ogg_q for audio, Theora for video, in an ogv container for that distribution version release.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
pemasu


Joined: 08 Jul 2009
Posts: 5458
Location: Finland

PostPosted: Mon 15 Oct 2012, 03:34    Post subject:  

Version 0.8.8: Very Happy Very Happy Very Happy
The combining works and also my inbuild microphone now is captured. I played with options and Theora video encoder produces good visual quality.
I added .ogv to the mime definitions and it will be associated to the gnome-mplayer in next dpup release. Now it opens in Mplayer, not bad choice either.....

And thanks !!!

EDIT. Here is the pavrecord output when I launched it in the terminal. Remove the phony .gz. It is plain text file.
pavrecord-output-in-terminal.gz
Description 
gz

 Download 
Filename  pavrecord-output-in-terminal.gz 
Filesize  2.17 KB 
Downloaded  715 Time(s) 
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7547
Location: qld

PostPosted: Mon 15 Oct 2012, 06:08    Post subject:  

I had to find one of my machines with a working mic.. Rolling Eyes .. the eee701Sd. I had a usb stick lying around with an earlier slacko-5.4 beta (basically all the same under the hood though) and pAVrecord worked nicely.

This will fill a gap in the Puppy suite, nice job!

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2010
Location: New Zealand

PostPosted: Tue 16 Oct 2012, 00:49    Post subject: A couple of screenshots of pAVrecord in use  

Thought I'd better upload a couple of screenshots. You will find them in second post of this thread. i.e. at the link below:

http://www.murga-linux.com/puppy/viewtopic.php?p=656913#656913

pAVrecord can be downloaded at first post in this thread.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2010
Location: New Zealand

PostPosted: Wed 17 Oct 2012, 02:24    Post subject: pAVrecord 0.8.9 released
Subject description: Sorry I had accidentally left aac -strict experimental in 0.8.8
 

# Changes:

# Version 0.8.9: replaced aac -strict experimental with libfaac (sorry, I didn't realise I had left aac -strict experimental in 0.8.8 - I had forgotten to put it back to libfaac)

I note from a post by shinobar at http://www.murga-linux.com/puppy/viewtopic.php?p=658852#658852 that he has provided a libav update for ffmpeg for the latest Precise beta. In that he supplies libvo-aacenc so I guess I will provide a special version of pAVrecord for Puppy Precise shortly to use that instead of libfaac

EDIT: Unfortunately I have just discovered that the PAE kernel in the new Precise beta does not run on my machine, so I cannot test it at the moment.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2010
Location: New Zealand

PostPosted: Wed 17 Oct 2012, 06:53    Post subject: New version for Precise will be uploaded tomorrow  

I'm working on a version for Precise plus shinobar's libav extra dotpet installed there.

There is a problem with libxvid on that one for some reason, so I am planning to work around that. Also, mplayer and gnome-mplayer on Precise doesn't like my method of delaying the audio track so refuses to play (or won't play the sound sometimes) - the same created video plays fine on the Slacko 5.4 beta versions of these programs. However, I think I have found a better way of delaying the audio anyway so I hope to produce new version(s) tomorrow. Will be a different dotpet for Precise though, because of that libxvid issue.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 3 [34 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.0934s ][ Queries: 13 (0.0041s) ][ GZIP on ]