Category Archives: Canadian, eh!

Articles written in English (at least attempted to be, I’m not very good at it)

Haddock in the oven

Lay two pieces of haddock in a greased pan. Salt and pepper on top. Melt butter and mix with lemon juice and fine chopped garlic. Spread the mix on the haddock pieces. Add chopped parsley and paprika. Bake for 20 minutes on 180 degrees Celsius.

Very tasty!

Trouble with Tria … playing with ffmpeg

We had an interesting problem this week. In one of our TV studios we have Ross Video’s Tria video server for playing clips and recording newscasts. Instructor who teaches TV production noticed that right audio channel was missing from exported mxf files when playing in VLC and editing in the Adobe Premiere Pro. My colleague contacted Ross Video, they were great, sent us a new updated firmware and we applied it. Exported the mxf file again and tested in VLC and our troubles of sidetracking began.

File that instructor was using is a static video of about 40 seconds in length. In the first 20 sec Jimi Hendrix is playing on the left channel, then in the last 20 sec Stevie Ray Vaughan is playing on the right.

Jimi on the left channel
Stevie on the right channel

When we first tested the exported mxf file in VLC, before the firmware upgrade, we could hear Jimi on the left only, but no Stevie on the right – silence. After the upgrade we could hear Jimi on both L and R, but again no Stevie at all! Ross Video was saying that files that we sent them (original jimi_left_stevie_right.clip and exported jimi_left_stevie_right.mxf) were OK. When we reimported mxf file into the Tria again, it was indeed OK playing from Tria. But it still wasn’t playing correctly in the VLC.

Problem was also seen before the firmware upgrade when the exported file from Tria was imported into the Adobe Premier Pro. Only left channel was there. After the Tria’s firmware upgrade, file was good in the Premiere Pro. So, instructor was happy, problem solved for him. But it still bothered me that VLC was doing it wrong.

In the mxf file that Tria exported VLC was seeing channel 1 (our left channel, Jimi) and channel 2 (our right channel, Stevie) as a separate mono audio streams. VLC can play only one track (stream) at a time, and by the default it’s Stream 1 – unless you start it from the command line as vlc --sout-all --sout #display , in which case you get both Jimi and Stevie on both L and R.

File originally exported from Tria

After some reading on FFMPEG and looking what others tried to do, found a post that was trying to solve similar problem. Below is my adaptation for our problem.

ffmpeg -i jimi_left_stevie_right.mxf \
-filter_complex "[a:0][a:1]amerge=inputs=2[ch1ch2]" \
-map 'v:0' \
-map '[ch1ch2]' \
-c:v copy \
-c:a pcm_s16le \
jimi_left_stevie_right_reordered.mxf

What’s happening here – video is being copied as-is, without transcoding. Two mono audio streams a:0 and a:1 are being merged as stereo and mapped into one stereo audio stream and re-encoded as pcm_s16le.

When processed like that, VLC plays it correctly and here’s what it sees.

File processed with ffmpeg

Notice that Stream 1 now has “Channels: Stereo”, while the original file exported from Tria had Streams 1 and 2 with “Channels: Mono” on both streams.

FFMPEG is a powerful tool with lots of options and I need to do a lots of reading to begin understanding most of them … I’ve got a work to do 🙂

Later … when imported in the Premiere Pro, both files look identical – Jimi on the left, Stevie on the right. Oh well … 🎸🤷‍♂️ … at least I learned how to manipulate audio tracks using ffmpeg.

Migration of WP to new Bitnami instance on AWS Lightsail

My original WordPress instance on AWS was showing me that its using an old version of PHP that wasn’t supported anymore. I was reluctant to move to a new WordPress instance, thinking it’s going to be sooo complicated, and how I’m going to handle the IP address change, and do I need to do HTTPS certificates all over again, …

It turned out it’s sooo simple! I’ve read these two posts several times: Update PHP Version On Bitnami WordPress On AWS Lightsail and Updating PHP on an AWS Lightsail WordPress Stack. They helped me a lot to understand the process. I didn’t follow them to the letter, my case was a bit simpler than theirs.

First thing on the list was to update the WordPress to the latest version and then back up the WordPress installation. That involves installing the All-In-One WP Migration plugin and exporting data to a safe temporary storage (eg. local hard drive).

Next step is to create a new Bitnami WordPress instance. Wait several minutes for it to be completed. If you try to get into the instance with the SSH console it will give you an error if it’s not done yet. Attach a static IP to it, then you can add your domain to that static IP. I’m using AWS name servers, that’s why it turns out to be simpler than most cases. SSH into the instance and run:

sudo /opt/bitnami/bncert-tool

Answer all the question. Now you can get to your WordPress website. It shows default theme with no posts – they haven’t been imported yet. Update WP to the latest version and install the All-In-One WP Migration plugin. Edit php.ini:

sudo vi /opt/bitnami/php/etc/php.ini

; Maximum size of POST data that PHP will accept.
post_max_size = 100M

; Maximum allowed size for uploaded files.
upload_max_filesize = 100M

Change these two values if needed to whatever they need to be – bigger than the size of the backed up data file. Restart the services on the instance:

sudo /opt/bitnami/ctlscript.sh restart

Log into the WP Dashboard and import the data file into the WP using above mentioned plugin. Everything will be restored. Done!

Attic dipole, 20 m

Finally, time has come to put up the antenna and start having some on-air conversations. It’s nice living in the inner city and having only 7 minutes of the walking commute. Drawback is that I don’t have too much space for the antenna farm 🙁 Our house is one of those so-called ‘infills’ where the developer split the standard 50′ lot in two, so we ended up with 25′ wide piece of land. It doesn’t help being on the corner lot either, with high voltage lines running on poles parallel to the house. So, antenna tower is out of question and I decided on the hidden, attic antenna.

Continue reading

Outside temperature, frozen!

The Raspberry Pi in the garage that measures temperature connects to the house network through wireless. Sometimes the wireless USB stick goes wonky and loses connection to the house (and to the rest of the world) and temperature on this web site won’t get updated periodically. I have to go to the garage and pull the stick from the port, put it back again and it will reestablish connection.

I just came back in from cleaning the sidewalks, it’s heavily snowing, and I don’t feel like going back to the garage just to reset the stick. It can wait a bit!

Outside temperature

And finally, the upload of the temperature from my backyard works! See it in the side bar, above the Search field, and in the footer area at the bottom of the page. It uploads new measurement every ten minutes.

Hello again!

Just created the WordPress instance on AWS Lightsail and was able to successfully move my domain to it. So far, works OK. I’ll need to change the default theme and do some other tweaks … we’ll get to it. Now it’s bedtime/reading time. Good night!

Some HDTV numbers

Just thinking aloud. OK, 3D TV is dead. Nothing new here. It already died couple of times throughout the history of moving pictures. But, what about higher-than-high-definition? I was quickly crunching some numbers and thinking about display capabilities.

We all know that new iPad3 has that famous ‘retina’ display, with resolution of about 260 ppi (pixels per inch). So, technology is here. My current TV has 40″ diagonal and resolution of 1920 x 1080 (Full HD), which comes to about 55 ppi. If someone make ‘retina’ display of that size, that TV would be 9064 x 5098 pixels. This is just a calculated number, not a standard.

Let’s scale back to the next standard, just a little bit. Proposed display standard, called 8K or UHD (Ultra HD) have a resolution of 7680 x 4320 pixels. That’s four times horizontal and four times vertical resolution of Full HD. As we all know, HD bit rate is about 1.5 Gb/s. And for Ultra HD, or for a pleasure to have ‘retina’ display in my living room, we need ~24 Gb/s!!! Which means, we need heck of a good compression method to push all these bits through existing infrastructure.

My guess is that it won’t be a long wait. Anyone remember days when we thought that 56 kb/s was a maximum over telephone copper wires? Is there a limit for the copper? Or should I just picture myself pulling optical cables into the racks of our TV station? We’ll see.

Christmas tree, take 2

OK, here’s another take on drawing the Christmas tree on electronic screen – this time using “specially designed colour bars” 🙂 and here’s the result viewed on the vectorscope:

Christmas tree on the vectorscope

How’s the tree created? I was using Charles Poynton’s book “Digital Video and HDTV” (thanks, Charles!) and formula for calculating RGB colour from YCbCr. Here’s the formula, just to scare you off:

DON'T PANIC!

So, tree was plotted on the X-Y coordinate system, where Cb is on a X axis, and Cr is on a Y axis. Because it involves a lot of calculations, spreadsheet was used. After all, we live in a 21st century, right? Spreadsheet helped a lot with playing with Y values, to keep RGB between 0 and 255. Here’s the screenshot of the spreadsheet:

Finally, here’s the original picture that was converted to the HD video and fed to the Harris rasterizer (vectorscope, waveform monitor, etc) that you can see on the first picture:

Christmas tree colour bars

As you can see on the first picture, tree is little bit slanted towards RED. I still have to figure out why is that? Since I don’t have the equipment at home to adjust the bars, picture was created just by doing calculations and brought to the station for the first try. Well, I think it’s not bad for the first shot.

Here’s some more pics of my colleagues trying to get picture of the tree:

Eric, Doug, and Chris

Christmas tree on all screens