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 Fri 19 Sep 2014, 15:53
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Precord mp3,wav,ogg,aac,flac recorder/player.
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 12 [177 Posts]   Goto page: 1, 2, 3, ..., 10, 11, 12 Next
Author Message
mcewanw

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

PostPosted: Thu 10 Dec 2009, 03:22    Post subject:  Precord mp3,wav,ogg,aac,flac recorder/player.
Subject description: with rec, play,pause, and duration, and interface to Pscheduler
 

NOTE WELL: Please remember to delete your old ~/.precord config directory before installing this latest version.

Changes 9.0.3:

# (YMD)2014/08/03: changed hijack ext to .hijack; Removed old 'slave' addon code. Hijack addon modules allow developer to add to or change code functionality/codec commands etc without needing to edit the main program script. Details in second post of pavrecord thread, which also provides the same addon ability.

Fixed record Duration not working. Modified such that most functionality no longer requires ffmpeg (which was previously used in playback code). Can now also control playback (but not record) of video files too if mplayer on system.

One version now only. Tested on Slacko 6 beta, Precise 5.7.1 and DebianDog.

Major config GUI modification.
Can use avconv if available.
Selects appropriate AAC encoder.
As per pAVrecord, Precord now includes hijack expansion capability to allow modular plugin addition of new main code, new functions, new gui panels and new gui general config buttons:

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

Notes for Precord mp3, wav, ogg, acc(faac), and flac recorder and player with pause controls and auto config saving:

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

Uses ffmpeg for ogg recording if oggenc is not available.

Precord has the advantage over, for example, mhWaveEdit, in that it records straight to mp3, wav or ogg, so doesn't need to use the hard disc for temporary storage of huge intermediate files.

It depends on arecord and lame for recording, and ffmpeg and aplay for playback; these are all standard core apps in Puppy

For vorbis ogg Precord uses oggenc for recording if it is available, otherwise it uses ffmpeg.

Precord has an inbuilt interface to Pschedule, so you can also use it for very versatile timed-recording (over, days, months, and years...). It can also record any sound coming through your soundcard (e.g. radio streams). Indeed, 01micko's pupradio/tv program automaticaly includes a button to call up Precord once Precord is installed. You just need to select appropriate Mixer input channel instead of Mic input using retrovol or alsamixer.

The provided dotpet installs an entry/icon for the program in JWM Start menu -> Multimedia -> Precord mp3,wav,ogg recorder/player

As well as having a GUI interface, Precord 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:

precord [with no args starts GUI version]

precord  rec  /mnt/home  anything.mp3 10 [records without GUI; assumes mp3 previously selected in precord config GUI]

or via pipe:

echo  rec  /mnt/somewhere  testrec.ogg  25 | precord -
[assumes ogg previously selected in precord config GUI]

precord  play  /root  out.mp3 [plays without GUI]

echo  play  /mnt/sdb1  out.mp3 5 | precord -
[also plays without GUI; here using duration of 5 seconds]

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

precord quit
does what you'd expect...

precord --help
for commandline usage


mcewanw
precord_9.0.3_i386.deb.tar
Description  Tested on DebianDog. Just remove the dummy tar.
tar

 Download 
Filename  precord_9.0.3_i386.deb.tar 
Filesize  11.02 KB 
Downloaded  30 Time(s) 
precord-9.0.3.pet
Description  Tested on Slacko 6 beta, Precise 5.7.1, Puppy Akita (see above notes).
pet

 Download 
Filename  precord-9.0.3.pet 
Filesize  11.33 KB 
Downloaded  46 Time(s) 

Last edited by mcewanw on Sat 02 Aug 2014, 04:57; edited 188 times in total
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

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

PostPosted: Thu 10 Dec 2009, 07:21    Post subject: If Precord fails to start or your mic doesn't work  

EDIT: You can also record from 01micko's pupRadio app
http://www.murga-linux.com/puppy/viewtopic.php?p=371420#371420
More details on setting up alsamixer for that use in the later post:

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


EDIT: For something more definitive (which says how to use Mic control in alsamixer) see here:

http://alsa.opensrc.org/index.php/Record_from_mic

If you have a USB mic, the following link might help:

http://wiki.audacityteam.org/index.php?title=USB_mic_on_Linux

If the config file for Precord (/root/.precordrc) gets corrupted somehow, Precord won't be able to start. EDIT: FIXED in version 1.0.1 upwards: the program now autocleans its config file on the next run if it found an error (i.e. if it doesn't start the first time because of a corrupted config file, it will start fine next time your try running it).
-------------------------

If using a microphone and it's not working, you can open up alsamixer from the Config GUI of precord by clicking on the MIX button. To adjust the alsamixer controls to get your sound basically going:

Move to the different volume controls (Master, Master M, and PCM) using the left/right cursor keys and use the up/down cursor keys turn up these volume controls to maximum.

Use "Mic Sel" to select the Microphone you are using (Mic1 internal; Mic2 external).

You might need "Mic Boost" (press M key to activate), which provides extra gain from your microphone.

(I suggest NOT USING the control marked simply "Mic"; on my system at least, that one just messes things up with lots of howling feedback...)

You should also try moving to the control marked Capture, press space bar to select, and turn it right up using the cursor up key.

Occasionally, alsa seems to get screwed up and I've had to reboot after playing with alsamixer controls (nothing to do with precord though, which works fine - just alsa generally), but usually things go fine (I've never taken time to discover the combination of settings that have worked best I'm afraid).

What I've found isn't good on my system is to use the control marked simply "Mic" whilst recording: that just creates horrible feedback whining noise in the background. i.e. I suggest therefore that you first leave that particular control de-activated; key M activates it (a toggle ON/OFF effect), so don't do that, or turn up its capture volume either...

i.e. As an initial attempt to get your mike working, just try sticking to Master, Master M, Mic select, Mic Boost (M to toggle activate), and plain "Capture" (space bar to toggle activate capture).

Sometimes entering the following two commands in a console gets your mic going if alsamixer isn't doing the job...:

Code:

amixer set 'Mic Input',0 on
amixer set 'Mic',0 cap on

_________________
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 Sun 13 Dec 2009, 10:07; edited 5 times in total
Back to top
View user's profile Send private message Visit poster's website 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11066
Location: Arizona USA

PostPosted: Thu 10 Dec 2009, 23:46    Post subject:  

I played around with Precord tonight for a bit. It's easy to use and seems well-behaved. That is, it did what I expected and didn't do anything I didn't expect. I tried running
Code:
arecord -V mono

in rxvt for a VU meter (see here for details) while Precord was running. Arecord has the unfortunate habit of beeping the computer's beeper when the input level clips, and the beeps are picked up by the microphone. After a while, arecord seemed to cause Precord to not record at all. Ah, well, it's still useful for setting levels before you record.
Back to top
View user's profile Send private message 
mcewanw

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

PostPosted: Fri 11 Dec 2009, 01:18    Post subject: version 1.0.1 uploaded
Subject description: fixes error with pause function and auto cleans its config file
 

version 1.0.1 uploaded (attached to first post)

fixes error with pause function and auto cleans its config file (if it ever doesn't start, just try running it again and it should have fixed its config file automatically back to the default).

@Flash:

I tried,

arecord -V mono

My 1024x768 screen does not allow the rxvt console to be stretched out wide enough, though I could see the percentage figures which also indicated the recording levels. I could add a button to the Config menu of precord I suppose to run arecord -V mono in its own rxvt, if you like.
Pity I don't know how to make the rxvt fonts tiny enough that it wouldn't need stretched so much - I know how to enlarge the fonts, but haven't tried making them tiny...

_________________
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: 2346
Location: New Zealand

PostPosted: Fri 11 Dec 2009, 03:18    Post subject: version 1.0.2 uploaded with VU for setting up sound  

version 1.0.2 uploaded with VU for setting up sound

I used

arecord -vvv

in preference to

arecord -V mono

because I wanted a dynamically changing VU graph.

@Flash: At the command line you might also like to try:

Code:

arecord -V mono /dev/null 2>/dev/null

or

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


Note that you cannot record (as far as I am aware) whilst the VU meter is running (but you can playback!...).
You can also start up the alsamixer at the same time (MIX button) and, if you wish, activate the single bar MIN GUI of Precord (or switch back and forth between single bar GUI and config GUI, whilst one or both of these are running in their rxvt windows.

_________________
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 
zigbert


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

PostPosted: Fri 11 Dec 2009, 13:43    Post subject:  

mcewanw
What I like about Precord is that it is built around ffmpeg/arecord and not libsnd.

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


Joined: 11 Oct 2008
Posts: 7802
Location: qld

PostPosted: Fri 11 Dec 2009, 22:07    Post subject:  

Hi mcewanw

Thanks for this cool little app. It also does a decent job of recording stdin from whatever is going through the sound card.

I just wrote a little radio streaming app that includes a recording feature and I was having all sorts of problems trying to get it right but now I don't have to at all. My app can call 'precord' and the user can set up alsamixer (setting up alsamixer is the key) and save in whatever quality they want. Neat. Of course this makes recording optional in my radio app but that's fine. I will put a link in my app to this thread.

Thanks again.

Cheers

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


Joined: 23 Nov 2006
Posts: 8252

PostPosted: Sat 12 Dec 2009, 11:06    Post subject:  

Looks like you caught barry's eye...check his blog if you haven't already Smile

regards

mike
Back to top
View user's profile Send private message 
mcewanw

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

PostPosted: Sun 13 Dec 2009, 05:42    Post subject: Version 1.0.3 uploaded  

precord-1.0.3.pet uploaded (see first post in thread)

# Version 1.0.3
# Added Record and Play file entry boxes, and date-stamped file handling.

Now you can easily play back one file, whilst recording another (headphones are best when doing that...).

Note that though precord is designed to record mp3 files, it will play back many formats.

I only have a very slow dialup connection, so haven't tried this, but I imagine precord could probably play back (some/a few) mp3 streams as well (try entering a URL of such a stream as the file to play - let me know if it works...).

EDIT: Oh well, I had no success with streaming mp3 playing in precord, but 01micko's wee app works well for that (looking forward to him creating a universal version for different players etc.

The date stamp record is pretty handy for making lots of quick recordings. The playback window makes a best effort to track the date-stamped file being recorded, but it occasionally gets fooled (that is inevitable, the date stamp is at second resolution...) - not that that matters - the recording goes fine.

The dotpet is much the same size (tiny: 3.8kB)

_________________
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: 2346
Location: New Zealand

PostPosted: Sun 13 Dec 2009, 09:48    Post subject: Using Precord with 01micko's pupRadio
Subject description: tested with newly uploaded Precord 1.0.3
 

Just tried 01micko's pupRadio

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

which includes the option to Record the played audio streams via Precord. I tested pupRadio in conjunction with my newly uploaded Precord version 1.0.3.

The combination works really well (if you are lucky! Alsa seems to be a temperamental beast...) You can use the VU meter of Precord when setting up Alsa mixer and pupRadio volume 'PRIOR' to recording - but, alas, you the VU meter can't be allowed to run whilst recording. I haven't been successful (as yet) getting any VU meter to work whilst recording - maybe one day! :-)

As 01micko says, the trick is to set up alsamixer correctly. You can do that from within Precord (in its config GUI press the MIX button). I found that selecting Capture device "Mix" (instead of "Mic") worked.

EDIT: On my admittedly slow system the recording of pupRadio seemed to loose lots of chunks of sound though - but its hard to tell when the dialup connection continually results in pauses due to buffering needs. RE-EDIT...! Worked great when I either reduced the bit rate with cbr, but best on my system was to use Variable Bit Rate mode, vbr (I used stereo and 320k vbr in my test, with great results, though I'm sure lower bit rate vbr would be fine)

Be careful not to leave Mic as the Capture device or you may think things are working when all you are then doing is recording your speaker output through your microphone!!! Not so good! :-)

But using "Mix" (rather than "Mic") for alsamixer Capture seemed to be the way to do it as far as I can see).

I included some tips on setting up alsamixer (albeit primarily for Microphone use) here

_________________
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: 2346
Location: New Zealand

PostPosted: Sun 13 Dec 2009, 13:11    Post subject: Version 1.0.4 uploaded to fix opening bug  

Version 1.0.4 uploaded.

FIxes the config file corruption bug caused by not closing app with the Quit button. Should never start up with a blank file panel now (so works better with pupRadio now too).

_________________
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: 2346
Location: New Zealand

PostPosted: Sun 13 Dec 2009, 18:46    Post subject: added the precord 1.0.4 bugfix to the older precord 1.0.2
Subject description: Renamed that older version 1.0.2s and re-uploaded
 

Though I recommend the new version 1.0.4 I have re-uploaded version 1.0.2 with the bugfix from 1.0.4 incorporated. I accordingly renamed that old version 1.0.2s

[the 1.0.4 and 1.0.2s bugfix ends the problem of precord sometimes starting up with a blank file window and then having to be restarted]

_________________
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 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11066
Location: Arizona USA

PostPosted: Sun 13 Dec 2009, 23:01    Post subject:  

May I suggest that you add the version number to the name that is displayed in the upper left corner of the GUI? With your rapid improvements, I'm not sure which version I'm using. Laughing

I notice that now the speakers are not connected to the microphone when Precord is recording. Good job!
Back to top
View user's profile Send private message 
mcewanw

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

PostPosted: Mon 14 Dec 2009, 02:03    Post subject: 1.0.5 uploaded  

1.0.5 uploaded

I haven't tested this one so thoroughly. I'm too busy working on 1.0.6, which is still about file entry handling - so consider this one temporary but close.

_________________
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 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11066
Location: Arizona USA

PostPosted: Mon 14 Dec 2009, 09:42    Post subject:  

I don't know if this is a bug or just a peculiarity of my system:
When I click to expand the "Config" menu, Precord 1.0.5 disappears. I restart it from the Multimedia menu, click "Config" again, and it works like it's supposed to. (This also happened in 1.0.4 but I forgot to mention it. Embarassed )

I tried vbr. It works fine. I didn't do a real comparison yet (recording the same audio track with both vbr and cbr) but vbr's file size for 30 seconds of me talking seemed about the same as with cbr. Is that what you found?

_________________
Puppy Help 101 - an interactive tutorial for Lupu 5.25
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 12 [177 Posts]   Goto page: 1, 2, 3, ..., 10, 11, 12 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.1042s ][ Queries: 13 (0.0062s) ][ GZIP on ]