wot:help with usb paths please

ushere wrote on 6/20/2014, 9:18 PM
ok, this in connection with my last post here:

http://www.sonycreativesoftware.com/forums/ShowMessage.asp?MessageID=898777&Replies=11

but to summarize:

i have vlc portable on a usb, and also a folder called 'video' containing a single m4v file. (the video is in it's own folder in case people want to download it to their pc)

i also created a shortcut in the root of the usb pointing to a playlist of the single video so that when clicked, it automatically plays the video.

this works well on the computer it was created on, but not, of course, when used on another where the drive letter for the usb might have changed.

a. is it possible to automatically load the video, (with a command line) so skipping the playlist shortcut. ie. create a shortcut directly to vlc to play video? and if so, what's the syntax required?

b. i have searched the net to find a SIMPLE method of making the usb paths relative so it will work in any pc. i'm very confused. could someone help me out or point me to a idiot proof tut ;-)

as ever, thanks

Comments

musicvid10 wrote on 6/20/2014, 10:28 PM
Can you point the shortcut to a relative, rather than absolute path?
I don't know the answer.
videoITguy wrote on 6/20/2014, 10:38 PM
Your quest kind of begs what is the front-end of your install solution. In the old CDROM media heyday of multi-media front-ends we started by using simple MS_DOS batch file run commands, then graduated to more elegant solution of special compiled executables to be the front-ends.

What should be your front-end? An MS_DOS command, or some execution by a windows .ini text file under autoplay control of the resident OS ? or?
Steve Mann wrote on 6/20/2014, 11:25 PM
Autoplay won't work from a USB.
TheHappyFriar wrote on 6/21/2014, 11:03 AM
Only way to do relative paths is a bat/cmd file (does win7/8 support cmd files?).

Besides that, I haven't found a way to keep the new drive letter the same on every machine so I just changed it when I plug it in a new machine.
ushere wrote on 6/21/2014, 6:20 PM
just a follow up in case anyone is interested:

@echo off
Start ..\VLCPortable\VLCPortable.exe ..\..\video\nst.m4v

and / or

start "" %~dp0/VLCPortable/VLCPortable.exe %~dp0/video/nst.m4v

both .bat(s) work perfectly.... i also converted them to .exe for icon change and to stop any confusion with users.
musicvid10 wrote on 6/21/2014, 6:32 PM
So can you upload a working folder somewhere for us to play with?
Kit wrote on 6/21/2014, 6:57 PM
Have you thought of using AutoHotKey? I use it to automate all kinds of tasks. Also if you ahve just one video why not just put it on the root of the USB drive. I must be missing something.
videoITguy wrote on 6/21/2014, 9:27 PM
AutoHot key is a good scripting program for developing front-ends - see my post earlier in this thread. Note that in the documentation you are warned about the deployment to various iterations of Windows OS -
AS ALWAYS with programming languages - you have got to test and debug in every which way possible for a large problem free distribution.
ushere wrote on 6/22/2014, 2:13 AM
@kit - putting a video on a usb is a no brainer, and that's how nearly every video i've done for the past few years has been distributed.

what was different in this case was the need for chapters in the file. of course it could have gone out as a dvd with menus, but since the project was hd why waste that resolution, and especially so considering there was a lot of text in the program.

packaging vlc portable and having it sort of auto run on the usb (you still have to click a 'play' icon solved all the problems at once. the client is very happy.

@ musicvid10 - i'd like to, but the video alone is 2.5gb. also it wont work from a hard drive, the whole thing is specifically designed to work off a usb (hence all my kerfuffle over 'paths', etc.,)

if you're interested, what is on the usb is:

a. a folder containing the vlc portable program - 'VLCPortable'

b. a folder contain the video - 'video' (this simply so any user can easily access and download the video - minus chapters - to their hd. if they have either vlc or mpc on their pc the chapters will still show).

c. in the root is the .bat file:

@echo off
Start ..\VLCPortable\VLCPortable.exe ..\..\video\nst.m4v

i later converted the .bat to an .exe (using Bat_To_Exe_Converter.exe) which not only minimises any confusion re the uninitiated regarding both the .bat file and it's icon, it also allowed me to use the clients logo for the icon and "Play Video" as it's name.

i then hid everything but the exe and the video folder. as the usb was formatted ntfs i then changed security settings to read only. this prevents the drive being erased accidentally. of course it's just a matter of reformatting to get it back to original state.

hope that helps?
TheHappyFriar wrote on 6/22/2014, 8:36 PM
What if you use a webpage on the usb drive & the video is run that way? HTML supports relative paths and is there a browser that doesn't play a video by default any more?
ushere wrote on 6/23/2014, 3:43 AM
@ thf - that was my initial thought, but it's back to getting chapters to display, or at least be easily accessible.

most browsers (running under windows) will default to wmp, a useless player at the best of times, and if you're dealing with a non tech audience it can easily backfire on the client.

i just discovered you can easily do chapters in vimeo, though not elegantly, as you can in youtube (even less elegantly, verging on the atrocious).

but then again, back to square 1, download and the chapters are gone...