Monday, December 21, 2015

720p movie with black bars

Check the aspect ratio

1.78:1 - fill the entire screen
1.85:1 - small black bars at the top and bottom of the screen
2.35:1, 2.39:1, or  2.40:1 - black bars on the top and bottom of the image (common for cinematic movies) 

Examples:
MOVIE
Starting playback...
Movie-Aspect is 2.39:1 - prescaling to correct movie aspect.
VO: [xv] 1280x536 => 1280x536 Planar YV12 

TV SHOW
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 1280x720 => 1280x720 Planar YV12 

Sunday, December 6, 2015

Install ttf fonts in Fedora

Exit the app that you want to use the font in (Libreoffice, Gimp, etc)
Copy TTF file(s) into /usr/share/fonts directory (as root - but they need to be world readable).

As root run

fc-cache -v

Then open LibreOffice/Gimp and you'll see the font in the list.

Saturday, November 21, 2015

Download youtube audio

dnf install youtube-dl

youtube-dl --extract-audio --audio-format mp3 --audio-quality 0  


Sunday, November 15, 2015

Fedora 23 rpmfusion gpg check

Navigate to rpmfusion gpg listing

http://rpmfusion.org/keys?action=AttachFile&do=view&target=RPM-GPG-KEY-rpmfusion-free-fedora-23

Download the appropriate gpg files (Fedora 23 in this example)


rpm --import RPM-GPG-KEY-rpmfusion-free-fedora-23

rpm --import RPM-GPG-KEY-rpmfusion-nonfree-fedora-23


or use dnf install "whatever" --nogpgcheck   <--- bad="" div="">

Add the date to Gnome 3 menubar (gnome-tweak-tool or dconf-editor)

New Way

Install gnome-tweak-tool

dnf install gnome-tweak-tool

In the Top Bar section, enable show date, show seconds. Restart gnome (logout, login).


Old Way

Install dconf-editor
In Fedora 23 its using DNF,

dnf install dconf-editor

navigate to org.gnome.desktop.interface

Enable:

clock-show-date
clock-show-seconds
clock-format




Thursday, February 5, 2015

Convert from flac to mp3 with ffmpeg

for FILE in *.flac;
do
    ffmpeg -i "$FILE" -ab 320k -map_metadata 0 "${FILE%.*}.mp3";
done

Fix for lftp - Fatal error: Certificate verification: Not trusted

lftp

[dwills@fedora ~]$ lftp -u ftpuser1 192.168.0.19
Password:
lftp ftpuser1@192.168.0.19:~> ls -l
ls: ls -l: Fatal error: Certificate verification: Not trusted


edit /etc/lftp.conf

append the following



set ssl:verify-certificate no


Friday, January 30, 2015

Bash padding with zeroes

example, 5 digit padding (printf formatting)

for i in $(seq -f "%05g" 1 100)
do
  echo $i
done


MadCatz Madcatz FightStick TE in Fedora

[root@fedora-m91p ~]# dmesg |tail
[282938.508349] input: MadCatz Madcatz FightStick TE as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/0003:0738:8838.0004/input/input15
[282938.508593] hid-generic 0003:0738:8838.0004: input,hidraw3: USB HID v1.10 Gamepad [MadCatz Madcatz FightStick TE] on usb-0000:00:1d.0-1.3/input0
[283624.503845] usb 2-1.3: USB disconnect, device number 4
[283650.985736] usb 2-1.3: new full-speed USB device number 5 using ehci-pci
[283651.072699] usb 2-1.3: New USB device found, idVendor=0738, idProduct=8838
[283651.072704] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[283651.072706] usb 2-1.3: Product: Madcatz FightStick TE
[283651.072709] usb 2-1.3: Manufacturer: MadCatz
[283651.075144] input: MadCatz Madcatz FightStick TE as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/0003:0738:8838.0005/input/input16
[283651.075449] hid-generic 0003:0738:8838.0005: input,hidraw3: USB HID v1.10 Gamepad [MadCatz Madcatz FightStick TE] on usb-0000:00:1d.0-1.3/input0

[root@fedora ~]# yum install joystick-support kernel-modules-extra
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * fedora: mirror.metrocast.net
 * rpmfusion-free: mirror.nexcess.net
 * rpmfusion-free-updates: mirror.nexcess.net
 * rpmfusion-nonfree: mirror.nexcess.net
 * rpmfusion-nonfree-updates: mirror.nexcess.net
 * updates: less.cogeco.net
Resolving Dependencies
--> Running transaction check
---> Package joystick-support.noarch 0:1.0.0-13.fc21 will be installed
--> Processing Dependency: kmod(joydev.ko) for package: joystick-support-1.0.0-13.fc21.noarch
--> Processing Dependency: kmod(analog.ko) for package: joystick-support-1.0.0-13.fc21.noarch
--> Running transaction check
---> Package kernel-modules-extra.x86_64 0:3.18.3-201.fc21 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
 Package                                Arch                     Version                            Repository                 Size
====================================================================================================================================
Installing:
 joystick-support                       noarch                   1.0.0-13.fc21                      fedora                    5.4 k
Installing for dependencies:
 kernel-modules-extra                   x86_64                   3.18.3-201.fc21                    updates                   2.2 M

Transaction Summary
====================================================================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 2.2 M
Installed size: 2.1 M
Is this ok [y/d/N]: y
Downloading packages:
(1/2): joystick-support-1.0.0-13.fc21.noarch.rpm                                                             | 5.4 kB  00:00:00     
(2/2): kernel-modules-extra-3.18.3-201.fc21.x86_64.rpm                                                       | 2.2 MB  00:00:00     
------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                               3.2 MB/s | 2.2 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction (shutdown inhibited)
  Installing : kernel-modules-extra-3.18.3-201.fc21.x86_64                                                                      1/2 
  Installing : joystick-support-1.0.0-13.fc21.noarch                                                                            2/2 
  Verifying  : joystick-support-1.0.0-13.fc21.noarch                                                                            1/2 
  Verifying  : kernel-modules-extra-3.18.3-201.fc21.x86_64                                                                      2/2 

Installed:
  joystick-support.noarch 0:1.0.0-13.fc21                                                                                           

Dependency Installed:
  kernel-modules-extra.x86_64 0:3.18.3-201.fc21                                                                                     

Complete!



[root@fedora ~]# ls -l /dev/input/
total 0
drwxr-xr-x  2 root root     160 Jan 30 16:55 by-id
drwxr-xr-x  2 root root     160 Jan 30 16:55 No package kernel-modules-extras available.by-path
crw-rw----  1 root input 13, 64 Jan 27 10:07 event0
crw-rw----  1 root input 13, 65 Jan 27 10:07 event1
crw-rw----  1 root input 13, 74 Jan 27 10:07 event10
crw-rw----  1 root input 13, 75 Jan 27 10:07 event11
crw-rw----+ 1 root input 13, 76 Jan 30 16:55 event12
crw-rw----  1 root input 13, 66 Jan 27 10:07 event2
crw-rw----  1 root input 13, 67 Jan 27 10:07 event3
crw-rw----  1 root input 13, 68 Jan 27 10:07 event4
crw-rw----  1 root input 13, 69 Jan 27 10:07 event5
crw-rw----  1 root input 13, 70 Jan 27 10:07 event6
crw-rw----  1 root input 13, 71 Jan 27 10:07 event7
crw-rw----  1 root input 13, 72 Jan 27 10:07 event8
crw-rw----  1 root input 13, 73 Jan 27 10:07 event9
crw-rw-r--+ 1 root input 13,  0 Jan 30 16:55 js0
crw-rw----  1 root input 13, 63 Jan 27 10:07 mice
crw-rw----  1 root input 13, 32 Jan 27 10:07 mouse0

This installs the kernel module, and you'll then see the /dev/input/js0 for the MadKatz joystick in Fedora