f-log

just another web log

24 Feb 2020:
using linux to throw a snowball
Many moons ago I was given a "Snowball USB microphone". Never got around to using except for the Zooming Light titles video and that was recorded on Windows(for various reasons).

Well now I have another Blender tutorial I want to record and this time I am going 100% Linux

Plug the USB Snowball in and dmesg shows the USB connection with the name, but not much else. Nothing is finding a new audio device. Maybe I am missing the USB audio driver ...

cd /usr/src/linux
make menuconfig

Device Drivers -->
Sound card support -->
     Advanced Linux Sound Architecture -->
         USB sound devices -->
            <*> USB Audio/MIDI driver

            
make modules
make modules_install
modprobe snd-usb-audio


Nothing new in dmesg other that snd-usb-audio registered

But now six inputs in Audacity
Blue Snowball: USB Audio (hw:2,0): Front Mic:0
Blue Snowball: USB Audio (hw:2,0): Rear Mic:0
Blue Snowball: USB Audio (hw:2,0): Line:0    
Blue Snowball: USB Audio (hw:2,0): Front Mic:1
Blue Snowball: USB Audio (hw:2,0): Rear Mic:1
Blue Snowball: USB Audio (hw:2,0): Line:1


A quick test shows all of them appear to work in exactly the same way.

On the back of the Snowball is a three position DIP switch. Never been sure what that was for ...

https://sound.stackexchange.com/questions/46331/what-are-the-1-2-3-settings-on-the-back-of-the-blue-snowball

    Position 1,
        Setting: Cardioid (capsule),
        Applications: speech, vocals, podcasting
        Picks up sound from the front, ideal for podcasting, game streaming or recording vocals and instruments

    Position 2
        Setting: Cardioid (capsule) with -10dB pad
        Applications: live music, loud sound sources
        Reduces mic sensitivity so loud instruments or vocalists come in crystal clear and distortion free

    Position 3
        Setting: Omnidirectional (capsule)
        Applications: conferences, interviews, environmental recordings
        Picks up sound all around the mic, perfect for conference calls or recording a group of musicians

        
Now I have the POC working ... I am dropping the tutorial until I complete another mission ...
16 Feb 2020:
another cream egg on my face
Also this week I accidental(well sort of) instigated another "cream egg" incident.

I did not blog the last "cream egg" incident for good reason. Not my finest hour. To be fair I had no idea it would blowup so badly or so quickly.

This time I have tried my best to mitigate the fallout and inform the right people in the right way so that it can be resolved.

The reporting structure was sub-optimal.

I cannot really say any more than that.
16 Feb 2020:
detecting the hue from sports with a like imagemagick
So the sports videos I was doing had a bit of a change up. The cameras were replaced and now the size and the timings are off.

Previously the timing between the two sources was consistently off by 0.75 seconds and could be scripted. Then new setup has a variable offset.

In the sports environment a blue LED is turned on to indicate a change and this light is very clear in both video sources.

I convert the video to an image sequence and found the change in lighting could be identified in a small number of pixels in multiple locations. To avoid any issue when the view is blocked.

These tiny 10x40 pixel images could then be put through imagemagick to read the HSV(Hue, Saturation, Value/Luminescence). I had tried interpreting RGB in histograms to no avail.

The Blue Hue I am looking for is clearly in the 200-300 range, making it easy to differentiate from the 0-100 that is the unlit images.

convert 1088.png -colorspace HSV txt: | egrep -o "hsv\([^,.]+" | sort -n | uniq -c | sort -n | tail -n 3

This uses the imagemagick convert command to convert the image file into HSV text. Which is 1 line per pixel. DO NOT RUN IT ON A LARGE FILE!

Piped through to extended grep to get only(-o) the matching regex. This matches the Hue part of the result(avoiding decimal points).

This gets sorted numerically(-n) and passed to uniq which counts the uniq instances.

That gets sorted so the highest count is at the bottom and then trimmed to 3 entries.

Frame 1088 is unlit

convert 1088.png -colorspace HSV txt: | egrep -o "hsv\([^,.]+" | sort -n | uniq -c | sort -n | tail -n 3
36 hsv(27
     40 hsv(40
     55 hsv(36


and frame 1089 has the blue LED lit. There is also some over saturation making the result look very white to human eyes, but is clearly discernible as a part of the HSV blue hue.

convert 1089.png -colorspace HSV txt: | egrep -o "hsv\([^,.]+" | sort -n | uniq -c | sort -n | tail -n 3
30 hsv(216
     31 hsv(211
     39 hsv(217


I still need to process this and make it automatic. Not to mention calculating the FPS(Frames Per Second) and make use of the results :)
09 Feb 2020:
ubuntu loses game of hide and seek with the simpsons
I was sure I had already blogged this, but ...

I have an old laptop that runs stock Ubuntu.

I needed to use it as, it is the only device that has a DVD/CD drive to watch Simpsons season 19 box set.

Although I could get it to work it often required more than one boot attempt, screen would just be black and system seemed to have hung.

Edited
/etc/default/grub
to include
nomodeset
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"

and after forcing grub to update
sudo update-grub2

I can now see all the fun things the machine is doing while booting and not had an issue yet.

Also, to enable DVD playback on Ubuntu

sudo apt-get install libdvd-pkg
sudo dpkg-reconfigure libdvd-pkg


Prior to this VLC would just hang playing DVDs
06 Feb 2020:
more victor troubles in the blender cli
And now the command line version of the Blender Bench-marking system

running

./benchmark-launcher-cli

gives you a interactive console to select the various options and it happily does the renders and sends the results to Blender Foundation Open Data

But where is the fun in that?

./benchmark-launcher-cli blender list

gives you the various supported Blender versions

2.81a
2.81

and

./benchmark-launcher-cli devices --blender-version 2.81a
GeForce GTX 1660 Ti    CUDA
Intel Core i5-9400F CPU @ 2.90GHz    CPU



./benchmark-launcher-cli scenes --blender-version 2.81a list

lists the scenes
bmw27    0
classroom    0
fishy_cat    0
koro    0
pavillon_barcelona    0
victor    0


Now we can run a full benchmark

./benchmark-launcher-cli benchmark --blender-version 2.81a --device-type CUDA --json --submit bmw27




Warming up bmw27
4 / 4 [-----------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 10 p/s
Benchmarking bmw27
4 / 4 [------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 0 p/s
[
{
    "timestamp": "2020-02-06T18:41:59.033915+00:00",
    "blender_version": {
     "version": "2.81 (sub 16)",
     "build_date": "2019-12-04",
     "build_time": "13:48:07",
     "build_commit_date": "2019-12-04",
     "build_commit_time": "11:32",
     "build_hash": "f1aa4d18d49d",
     "label": "2.81a",
     "checksum": "08d718505d1eb1d261efba96b0787220a76d357ce5b94aca108fc9e0c339d6c6"
    },
    "benchmark_launcher": {
     "label": "2.0.4",
     "checksum": "37c9687e041fa0a94a89914618f80d5213a556bba3822c58c09086e9c8d48944"
    },
    "benchmark_script": {
     "label": "2.0.0",
     "checksum": "e38921ff7a2959d5e47a83501a2dde3f7f166a4f46b65fac272eec38ae9e5f27"
    },
    "scene": {
     "label": "bmw27",
     "checksum": "bc4fd79cbd85a1cc47926e848ec8f322872f5c170ef33c21e0d0ce303c0ec9ea"
    },
    "system_info": {
     "bitness": "64bit",
     "machine": "x86_64",
     "system": "Linux",
     "dist_name": "Gentoo",
     "dist_version": "2.6",
     "devices": [
        {
         "type": "CUDA",
         "name": "GeForce GTX 1660 Ti",
         "is_display": false
        },
        {
         "type": "CPU",
         "name": "Intel Core i5-9400F CPU @ 2.90GHz"
        }
     ],
     "num_cpu_sockets": 1,
     "num_cpu_cores": 6,
     "num_cpu_threads": 6
    },
    "device_info": {
     "device_type": "CUDA",
     "compute_devices": [
        {
         "type": "CUDA",
         "name": "GeForce GTX 1660 Ti",
         "is_display": false
        }
     ],
     "num_cpu_threads": 6
    },
    "stats": {
     "device_peak_memory": 145.99,
     "total_render_time": 97.3422,
     "render_time_no_sync": 94.9699
    }
}
]
Submitting results
Submission successful! View your results at:
https://opendata.blender.org/benchmarks/253bacd3-abe9-4177-b2b9-a9cbcdf69f33/


That was just the BMW scene(one of the smallest and quickest)

If you want to include all the scenes you can use
/benchmark-launcher-cli benchmark --blender-version 2.81a --device-type CUDA --json --submit bmw27 classroom barbershop_interior fishy_cat koro pavillon_barcelona victor

But whenever I include victor I get an error

./benchmark-launcher-cli benchmark --blender-version 2.81a --device-type CUDA --json --submit victor

Warming up victor
ERROR: An unexpected error occurred. Run with '--verbosity 3' for detailed logs.
ERROR: Did not receive Benchmark JSON Data.


and if I run it with the '--verbosity 3' flag

benchmark-launcher-cli benchmark --verbosity 3 --blender-version 2.81a --device-type CUDA --json --submit victor
I get a huge console dump. Pastebin of the results(415.03 KB)

So I tried
benchmark-launcher-cli clear_cache

Which completed successfully, but the error persisted when I tried victor again.

I have been trying to get to the bottom of this for a number of days, so I guess it is time to open a bug report.

FYI if you get

ERROR: No token found. Create one using the 'authenticate' command.

Then run

./benchmark-launcher-cli authenticate
Please verify the token at:
https://opendata.blender.org/benchmarks/tokens/b60add57-dead-47e0-beaf-9ffaeb2d2aa0/verify/
Waiting for verification...
? The token was verified by rob_on_earth <.........@jumpstation.co.uk>, was this you?

and verify the token at the given address in your browser before answering yes.
06 Feb 2020:
victor on the blender bench
When I got my new machine the first job was do Blender bench-marking in Windows(before wiping it) so it could be compared to Linux and CPU to GPU
So I was a bit surprised that official Blender bench-marking code was all 2.79(2.8 was officially released in Oct 20 and previews were available a year before). But 2.79 had serious problems running GPU renders.

Fast forward to January 2020 and a new official Blender Benchmark system was released.

It comes in two flavours. A command line only and a GUI version. Both do basically the same. Select a Blender version, download it and any required demo scenes then render the benchmarks with either CPU or GPU.

The data is then optionally uploaded and shared on the open data platform.

I tried the GUI version and it was very slick. But ultimately it failed. After a long time rendering, it told me there was no data to submit.

Time to investigate;

Ran ps auw
and found

/home/user/.cache/blender-benchmark-launcher/blender-versions/08d718505d1eb1d261efba96b0787220a76d357ce5b94aca108fc9e0c339d6c6/blender-2.81a-linux-glibc217-x86_64/blender --background --factory-startup -noaudio --debug-cycles --enable-autoexec --engine CYCLES /home/user/.cache/blender-benchmark-launcher/scenes/0089a8807b16e07be5fba59beca64def206249df49c74f7c6aaa15d2e1a483ec/classroom/main.blend --python /home/user/.cache/blender-benchmark-launcher/benchmark-scripts/e38921ff7a2959d5e47a83501a2dde3f7f166a4f46b65fac272eec38ae9e5f27/blender-benchmark-script-2.0.0/main.py -- --device-type CUDA --device GeForce GTX 1660 Ti


depending on which scene it was working on the parameters changed

/home/user/.cache/blender-benchmark-launcher/blender-versions/08d718505d1eb1d261efba96b0787220a76d357ce5b94aca108fc9e0c339d6c6/blender-2.81a-linux-glibc217-x86_64/blender --background --factory-startup -noaudio --debug-cycles --enable-autoexec --engine CYCLES /home/user/.cache/blender-benchmark-launcher/scenes/099f581574457791e8cc753b2bf350c42fcdedb9ddcf3499909d119f0ab9137f/barbershop_interior/main.blend --python /home/user/.cache/blender-benchmark-launcher/benchmark-scripts/e38921ff7a2959d5e47a83501a2dde3f7f166a4f46b65fac272eec38ae9e5f27/blender-benchmark-script-2.0.0/main.py -- --device-type CUDA --device GeForce GTX 1660 Ti
/home/user/.cache/blender-benchmark-launcher/blender-versions/08d718505d1eb1d261efba96b0787220a76d357ce5b94aca108fc9e0c339d6c6/blender-2.81a-linux-glibc217-x86_64/blender --background --factory-startup -noaudio --debug-cycles --enable-autoexec --engine CYCLES /home/user/.cache/blender-benchmark-launcher/scenes/20cedaf5d93ba81b74a1dd095e33ffac093d9928c214c6cd211bb8af9ded2dd6/pavillon_barcelona/main.blend --python /home/user/.cache/blender-benchmark-launcher/benchmark-scripts/e38921ff7a2959d5e47a83501a2dde3f7f166a4f46b65fac272eec38ae9e5f27/blender-benchmark-script-2.0.0/main.py -- --device-type CUDA --device GeForce GTX 1660 Ti


I then tried the non 2.81a version of Blender. Same error. Tried CPU rendering, both versions of Blender. Same Error. Looked at log files, but nothing stood out.

Tried the command line benchmark(* see next post). Same result, but does not send error to Blender Foundation.

Found the issue is with one of the scenes. "Victor" from the open movie Cosmos laundromat

GeForce GTX 1880 Ti results Blender 2.81a Linux (most likely just me)

Excluding this scene allowed me to complete all the other benchmarks and submit my data. The data submission was a slightly convoluted OAuth browser confirmation system, but worked with both the GUI and command line version.

I spent sometime trying to work out why the "Victor" scene has an issue. But, nobody is talking about it and I cannot debug it :(

(I repeatedly "cleared cache" and delete files to no avail).

Next time how to run the command line benchmark tool.
01 Feb 2020:
2019 we knew you fleetingly
Almost got it in in January :)

Here is the year 2019 in review.

Archive has been updated and I found that once again I do not give myself much credit.

There was a lot going on in 106 posts (up 35 from last year) of which 18 were tagged as Blender (down 22 from 2018)

From Resurrecting and then dissecting my Pi VR experience to a new machine and graphing anything that moves.

Plus much much more. I did notice that although I do not have so many spelling mistakes of older years, there is a fair bit of just bad English. Maybe from over use of a spell checker :) Also the BBCode like modifiers I use internally keep popping up in their raw form, oops.

There are a total of 1599 different f-log tags of which 177 were used in 2019
loading results, please wait loading animateloading animateloading animate
[More tags]
rss feed

email

root

flog archives


Disclaimer: This page is by me for me, if you are not me then please be aware of the following
I am not responsible for anything that works or does not work including files and pages made available at www.jumpstation.co.uk I am also not responsible for any information(or what you or others do with it) available at www.jumpstation.co.uk In fact I'm not responsible for anything ever, so there!