'
Home... Help... Search... Computers...
Tardus's Linux Hints and Tips
Things I've discovered that helped me. Hope they help you too
# speed up a video including its audio
# also shrinks the video, which is always good!
if [ "$1" = "" ] || [ "$2" = "" ]; then
echo Usage: speedup-video.sh videofile speedup
echo where speedup is, eg, 110 for 10% faster
else
VID=$1
SPEEDUP=`echo "scale=2; $2 / 100" | bc`
VIDEOSPEEDUP=`echo "scale=4; 1 / $SPEEDUP" | bc`
NAME=`echo $VID | awk -F. '{print $1}'`
NEWVID=$NAME-$2.mp4
echo $VID $SPEEDUP $VIDEOSPEEDUP $NEWVID
ffmpeg -i $VID -filter_complex "[0:v]setpts=0.85*PTS[v];[0:a]atempo=1.1765[a]" -map "[v]" -map "[a]" $NEWVID
fi
e.g.
for colour in black white yellow red brown; do cp 2faces.jpg 2faces-$colour.jpg; done
results in
2faces-black.jpg
2faces-brown.jpg
2faces-red.jpg
2faces-white.jpg
2faces-yellow.jpg
Sat 27 Nov 18:08:19 AEDT 2021
Apple iMac 24 inch 2008, 6GB ram, 1TB disk
Was quite adequate is not quite snappy.
Lately quite sluggush.
Tracked it down to using snap apps. I removed 2 snap apps I had plus the snapd support stuff and it is now fine again.
Fix is to remove Ubuntu WEEX:
sudo apt-get --purge remove weex
And Install from Debian:
wget http://ftp.br.debian.org/debian/pool/main/w/weex/weex_2.8.3_amd64.deb
sudo dpkg -i weex_2.8.3_amd64.deb
Source: https://askubuntu.com/questions/1338535/weex-segmentation-fault-core-dumped/1375991#1375991
cat /etc/issue
Linux Mint 20.1 Ulyssa \n \l
ffmpeg -loop 1 -i who-is-best-1280x720.png -i who-is-2-audio-a.mp3 -c:v h264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest out.mp4
ffmpeg -i who-is-best-1.mp4 -i out.mp4 -filter_complex "[0:v] [0:a] [1:v] [1:a] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" merged-video.mp4
I wanted to print a free model plane plan, sized at 20x30 inches. Here is how I did it.
Install pdfposter
sudo apt-get install pdfposter
then at the command line:-
pdfposter -m A4 -p 30x20inch the_fish_v2.pdf fish-fuse-30x20inch.pdf
where:-
-m A4 means use A4 size paper in the printer
(man pdfposter shows other sizes)
-p 30x20inch means a 30x20 inch size plan/poster
the_fish_v2.pdf is the input file
fish-fuse-30x20inch.pdf is the 8-A4 page output file. When printed the 8 pages can be taped edge to edge (no overlap or trimming needed) to make the full-size plan/poster.
I found this superior to posterazor which required trimming of the pages and lacked alignmenbt cues.
# extracted the audio using ffmpeg
ffmpeg -i Spot\'s_sad_and_happy_day.mp4 Spot\'s_sad_and_happy_day.mp3
# made a copy, in case I need to check the original audio later.
cp Spot\'s_sad_and_happy_day.mp3 spot.mp3
# used Audacity to reduce the noise, which was constant background "white noise"
# and saved to spot-lownoise.mp3
# used normalize-mp3 to make the sound loud enough
normalize-mp3 spot-lownoise.mp3
# renamed it
mv spot-lownoise.mp3 spot-lownoise-normalised.mp3
# extract just the video
ffmpeg -i Spot\'s_sad_and_happy_day.mp4 -codec copy -an spot-video-only.mp4
# and merge video and audio streams, transcoding the audio to "aac" format.
# Apple devices won't play the audio if it is not in aac format.
ffmpeg -i spot-video-only.mp4 -i spot-lownoise-normalised.mp3 -shortest -c:v copy -c:a libvo_aacenc -b:a 256k Spot\'s_sad_and_happy_day_aac.mp4
e.g. cat suncalc-17July2021.lis |paste - - - -
( first remove blank lines from the file using
grep -v '^$' inputfile > outputfile )
Mint 20.x uses netplan, so the old method of editing /etc/network/interfaces
does not work.
Here are the steps for netplan:-
1. edit /etc/netplan/1-network-manager-all.yaml as follows-
network:
version: 2
renderer: networkd
ethernets:
enp0s25:
addresses:
2. sudo netplan apply
Use Aegisub to create a sub-titles file.
Open the mp4 video in Avidemux
For the video stream select a different format (ie, not "Copy"). I used MPEG4 AVC (x264)
Save as an mkv file.
Put @reboot mount /dev/sdb1 /media/steve/ehd
in root's crontab.
-------
sudo systemctl set-default multi-user.target
-----------
eg, to work out percentage of foamboard sheet used for a model.
For black and white (posterize 2)
convert image.jpg -format %c histogram:info:- | sort -nr
More generally
convert image.jpg -colorspace RGB -format %c histogram:info:- | sort -nr
This filter only works is there is no alpha channel
convert image.png -crop 32x32 parts-%02d.png
extract audio
ffmpeg -i myvideo.mp4 audio.mp3
cutting can also be done quickly using ffmpeg
cut out first minute for testing (and respects leading keyframe)
ffmpeg -i input.mp4 ss 00:01:00 -to 00:02:00 -c copy output.mp4
if video needs brightening, use ffmpeg
ffmpeg -i test2.mp4 -vf lutyuv=y=val*1.5 out2-1-5.mp4
brighten, crop and rotate together, showing how to use multiple video filters.
"transpose=2" is rotate 90 degrees anti-clockwise:
lutyuv=y=val*1.5 increase brightness by 50%:
ffmpeg -i VID_20200508_164812993.mp4 -vf "crop=iw*8/10:ih*8/10, lutyuv=y=val*1.5, transpose=2" neveralone.mp4
1. Load the file
2. find the selection to cut out.
3. Use the A and B markers to span the selection to cut out. Use the keyframe buttons to nudge the A and B into place, otherwise you get an error.
4. Press Delete
5. Save the video with a new file name, as MP4
---------------
This works for images with a solid background.
1. save the image in PNG format with an alpha channel (Layers, Transparency, Add Alpha Channel)
2. from the Toolbox, use the select by colour tool (Tools, Selection, By Colour Select)
3. click on the background.
4. press "Delete" key.
5. export as PNG
sudo ip flush enp0s25 && sudo systemctl restart networking.
Better than fiddling with the Network-Manager GUI!
OBSOLETE:- Editing the interfaces file per below did not work. I used the GUI to edit from DHCP to Manual, and set the address, netmask and gateway, and also OpenDNS's DNS servers, then saved.
one glitch: the gui does not tab properly to enter the address, mask and gateway. Visusally messy. Just ignore the look, and type ADDR Tab MASK Tab GATEWAY and click Save.
# Generic
Step1: Open the below configuriaton file
vi /etc/network/interfaces
Step2: Enter the ip address as below in the same file.
auto lo eth0 enp0s25
iface lo inet loopback
iface enp0s25 inet static
address 10.0.0.254
netmask 255.255.255.0
gateway 10.0.0.1
Step3: Restart the network service
sudo ip flush enp0s25 && sudo systemctl restart networking
# Mine
Edited /etc/network/interfaces file to be:-
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo enp0s25
iface lo inet loopback
iface enp0s25 inet static
address 10.1.1.5
netmask 255.0.0.0
gateway 10.1.1.1
# DNS configurations
dns-nameserver 10.1.1.1
dns-nameserver 220.233.0.4
I have an AWK script that adds numbers from each input line. The input numbers are intergers or decimals of 1 or 2 places (dollars and cents in fact).
It has been working well for many months, but today I noticed an anomaly.
One of the numbers reached 5 places plus a decimal fraction, eg 10000.25, but the print statement output it as only 10000.2
It turns out that the awk print statement uses sprintf to format numbers, controlled by OFMT = "%.6g" (ie, as floating point or in scientific notation, which ever uses fewer characters). OFMT is the Output Format specification variable.
So:-
$ echo "null" |awk '{print 9000.25}' correctly outputs
9000.25
but
$ echo "null" |awk '{print 10000.25}' incorrectly outputs
10000.3
I checked and OFMT is indeed %.6g on my Linux Mint 18.3 system
so, adding in an overt OFMT definition to override the default gives:-
$ echo "null" |awk '{OFMT = "%.6g"; print 90000.25}'
90000.2
$ echo "null" |awk '{OFMT = "%.5g"; print 90000.25}'
90000
$ echo "null" |awk '{OFMT = "%.7g"; print 90000.25}'
90000.25
So, OFMT = "%.7g" is what I need.
I added it to the BEGIN section of the script.
mp3info -p "%f: %S\n" audio.mp3
gives the file name and length in seconds
inkscape -z -e test.png -w 1024 -h 1024 test.svg
awk -F'[/=]' '{print $3 "\t" $5 "\t" $8}' file
use "\r" not "\n" which will insert a null
https://stackoverflow.com/questions/71323/how-to-replace-a-character-by-a-newline-in-vim#71334
eg, where the second field is an integer, this will pad it to 3 decimal places:
ls *.png | awk -F[-.] ' {printf ("%s-%03d.%s\n", $1,$2,$3)}'
:1,24sort
sorts lines 1 to 24
exe is in ~/B-Folder_5
config.ini is ~/B-Folder_5/configuration
database in ~.B-Folders5/workspace
To get a second database instance:-
copy B-Folder_5 to B-Folder_52
create a workspace2 folder in ~/.B-Folders5
alter ~/B-Folder_52/configuration/config.ini by changing "workspace" to "workspace2"
create a Desktop launcher to run ~/B-Folder_52/b-folders
sudo apt install pdfposter
pdfposter -s1 a3-input.pdf a4-output.pdf
or
pdfposter -p a3 original-file.pdf multipage-poster.pdf
or
Printing images across multiple pages
use PosteRazor
(Easy Poster Printer and Poster Printer might also be worth a look)
need to install hfsprogs
need to mount the disk read-writer
e.g. sudo mount -t hfsplus -o remount,force,rw /dev/sb2 /media/steve/Macintosh\ HD/
depending on permission, may need to do file copying, etc. using root account
eg, convert marble-mic.pdf marble-mic.png gives
convert: not authorized `marble-mic.pdf'
Used to work, but not in latest Linux Mint 18.3
Fix is to edit the line in /etc/ImageMagick-6/policy.xml
<policy domain="coder" rights="none" pattern="PDF" />
to
<policy domain="coder" rights="read" pattern="PDF" />
Re: Delete apostrophe (single quotes) before numbers in all cells?
Postby FJCC » Fri Mar 16, 2012 4:54 am https://forum.openoffice.org/en/forum/viewtopic.php?f=9&t=49046
The apostrophe isn't really part of the cell content, it just signifies that the cell is formatted as text. To reenter all the data as number:
1. Highlight all of the cells and use Format -> Cells to change the cell format to an appropriate number format.
2. With all of the cells still selected, go to the menu Edit -> Find & Replace
3. In the Search For box enter .* (period asterisk)
4. In the Replace with box enter &
5. Select More Options and check Current Selection Only and Regular Expressions
6. Click Replace All
The .* "means zero or more of any character" and & means "whatever was found". These are regular expressions which are explained in the help section
run as an appimage. Add a link into the main menu. v2.7 is working fine
Handbrake works well for transcoding video.
13 Dec 2018
This has been occuring for sometime on my old 2008 iMac 24" Unibody box, running Linux Mint 18.3,
Linux lion 4.15.0-42-generic #45~16.04.1-Ubuntu SMP Mon Nov 19 13:02:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
I've had the box for about 8 months, and the problem only occured in the last several weeks, so maybe due to some Mint uppgrade.
This page gave me some idea, but no resolution.
This was more help
https://askubuntu.com/questions/780689/why-does-dns-resolution-not-work-on-the-first-try
I found that adding "nameserver 10.1.1.1" above the default "nameserver 127.0.1.1" in /etc/resolv.conf gave a temporary fix, but lost at the next reboot when the resolvconf startup process overwrites it.
(10.1.1.1 is my router, which is also the DNS server, presumably a caching server, and the DHCP server for my home network.)
Here is what I eventually did to resolve the issue.
I created a second resolv.conf file in /etc/resolvconf/ containing just the line "nameserver 10.1.1.1". This line is linked to by /etc/resolvconf/resolv.con.d/original.
After reboot I checked and name resolving was working fine. Here is what nslookup showed
steve@lion ~ $ nslookup tardus.net
Server: 127.0.1.1
Address: 127.0.1.1#53
Non-authoritative answer:
Name: tardus.net
Address: 64.37.52.84
Here are the contents of the 2 resolv.conf files
steve@lion ~ $ cat /etc/resolvconf/resolv.conf
nameserver 10.1.1.1
steve@lion ~ $ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
From what I have gleaned it looks likes this is the way it wants to work:-
1. resolvconf re-writes /etc/resolv.conf to point to 127.0.1.1 as the DNS server for all lookups on this box.
2. it also creates a caching DNS process on 127.0.1.1
1240 ? S 0:00 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/var/run/NetworkManager/dnsmasq.pid --listen-address=127.0.1.1 --cache-size=0 --conf-file=/dev/null --proxy-dnssec --enable-dbus=org.freedesktop.NetworkManager.dnsmasq --conf-dir=/etc/NetworkManager/dns
3. this caching DNS server process should in turn use the DHCP supplied DNS address to do initial lookups, but fails to do so for a period of several minutes.
4. my fix forces the caching server to use my router as its source of lookups.
for a circle of diameter 952px, black on white,
convert -size 952x952 xc:white -fill white -stroke black -draw "circle 476,476,952,476" black-open-circle-2.png
(circle is specified by x,y of centre and a single point of the edge)
to add a dot for the centre,
mogrify -size 952x952 -fill black -stroke black -draw "circle 476,476,478,476" black-open-circle-2.png
(note: 3rd circle parameter is 2 more than the centre, so we get a dot of 4px.
also note that the mogrify command will give an error if the xc:white is left in. The convert command will give an error is it is left out!)
sed -e "s/\b\(.\)/\u\1/g"
make image RGB
use Colors > Map > Color Exchange
#!/bin/sh
# mkSermonPics.sh
# take an image less than 1024x1024 size, resize it, and extend its canvas
# to 1024x1024
INFILE=$1
NAME=`echo $INFILE | awk -F. ' {print $1}'`
TYPE=`echo $INFILE | awk -F. ' {print $2}'`
echo $NAME $TYPE
for PERCENT in 10 20 30 40 50 60 70 80 90
do
echo $PERCENT
convert $INFILE -resize "$PERCENT%" -gravity center \
-extent 1024x1024 $NAME-$PERCENT-1024.$TYPE
done
e.g.
$ convert -crop 800x1000 image.png cropped_%d.png
Just edit the domains that you want to block into /etc/hosts, using the localhost address 127.0.0.1. As Linux consults the hosts file before doing a DNS lookup (at least it does for Mint 18) the blocked domains can never be reached.
e.g.
# block youtube
127.0.0.1 youtube.com
127.0.0.1 www.youtube.com
127.0.0.1 m.youtube.com
Here is a shell script for bypassing the "blocked" entries. I made 2 copies of the hosts file and this script swaps between them. The hosts.unblock file has the blocked domains commented out.
#!/bin/sh
# block sites by manipulating the hosts file
# by setting the domain in question to 127.0.0.1
ARG=$1 # 0 = noblock 1 = block
if [ $ARG = 1 ]; then
sudo cp /etc/hosts.block /etc/hosts
else
sudo cp /etc/hosts.unblock /etc/hosts
fi
This is for Gmail via web browser on Linux.
Click the "expand all" icon at the top right of the conversation
Click "print" icon
A new tab opens in Firefox.
On the Firefox menu, File > Save Page As, and select as "text". save the file with ".txt" suffix
You now have an editable text file.
You can clean it up quickly using the following sed command in a terminal
$ sed -f strip-gmail.sed MYTEXTFILE
# here is my strip-gmail.sed file; alter to taste
/._,_._/d
/Reply via web post /d
/Start a New Topic/d
/Have you tried the highest rated email app?/d
/With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email/d
/app on the market. What are you waiting for? Now you can access all/d
/your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete/d
/an email again with 1000GB of free cloud storage./d
/Visit Your Group/d
/Yahoo! Groups/d
/Privacy/d
/stime=/d
/fpc.pl/d
/=img&am/d
/logo_groups/d
/_php/d
/Quoted text/d
/https/d
/.png/d
/mailto/d
Just type the size in manually!
Image > Canvas Size > enter the size > click on "all layers" under Resize Layers.
Using GIMP
1. make image mode RGB
2. Layers > Transparency > Add Alpha Channel
3. Colors > Levels and the eye-dropper to select "black" somewhere in the image line-work ( if needed, slide the rightmost (white) slider in "input" to the left until the contrast looks good)
4. Then use Layers > Color to Alpha to set transparency
This will make everything but the black line-work transparent.
--
Alt. Select by colour, then delete
all done!
sed 's/\([A-Z]\)/ \1/g'
Captures each capital letter and substitutes a leading space with the capture for the whole stream.
e.g.
$ echo "aCertainCamelCasedWord" | sed 's/\([A-Z]\)/ \1/g'
a Certain Camel Cased Word
(from https://stackoverflow.com/questions/614930/how-can-i-cut1-camel-case-words)
The running app. icons in the Mint Mate panel disappeared.
Right-clicking on the blank part of the panel and de-selecting "Expand" brought the icons back. Note: the shortcut icons for Firefox, terminal, etc. had never disappeared, on those for running apps.
Now the panel shrinks to fit (horizontally) and shows scraps of desktop at the ends. If I right click on the triple bar at either end, and then re-select Expand, I'm back where I started. Still something wrong here, but it is workable.
With Expand on, I used the right-click menu to Add to Panel, then selected "Window List". That fixed it.
Sun Jan 15 16:16:50 AEDT 2017
If Caja is using a case sensitive sort eg, A B C a b c, create a file .gnomerc in your home directory, containing
export LC_COLLATE=C
This will force case-insensitive sorting, ie, a B c D e F
:r !date
UPDATE: Sun Jan 15 16:26:44 AEDT 2017
WiCD still behaving flawlessly - I'll keep using WiCD.
UPDATE: Wed Jan 11 17:24:33 AEDT 2017
WiCD has performed without fault since installed 5 days ago.
UPDATE: Fri Jan 6 15:02:51 AEDT 2017
turning off power management within networkmanager did not work.
Next step: remove network manager and install WiCD instead
.................................................................
From google search, turning power management off for the adaptor seems to be the key.
sudo iwconfig wlan0 power off
Time will tell if this a) is a fix b) survives a reboot.
I added this to /etc/rc.local
No longer needed! #!/bin/sh # chkNetwork.sh # check if the network interface is up, and if not, start it. # on the x60s Thinkpad sometimes it does not start properly. echo ==== `date` ==== echo $0 "-------------------" STATUS=`netstat -rn` # now ping and get the % packet loss ONLINE=`ping -q -c 3 10.1.1.1 | awk ' /loss/ {print $6}'` echo "netstat -rn :" $STATUS echo "ping -q -c 3 :" $ONLINE if [ "$ONLINE" = "100%" ]; then echo "Network is off-line:" echo "Now restarting the network and running dhclient" service network-manager restart dhclient wlan0 else echo "Network is on-line:" fi # and set power management to off, to avoid sporadic Wifi shutdowns PMSTAT=`iwconfig wlan0| grep "Power Management" | awk -F: '{print $2}'` echo "Power management was "$PMSTAT #display current power management status iwconfig wlan0 power off # set it to off PMSTAT=`iwconfig wlan0| grep "Power Management" | awk -F: '{print $2}'` echo "Power management is "$PMSTAT #display current power management status
( from http://askubuntu.com/questions/73607/wireless-connection-keeps-dropping-with-an-intel-3945abg-card )
use tr
eg, cat file | tr -d '\r' > newfile
The Filters > Decor > Round Corners option does this, with a dropped shadow too.
If it is greyed out, try turning off the image's alpha channel; Layers > Transparency > Remove Alpha Channel
Original HP 61 (not XL) gave 177 pages and both cartridges ran out together.
Replacement 3rd party cartridges (61XL) off eBay installed OK 30 May 2016. Printer reported them as original HP that had been refilled.
eyeD3 is very good
Leaner than using Mate desktop.
sudo apt-get install xterm
edit ~/.vnc/xstartup to contain:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
#unset DBUS_SESSION_BUS_ADDRESS
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
/usr/bin/xterm -geometry 80x24+10+10 -ls -title "xterm" &
/usr/bin/xterm -geometry 80x24+200+200 -ls -T "xterm" &
twm &
If you use the default x-terminal-emulator you get no active prompt, hence cannot enter any commands. Ditto mate-terminal
xterm is fine. To copy and paste, select the text with the mouse, then press middle button (or left and right together) to paste.
To print an image that is say exactly 35x56mm, for model making etc, use GIMP.
Use the resize function, and with dimensions in mm. Then print from within GIMP using 100% scaling.
http://www.linuxquestions.org/questions/slackware-14/new-motherboard-eth0-gone-missing-4175524936/
Problem is that with a static IP for server puffer, while udev finds the new Ethernet hardware, and writes it in to /etc/udev/rules.d/70-persistent-net.rules, it does so as "eth1", which is not in the /etc/network/interfaces file.
The fix was to edit the 70...rules file, commenting out the old eth0 entry, and altering the "eth1" entry to "eth0". Then either restart using
> service network-manager restart
or
reboot.
1. Sketch with black fibre pen, complete, but no colours
2. scan into an image
3. convert -posterize 2 the image to make the black into uniform black
4. use GIMP to add the colour fills and any correction; brush or eraser
avconv -i VID_20160203_103749861.mp4 -s 480x270 -strict experimental Kylie.mp4
avconv -i Kylie.mp4 -vf "transpose=1" -strict -2 Kylie-demo-3Feb2016.mp4
avconv -i Kylie-demo-3Feb2016.mp4 -vcodec copy -af volume=volume=12dB Kylie2.mp4
put in ~/.profile
put these in ~/.bashrc
date -d @Epoch
>$ snmpwalk -c public -v 1 10.1.1.11|grep 33[0-9][0-9]
iso.3.6.1.2.1.43.10.2.1.4.0.1 = Counter32: 3318
confirmed against Print Status Report
use: wkhtmltopdf qanda.html qanda.pdf
very good results
Installed WiCD via eth0, configured wlan0 for home wifi and all fine, therefore
concluded that network-manager config was mangled.
Found wlan0 defined for tardus, and wifi0 defined for home wifi in
/etc/network/interfaces. Network-manager ignore interfaces defined here. Removed and ran sudo service network-manager restart
This fixed it. No idea how it got messed up. Did connect via phone on Canberra trip last week, so maybe this messed with it.
Removed WiCD after, as it autostarts and could interfere.
mkBanners.sh works.
Here is the actual convert command:-
convert -background white -fill black -font $FONT \
-size 640x480 \
-gravity Center caption:"$TEXT" $IMAGE
mogrify -trim +repage $IMAGE
So far the best way to print is to insert the images into an Impress file, resizing manually as needed.
imagemagick convert command
For simple concatenation in a single row or column, the append option of the convert tool is sufficient. Note that -append concatenates all images vertically, creating one column with n rows and +append concatenates horizontally, creating one row with n columns.
montage can also be used, eg,
montage orig-GodAndWarlords-[2-5].png -geometry +4+4 -tile 4x1 God-and-Warlords.png
The command above will string 4 images (GodAndWarlords-2.png to GodAnmdWarlords-5.png) resizing smaller ones to the size of the largest, with 4 pixel borders and in one row of 4 tiles.
convert -posterize 2 day4RepairWork-12-complete.jpg junk-2b.jpg
does a fair job.
sudo apt-get install cups-pdf
awk ' NR==1 {print $1, $2, NR;t=$1} NR>1 {if (($1-t)<590) print $1,$2, $1 - t,NR; t=$1} ' subFloorAH.hist
# above checks for the timestamp
awk ' { print strftime("%a %b %e %T %Z %Y",$1),$2,$3,$4,$5 }' subFloorAH24h.plot
paste file1 file2 | column -s $'\t' -t
edit /etc/default/grub to add "text" to the default line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash text"
then run, as root, update-grub
use pmount and pumount
sox, using trim or silence options
default is "Human", mostly mono; I prefer "tango" with its colours. Use Synaptic to install libre-office-tango, then restart Office.
pandoc works very well
Does a lot of other conversions too.
reset the background to another colour, then back to white. Seems to reset it.
awk ' BEGIN {srand(systime() + PROCINFO["pid"])};{item[NR]=$0}; END {x=int(rand()*(NR)+0.9999); printf("%-50s|%2d|%20s\n",item[x],x,FILENAME)} ' $LIST
Fix by redirecting the sh link in /bin
cpdf -scale-to-fit a4portrait -scale-to-fit-scale 0.8 ChurchContactListApril2015.pdf -o ChurchContactListApril2015-80.pdf
alt: convert -density 300 -trim test.pdf -quality 100 test.jpg
and put the images in a doc.
sudo service vsftpd restart
sudo service network-manager restart
cat dsl_down.conf | gnuplot
for example see the "PCs" folder
convert WEIGEL-VISION-OF-THE-FOUR-BEASTS-a.jpg WEIGEL-VISION-OF-THE-FOUR-BEASTS-b.jpg -append weigel.jpg
ffmpeg -i 20150312_171144.mp4 -vf "transpose=1" -strict -2 feedingChooks.mp4
For the transpose parameter you can pass:
0 = 90CounterCLockwise and Vertical Flip (default)
1 = 90Clockwise
2 = 90CounterClockwise
3 = 90Clockwise and Vertical Flip
./textcleaner -g -e stretch -g -e stretch -f 25 -o 10 -u -s 1 -T -p 10 Christmas-Angel-1.jpg Christmas-Angel-1-cleaned.jpg
where textcleaner is from Fred's (Imagemagick) Scripts
use the script shrinkMP3toFreq.sh
eg, shrinkMP3toFreq.sh 44.1 "LOTR*.mp3"
I turned of cartridge chip info in settings. Also had to get the chip of an old 3rd party cartridge and install to one of the older chipless ones. so far so good.
rename 's/This_or_\(that\)/The-other/' *.mp3
a2ps does not work (Dec. 2014); gives tiny print.
Instead use:-
enscript -2 -jr --header='$n %W Page $% of $=' index.txt
This gives crude borders, title, 2 pages per page in landscape, and is as good as a2ps used to be, though not quite as pretty.
Avidemux 2.5.4 has bug with GS24G MP4, cant find codec for audio, with Mint 17.1
Postby Statik on Fri Sep 19, 2014 7:04 pm
Alright, so I exported the package list on the old computer and diff'd it to the new computer and I discovered that avidemux-plugins-common and avidemux-plugins-gtk were both missing. I installed those and it works great!
Thanks!
Rod
Also need to set audio as pulse-audio, not the default. Edit > Prefs > Audio
Used PITIVI instead.
Start new project
add file to it
render it, using MP4 (720 x 576 reduced a 130MB 1m18s file to 20MB) and MP3.
MediaInfoGUI is good for information
As mp3gain is not readily available in Linux Mint now, and I cannot get normalize-audio to work, I've settled upon using sox. Needs sox MP3 library as well.
sudo apt-get install sox libsox-fmt-all
sox --norm infile outfile
Slow but it does work
convert rockwallPizza.jpg -crop 50x100% cliff.jpg
eg, convert stone-93466_640reversed.jpg stone-93466_640.jpg +append rockwall.jpg
mp3wrap 20140418-WhatIsDeathWhatItsCure_30m_00s__35m_15s_65h.mp3 temp1.mp3 temp2.mp3
1) enhance using Shotwell (may help)
2) mogrify daniel3-*.jpg -scale 50% +dither -posterize 2
1. use Adobe Reader and in Print, use a page size of A4-marginless.
2. use jpdftweak, and page size legal (gives more white space, but cannot
open password locked PDFs).
can cleanup in separate shell
tr -cd '\11\12\15\40-\176' < dirtyfile > cleanfile
eg, pdftk JohnsGospel4.pdf cat 1S 4S 2 3 output JohnsGospel4booklet.pdf makes a 4 page A6 folded booklet from a four page original.
simple scan reports "no scanners detected"
#!/bin/sh
cd ~/.mozilla/firefox
# find the mozilla profile folder
FOLDER=`awk -F= ' /Path/ {print $2}' profiles.ini`
echo $FOLDER
# clear the cache
cd $FOLDER
rm -rf Cache/*
rm -rf minidumps/*
rm -rf startupCache/*
rm -rf thumbnails/*
rm -rf ~/.local/share/Trash/*
[SOLVED] Ubuntu : Agent admitted failure to sign using the key." problem.
This are the steps to access other server with keys
At client
ssh-keygen -t rsa
scp .ssh/id_rsa.pub server:
(ftp is fine too)
At users home on server
mkdir .ssh
chmod 0700 .ssh
cp id_rsa.pub .ssh/authorized_keys
chmod 0600 .ssh/authorized_keys
or if the authorized_keys file already exists, just
cat id_rsa.pub >> authorized_keys
At client, now login to the server with password then logout and run :
ssh-add (though may not be necessay)
Can also F11, right click on eg "title" and change default
for fl in YOURMOVFILE.MOV
do
mencoder ${fl} -o ${fl/mov/avi} -oac mp3lame -ovc lavc
mplayer -ao pcm -vo null -vc dummy -dumpaudio -dumpfile ${fl/mov/mp3} ${fl/mov/avi}
#rm ${fl/mov/avi}
done
then use avidemux to expand 2:1 if nec, and convert to MP4, etc
20150828 - nogo use gwenview, landscape, 4x6 photo paper, auto scale and enlarge smaller
---
Shotwell viewer is good too - 20150828 - works fine, but needed to select Photo tray as source for each job. Landscape, source photo tray, image set to fill page, media size set to plain 4"x6" photo, quality to high res. photo.
NOTE: CHECK CARTRIDGES FIRST, RUN CLEAN PRINT HEAD
used DVD Movie Backup to create iso file
used K3B to burn to single sided DVD-R
Dec 2015 - DeVeDe app works well, to make iso and burn same
mencoder -of avi -oac pcm -srate 48000 -af resample=48000:0:2 -ovc lavc -lavcopts vcodec=mjpeg inputfile.mov -o outputfile.avi
mencoder input.avi -of mpeg -mpegopts format=mpeg1:tsaf:muxrate=2000 -o output.mpg -oac lavc -ovc lavc -lavcopts acodec=mp2:abitrate=224:vcodec=mpeg1video:vbitrate=1152:keyint=15:mbd=2:aspect=4/3
lame --resample 16 input.mp3 output.mp3
convert deltamodel2.jpg -resize '640x480>' junk2.jpg
mogrify -resize '640x480>' duckchaser1-*.jpg
apt-get install libk3b6-extracodecs
sox qaz.mp3 qaz.ogg
mp3splt -t 5.00 qaz.ogg
# killall esd first
Complete Example
This example explains how to use dir2slideshow, dvd-slideshow, and dvd-menu together to create a complete DVD.
* Using dir2slideshow
* Creating slideshow with dvd-slideshow
* Creating menu with dvd-menu
This example is designed to show how to make a simple dvd slideshow from start to finish. I'm assuming you have installed all the required packages first.
Let's assume we have a directory with a bunch of pictures that we want to use in a slideshow. The directory is called "my_pictures".
Use the dir2slideshow script to quickly generate an appropriate listing of the pictures in "my_pictures". We want each picture to be displayed for 5 seconds before going on to the next picture. The name of the slideshow will be "Complete example":
> dir2slideshow -n 'Complete example' -t 5 my_pictures
This will generate an output file "Complete_example.txt" that looks like this:
title:5:Complete example
fadeout:1
background:1
fadein:1
my_pictures/pano.jpg:5:
my_pictures/picture1.jpg:5:
my_pictures/picture2.jpg:5:
fadeout:1
background:1
This will be the input file to dvd-slideshow. If you want to do anything fancy, you could edit this text file by hand at this point. We won't bother since this is a simple example. We want to name the slideshow "test complete", and add some simple audio during the slideshow:
> dvd-slideshow -n 'test complete' -f Complete_example.txt -a 'strojovna_07-TEXEMPO-30s.ogg'
You'll see the program display the progress, and assuming there are no errors, it will finish by producing the following files in the current directory:
test_complete.xml
test_complete.vob
The mpeg file is the actual video file that you can check to make sure it looks ok. Use mplayer or your favorite video player:
> mplayer test_complete.vob
Make sure everything looks ok. At this point, you could repeat this process on a different directory to generate a new slideshow, where we'd get a new set of .xml and .vob files corresponding to that slideshow, but let's keep it simple for now with just one.
The .xml file is fairly simple. It contains the chapter information and the name of the mpeg file that you just created. It is used when making a dvd button menu with dvd-menu.
To create a dvd navigation menu, call dvd-menu with the dvd title "Complete Example DVD", creating two buttons labelled "My example" and "Slideshow 2" which both point to the same video, test_complete.vob:
> dvd-menu -t 'My example' -t 'Slideshow 2' -f test_complete.xml -f test_complete.xml -n 'Complete Example DVD'
This command will write the output (real dvd filesystem) in the directory "dvd_fs". After the dvd-menu script finishes, you can check out your final dvd with xine using the command:
> xine -g -u 0 dvd:"`pwd`/dvd_fs/"
or for those using Totem:
> totem dvd:"`pwd`/dvd_fs/"
Now you may want to have a backup copy of all the original pictures that went into your slideshow on the dvd. Before making the dvd-compatible UDF filesystem, you can copy other stuff into the top-level of your dvd:
> cp -a my_pictures dvd_fs
The -a option copies recursively and keeps the date the same. Note that you can use the "-c" option in dvd-slideshow to perform this same function! Now, in the dvd_fs directory, it looks like this:
> ls -F
AUDIO_TS/ my_pictures/ VIDEO_TS/
The AUDIO_TS/ and VIDEO_TS/ directories are required by the dvd video standard, and contain all of the menus and video that will be used when you put this dvd into your home dvd player. If you mount it on your computer, you'll see the filesystem above.
Now let's create a dvd-compatible UDF filesystem that we can burn to a real dvd:
> mkisofs -dvd-video -udf -o dvd.iso dvd_fs
This will create the iso image dvd.iso that you can burn to a real dvd with dvdrecord. You could have also used the "-iso" option in dvd-menu to automatically create the iso image at the end of the dvd-menu script. I'm assuming that you've already found out which device your dvd recorder is on with "dvdrecord –scanbus" or equivalent. Mine is device number 1, hence the dev=0,1,0.
> dvdrecord -v -eject -dao speed=4 dev=0,1,0 dvd.iso
When finished, try it out in your computer or home dvd player!
1. click on the volume control in the toolbar of Ubuntu
2. Sound Preferences
3. select line-in
4. un-mute
Save
Open Audacity
1. set input and output to ALSA:pulse
2. file new
3. record
host puffin with xset m 0 gives 55mm horizontal movement of optical mouse for full width traverse, = to 65:1 for 1800mm water depth in tank (at half screen for full height of tank).
Home... Help... Search... Computers...
This page tardus.net/bits.html Last updated: 31 Mar 2022
Contact me, "Tardus"
Copyright
powered by txt2tags