Saturday, December 2, 2017

Java Webstart

Launching Java webstart apps on linux OS

In my tests today, these will fail to launch as per the original specs that once existed and per my past experiences with Webstart Deployed apps. Instead what is happening is that the file is being downloaded instead of being launched.

Provided you already have a JDK installed, the trick is this....

  • Just download the JNLP (Java Network Launch Protocol) file to somewhere
  • Then locate the file and right click it then choose.... Open With
    • locate javaws. Find this in the bin folder of your JDK (java development kit)
  • Whoalla!

Wednesday, November 22, 2017

Recording PC screen on linux PC

SimpleScreenRecorder does the job nicely. Do a search and you'll find it! :)

Hands-free mobile phone use while driving

After finally getting around to putting the effort into a hands free kit for mobile use in the car, these are my findings and works pretty well!

Hardware

Phone device:

Samsung s7 edge

Bluetooth device:

I do not have a stereo system or head unit in my daily-driver that is Bluetooth capable. In fact it is the original stereo from Japan which only has a frequency rage of...  todo. 
Rather than install a stereo system capable of bluetooth, what I did was purchased a roidmi device. See url: https://xiaomi-mi.com/fm-transmitters/
This device transmits audio via a set FM channel of your choosing to your existing car stereo.
You wont need this if your stereo is already Bluetooth capable (which many are)


Wednesday, November 1, 2017

Find your linux version information


Recently I had to install virtualbox but feedback coming back at me from the install process was telling me that not all dependencies were being satisfied and therefore the installation was being aborted.

Looking at the download page for virtualbox it provided information on the ubuntu code names such as...

  • Trusty
  • Precise
  • Wheezy
  • etc etc...

Turns out I needed the download for xenial



Feed this into a terminal and see version info

cat /etc/*release

Wednesday, August 23, 2017

Auto-mounting external USB drive onto a linux OS

Yes, by default this will typically happen anyway.

However...

If like me and you have an app that starts up at boot time and needs access to a particular USB drive.... we find that in some cases the drive may not be accessible right at the moment our app needs it and so it fails to run as expected!

The fix???

Assuming you have the drive mounted at this moment, get a terminal and punch in..
$ cat /proc/mounts

Look through all the muck and find the drive of interest. For me it's...

/dev/sdb1 /media/mugwhy/blueDrive ext4 rw,nosuid,nodev,relatime,data=ordered 0 0

Yours will be different of course!!!

Take a copy of that to your clipboard!

Now launch your GUI Disk tool. Choose your drive from the list in the left. Now nosy around and look for the mount options. Make sure Automatic Mount is Off! Click OK and close the tool!

Now, in your terminal punch in...

$ sudo gedit /etc/fstab


You'll get a file loaded into a text editor.

At the end of the file add a comment such as...

# blah blah so I wont forget what the following is for...

then paste in the line from your clipboard!

Save the file and  re-boot!!

You-re done!!!

The drive should now get mounted at boot and before apps try to access it....

Note:
A small clue to let you know it's probably working.... Your computer may take a little longer to boot since it's now looking to boot from the USB drive (if it's bootable), then if not, boot will continue on as normal!  :)

Good luck!






Saturday, March 4, 2017

Playing video in a Visual Studio Solution/Project using the FFmpegInterop




The following relates to my experiencing of tireless trial and error of finally getting the FFmpegInterop building and running as described here...

https://github.com/Microsoft/FFmpegInterop in Visual Studio 2017

I'm running Windows 10.
My tests were performed with VisualStudio 2015 and 2017 community editions



I like to think of the process like this...

  1. Get a copy of FFmpegInterop
  2. Getting a compatible build of ffmpeg
  3. Combine the two into one folder structure
  4. Load up the FFmpegInterop Solution/Project in VS 2015 edition. Build and run
  5. Copy the FFmpegInterop folder from Visual Studio 2015 projects folder and place into the VS 2017 projects folder
  6. Load build and run





FFmpegInterop
16 March 2017:
Head over to...
https://github.com/Microsoft/FFmpegInterop

Have a read. Check this is actually something you want.

Grab a copy of the project file.
I recommend putting it in a safe place such as your personal archives for future use. Put it somewhere where you will not mess with it's data. 
Somewhere for safe keeping!

Now grab a copy of the above file and  place it on your desktop.
Extract the file.
Inside the extracted folder is another folder of the same name. 
I recommend taking a copy of this internal folder (of the same name) and putting it in a safe place such as your personal archives for future use. Somewhere for safe keeping.



Compatible build of FFmpeg

16 March 2017
As per the prerequisites as noted on the FFmpegInterop download page, we will need a compatible build of FFmpeg for this to work.

So using git, grab yourself a copy of the latest ffmpeg source code using git...



git clone git://source.ffmpeg.org/ffmpeg.git
You will end up with a folder called ffmpeg

As always, I recommend putting a copy of this away in a safe place so you can replicate your success with good data in the future.

Now head to...
https://trac.ffmpeg.org/wiki/CompilationGuide/WinRT

and simply follow the instructions.
There's a lot there. Follow the instructions very carefully. Take your time!

During my time attempting this, there were a couple of things that tripped me up.


Trip-up 1...

You will need Visual Studio 2015 with Cross Tool launchers in your Windows start menu.
I had an install of Visual Studio 2015 that did not provide the launching of (in my case....  
VS2015 x86 x64 Cross Tools Command Prompt
from the Windows Start menu

So this was a little hit-and-miss for a while but I finally found an install that gave me...
VS2015 x86 x64 Cross Tools Command Prompt
See the picture below. Hunt around for the download that provides the many  Cross Tools in your Start menu.



My download file was called...
vs_community_ENU.exe
I'm sorry but I can't recall where I got this download from.


Trip-up 2
My Windows 10 username comprises of both my First and Last name and I had my ffmpeg source folder hanging from that. Example...

C:\Users\MyFirstName MyLastName\Documents\here

So you can see here that the path has white space in it. A successful build and compile etc will fail if you build in such a path.

----------------------

Sort out Trip-up 1 above
Regarding Trip-up 2, Just make a folder directly on your root c drive. Ive called mine...
C:\here
Grab your copy of ffmpeg and place it in the above folder. So now you'll have...
C:\here\ffmpeg

Now that the above is sorted, continue on with the instructions here...
https://trac.ffmpeg.org/wiki/CompilationGuide/WinRT
and remember to take your time.

Once you have successfully built a compatible ffmpeg folder, put it away safe (since that was a lot of work)

------------------------------------

Get your copy of FFmpegInterop folder from your archives and place it in your VS 2015 projects folder

In the above folder should be an ffmpeg folder which should be empty.

What you want to do now is replace the ffmpeg folder with your newly built ffmpeg folder.

You can now Launch VS 2015 and load up the appropriate Windows10 or Windows8.1 solution. Set the startup project to...
MediaPlayerCS 
for c#

And build/run
It's very possible that VS will present prompts stating you need to update/convert this that and the other. just go with the flow here and accept the defaults.

Once you get success with 2015, Copy the  FFmpegInterop project folder from VS 2015 to VS 2017

Reload with VS 2017 and test

Good luck!




Findings....
Out of the box solution plays various media types straight off the hard drive no problem.
Also plays RTSP streams no problem.
Cant seem to play my IP camera http streams. With some tweaking I'm hoping to overcome this!
















Kotlin (Programming language)

Todo