Monday, February 20, 2017

openvpn p12 file creation

openssl pkcs12 -export -in client.crt -inkey client.key -out client.p12 -name MyClient

https://syedali.net/2014/02/17/using-chromebook-to-connect-to-an-openvpn-server/

http://www.frogiswrong.com/blog/articles/8/openvpn-on-openwrt-a-little-more-detail

Sunday, January 29, 2017

Create DVD from the command line

Convert the source to an NTSC compatible DVD video format
ffmpeg  -i saltbae.mp4  -target ntsc-dvd  -aspect 16:9  saltbae.mpg

Author the DVD compatible video into the DVD container format with chapters every 5 minutes
dvdauthor  -o DVD/ -t -c 0,5:00,10:00,15:00,20:00,25:00,30:00,35:00,40:00 saltbae.mpg

Create the table of contents files VIDEO_TS.IFO
dvdauthor -T -o DVD

Done

Saturday, January 28, 2017

How to set time restrictions in Windows 10 from the command line



net user /time:,

User1 allowed to use the computer weekdays from 1-11pm

net user user1 /time:M-F,1pm-11pm

User2 allowed to use the computer Saturday from 8am-4pm, and  weekdays from 9am-9pm

net user user2 /time:Sa,8am-4pm;M-F,9am-9pm

Reset to defaults
net user user1 /time:all  


Show stats net user user1

Sunday, December 11, 2016

How to change default background in Aeon Nox


On Android internal SD card, replace:

/data/org.xbmc.kodi/files/.kodi/addons/skin.aeon.nox.5/backgrounds/default_bg.jpg

with another JPG of 1920x1080

This will repace the default Gravity background with another JPG for all Kodi screens.

.kodi is a hidden directory
Copy can be done simply with MiExplorer or something similar.

Saturday, October 22, 2016

Youtube download of 4k UHD video

[funderwood@localhost ~]$ youtube-dl -F https://youtu.be/Zk9J5xnTVMA

This shows the available video formats and resolutions.  

[youtube] Zk9J5xnTVMA: Downloading webpage
[youtube] Zk9J5xnTVMA: Downloading video info webpage
[youtube] Zk9J5xnTVMA: Extracting video information
[youtube] Zk9J5xnTVMA: Downloading MPD manifest
[info] Available formats for Zk9J5xnTVMA:
format code  extension  resolution note
249          webm       audio only DASH audio   56k , opus @ 50k (48000Hz), 1.71MiB
250          webm       audio only DASH audio   78k , opus @ 70k (48000Hz), 2.32MiB
140          m4a        audio only DASH audio  128k , m4a_dash container, mp4a.40.2@128k (44100Hz), 4.21MiB
171          webm       audio only DASH audio  139k , vorbis@128k (44100Hz), 4.31MiB
251          webm       audio only DASH audio  145k , opus @160k (48000Hz), 4.51MiB
160          mp4        256x144    DASH video  112k , avc1.4d400c, 24fps, video only, 3.65MiB
278          webm       256x144    DASH video  123k , webm container, vp9, 24fps, video only, 3.31MiB
133          mp4        426x240    DASH video  250k , avc1.4d4015, 24fps, video only, 8.13MiB
242          webm       426x240    DASH video  295k , vp9, 24fps, video only, 7.69MiB
243          webm       640x360    DASH video  559k , vp9, 24fps, video only, 14.21MiB
134          mp4        640x360    DASH video  677k , avc1.4d401e, 24fps, video only, 19.14MiB
244          webm       854x480    DASH video 1017k , vp9, 24fps, video only, 26.14MiB
135          mp4        854x480    DASH video 1183k , avc1.4d401e, 24fps, video only, 36.11MiB
247          webm       1280x720   DASH video 2090k , vp9, 24fps, video only, 52.00MiB
136          mp4        1280x720   DASH video 2392k , avc1.4d401f, 24fps, video only, 69.38MiB
248          webm       1920x1080  DASH video 3405k , vp9, 24fps, video only, 91.30MiB
137          mp4        1920x1080  DASH video 4595k , avc1.640028, 24fps, video only, 125.58MiB
264          mp4        2560x1440  DASH video 10578k , avc1.640032, 24fps, video only, 270.37MiB
271          webm       2560x1440  DASH video 10767k , vp9, 24fps, video only, 279.32MiB
313          webm       3840x2160  DASH video 22275k , vp9, 24fps, video only, 588.32MiB
266          mp4        3840x2160  DASH video 23379k , avc1.640033, 24fps, video only, 587.81MiB
17           3gp        176x144    small , mp4v.20.3,  mp4a.40.2@ 24k
36           3gp        320x180    small , mp4v.20.3,  mp4a.40.2
18           mp4        640x360    medium , avc1.42001E,  mp4a.40.2@ 96k
43           webm       640x360    medium , vp8.0,  vorbis@128k
22           mp4        1280x720   hd720 , avc1.64001F,  mp4a.40.2@192k (best)


Pay attention to the format 266 which is 3840x2160  and the m4a audio container.  Use the folowing to download and join (otherwise video-only or audio-only will download).

[funderwood@localhost ~]$ youtube-dl -f 266+140  https://youtu.be/Zk9J5xnTVMA
[youtube] Zk9J5xnTVMA: Downloading webpage
[youtube] Zk9J5xnTVMA: Downloading video info webpage
[youtube] Zk9J5xnTVMA: Extracting video information
[youtube] Zk9J5xnTVMA: Downloading MPD manifest
[download] Destination: Road to Machu Picchu - Peru in 4K-Zk9J5xnTVMA.f266.mp4
[download] 100% of 587.81MiB in 01:50
[download] Destination: Road to Machu Picchu - Peru in 4K-Zk9J5xnTVMA.f140.m4a
[download] 100% of 4.21MiB in 00:00
[ffmpeg] Merging formats into "Road to Machu Picchu - Peru in 4K-Zk9J5xnTVMA.mp4"
Deleting original file Road to Machu Picchu - Peru in 4K-Zk9J5xnTVMA.f266.mp4 (pass -k to keep)
Deleting original file Road to Machu Picchu - Peru in 4K-Zk9J5xnTVMA.f140.m4a (pass -k to keep)
[funderwood@localhost ~]$ 

Sunday, August 7, 2016

Extract Audio from Youtube


youtube-dl --extract-audio --audio-format mp3




[user1@localhost ~]$ youtube-dl --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=nI3sH53SH2k 
[youtube] nI3sH53SH2k: Downloading webpage
[youtube] nI3sH53SH2k: Downloading video info webpage
[youtube] nI3sH53SH2k: Extracting video information
[youtube] nI3sH53SH2k: Downloading MPD manifest
[download] Destination: testfile-nI3sH53SH2k.webm
[download] 100% of 129.58MiB in 00:31
[ffmpeg] Destination: testfile-nI3sH53SH2k.mp3

Sunday, March 13, 2016

Youtube and Vimeo and Soundcloud

For Vimeo, use http://en.savefrom.net/

For Soundcloud use http://scdownloader.net/

For Youtube

youtube-dl -F will show the best video+audio stream quality that can be downloaded and merged.

youtube-dl -F "URL"

Example

[user1@fedora]$ youtube-dl -F https://www.youtube.com/watch?v=dKrVegVI0Us
[youtube] dKrVegVI0Us: Downloading webpage
[youtube] dKrVegVI0Us: Downloading video info webpage
[youtube] dKrVegVI0Us: Extracting video information
[youtube] dKrVegVI0Us: Downloading MPD manifest
[info] Available formats for dKrVegVI0Us:
format code  extension  resolution note
249          webm       audio only DASH audio   51k , opus @ 50k, 872.56KiB
250          webm       audio only DASH audio   69k , opus @ 70k, 1.11MiB
171          webm       audio only DASH audio  123k , vorbis@128k (44100Hz), 1.94MiB
140          m4a        audio only DASH audio  127k , m4a_dash container, mp4a.40.2@128k (44100Hz), 2.19MiB
251          webm       audio only DASH audio  135k , opus @160k, 2.18MiB
160          mp4        256x106    DASH video   82k , avc1.4d400b, 24fps, video only, 1.40MiB
278          webm       256x106    DASH video   93k , webm container, vp9, 24fps, video only, 1.24MiB
133          mp4        426x178    DASH video  194k , avc1.4d400d, 24fps, video only, 3.16MiB
242          webm       426x178    DASH video  199k , vp9, 24fps, video only, 2.46MiB
243          webm       640x266    DASH video  368k , vp9, 24fps, video only, 4.32MiB
134          mp4        640x266    DASH video  471k , avc1.4d4015, 24fps, video only, 5.14MiB
244          webm       854x354    DASH video  703k , vp9, 24fps, video only, 7.62MiB
135          mp4        854x354    DASH video  871k , avc1.4d401e, 24fps, video only, 10.04MiB
247          webm       1280x532   DASH video 1307k , vp9, 24fps, video only, 14.63MiB
136          mp4        1280x532   DASH video 1723k , avc1.4d401f, 24fps, video only, 19.00MiB
248          webm       1920x798   DASH video 2406k , vp9, 24fps, video only, 25.86MiB
137          mp4        1920x798   DASH video 3213k , avc1.640028, 24fps, video only, 33.84MiB
36           3gp        320x?      small , mp4v.20.3,  mp4a.40.2
17           3gp        176x144    small , mp4v.20.3,  mp4a.40.2@ 24k
5            flv        400x240    small , h263, mp3  @ 64k
18           mp4        640x360    medium , avc1.42001E,  mp4a.40.2@ 96k
43           webm       640x360    medium , vp8.0,  vorbis@128k
22           mp4        1280x720   hd720 , avc1.64001F,  mp4a.40.2@192k (best)
[user1@fedora]$ youtube-dl -f 137+140 https://www.youtube.com/watch?v=dKrVegVI0Us
[youtube] dKrVegVI0Us: Downloading webpage
[youtube] dKrVegVI0Us: Downloading video info webpage
[youtube] dKrVegVI0Us: Extracting video information
[youtube] dKrVegVI0Us: Downloading MPD manifest
[download] Destination: Marvel's Captain America - Civil War - Trailer 2-dKrVegVI0Us.f137.mp4
[download] 100% of 33.84MiB in 00:06
[download] Destination: Marvel's Captain America - Civil War - Trailer 2-dKrVegVI0Us.f140.m4a
[download] 100% of 2.19MiB in 00:00
[ffmpeg] Merging formats into "Marvel's Captain America - Civil War - Trailer 2-dKrVegVI0Us.mp4"
Deleting original file Marvel's Captain America - Civil War - Trailer 2-dKrVegVI0Us.f137.mp4 (pass -k to keep)
Deleting original file Marvel's Captain America - Civil War - Trailer 2-dKrVegVI0Us.f140.m4a (pass -k to keep)