Showing posts with label Aide Memoir. Show all posts
Showing posts with label Aide Memoir. Show all posts

Wednesday, 27 September 2017

Combining separate MP4 files into one

Another useful thing I found out that I needed to know that I didn't know that I needed to know (if you still follow!)

Combining two .mp4 files into a single .mp4 file.

So, say you have a NAS and a collection of DVDs and a 'Smart TV'. You decide to "rip" your DVD collection to your NAS so that you can view them on your Smart TV as it is a DLNA device. All good. But what happens when you find out (I mean, remember) that you have a "flipper" - you know a DVD that you have to turn over halfway through playback?

So you know you have to rip it as two separate files, but now it is a stream you don't want the inconvenience of watching the first half of the film only to have to find the second half in your library and start watching that one. No. What you want to do is combine them into a single file.

I have been ripping my collection into MP4 format, but I have read in the original article that this technique will work for any format that VLC Player supports. So, there's the first thing - you need VLC Player.

Here's a link to the original article, but if like me you're a reasonably technically savvy, then here's the boiled down version.

  1. Ensure both clips are in the same format, and the format is one that VLC Player supports
  2. Open a command prompt
  3. Enter the following command with suitable replacements:
  4. [Location of vlc.exe] [first_clip.ext] [second_clip.ext] --sout "#gather:std{access=file,dst=[new_name.ext]}" --sout-keep

    ** Remember that if your paths include long filenames (i.e. spaces), use quotes.

    Here's  a working example of the above command:
    "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" C:\Ripped\Goodfellas-p1.mp4 C:\Ripped\Goodfellas-p2.mp4 --sout "#gather:std {access=file,dst=C:\Ripped\Goodfellas.mp4}" --sout-keep

  5. VLC Launches and starts processing the files. Wait until it is done (the progress bar finishes, er, progressing across the second file), then start monitoring the output folder. It seems to take quite some time until the finished output file grows from 0bytes with no visual output from VLC that it is doing anything! Don't worry - just wait, and press F5 on that Windows Explorer ...
  6. When it is all done, close VLC and the command window

Saturday, 25 February 2017

'Fixing' a corrupt User Profile

Here's another one for memory banks... Fixing a corrupt profile in Windows Vista, 7 or 10. Sadly this happens far too often and I am often called upon to help people back on their computer or laptop AND to help retrieve their data that's seemingly 'locked in' to the corrupt profile.

This article is really useful and the basis of this post. Just remember - the only way to "fix" this isn't really to fix it but to create a new profile on the errant computer, copy the data files from the corrupt profile to the new one, and then hide the corrupt profile from the login. It is a bit crap, well a LOT crap actually IMO, but I have never had success by trying to restore the system or registry.

So, suck it up, and go right ahead and create that new profile.

In order to do this you're going to need to be able to log on to the computer as an Administrator of some kind. But the Admin account that came with that lovely branded laptop is hidden, right?! Yeah, it usually is.
 
Boot into safe mode, click Start, type 'cmd', then right-click Command Prompt and select 'Run as Administrator'. In the command prompt type:
Net user administrator /active:yes
Hit Enter and you should see a message that says, "The command completed successfully". 

Exit the command prompt and re-boot. When the login screen appears you should see the newly un-hidden Administrator account. Log in as Administrator - there shouldn't be a password (hint: you may want to set one at some point, but for goodness sake DO NOT FORGET IT!)

After you've logged in you can go right ahead and create the new account (Control Panel, User Account and Family Safety, User Accounts, Manage another account, Create another account). Remember that this new user account needs to have a different username to the username on the corrupt profile (seems obvious, but there are some dumb people out there). Make the new account an Administrator.

Log off and then log on as the new user (or switch account if you prefer) to create the new user's folders on the local drive, then log off and log on as the Administrator again (or switch...)

Now you can go ahead and copy the data from the corrupt profile to the new profile. Copy the data files from the corrupt profile (C:\Users\CorruptProfileUserName) to the new profile. Don't forget to enable 'Show hidden files, folders and drives' in Windows Explorer first though else you won't get far. Remember: DO NOT COPY Ntuser.dat, Ntuser.dat.log, Ntuser.ini from the corrupt profile or you'll be back where you started.

There you go. You can log off and then log on as the new user and set-up your desktop and so on just how you like it. Don't forget some housekeeping though ...

Hide the Administrator account with
Net user administrator /active:no
on the command line, and delete or disable the corrupt profile (after you're sure you have everything you need from it!!)


Tuesday, 22 September 2015

Mutual Authentication (2-way SSL)

I had to look into this today for a project I am working on. I found this blog which I think explains the concept very nicely.

One Way and Two Way SSL and TLS

Monday, 16 December 2013

Clearing Windows Media Player cache

During an MP3 re-tagging session I was becoming frustrated that WMP wasn't refreshing and showing the tag changes I had made to the files on my NAS. The NAS is a uPnP server for media around the home and WMP is just one of the clients that render from it.

Restarting WMP didn't help, nor did re-starting the machine, so after a bit of Googling I found this post that help me crack it. Essentially you have to delete the WMP databases (local cache) which forces WMP to reload from the uPnP server.

NB: I had to stop the Windows Media Player Network Sharing Service for this to work (it has a read lock on one file)

Link Here

A copy of the text is reproduced here in case it goes missing ...

Hi,
Method 1: To resolve this problem, clear the Windows Media Player database. To do this, follow these steps:
a. Exit Windows Media Player.
b. Click Start, click Run, type %LOCALAPPDATA%\Microsoft\Media Player, and then click OK.
c. Select all the files in the folder, and then click Delete on the File menu.
Note You do not have to delete the folders that are in this folder.
d. Restart Windows Media Player.
Note Windows Media Player automatically rebuilds the database.


Method 2: If this does not resolve the problem, clear the Windows Media Player database cache files. To do this, follow these steps:
a. Exit Windows Media Player.
b. Click Start, click Run, type %LOCALAPPDATA%\Microsoft, and then click OK.
c. Select the Media Player folder, and then click Delete on the File menu.
d. Restart Windows Media Player.

Note :Windows Media Player automatically rebuilds the database.

Thursday, 4 July 2013

Upgrading / uninstalling SQL 2008r2

This has happened to me before - sometimes when you want to un-install SQL 2008 (including r2) to clean-up before upgrading or re-installing you get an error message saying something like

Warning 26003. Microsoft SQL Server 2008 R2 Setup
Support Files cannot be uninstalled because the
following products are installed:
SQL Server 2008 R2 Common Files
Microsoft SQL Server 2008 R2 RsFx Driver



 
But these items do not appear in the Control Panel | Add/Remove programs applet. So how do you uninstall them?
 
Here's how:
http://myitforum.com/cs2/blogs/jnelson/archive/2011/08/30/159139.aspx

Friday, 14 June 2013

Difficult printers in Windows 7

Ok, so here's another reminder for myself.
From time to time I come across systems that have printers "ghosted" in Devices and Printers. You right-click on them, select "remove" and they're gone .... only they're not! Next reboot, there they are again! Varmits!

It seems that Windows wont remove them if there are documents spooled and un-printed (doesn't matter how old) or sometimes if there are ports that have been created and associated with a printer that are still present.

These instructions help you to remove these pesky items!

  1. Right-click on the desktop, and create a new shortcut with a target of 'cmd.exe'
  2. Right-click on the shortcut and select "Run as Administrator"
  3. Run the printui tool with: printui /s /t2
  4. Try deleting the printers. If that doesn't work...
  5. Click Start > Run > Services.msc
  6. Locate the Print Spooler service and stop it (Right-click > Properties > stop service)
  7. Open My Computer and browse to C:\Windows\System32\spool\Printers
  8. (you will need to say "Continue" or "OK" to get access to this folder)
  9. DELETE the contents of that folder
  10. Restart the Print Spooler service
  11. Go back into the printui utility (might need to restart it using same method as above) and try removing the printers again. This time it should work. If necessary, check the "Ports" tab and remove any TCP/IP ports that are associated with the old printer
  12. Finally, check any other computers on the network to see if any have mapped to the printer. Remove any mappings

Tuesday, 4 June 2013

Calling a SPROC through ODBC with a DSN

This has caused me an issue today. I was creating an ODBC command object (correctly) with a connecting string (also correct) and calling a SPROC that needed two parameters. Again, I had added the parameters in the normal way (used MANY times before) but I kept getting an error "the query xxx requires parameter @yyyy which was not supplied". Turns out you have to re-structure the code as per the article below.


CSS 3.0 validation in Visual Studio 2010

It annoys me that CSS 3.0 validation is not included in VS 2010. At work we make heavy use of Virtual Machine for development environments and with each product release a new VPC Development Environment is created, and some time after that I will need to work on an ASP.NET project. I'll load up the project and get confronted with the usual VSS errors complaining that the Style Sheets contain validation errors because VS is validating against CSS 2.1.

The link below is where to download the installation files for the CSS 3.0 validation tool. Follow the simple installation and there you go!

http://visualstudiogallery.msdn.microsoft.com/a15c3ce9-f58f-42b7-8668-53f6cdc2cd83


Tuesday, 28 May 2013

Compacting a VHD

This is something I refer to from time to time - I'm posting here so I can find the link again more quickly in the future...

http://helpdeskgeek.com/how-to/compact-virtual-pc-disk/

Wednesday, 24 April 2013

Mike's Knowledgebase

I found this post REALLY helpful and worth a couple of hours working through the tutorials. It takes you through the process of setting up a WCF web service with a JSON payload to perform CRUD operations against SQL Server, and ultimately consume the service(s) in iOS.

http://mikesknowledgebase.com/pages/Services/WebServices.htm

Overriding base form control events

This is something that's bugged me for a while, and each time I do this I hit the same problem before the "Oh Yeah!" moment occurs and I remember what I need to do. This is clearly just a problem in my head; something that isn't intuitive for me in someway.

Inherited forms in a WinForms application : overriding the base form's control events so that the base form's event code is not executed, just the code in the derived form.

It's really very simple and I don't know why I struggle with this every time, but I do. So this Blog entry is an Aide Memoire for me.

1. On the base form, select the control in the form designer and make sure the Modifier is set to Protected
2. On the base form, in the code window, mark the event handler as protected void ...

protected virtual void button1_Click( object sender, EventArgs e)
{

    MessageBox
.Show( "Hello" );
}


3. On the derived form, open the designer and double-click the button to add the button1_Click event code
4. Change the new event to protected override void ...

protected override void button1_Click( object sender, EventArgs e)
{

    MessageBox
.Show( "overridden" );
}


5. In the derived form's designer code, you can see that the derived form has subscribed to the Click event again. This means that the code in the derived form's _click event will get run twice - once when the base form click event calls it, and once when the derived form calls it. The fix is to remove the this.button1.Click += new System.EventHandler(this.button1_Click); line
6. If you need to run the code in the base class, you can do this:

    base .button1_Click(sender, e);