Thursday, December 28, 2017

Audio/Video Tools - ripping SACD, DVD-Audio and Blu-ray


So you're running Kodi and want to have all your SACD and DVD-Audio music online?

DVD Audio Extractor is the tool for the job, it'll pull the audio out of DVDA discs and save as MLP or convert to FLAC, it'll even pull tags for most discs.  Works with any DVD drive.  Use the GUI or there's a command line tool dvdae.



My LA Woman DVD-Audio


SACD is a harder one to deal with.  The discs won't read in regular DVD drives, so you need to either get the one special PS3 that will run Linux and read SACDs, or recent news says it can be done by connecting to a port on the newer Oppo players (model Oppo 105D is reported to work).  Otherwise, go fish on bittorrent for the ISOs.

Once you have the SACD ISO files, sacd_extract will turn them into .dsf files that Kodi will play.
Look about for sacd_extract-0.3.8-1.144.x86_64.rpm or source, I started off building from source but found a SUSE Linux RPM that works fine on Fedora.  Example command line:

sacd_extract -m -s -i BatOutOfHell.iso

And chmod a+x on the directory it creates, otherwise my Kodi players with NFS access can't play the files!  On some recent conversions to .dsf (the -s option) I've been getting a loud POP at the end of each song, so I switched to using the -p flag (Philips .dff format) instead of the -s and the problem has gone away.  I don't know if it's a problem with the disc, Kodi or sacd_extract but I've not had it happen before.

My Bat Out Of Hell SACD

Blu-Ray - to move your discs online the best tool I've used is makemkv, it'll open any type of DVD or Blu-Ray disc and extract the content unchanged to .mkv files.  That right, it doesn't "reencode" or compress anything.  If you want to compress or convert to another format, use a tool for that, Handbrake or just ffmpeg.  There's a lot of bugs and problems with Handbrake, I'd not use it for extracting.  Example command line:

ffmpeg -i mpeg2movie.mkv -c:v libx264 -crf 17 mpeg4movie.mkv





If you get an error like below, it means your blu-ray drive doesn't understand the new key/disc that just came out and has therefore bricked itself.  That's right, it won't even read the old discs it use to.
The only fix I know of it to upgrade to a newer release of makemkv, which somehow "unbricks" the blu-ray drive and your problem is solved.

"Tip for everyone, MakeMKV displays the AACS version of the disc before you open the disc. Don't try to open the disc if the disc is higher than the current version that is supported by MakeMKV, which is v63."

Can't read AACS VID from disc - most likely current AACS host certificate is revoked by your drive

See MKB for the story.


Saturday, September 23, 2017

Android best apps and tips


Android and Linux desktop integration




Want to get SMS message and be able to reply to them from your desktop?

How about drag and drop pictures from your phone to desktop with a USB cable?

Install kde-connect (yum install -y kde-connect) on your Linux desk/laptop!  And the KDE Connect app from Playstore. With this app it's easy to move files back and forth between your phone and desktop.

Or it should be, after upgrading to Fedora 29 kdeconnect stopped working.  It pairs fine, however I can't send files to my desktop anymore, after beating Google and all the settings to death I found the best advice was to use the "andftp" Android app with ssh, it works better than kdeconnect does for file sharing from your phone to your desktop.

Another way to do it is via USB cable and the simple-mtpfs Linux RPM.

Another way is Cloud sharing, get a free Gdrive account.

And of course, since we're talking Android here, you can always pop the SD card out of the phone and mount it your desktop/laptop.  I find this is the best way when you're transferring a lot of media files.


NFS on Android?  Forget it, unless you root the device.  However Kodi on Android can access your NFS server just fine.  And KDE Connect can send files back and forth, so that's what you have to live with.


gmail can't establish a reliable connection to the server - You may get this error if your device battery goes completely dead, like you left it in a drawer for several months without charging.  Then you find you can't login to Gmail or Playstore.  The fix that works for me is simply setting the date/time on the device to be current.  It's some kind of "out of range date" bug thing.

Battery

Gause meter

Monday, July 17, 2017

Remove or change a "." extension from files

There's quite a lot of convoluted advice out there on how to do this, cut the ".mp3" or other dot something extension from files, using tricky loops and funny shells.  For years I did convoluted things with sed and for loops, but recently I've switched to the simple and versatile /bin/rename command.

My example files:

locnar<117>% touch Snoop1.H264.mkv Snoop2.H264.mkv title00.mkv

locnar<118>% ls
Snoop1.H264.mkv  Snoop2.H264.mkv  title00.mkv

locnar<119>% rename ".mkv" "" *

locnar<120>% ls
Snoop1.H264  Snoop2.H264  title00

Done!



Thursday, March 16, 2017

Linux log




After fiddling about a bit this morning I was able to join a WebEx meeting
using Chrome. Type in the URL bar:

chrome://apps/

And click on the Cisco WebEx app.

If it's not there click on Web Store then select "App" on the left button
and search for "WebEx".  Install the app. (the APP, not the extension!!)

Another way I commonly use WebEx is from my Android phone and tablet.



https://www.theregister.co.uk/2017/03/21/dns_records_more_revealing_than_you_think_says_german_boffin/

uas_eh_abort_handler = many drive problems, issue went away when I swapped cables.

This happen with a brand new cable.  Over many years as a sys admin I've seen the bad SCSI (now USB) cable issue pop up again and again, with no rhyme or reason.  Known good cables fail out of the blue.  New out of the bag cables are bad.  Lesson learned, always have spare cables on hand, not just as many as you need, always buy extras, from different sources, and keep them handy.

openSUSE Tumbleweed RPMs install on Fedora 25, who knew!?!?!

There's lots of advice out there as to how to change your default boot kernel, and none of it works. At least not on Fedora 25.  What does work is install "grub-customizer" and use that to change the boot order.  No need to "update MBR", I didn't and the order stuck.

There is an issue with kernel 4.13.16-100, doesn't see my second monitor like 4.9.6-200 does.  So I'm just staying with 4.9.6-200 until I do the F25 to F27 upgrade, then I'll dig into the hows/whys if my second monitor isn't seen.

yum updateinfo list - very useful command, had not used before, try and see.

Today's PSA:

[568049.151349] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[568364.120021] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[568679.139156] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready

Unreadable time stamps on your dmesg (Captain's log) output?

This is what we call "Unix Stardates", or seconds since the kernel started. There's an easy solution,
use "dmesg -T" to produces a coherent time/date format:

[Fri Mar 23 14:33:20 2018] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[Fri Mar 23 14:38:35 2018] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[Fri Mar 23 14:43:50 2018] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready

Not to be confused with "Unix Time" (seconds since 1 January 1970), which is really a Doctor Who thing.

Mounting Nero! This maybe a disc image with .nrg or .cdi, the file comand shows:

locnar<80># file Image1.cdi
Image1.cdi: Nero CD image at 0x4B000 UDF filesystem data (version 1.5) '071215_0244'

Mount as shown below:

mount -o "loop,offset=307200" imagename.nrg /mount-point
mount -o "loop,offset=307200" Image1.cdi /mnt/sysimage







Tuesday, January 31, 2017

Fedora 21 to Fedora 25, 30, 31, 32, 33, 35 upgrade, the saga continues




Major changes happened with KDE between F21 and F22, and my .kde configs didn't work, so I stayed on F21 for a long time.  Also I was bit by the enforcement of UID must be greater than 1000 policy, if UID is under 1000 you can't login.  Took ages to figure out what was going on with this. /etc/sddm.conf has a bug.  It seems the format changed, and when you do an upgrade it saves your old sddm.conf and renames the newer version to sddm.conf.rpmnew.  How nice.  Except, the old sddm.conf file doesn't seem to work right with the new sddm.  Manually editing sddm.conf.rpmnew and adding the one whole option I wanted (allow UIDs under 1000 to login via the GUI) then mv sddm.conf.rpmnew to sddm.conf fixed the problem.  This is of course KDE 5 on Fedora 25.

Another KDE change that was a time waster to figure out, no longer can you just copy .kde to move your GUI setup to a new system, you need to copy .local and .config as well, exactly which files in those directories KDE uses I've yet to figure out.

Fedora 34! Major changes! Btrfs with compression is default. PipeWire replaces PulseAudio. Wayland replaces X11. "Things happen" with the NVIDIA driver.

DON'T Upgrade?!? But I have to!!!

ALL of this sound like a headache? Happy with the version you're on? But need that one thing that's only available in a later release? Don't upgrade (or at least delay it) by launching a new release as a VM!
youtube-dl comes to mind.....

Three easy commands for the upgrade:

dnf upgrade --refresh
dnf install dnf-plugin-system-upgrade
dnf system-upgrade download --refresh --releasever=35 --allowerasing -y
dnf system-upgrade reboot

(Below is only a problem if you try to skip ahead a few version, like F21 to F25)

And again, bit by the invalid keys issues!  Had to grab the keys and put them into /etc/pki/rpm-gpg/ by hand, then run the dnf system-upgrade again.  Also had to add the --allowerasing due to a problem with a couple of RPMs.

Get the F25 keys here, 4 in total, free, nonfree, primary, secondary:

https://rpmfusion.org/keys
https://getfedora.org/keys/

RPM-GPG-KEY-fedora-25-primary
RPM-GPG-KEY-fedora-25-secondary
RPM-GPG-KEY-rpmfusion-free-fedora-25-primary
RPM-GPG-KEY-rpmfusion-nonfree-fedora-25-primary

Add links and stir:

cd /etc/pki/rpm-gpg/
ln -s RPM-GPG-KEY-fedora-25-primary RPM-GPG-KEY-fedora-25
ln -s RPM-GPG-KEY-fedora-25-primary RPM-GPG-KEY-fedora-25-x86_64
ln -s RPM-GPG-KEY-rpmfusion-free-fedora-25-primary RPM-GPG-KEY-rpmfusion-free-fedora-25
ln -s RPM-GPG-KEY-rpmfusion-nonfree-fedora-25-primary RPM-GPG-KEY-rpmfusion-nonfree-fedora-25



Final step:
dnf system-upgrade reboot

And we're done!  Besides the key thing, Fedora Linux upgrades are pretty smooth, a few commands, one reboot and you're there, no need to wipe the disks, insert dvds, backup/restore, none of that stuff.  All data files, home dirs, network configs are preserved threw each version upgrade.  There's probably a GUI button to do as well.
Best to be on a wired connection though, as the upgrade pulls in about 3,000 packages, at least a GB of data.

Well, almost, have just done another F21 to F25 upgrade, I had to throw in a --exclude=packagename
to get by a problem.  That happens when you install weird repos with oddball packages like I do.

Now I'm up to F31, 5000+ packages to download!

My Acer Aspire i7-8700/ NVMe desktop took less than 10 minutes to upgrade from F30 to F31!

As of F37 you can still choose X11 or Wayland at login, at least with KDE. I've had strangeness running Kodi under Wayland. 


USB stick boot fun, issues, gotchas


If you need to instal a new system, always use a USB stick, not the SD slot, not a SD card in a reader.

Avoid the "liveusb-creator" GUI's and use the DD command. 

Step 1, down some Fedora release as a .iso.  Plug in your USB stick, use dmesg to see what drive letter the computer assigned to the USB stick.  Use DD to write the .iso to the stick, as root or sudo.

Keep in mind, if you pick the wrong drive letter you may wipe out your internal drive!!!  The below output tells us the Samsung USB stick got drive letter B, as in /dev/sdb.

oralab<19>% dmesg

[ 3609.068811] scsi host6: usb-storage 4-2:1.0
[ 3610.403164] scsi 6:0:0:0: Direct-Access     Samsung  Flash Drive FIT  1100 PQ: 0 ANSI: 6
[ 3610.404016] sd 6:0:0:0: Attached scsi generic sg1 type 0
[ 3610.405254] sd 6:0:0:0: [sdb] 250626566 512-byte logical blocks: (128 GB/120 GiB)
[ 3610.405373] sd 6:0:0:0: [sdb] Write Protect is off
[ 3610.405376] sd 6:0:0:0: [sdb] Mode Sense: 43 00 00 00
[ 3610.405503] sd 6:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 3610.405506] sd 6:0:0:0: [sdb] Optimal transfer size 0 bytes < PAGE_SIZE (4096 bytes)
[ 3610.407571]  sdb: sdb1 sdb2 sdb3
[ 3610.408389] sd 6:0:0:0: [sdb] Attached SCSI removable disk

Take a look at df -k, make doubly certain you understand what your live file systems are!

Next step:

oralab<33># dd if=Fedora-KDE-Live-x86_64-29-1.2.iso of=/dev/sdb bs=8M status=progress oflag=direct

This may take some time, like 5 minutes for a USB2 stick, and 1 minute for a USB3 stick, and look for the "SS" letters on the computer USB port, those are your USB3 ports. Btw I'm using tcsh shell.

dd: failed to open '/dev/sdb': No medium found
Note - there are differences between umount and eject that can bite you! umount from the command line, don't use the GUI!

locnar<38># dd if=Fedora-KDE-Live-x86_64-31-1.9.iso  of=/dev/sdb bs=8M status=progress oflag=direct
221+1 records in
221+1 records out
1854996480 bytes (1.9 GB, 1.7 GiB) copied, 22.5527 s, 82.3 MB/s


oralab<33># eject /dev/sdb

Next comes the fun part, Legacy vs UEFI boot.  You *may* need to get into the BIOS (hold down F12 or enter key or del while powering up) and change the boot options, possibly set USB device to boot first, maybe change the security tab UEFI options, it depends on the machine, how old it is, what BIOS rev it has.  Also turn on virtualization support when you're in the BIOS.

Put the USB stick in (hopefully) a USB3 port and power on. Fedora releases generally make you click on the Install Disk item and select the drive to use, and/or reclaim space. Very likely you'll need to DOUBLE CLICK the drive icon and get a highlight check on the drive. This drive selection step confuses a lot of users. 

Final step, reboot from the Fedora Live menu, DON'T just the turn the computer off and on again! 


Fedora 29 Linux on Acer Aspire TC-885-UR17 Desktop with NVME, hold down Delete key while booting, BIOS/peripheral setting and change the SSD/NVME to ahci, by default a lot of laptops now have them set in RAID which doesn't work right in Linux.

Just installed an Acer Aspire TC-1660-UA92, the only hard part was finding the ahci setting in the BIOS/boot menu.

terminate called after throwing an instance of 'libdnf::ModulePackageContainer::EnableMultipleStreamsException'
Cannot enable multiple streams for module

What this goop means is something to do with  "dnf module", this is the fix:

dnf module reset gimp
dnf module reset maven

The above was seen when going from F30 to F31.

  dnf system-upgrade download --refresh --releasever=35 --allowerasing -y --nogpgcheck --exclude=clang12-libs-12.0.1-3.fc35
 dnf system-upgrade download --refresh --releasever=36 --allowerasing -y --exclude="compat-ffmpeg4*"
yum erase libavutil56-1:4.4.4-1.fc37