Author Archives: markp

Capture MiniDV Tapes for Editing and

I’ve got over 30 MiniDV tapes with home video on and occasionally I’m inspired to capture some to the PC, where I can edit with Davinci Resolve. One challenge is that most PCs don’t have ieee1364 ‘FireWire’ conections these days. The other issue is that software that used to do such jobs is now 20 years old.

Workflow

  1. Install old PCI based firewire card in linux PC
  2. Connect DV Camcorder
  3. Install the amazing dvgrab program – which not only grabs the video in raw .dv or .mov format but can control the camcorder as well
  4. dvgrab -showstatus -format qt -size 0
  5. the above creates an .dv file in a .mov container, which Davinci can use. the size option creates a limitless file. 1 hour is about 11Gb.
  6. Use this ffmpeg command to change the .dv container to a .mov for use in video editing software. Note that the video is formatted like this:

Stream #0:0: Video: dvvideo, yuv420p, 720×576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s

5. ffmpeg -i dvgrab-002.dv -map 0 -c copy test.mov

6. Better: grab the dv tape straight to .mov. -rewind rewinds the tape before capturing ­čÖé

dvgrab -showstatus -format qt -size 0 -rewind

6. Convert .mov to .mp4 with ffmpeg:

ffmpeg -i my-video.mov -deinterlace -vcodec h264 -acodec mp2 my-video.mp4

7. Batch convert a whole folder and create the new .mp4 with the same name as the original .mov -deinterlace is needed

for i in *.mov; do ffmpeg -i “$i” -deinterlace -vcodec h264 -acodec mp2 “${i%.mov}.mp4”; done

Backing Up using cron and rsync

To run the backup script manually at anytime:

sudo ./rsync-shell.sh

in the folder below

The rsync script for this is in /home/markp/Documents/scripts: rsync-shell.sh
it creates a log file in /home/markp/Documents/backups
it backs up to an external e-sata hdd mounted at /external in fstab
it needs to be copied to /root so that it can run as a sudo cron jon
ensure chmod 744 so file is executable

in root, crontab -l lists all cron jobs; if no crontab exists yet create one with:

sudo crontab -e 

then add:
0 2 * * * /root/rsync-shell.sh

the five cron parameters above are:
minute (of the hour)
hour (of the day)
day (of the month)
month
day (of the week)
* = any value. So, the above job runs every day at 2.00 (am).

Issues: need to find a way of flagging when the cronjob doesn’t run, although the log reveals that. 2. need to find a way of bringing the PC out of suspend, now that I’m trying to be more power saving.

For 2. see here: https://www.dedoimedo.com/computers/wake-cron.html

drive full or boot hangs at /dev/sb2/ files clean

This is usually caused by the external usb drive not being available for an overnight backup (why is another issue). The system drive’s mount point for the USB: /external then get’s filled up with what should have gone to the USB. Diagnose using df from a TTY prompt at the hung screen.

/dev/sdb2 will show 100% full and 0 space available on it

IMPORTANT don’t run the commands below with the USB drive connected, if it has re-mounted the backup will be deleted. For safety boot into temp system from a pendrive

You can access a tty shell by pressing CTRL+AL+F1 if the gui login keeps coming back, or if the login doesn’t get to that stage.

then: sudo rm -rf /external/home will delete the appropriate subfolders on the system mount point. check df again.

CTRL+AL+F7 should get you back to the gui loging screen

IF you have trouble with the deleted files being moved to trash and still not releasing drive space, also:

sudo rm -rf /external/home/.Trash-1000

releases the space

Remedial work: find a way of not making this happen then the USB drive ‘dissapears’?

TT Turbo Rebuild

All based on a 1.8t AMK engine, K04 turboTurbo to manifold bolts (the 3[strikethrough] star[/strikethrough] Ribe head ones)
30Nm.

Downpipe to turbo (the 3 nuts that go onto the studs)
40Nm.

Banjo bolts for oil feed pipe
Turbo CHRA
Oil line securing bolt 10Nm.
Hollow bolt into CHRA 30Nm.
Oil filter housing
Oil line securing bolt23Nm.
Hollow bolt into oil housing 30Nm.

Water lines
Turbo CHRA to engine block
Hollow bolt CHRA 30Nm.
Waterline securing bolt 10Nm.
Hollow bolt engine block 35Nm.
Turbo CHRA to cooling circuit
Hollow bolt CHRA 35Nm.
Waterline securing bolt20Nm.

Oil return line
Bolts to sump 10Nm.
Bolts to CHRA 10Nm.

Turbo to engine block holding mount
Turbo 30Nm.
Block 20Nm.

Pendulum support (‘dogbone’ – under the engine) geabox to subframe mount
Bolts A (2 x the same) pendelum support to subframe – 20Nm (15lb ft) plus 1/4 turn (90 degrees)

bolts B (2 off) pendulum support to transmission – 40Nm (30lb ft) plus 1/4 turn(90degrees)

Be careful, I stripped the first bolt B trying for the 90degrees

tty console for serial control

need to remind myself about this for resetting battery state monitors on APC SmartUPS’s. This is using the (cheap) blue USB to serial, lsusb shows them as ‘Prolific Technology’

sudo apt-get install minicom

Check if the USB to serial adapter seen:

$ dmesg | grep tty
[1016778.750081] usb 1-3: pl2303 converter now attached to ttyUSB0

So start minicom accordingly:

sudo minicom –device /dev/ttyUSB0

https://www.cyberciti.biz/tips/connect-soekris-single-board-computer-using-minicom.html

https://www.stevenjordan.net/2016/05/fix-early-ups-shutdowns.html

MailMerge using LibreOffice for Church Mailing in 2021

Export from the gsheet (prime up to date source) into an odt spreadsheet. Use the mailmerge template letters (in each church pastoral folder). Filter using the ‘mailing ok’ ticklist field, including unticking those from the same household, for which the ‘MailMerge-Sal’ field is inserted in between ‘Forename’ and ‘Surname’ to concatenate ‘him & her’ type naming. Use same on salutation line of letter. ‘Address2’ field line, often blank, can be suppressed with a ‘Hidden Paragraph’ formula field: Condition = ![Docname.Sheetname.Columnname]. Likewise a ‘Hidden text’ formula field can be used to suppress other blank entries, eg lack of ‘Prefix’, lack of ‘MailMerge-Sal’ field. Naming these conditions is simplified by not having ANY spaces in the name of either the doc, the sheet(tab) or the column! Use the ‘View–>’Field Names’ menu option to highlight the full field name when creating the suppressed field; this view also allows the hidden paragraph/text field to be seen. Fiddly, but it does work reliably (I think) and once set up in a doc shouldn’t need redoing.

For reasons I haven’t figured re-opening a document all setup with these mailmerge fields results in the mailmerge buttons greyed out? I’ve been working around this by using ‘Tools –> MailMerge Wizard’ and clicking defaults until ‘Finish’ shows, this makes the mailmerge toolbar buttons ungreyed (?). Click ‘Edit Individual Documents’ button to create a page-per-address single document.

To filter which addresses are approved for a mailing use the ‘OK (e)mail’ ticklist field. Using this to filter it’s possible to also exclude the duplicate address people, who’s names are inserted in both the address & greeting fields, with appropriate editing of the ‘MailMerge-Sal’ column. Note that when updating the data source .odt (eg after making amendments) turning on the ticklist filter does NOT stop unticked lines being exported into a new .odt. Because of this, simply copy/paste from the gsheet and overwrite the previous .odt data. Don’t amend or change the name of the .odt either, as otherwise all the mailmerge field names need dragging in again.

If you find crazy page numbers or loads of blanks in the merged output it’s because lower down rows in the sheet are not totally empty. Delete all rows below the last entry to resolve this (it’s taken me years to notice/figure this!).