Showing posts with label Toolbox. Show all posts
Showing posts with label Toolbox. Show all posts

Sunday, 11 February 2018

How to Download and Save Videos from a Website

I recently watched a free video embedded in a website and wanted to save the video itself for future reference (imagine the nerve!). The video content was delivered via the Brightcove player and was not a Flash/.swf file which I could otherwise deal with using traditional video download tools or shonky websites. The video was in fact, I believe, an HLS m3u8 video… admittedly, I don’t know if those are the same thing, or for that matter, what they are, and I don’t particularly care.

Rather than download a suspicious installer and infect my computer with the latest crypto virus, TubeOffline provided a handy and relatively simple tutorial using the ever trusty (and trustworthy) VLC media player. I’m reproducing the steps here in simple terms for future reference.

  1. Firstly, find the URL to the .m3u8 file you want to save. In Chrome, hit F12 and go to the Network tab. Check the Disable Cache button. Make sure the Record Network Log button is red and type “m3u8” (without quotes) in the Filter box. Load (or reload the page containing the video you’re after) and have a look at the network log. I grabbed the URL to the master.m3u8 file (right-click, Copy > Copy link address).
  2. From the Media menu in VLC, select Open Network Stream. It should open to the Network tab
  3. Copy the URL of the .m3u8 file to be downloaded and paste it in to the Network URL box. Don’t click the Play button!
  4. Click on the arrow next to the Play button and select Stream
  5. Click Next on the Source screen
  6. At the Destination screen, ensure the destination is set to File and click the Add button. Browse to the location where you want to save your downloaded video and specify a file name. The Save as type box will be left as Containers.
  7. On the Transcoding Options screen, leave Profile set to the default (Video – H.264 + MP3 (MP4). You can disable transcoding if you like but file sizes will likely be larger.
  8. On the Option Setup screen, leave the Stream all elementary streams checkbox un-ticked. Click the Stream button.
  9. VLC will begin saving the video to the selected file. Don’t try and play the video and don’t touch anything until the blue progress bar in VLC has reached the end (the far right side). You can sometimes monitor the file itself by hovering over in the file system to keep an eye on its size.

In practice, I noticed the blue progress bar reached the end and the file size was showing as 132MB. I thought it was all finished at that stage but opening the .mp4 file to review in a new VLC instance opened a whole lot of nothing with a duration zero seconds. After another minute or so, the file size bumped up to 133MB and opening the file again revealed the downloaded video complete with audio. I’ve found closing the original VLC instance seems to finalise the download/flush the last few bits to file (note: don’t just close the video or open another file—completely close VLC so it can flush its buffers and clean up). Your mileage may vary.

Sunday, 15 March 2015

Infix PDF Editor Pro Review

I may have finally found a fully-featured desktop PDF editor that won’t blow the budget (hence this review: Iceni Technology offer a free license for promoting the Infix product). I’m referring to Infix PDF Editor from Iceni Technology.

In the last few years I’ve committed to reducing the volume of physical paper in my house and to that end, I’m scanning existing documents to PDF. As my multifunction device only scans single-sided, I have a need to merge PDFs and reorder pages, at a minimum. On occasion I’ve also had a need to edit the PDF content—the text within the PDF.

To date, I’ve used a hybrid  solution for manipulating PDFs including the CutePDF Writer to print documents from other applications to PDF and the free, online CutePDF Editor for manipulating and combining PDFs. Although the Cute printer is great, the Editor product is painfully slow, especially when reordering pages and joining PDFs. Plus, I’m not terribly comfortable uploading sensitive (private) PDF documents to an unknown web server.

The obvious benchmark for PDF editing is Adobe’s Acrobat and I installed a trial version of the Acrobat XI product. It worked amazingly but the price tag is also amazing—over $400.

Finally, I’ve integrated third-party PDF solutions into my web applications in the past, notably WebSupergoo’s ABCpdf.NET product. I was literally just about to write my own PDF editor using their product when they pointed me to Infix.

I’ve previously searched high and low for free PDF editors (open source or otherwise) but found very few products that meet my primary requirements:

  • Desktop-based for performance and security reasons
  • The ability to merge PDF documents
  • The ability to reorder PDF documents (preferably graphically)
  • No watermark
  • No dodgy adware or crapware

Most of the merge and reordering features I require aren’t available in freebie products. The closest thing I’ve found previously was a product called PDFill, which works but is really only a basic Windows application with a fairly painful UI.

Enter Infix Pro (v6.36). The Professional pricing is $159, I see and the evaluation version will, unfortunately, watermark your files. For promoting the product, however, you’re eligible for a free license.

I’ll reserve final judgement about the watermark until I’ve received my free license but from the evaluation I can see all of the requirements I list above are met.

The application is an .exe install that installed no other programs as far as I can see. No browser extensions or toolbars, no random stuff. I wasn’t prompted to install anything else either. The download was not quite 60MB and the application itself is responsive and fairly intuitive. I’ve read other reviewer’s comments about the toolbars being of the older Windows style (not a ribbon) but the application still works fine and most functions are easy to find and use.

Merging two (or more) documents is easy and I was surprised that by default the program allows me select other file types (as in not PDFs). I tried to join a .tiff to a PDF but this failed, understandably, with an appropriate error message that I was trying to merge a file that isn’t a PDF. I have tried merging other file types.

Reordering is semi-graphical: you can’t drag and drop pages to reorder them but you make a current selection and then reorder through the Document > Pages > Re-order menu. There is no shortcut noted for this operation and right-clicking on the current page itself or the thumbnail offers no option to reorder the page. In short, reordering multiple pages might get a bit painful but at least it’s quicker than the slow, web-based CutePDF Editor I’m used to.

I’ll be giving this product a thorough workout once I can get rid of the watermark but so far it looks like a pretty good bet.

Monday, 18 November 2013

Convert old .mdi files

I finally decided to bite the bullet and have a go at converting all of my old .mdi files ("printed" when the Microsoft Office suite included the .mdi virtual printer, before it was deprecated). Microsoft kindly supplies a command line utility to help out called MDI to TIFF Converter, which--as the name suggests--converts .mdi files to .tif files.

The tool only has a command line interface but the arguments it accepts are simple. The tool will also recurse through a directory hierarchy.

I did have trouble with one document and the tool just bombed while running but it was simply enough to track down the offending file and start afresh after deleting it (deletion was appropriate in my case).

You can download MDI to TIFF Converter here: http://www.microsoft.com/en-au/download/details.aspx?id=30328

Thursday, 20 May 2010

Disable the Output Cache Programmatically with PowerShell

Restoring a content database from a production environment to a development machine for dev purposes can sometimes get a little bit interesting.

Our production environments generally have output caching enabled for performance reasons(see /_Layouts/sitecachesettings.aspx in your own environment) but developing or troubleshooting an issue in dev normally requires output caching be disabled to you can view the results of your work. Of course the output cache settings are stored within the site collection so using a production backup will normally bring the output cache setting along with everything else.

Of course you can manually disable output caching but that means remembering to do so. As our attach process is scripted in a batch file for repeatability and automation purposes, I recently added a step to disable the output cache programmatically. To do this, I wrote a little PowerShell script and call it from the batch file:

Param($Url)

write-host "User must be a site collection administrator or have full control within web application policy!"

[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”)
[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint.Publishing”)

$cacheSettings = new-object Microsoft.SharePoint.Publishing.SiteCacheSettingsWriter($Url);
$cacheSettings.EnableCache = $false;

$cacheSettings.Update();

The script takes a single named parameter (Url) which specifies the site collection URL. As you can see, I'm working with the SiteCacheSettingsWriter class to set the EnableCache property to false before sending through an Update() command; of course the same thing can easily be accomplished in C#.

I call the script like so from my batch script:

powershell "& ./DisableOutputCache.ps1 -Url http://dev-moss"

I've parameterised this script since I restore content databases from multiple sites and didn't want the URL hard-coded.

As per my note, the account used to execute this script must be a site collection owner or have rights configured the web application policy or you'll encounter an access denied error.

 

Friday, 6 February 2009

SQL Server Results to CSV

I'm sure all you DBA types out there have an elegant, simple mechanism for saving results to a .csv file but I'm not a DBA and get frustrated trying to find the best way to do this every time I'm faced with a "reporting" task. I normally run my query as text, save the results as a .csv and then File->Open in Excel before trying to tell Excel how the data is delimited. This works well in some cases but it's long winded and the bugly .csv wizard thing always seems to split on commas even when I tell it not to (that's .csv for you, I guess!).

Well, no more! I found a gem of a little tool today for doing exactly what I need and it's simple and doesn't get in the way. The UI even works the way I'd write a UI for this kind of tool!

http://codecorner.tigernews.co.uk/codecorner/SQL2000selecttocsvutility.html

There's no installer so run the .exe and from there in it's just like a normal Visual Studio database connection picker thing: specify the server name, the database name, supply your credentials. Once that's done, paste in a query, and specify the output file and you're done! It even converts bit fields to true/false strings!


Custom-Built Microsoft Office SharePoint Server 2007 Branded Sites and Webpart Development - info@mediawole.com