Re-encoding/transcoding video for space savings

There are lots of good reasons to run a media server at home to host your own content. There are also plenty of legitimate ways to get content, but also many that are less so. I think it is important to pay creators for their efforts, I also really like “owning” the media I enjoy and not paying repeatedly to re-watch things.

Sometimes you’ll end up with a version of the content (say captured OTA) that is both high quality, but huge. An hour long 1080p HDTV capture from my HD Homerun lands in around 7.7GB. A more efficient encoding can significantly drop that, of course these are lossy encodings meaning that the quality can be less. The trick is to figure out how to pick an encoding of the video that retains most of the quality, but is significantly smaller.

Different codecs have different approaches, all with trade-offs, but sometimes it’s really hard to see the differences. Many of the content creators are also faced with the same dilemma, they have high bit-rate master copies of the content and need to squeeze it down to fit on a DVD or Blu-ray.

Let’s dive into how we do this. For this example we’ll take a 45min TV show that starts at 1.9G. It is encoded in AVC1/H.264 at 6000 kb/s. The image quality is very good, but it’s also sort of big and maybe you don’t care that much about this particular TV series but you do want to retain a copy.

FFmpeg can fix this for us. We’ll be moving to H.265 as an encoding, burning a bunch of CPU cycles to get there, and ideally get a video that is substantially the same but uses less storage.

You can see we’ve told it to re-encode to the H.265 codec, but to simply copy the audio. The crf flag is important for maintaining quality, lower values will be more quality, higher less. If you don’t supply the flag, a default of 28 is used resulting in more space savings, but to my eyes a softness in the output.

That is a significant space savings, the new file is only 27% of the original – 3 times smaller! Sure, it’s small, but is it any good?

Let’s look at some stats. While we have maintained the 1920×1080 resolution, we’ve dropped the bitrate to 1510 kb/s. This explains a lot of the saving, we’ve reduce the number of bits used to create each frame of the image.

We will use ffmpeg to extract a few frames of the two videos for comparison. The use of the .png format will give us “lossless” images (but recall the video itself has been encoded in a lossy format).

Above are the the frames from 4:10, the first/top is from the original, and the second/bottom is from the smaller version. You can click through to view the original 1920×1080 image. Visually they seem identical.

Using the idiff tool we can create a difference image and get data about how different these two images are from each other.

Ok, so they are different but we knew that. What does the difference image look like?

Yup, just a big black box not a lot of obvious differences, this agrees with what we we can see ourselves. Let’s tweak the idiff command to highlight the differences by a scale of 20

Now we can see the small differences magnified, and it’s in areas you’d expect, around the edges of objects and in the small details.

Let’s look at another frame using the same approach.

Again, the original is the first, and the smaller is the second. Let’s do the diff, but only grab the scaled version.

Again, in the scaled version of the diff image we see that the fine details are were the very small differences are. Try opening the full images, one in each tab and toggling between them – can you see any changes? Yes, we know there are differences – the smaller file is 1/3 of the size – but is this enough to matter? Or even notice?

I’m going to continue to use MakeMKV to rip blu-rays of movies I consider ‘reference material’ – like Dune, because I want all the bits. However, if it’s just some TV show I captured OTA and I’m going to watch once, or at most a handful of times – I’ll take the space savings.

Epson 1080UB: Farewell

The Epson 1080UB was my first “digital” projector, having had two CRT projectors previously. When I bought the 1080UB it had only just been released, initially shown at the September 2007 CEDIA expo and then re-announced at CES 2008. Unlike my CRT projectors which were bought used, this was a brand new unit and I was an early adopter. Quebec Acoustic had a great price: $2895 + GST – $200 mail in rebate.

The unit arrived in early January 2008. While it did take me a day to go from unboxing to a temporary setup, I was still thrilled by the purchase. Today there are so many high definition options out there, and viewing has become split between personal devices (phones, laptops) and larger displays (TVs) that there are many good choices at lots of different price points. Way back in 2008, cost, resolution, colour accuracy, fan noise, and ease of use were all dimensions you were trading off.

In the early days of owning the 1080UB I ran through a bunch of tweaks. First up was colour measurement, then colour calibration, and while there wasn’t any convergence I could change, I did go deep into deciding if mine was good enough or not. I also built a DIY ceiling mount and was able to take advantage of the long throw distance this projector supported – placing it above my 2nd row of seating and adding to the theater experience.

After many years of enjoyment, I replaced the OEM lamp with a generic one. I have no regrets doing this, as it got me a few more years enjoyment. I didn’t keep close track, but I believe that rarely pre-lamp swap the projector would turn off the lamp and run the fans in high mode. One consideration with these projectors is keeping them cool, and this means you have fans and airflow. You also want to avoid any dust getting inside the light path, but the light path is also what gets hot.

The manual covers air filter cleaning (or replacement). It seems Epson has long discontinued the replacement part – which is unfortunate. I did from time to time remove the filter and clean it (using a vacuum). Doing so did seem to help any shut-down (heat related?) problems, at least in the early days.

When it had problems, it was a simple enough matter to turn the projector off using the power switch on the back, wait 30 seconds and power it back on. We’d then resume watching for an hour or more afterwards. Again, cleaning the filter seemed to help reduce occurrences. I wonder if the filter just needs a deeper cleaning or replacement. The other high possibilities are a fan problem, or a temperature sensor.

Over time, the shut-downs became more frequent and the upgrade urge started to itch. Earlier this year I made the leap to a new (well, refurbished) upgrade and bought the Epson Pro Cinema 4050. Our theater is our primary viewing setup, so while I love to tinker with things – keeping the system easy to use and trouble free is important.

It was time to find this projector a new home. While it was having problems, it still has some good life in it and someone willing to tinker with it may get a lot of enjoyment from it. Off to Kijiji I went.

The used market for projectors is pretty weak, as I mentioned there are many great choices out there for new things – also many people don’t really care about quality and as long as it’s bright and big that’s good enough. I priced it 100x cheaper than it was new, it still took a week before someone was brave enough to take a risk on it.

The person who took it off my hands seemed like the right match. Someone wanting to try out big screen projection and doing so on a budget. I do hope this works well for them. When I set it up to check the bulb usage (1024hr) and reset it from ceiling mount to table mount, it powered up just fine – ran for a while without issues – and gave me a great image.

Epson Refurbished Projectors

I made the switch from CRT projection technology to a modern digital projector back in 2008 when I bought the Epson 1080UB. At the time, there was a lot of criticism of the new-ish digital projectors and their black levels, but the ease of use, reduced maintenance and price were attractive. I’ll likely write up an exit review of the 1080UB, but it lasted a long time and was a great projector until recently.

Near the end of May this year one of my friends had some projector woes and was looking for a replacement. There are a lot of choices out there and he first picked the Hisense PL2, but upon getting it and trying it out – it didn’t meet his needs. He then considered the Epson 3200 or the Epson 3800, the choice between these seems difficult and the street price was close. While he was mulling this decision over, I spotted an Epson 4010 as a refurb on amazon for only $1600 – and he jumped at this deal. He reported that the refurb arrived in perfect shape and that it was an amazing upgrade.

At the time I wasn’t looking to change things up, but the Epson 4010 ticked a lot of boxes for my next projector list. It wasn’t the UB range, and it still used a traditional lamp – but this refurb was great value for money.

A few week later I saw the Epson 5050UB as a refurb deal for under $3000, certainly tempting but while my 1080UB was giving me some trouble it was still kicking along. This 5050UB deal soon disappeared like any good deal, and that door closed.

Maybe a week after that, I start of have more frequent (daily) issues with the 1080UB and from a WAF it was time to get a new one. I started my hunt. A dream projector would be the Epson LS11000 which with the right deals lands in around $5000. At this price I start looking at the high end JVC and Sony offerings too. As mentioned a good deal on a current model UB projector would be nice too.

One constraint I need to work within, is where my projector is mounted. It’s on the ceiling, about 16′ from the screen – which is a 92″ diagonal (80″x45″). One day I may bump the screen size up a little, but size limitations are things like: room size, speaker placement, and brightness levels (larger screen, less intensity). In any case, this long throw was designed around the 1080UB which has a 2.1x zoom allowing for this placement. Great options like the Epson 3800 only have 1.62x zoom, forcing a much closer mounting to the screen.

Around this time I discover the official Epson refurb store – at the time it listed both the 4010 and 4050 at under $2k. The Epson 4010 is considered the consumer version, and the 4050 a custom installer version. The 4010 is white and you might see it for sale in the local big box store, The 4050 is black and comes with a few extras – but you’ll likely only get it via a boutique AV store that does whole theater builds outs, oh and it also has a 3yr warranty vs a 2yr warranty.  Other than these minor differences, the projectors are twins – totally identical performance.

While the 4050 was $130.01 more expensive than the 4010, I couldn’t resist the black exterior – and the idea that this would make my theater seem more like a custom install. It’s hard to figure out the actual street price for the 4050 as the Epson site just points you at places that will sell it to you (again, custom installers). You can find a price for the 4010 which is $3299.00, and if we assume the 4050 is a bit higher, the refurbished price is a nice discount.

I will share that I did find some debate over the quality and overall experience of ordering via the Epson refurb store. The website does list a return policy, but it is unclear if that is exchange only for refurbished units.

Still, given my requirements and the discounted price, this still seemed like a good choice. Fingers crossed I waited for the new to me projector to ship.

A day later, my credit card company flagged the attempt to charge my card from Epson as suspicious. Fair. However, very frustrating because while I did indicate to the credit card company I was good with the purchase, apparently the only thing to do is ask the merchant to try again? When I called Epson later (and it was quick to get to a live person) they seemed to not have any problem at their end with my payment, but they also had no idea about the decline. I was forced to just patiently wait to see if this all worked out.

It did. I got a shipping notice from Epson and a Purolator tracking number, checking my credit card online showed that I had been charged. Overall from when I made the web order to it arriving on my doorstep was 8 days, not bad.

It arrived in a large box, clearly marked as a renewed product.

While I knew the dimensions (19 cm x 52 cm x 45 cm), seeing the unit in person was a little surprising. That large box was mostly taken up by a large projector. It was well packed and protected.

I will post up more details on my new projector in a later post, but the unit that arrived was pristine. Not a mark. There are a few stickers added to the projector to indicate it’s renewed status but this is very much a new in box feeling. Unlike a full retail price version of the 4050, there was no extra lamp nor mount included (no surprise here). The remote was included (with batteries), a power cord, and a few cable locking clips. At this point, the extra $130 got me a black exterior and an extra year of warranty. Worth it? Absolutely.