Month: January 2021

Hyperlapse Experiment 1

Some years ago (I think in 2017) I wanted to try to make a hyper-lapse video this is the result:

Some technical details:

  • I’ve moved for 5 meters
  • On every frame, I move by 5 centimetres forward
  • I’ve taken about 100 frames
  • The final video it’s created using FFmpeg

This is the FFmpeg script used to create the final clip:

ffmpeg -r 30 -pattern_type glob -i '*.JPG' -c:v libx264 -pix_fmt yuv420p out30fps.mp4

 

 

JunOS Upgrade

For some reason, JunOS 12.1X46-D65.4 on SRX platform can’t validate any update it takes me several attempts before figure out to run the upgrade with the “no-validate” option.

root> request system configuration rescue save 
root> request system autorecovery state save   
root> request system storage cleanup              

List of files to delete:

         Size Date         Name
    11B Dec 29 22:35 /cf/var/jail/tmp/alarmd.ts
 142.6M Dec 29 22:38 /cf/var/jail/tmp/install/junos-srxsme-12.1X46-D82-domestic.tgz
   420B Dec 29 22:36 /cf/var/jail/tmp/jweb-users.xml
   128B Dec 29 22:40 /cf/var/log/interactive-commands.0.gz
   175B Dec 29 22:40 /cf/var/log/messages.0.gz
    27B Dec 29 22:32 /cf/var/log/wtmp.0.gz
Delete these files ? [yes,no] (no) yes 


root> 


root> request system software add /cf/var/tmp/junos-srxsme-12.3X48-D40.5-domestic.tgz             
NOTICE: Validating configuration against junos-srxsme-12.3X48-D40.5-domestic.tgz.
NOTICE: Use the 'no-validate' option to skip this if desired.
Checking compatibility with configuration
Initializing...
Verified manifest signed by PackageProductionEc_2016 method ECDSA
veriexec: cannot bless /packages/junos-12.1X46-D65.4-domestic: Authentication error
Verified junos-12.1X46-D65.4-domestic signed by PackageProductionEc_2016 method ECDSA
Using /cf/var/tmp/junos-srxsme-12.3X48-D40.5-domestic.tgz
Checking junos requirements on /
Available space: 181112 require: 211214

WARNING: The /packages filesystem is low on free disk space.
WARNING: This package requires 211214k free, but there
WARNING: is only 181112k available.

WARNING: This installation attempt will be aborted.
ERROR: validate-config: junos/+REQUIRE fails for /
WARNING: Current configuration not compatible with /cf/var/tmp/junos-srxsme-12.3X48-D40.5-domestic.tgz

root> request system storage cleanup                                                     

List of files to delete:

         Size Date         Name
   474B Dec 29 19:44 /cf/var/log/install.0.gz
   134B Dec 30 04:41 /cf/var/log/interactive-commands.0.gz
  1815B Dec 30 04:41 /cf/var/log/messages.0.gz
    27B Dec 29 22:45 /cf/var/log/wtmp.0.gz
    27B Dec 29 22:40 /cf/var/log/wtmp.1.gz
  4821B Dec 30 04:36 /cf/var/tmp/cleanup-pkgs.log
 173.7M Dec 29 22:43 /cf/var/tmp/junos-srxsme-12.3X48-D40.5-domestic.tgz
Delete these files ? [yes,no] (no) yes 


root> show version 
Model: srx110h2-va
JUNOS Software Release [12.1X46-D65.4]

root> request system software add /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz    
NOTICE: Validating configuration against junos-srxsme-12.1X46-D66.1-domestic.tgz.
NOTICE: Use the 'no-validate' option to skip this if desired.
Checking compatibility with configuration
Initializing...
Verified manifest signed by PackageProductionEc_2016 method ECDSA
veriexec: cannot bless /packages/junos-12.1X46-D65.4-domestic: Authentication error
Verified junos-12.1X46-D65.4-domestic signed by PackageProductionEc_2016 method ECDSA
Using /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz
ERROR: Unsupported platform srx110h2-va for 12.1X46 releases after 12.1X46-D65.
ERROR: validate-config: junos/+REQUIRE fails
WARNING: Current configuration not compatible with /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz

root> request system software delete-backup 
Delete backup system software package [yes,no] (no) yes 


root> show chassis routing-engine              
Routing Engine status:
    Temperature                 58 degrees C / 136 degrees F
    Total memory              2048 MB Max   635 MB used ( 31 percent)
      Control plane memory    1088 MB Max   435 MB used ( 40 percent)
      Data plane memory        960 MB Max   202 MB used ( 21 percent)
    CPU utilization:
      User                       4 percent
      Background                 0 percent
      Kernel                    12 percent
      Interrupt                  0 percent
      Idle                      84 percent
    Model                          RE-SRX110H2-VA
    Start time                     2017-01-15 02:45:57 UTC
    Uptime                         9 hours, 32 minutes, 48 seconds
    Last reboot reason             0x200:normal shutdown
    Load averages:                 1 minute   5 minute  15 minute
                                       0.24       0.50       0.41

root> request system reboot 
Reboot the system ? [yes,no] (no) yes 

Shutdown NOW!
[pid 4875]

root>                                                                                
*** FINAL System shutdown message from root@ ***                             

System going down IMMEDIATELY                                                  

Password:
--- JUNOS 12.1X46-D65.4 built 2016-12-30 01:34:30 UTC

root@% cli
root> request system software add /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz     
NOTICE: Validating configuration against junos-srxsme-12.1X46-D66.1-domestic.tgz.
NOTICE: Use the 'no-validate' option to skip this if desired.
Checking compatibility with configuration
Initializing...
Verified manifest signed by PackageProductionEc_2016 method ECDSA
veriexec: cannot bless /packages/junos-12.1X46-D65.4-domestic: Authentication error
Verified junos-12.1X46-D65.4-domestic signed by PackageProductionEc_2016 method ECDSA
Using /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz
ERROR: Unsupported platform srx110h2-va for 12.1X46 releases after 12.1X46-D65.
ERROR: validate-config: junos/+REQUIRE fails
WARNING: Current configuration not compatible with /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz

root> request system software add /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz no-validate 
Formatting alternate root (/dev/ad0s2a)...
/dev/ad0s2a: 630.0MB (1290204 sectors) block size 16384, fragment size 2048
        using 4 cylinder groups of 157.50MB, 10080 blks, 20224 inodes.
super-block backups (for fsck -b #) at:
 32, 322592, 645152, 967712
Extracting /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz ...
saving package file in /var/sw/pkg ...
Installing package '/altroot/cf/packages/install-tmp/junos-12.1X46-D66.1-domestic' ...
Verified junos-boot-srxsme-12.1X46-D66.1.tgz signed by PackageProductionEc_2017 method ECDSA
Verified junos-srxsme-12.1X46-D66.1-domestic signed by PackageProductionEc_2017 method ECDSA
Verified junos-boot-srxsme-12.1X46-D66.1.tgz signed by PackageProductionEc_2017 method ECDSA
Verified junos-srxsme-12.1X46-D66.1-domestic signed by PackageProductionEc_2017 method ECDSA
ERROR: Unsupported platform srx110h2-va for 12.1X46 releases after 12.1X46-D65.
ERROR: junos-12.1X46-D66.1-domestic fails requirements check
Installation failed for package '/altroot/cf/packages/install-tmp/junos-12.1X46-D66.1-domestic'

root> request system storage cleanup                                                                 

List of files to delete:

         Size Date         Name
    96B Dec 30 04:58 /cf/var/crash/flowd_octeon_hm.log..0
   131B Dec 30 05:13 /cf/var/log/interactive-commands.0.gz
  3726B Dec 30 05:13 /cf/var/log/messages.0.gz
   136B Dec 30 04:59 /cf/var/log/wtmp.0.gz
    27B Dec 30 04:41 /cf/var/log/wtmp.1.gz
 142.4M Dec 30 05:10 /cf/var/sw/pkg/junos-12.1X46-D66.1.tgz
  4821B Dec 30 05:04 /cf/var/tmp/cleanup-pkgs.log
     0B Dec 30 04:57 /cf/var/tmp/eedebug_bin_file
 124.0K Dec 30 04:57 /cf/var/tmp/gres-tp/env.dat
     0B Dec 30 04:57 /cf/var/tmp/gres-tp/lock
     4B Dec 30 04:58 /cf/var/tmp/idp_license_info
 142.4M Oct 26 17:00 /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz
   155B Dec 30 04:58 /cf/var/tmp/krt_gencfg_filter.txt
    30B Dec 30 04:58 /cf/var/tmp/policy_status
     0B Dec 30 04:57 /cf/var/tmp/rtsdb/if-rtsdb
     0B Dec 30 04:56 /cf/var/tmp/spu_kmd_init
     0B Dec 30 04:58 /cf/var/tmp/vpn_tunnel_orig.id
Delete these files ? [yes,no] (no) yes 


root> request system software add /cf/var/tmp/junos-srxsme-12.3X48-D105.4-domestic.tgz no-validate                              
Formatting alternate root (/dev/ad0s2a)...
/dev/ad0s2a: 630.0MB (1290204 sectors) block size 16384, fragment size 2048
        using 4 cylinder groups of 157.50MB, 10080 blks, 20224 inodes.
super-block backups (for fsck -b #) at:
 32, 322592, 645152, 967712
Extracting /cf/var/tmp/junos-srxsme-12.3X48-D105.4-domestic.tgz ...
saving package file in /var/sw/pkg ...
Installing package '/altroot/cf/packages/install-tmp/junos-12.3X48-D105.4-domestic' ...
Verified junos-boot-srxsme-12.3X48-D105.4.tgz signed by PackageProductionECP256_2020 method ECDSA
Verified junos-srxsme-12.3X48-D105.4-domestic signed by PackageProductionECP256_2020 method ECDSA
Verified junos-boot-srxsme-12.3X48-D105.4.tgz signed by PackageProductionECP256_2020 method ECDSA
Verified junos-srxsme-12.3X48-D105.4-domestic signed by PackageProductionECP256_2020 method ECDSA
Verified junos-boot-srxsme-12.3X48-D105.4.tgz signed by PackageProductionECP256_2020 method ECDSA
Verified junos-srxsme-12.3X48-D105.4-domestic signed by PackageProductionECP256_2020 method ECDSA
JUNOS 12.3X48-D105.4 will become active at next reboot
WARNING: A reboot is required to load this software correctly
WARNING:     Use the 'request system reboot' command
WARNING:         when software installation is complete
Saving state for rollback ...

root> request system reboot 
Reboot the system ? [yes,no] (no) yes 

Shutdown NOW!
[pid 2578]

root>                                                                                
*** FINAL System shutdown message from root@ ***                             

System going down IMMEDIATELY                                                  

                           

Video Router XY Web Panel

From the moment that I’ve started working for a broadcaster I was immediately fascinated by the video routers, they basically are the core of a production centre the can switch, sync a reclock SDI signals it’s a very simple concept if you think switch a video from one port to others, but they hide a very complicated implementation because since you can switch any source to any destinations in the routing matrix the hardware must be no-blocking and you can’t do bandwidth oversubscription; in the meantime, you’ve to keep the vertical interval synched to avoid frames losses that cause flickering or other unexpected behaviours.

I know everything in the world it’s transitioning some sort of IP/Networked signal, but as I’ve mentioned before with 2022/2110/NDI/SRT you’ll always end up choosing the wrong one, this is the reason why I consider the legacy way more interesting, and there is nothing more legacy than the SDI born in the late ’80 it’s still surviving and actively developed. None I can say about the video routers and their ecosystems still based on some sort of not so fancy control protocol over some sort of serial interface.

To cut short a crosspoint commands it’s made by 3 elements: a destination, a source and a level; the first two are pretty self-explanatory, the level it’s the media type, in the big an complex systems, for example, you can split audio, video and data into different matrixes or different modules and control everything from a single command.

RCP XY PanelsHere we come to the reason for this project, some time ago I’ve acquired some video router to build my studio at home I’ve ended up acquiring a lot of 5 8×8 HD/3G routers and 1 8×8 SD (this one literally catch fire, but this is a story for another time, I’ve managed to save the 5 3G) I quickly realise the problem was not to find the matrix itself but to find the control panels, so why not to do a little reverse engineer and build write something.

 

 

 

Panacea Back Panacea Front

My weapon of choice for this project is the Leitch / Harris / Imagine Communications branded Panacea video router, this kind of devices are in my opinion very consistent XY protocol (in different flavours) the same code that I’ve written for a device released in early 2000 (Panacea/XPlus) can still run on every modern Imagine platforms like the Integrator or Platinum.

Imagine Communications devices are managed via XY Protocols, even if the name is similar between them they behave in a very different way.

  • XY Terminal (the crosspoint commands are specified in multiple lines via RS232 variables are decimal numbers)
  • XY Telnet (same as the XY Terminal but via Telnet)
  • XY Serial (the crosspoint command is a single string and every serial or telnet connection are joined to a shared stream where you can read every session and send commands, variables are hex)
  • XY Client (the router open a session to a client but I’ve never figured out how the handshake works)

You can find an example of XY Terminal and XY Serial code at https://github.com/lrizzi/xy-panel the python web services act as an API gateway, the web pages are a simple frontend.