Sound eXchange (Sox) transformation of files, individually and in batches - batch-file

I am new to programming (just a little bit of python), and I am trying to run a tutotrial that first needs files in wav format. My directory has a bunch of .au files that I am trying to transform to .wav :
tony#VirtualBox:/media/sf_Dropbox/data/genres/classical$ ls
classical.00001.au classical.00018.au classical.00035.au classical.00052.au classical.00069.au classical.00086.au
classical.00002.au classical.00019.au classical.00036.au classical.00053.au classical.00070.au classical.00087.au
classical.00003.au classical.00020.au classical.00037.au classical.00054.au classical.00071.au classical.00088.au
classical.00004.au classical.00021.au classical.00038.au classical.00055.au classical.00072.au classical.00089.au
classical.00005.au classical.00022.au classical.00039.au classical.00056.au classical.00073.au classical.00090.au
classical.00006.au classical.00023.au classical.00040.au classical.00057.au classical.00074.au classical.00091.au
classical.00007.au classical.00024.au classical.00041.au classical.00058.au classical.00075.au classical.00092.au
classical.00008.au classical.00025.au classical.00042.au classical.00059.au classical.00076.au classical.00093.au
classical.00009.au classical.00026.au classical.00043.au classical.00060.au classical.00077.au classical.00094.au
classical.00010.au classical.00027.au classical.00044.au classical.00061.au classical.00078.au classical.00095.au
classical.00011.au classical.00028.au classical.00045.au classical.00062.au classical.00079.au classical.00096.au
classical.00012.au classical.00029.au classical.00046.au classical.00063.au classical.00080.au classical.00097.au
classical.00013.au classical.00030.au classical.00047.au classical.00064.au classical.00081.au classical.00098.au
classical.00014.au classical.00031.au classical.00048.au classical.00065.au classical.00082.au classical.00099.au
classical.00015.au classical.00032.au classical.00049.au classical.00066.au classical.00083.au classical.au
classical.00016.au classical.00033.au classical.00050.au classical.00067.au classical.00084.au classical.wav
classical.00017.au classical.00034.au classical.00051.au classical.00068.au classical.00085.au
But when running the sox command, I get this:
tony#VirtualBox:/media/sf_Dropbox/data/genres/classical$ sox classical.0000.au classical.0000.wav
sox FAIL formats: can't open input file `classical.0000.au': No such file or directory
Does anybody know what's happening? Also, how can I run sox for a whole batch instead of one by one?

Without looking up the documentation for sox, it looks like 'sox classical.00001.au classical.00001.wav' might work. From the ls output, there is no file called classical.0000.au in that directory, but there is one called classical.00001.au.

Related

SWUpdate on RPi4 via yocto - error parsing configuration file

After booting SWUpdate yocto-generated image for the first time, executing swupdate results in error message:
Error parsing configuration file: 'globals' section missing, exiting.
I tried to strictly follow SWUpdate's documentation, but it gets short when it comes to yocto integration. I'm using meta-swupdate, meta-swupdate-boards, and meta-openembedded layers together with poky example repository all at Kirkstone tag, building via bitbake update-image and having modyfied local.conf as:
MACHINE ??= "raspberrypi4-64"
ENABLE_UART = "1"
RPI_USE_U_BOOT = "1"
IMAGE_FSTYPES = "wic ext4.gz"
PREFERRED_PROVIDER_u-boot-fw-utils = "libubootenv"
IMAGE_INSTALL:append = " swupdate"
Is there anything else I need to modify to generate the configuration file and be able to run SWUpdate binary properly?
Side question: In the documentation, it's recommended to append swupdate-www to achieve a better web server. However, if I append it, there is no swupdate-www binary inside the `/usr/bin' directory.
As with other recipes folders the recipes-support/swupdate/swupdate/raspberrypi4-64 folder was missing inside the meta-swupdate-boards layer. Therefore, an empty config file was always generated. After adding this folder and all related files, strongly inspired by raspberrypi3 folder, the error was gone and swupdate -h provided the expected output.
There was also one new error during build process thrown by yocto. It was related to missing systemd requirement and was solved by adding:
DISTRO_FEATURES_append = " systemd"
to local.conf

Asynchrous copy-file and copy-directory in Emacs-Lisp?

Does it exists functions for Emacs Lisp which can copy files and directories (with support for TRAMP) and does this asynchronously?
My problem is that (copy-file) and (copy-directory) blocks my editor until they finish and if I do it over TRAMP with a remote-server it takes about 5-10 seconds until I can proceed.
I found the answer to this myself, I use
emacs-async like this:
(async-start
`(lambda()
(copy-file ,local ,remote-path t t)
,local)
(lambda(return-path)
(message "Upload '%s' finished" return-path))))
Place your paths in the variables local and remote-path. For directories, just change (copy-file) to (copy-directory).
Also I think you can use emacs-deferred too, however I haven't tried it yet.

During apachectl start getting open shared object file: No such file or directory

After successfully installation of Apache2(2.4.4) i tried to start https server but i am getting below error
bimlesh#server:/usr/local/apache2/bin$ ./apachectl start
httpd: Syntax error on line 71 of /usr/local/apache2/conf/httpd.conf: Cannot load modules/mod_authn_core.so into server: /usr/local/apache2/modules/mod_authn_core.so: cannot open shared object file: No such file or directory
bimlesh#server:/usr/local/apache2/bin$
I looked at /usr/local/apache2/modules/ and really those .so files are not available.
Can anyone please help that how to get rid off.
if i look at /usr/local/apache2/modules/ folder then i see:(no .so files available)
bimlesh#server:/usr/local/apache2/bin$ ls ../modules/
httpd.exp mod_authn_file.a mod_cache_disk.a mod_file_cache.a mod_logio.la mod_ratelimit.a mod_socache_dbm.la
mod_access_compat.a mod_authn_file.la mod_cache_disk.la mod_file_cache.la mod_mime.a mod_ratelimit.la mod_socache_memcache.a
mod_access_compat.la mod_authn_socache.a mod_cache.la mod_filter.a mod_mime.la mod_remoteip.a mod_socache_memcache.la
mod_actions.a mod_authn_socache.la mod_cgid.a mod_filter.la mod_negotiation.a mod_remoteip.la mod_socache_shmcb.a
mod_actions.la mod_authz_core.a mod_cgid.la mod_headers.a mod_negotiation.la mod_reqtimeout.a mod_socache_shmcb.la
mod_alias.a mod_authz_core.la mod_dav.a mod_headers.la mod_proxy.a mod_reqtimeout.la mod_speling.a
mod_alias.la mod_authz_dbd.a mod_dav_fs.a mod_include.a mod_proxy_ajp.a mod_request.a mod_speling.la
mod_allowmethods.a mod_authz_dbd.la mod_dav_fs.la mod_include.la mod_proxy_ajp.la mod_request.la mod_status.a
mod_allowmethods.la mod_authz_dbm.a mod_dav.la mod_info.a mod_proxy_balancer.a mod_rewrite.a mod_status.la
mod_auth_basic.a mod_authz_dbm.la mod_dbd.a mod_info.la mod_proxy_balancer.la mod_rewrite.la mod_substitute.a
mod_auth_basic.la mod_authz_groupfile.a mod_dbd.la mod_lbmethod_bybusyness.a mod_proxy_connect.a mod_sed.a mod_substitute.la
mod_auth_digest.a mod_authz_groupfile.la mod_deflate.a mod_lbmethod_bybusyness.la mod_proxy_connect.la mod_sed.la mod_unique_id.a
mod_auth_digest.la mod_authz_host.a mod_deflate.la mod_lbmethod_byrequests.a mod_proxy_express.a mod_session.a mod_unique_id.la
mod_auth_form.a mod_authz_host.la mod_dir.a mod_lbmethod_byrequests.la mod_proxy_express.la mod_session_cookie.a mod_unixd.a
mod_auth_form.la mod_authz_owner.a mod_dir.la mod_lbmethod_bytraffic.a mod_proxy_fcgi.a mod_session_cookie.la mod_unixd.la
mod_authn_anon.a mod_authz_owner.la mod_dumpio.a mod_lbmethod_bytraffic.la mod_proxy_fcgi.la mod_session_dbd.a mod_userdir.a
mod_authn_anon.la mod_authz_user.a mod_dumpio.la mod_lbmethod_heartbeat.a mod_proxy_ftp.a mod_session_dbd.la mod_userdir.la
mod_authn_core.a mod_authz_user.la mod_env.a mod_lbmethod_heartbeat.la mod_proxy_ftp.la mod_session.la mod_version.a
mod_authn_core.la mod_autoindex.a mod_env.la mod_log_config.a mod_proxy_http.a mod_setenvif.a mod_version.la
mod_authn_dbd.a mod_autoindex.la mod_expires.a mod_log_config.la mod_proxy_http.la mod_setenvif.la mod_vhost_alias.a
mod_authn_dbd.la mod_buffer.a mod_expires.la mod_log_debug.a mod_proxy.la mod_slotmem_shm.a mod_vhost_alias.la
mod_authn_dbm.a mod_buffer.la mod_ext_filter.a mod_log_debug.la mod_proxy_scgi.a mod_slotmem_shm.la
mod_authn_dbm.la mod_cache.a mod_ext_filter.la mod_logio.a mod_proxy_scgi.la mod_socache_dbm.a
bimlesh#server:/usr/local/apache2/bin$
Run
find / -type f -name mod_authn_core.so
or install updatedb ( mlocate, slocate, findutils or sth ) if needed and run
updatedb
and then ( or before )
locate mod_authn_core.so
To find out if these files are somewere else than they should be, and possibly fix location with symbolic link or moving files where they're expected to be.
If there is no file you need, you may need to comment it in httpd.conf ( if it's specific module ), or (re)install apache package(s). I believe mod_authn_core should be in basic package, not in separate module though. Possibly someone removed it blindly or accidentally, or some intruder messed up with system, or disk got broken or whatever else.
PS. Modules usually are under "lib" e.g. /usr/local/lib/apache2 or /usr/lib/apache2, or /usr/lib/apache2/modules or similar, not in /usr/local/apache2/modules, though it usually depends on compilation of package..
You might also run
apache2ctl -t -D DUMP_VHOSTS
to find out what modules were compiled as shared or static. You should also include information about distribution, and note you're building/installing from source.
Also, have look here: http://httpd.apache.org/docs/2.4/install.html#configure

How to play .m4s file given in mpd of MPEG-DASH on player?

I have downloaded the MPDs "http://dash.edgesuite.net/adobe/hdworld_dash/HDWorld.mpd" and all related .m4s files.
I tried running it on VLC player. But the format is not recognized by VLC player.
I have downloaded this media segment using wget (1 to 14 segments are available)
http://dash.edgesuite.net/adobe/hdworld_dash/hdworld_seg_hdworld_0696kbps_ffmpeg.mp4.video_temp2.m4s.
Can anybody tell me solution how to run .m4s format file on player?
System: Ubuntu 11.10
You need the initialization segment. It is often named "00" or "init" or doesn't have a sequence number like the other files, and often ends in ".mp4" rather than ".m4s". Then you just concatenate the files together. You can start anywhere in the sequence so long as you begin with the initialization segment.
For example
cat init.mp4 *.m4s > output.mp4
Then you have a playable mp4 file with content, assuming there is no encryption (DRM) applied to it.
.m4s file format is ISO Base Media File. i.e. MPEG-4 Part 14. read specs for more info you may get m4s player for windows. As far as I know on Linux platform GPAC will help. You can create your own MPD from any media source using MP4Box a GPAC tool.
You can use MP4Client for playing your DASHed Media from MPD. Actually .m4s's separate segment is not able to play by its own bcoz player should know Codec and mime type to play any media and m4s is not supported by any player, i.e. it has its own header and data (moof & mdat).
For playing MPD which contains many m4s segment (you can make your own MPD or download each audio and video segment separately from any MPD & put it in to a same folder):
install GPAC.
$MP4Client MYWorld.mpd will open Osmo4 player and you can see your video is playing. Enjoy..
FYI, local streaming server can also play this video:
$MP4Client http://localhost/MYWorld.mpd
if not working change segmentAlignment flag, i.e. <AdaptationSet segmentAlignment="true" subsegmentAlignment="true">.
you can play it using GPAC player, installing it with all the third party codecs also -
http://gpac.wp.mines-telecom.fr/player/
some ppl claim that they are able use vlc, i have not tested it.
Try this in the OSX terminal:
open -a Osmo4 example.mpd
It works for me.

formats.h file containing WAV file format info

I am trying to make a prog which can record voice and store it in digital audio format on LINUX using ALSA. (currently using Ubuntu).
While looking for some help on net, I found this code from here
#include "formats.h"
...
...
WaveChunkHeader wch, ch = {WAV_FMT,16};
WaveHeader h;
WaveFmtBody f;
wch.type = WAV_DATA;
...
...
However, I don't have "formats.h" header file on my system. Any one know from where(which dev pkg) I can get this header file (containing audio file format related info)?
Thanks,
Vikram
it should be in the alsa-utils package, subdirectory aplay:
http://alsa-utils.sourcearchive.com/documentation/1.0.17/formats_8h-source.html

Resources