Author Archives: Goran

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.

Testo za picu (u procesoru)

  • 1 kašika kvasca
  • 1 kašičica šećera
  • 1 šolja tople vode (oko 37-39 C)
  • 3 šolje brašna
  • 1 kašićica soli

Voda, šećer i kvasac se pomešaju i ostave da odstoje da kvasac malo nadođe.

Brašno i so staviti u procesor, izmiksati jedno dva puta. Uz mešanje polako sipati kvasac i vodu. Mešati dok se ne stvori kompaktna lopta koja se ovaja od zidova posude.

Izvaditi iz procesora i staviti u nauljenu posudu na toplo mesto jedno sat i po do dva da nadođe.

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

Špagete u jednom loncu

Kad se kuvaju špagete, obično se posle jela pere gomila velikih sudova. Te lonac u kom se kuvao sos, te lonac u kom se kuvala testenina tj. špagete, pa onda cetka ako smo ih cedili (a jesmo jer ‘oće da iskliznu kad se cedi sa odškrinutim poklopcem) … ma čudo jedno, šta da vam pričam! Ovaj recept nas spasava svega toga, jer kompletna radnja se odvija u samo jednom loncu. Recept je sa ovog web sajta, al’ je zabavnije i poučnije ako se čita ovde – videćete na kraju (o tom potom 😉

Continue reading

Banana lebac (sa smokvama)

Sastojci:

250 g suvih smokava
75 ml ulja
125 g jogurta, može i vanila
1 kašika vanila ekstrakta
4 zrele banane
2 jajeta
150 g brašna, polubelog
1 kašičica praška za pecivo ili soda-bikarbone
100 g mlevenih badema, može i orasi
1 kašika maka
1 kašičica turmerik začina (kurkuma)
1 jabuka
50 g seckanih badema

Način:

U blender / food procesor staviti 80% smokava, ulje, jogurt, vanila ekstrakt, banane i jaja, pa izmiksati da se sjedini. Suve sastojke: brašno, peci-prašak, mlevene bademe, mak i turmerik, izmešati i dodati u prethodnu masu, pa sve izmešati, može i ručno. Narendati jabuke i njih dodati u sve to, pa izručiti pažljivo u podmazan pleh.

Ostatak smokava naseckati i posuti odozgo zajedno sa seckanim bademima. Malo sve to prstima ugurati u masu, da ne izgori na površini. Peći 35 – 40 minuta na 180 stepeni (sve aproksimativno), ili dok ubodena viljuška ne izađe čista (male tajne velikih majstora 😉 ).

Recept je adaptacija ovog recepta od Džejmi Olivera. Pravili već dva puta, pa reko ajde da zapišemo.

Dodatak:

Nisam stavio mak, a umesto badema stavio orahe. I opet dobro ispalo.

Здрава пита (рецепт од Звркића)

200 грама овсених пахуљица
3 јајета
200 грама ситног сира
100 грама сирног намаза
250 грама јогурта
50 грама млека
30 грама путера
50 грама сецканих црних маслина
семе лана и сусама
1 кашичица прашка за пециво
1 кашичица соли

Пахуљице залити млеком да упију. Јаја умутити пенасто са крем сиром (ваљда онај намаз), додати кисело млеко у које је претходно стављен прашак за пециво, сви зачини, потопљене пахуљице, измрвљени сир и сецкане маслине. Изручити у плех обложен печ-папиром. Посути семењем и додати комадиће путера. Пећи у рерни загрејаној на 180 степени око 30 минута.

Још нисмо пробали, план је да правимо за вечеру 🙂 па ком опанци, ком окрајци.

Zdrava pita po Sanjinom receptu 🙂

Dodatak, 31. maj: nije bilo za večeru nego za doručak. Umesto sitnog sira je išao cottage cheese, a feta sir umesto sirnog namaza. Umesto lana i susama sam posuo suncokret. Nije smetalo, opet se pojelo.

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!