howto: ATEM Switchers 8.x on Ubuntu Linux 20.04 using wine

Questions about ATEM Switchers, Camera Converter and everything live!
  • Author
  • Message
Offline

Walter Sonius

  • Posts: 105
  • Joined: Wed May 03, 2017 9:53 am

howto: ATEM Switchers 8.x on Ubuntu Linux 20.04 using wine

PostThu Jun 13, 2019 1:05 pm

Update 08: Describe upgrade path tested with 8.6 going from 8.5 "CTRL F upgrading and continue from there"
Update 07: Atem Mini Pro, av-sync custom rtmp ethernet vs async USB webcam&audio device
Update 06: Updated howto for ubuntu mate 20.04 with Atem Switchers 8.2.3
Update 05: Ubuntu 20.04 beta does seem to still work using Atem Switchers 8.2 with mono-5.0.0 & gecko-2.47.1.
Update 04: Ubuntu 19.10 still works with Atem Switchers 8.02 although they've dropped some i386 support
Update 03: Firmware update from wine over ethernet stalls/hangs(can be continued via Windows)!
Update 02: Atem Switchers 8.02 also working.
Updated and verified on a Ubuntu Live system:

This topic will show you howto get ATEM 8 Switchers Windows software usable for "ethernet" control on ubuntu 20.04 via wine. Settings and procedures related to "USB" connectivity such as setting/altering IP-address/devicename won't be addressed.

Hardware tested:
ATEM Television Studio HD
ATEM Mini Pro

Warning:
Recently I noticed the Windows Atem 8.02 Version updated the Firmware through ethernet, this won't work correctly under Linux via wine. It starts the firmware update process but never finishes therefor the Atem device stalls in a ever lasting grey "updating firmware" screen. I left the device on (didn't powercycle) and noticed that running the Atem software on Windows still detected the Atem device and its older firmware and upgraded the firmware from there and it continued the firmware update process. Afterwards the device was functional again.

Credits:
Belong to forum member "austinginn", but his former blog containing essential info was for an outdated Debian release and is currently offline:
http://forum.blackmagicdesign.com/viewtopic.php?t=42409#p249784

Other topics on the Blackmagic forum show modest interest and even a working Ubuntu 18.04 example but without a step by step guide:
http://forum.blackmagicdesign.com/viewtopic.php?f=4&t=73234&p=407480&hilit=atem+linux#p407480

Requirements:
For this howto I assume you start with a clean Ubuntu 20.04 amd64 desktop install (Ubuntu-mate was used) with at least 4.5GB free diskspace, that is 3 times the amount of the installer (necessary to compensate failing install). Make sure you won't have any previous wine software nor wine environments(bottles) installed, if you won't start clean. If you run a previous Ubuntu version like 16.04 you need to use a updated wine (ppa) if you want to use Atem software higher than 6 like version 7/8!
http://cdimage.ubuntu.com/ubuntu-mate/releases/20.04/release/ubuntu-mate-20.04-desktop-amd64.iso

First download the Atem 8 Switchers and unzip it:
https://www.blackmagicdesign.com/support/download/9a5e4d5560e641fd86519dbba660afeb/Windows

Followed by and Mono/Gecko software Wine Additions:
https://dl.winehq.org/wine/wine-mono/5.0.0/wine-mono-5.0.0-x86.msi
https://dl.winehq.org/wine/wine-gecko/2.47.1/wine-gecko-2.47.1-x86_64.msi

Then open a terminal and run the following commands:
Code: Select all
sudo add-apt-repository universe #otherwise some packages cannot be found for install
sudo add-apt-repository multiverse
sudo dpkg --add-architecture i386
sudo apt-get update
#will install i386 packages on amd64 therefor wine32 might be automatically installed
sudo apt-get -y install wine64 wine32 winetricks cabextract mono-complete #wine-stable


Running wine assumes the use of environments/bottles, these will be automatically created by running the program 'wine' the first time, which is fine if you use only 32bit software with 32bit wine. However if you run a 64bit wine instance it creates the same named environment as the 32bit version both in location ~/.wine which will lead to conflicts/incompatibility while installing/running mixed 32 and 64 versions of software!
So therefor mind/honor the "env WINEPREFIX=~/.xxx and WINEARCH=winXX wineXX" prefixes in the next steps! Because previous ATEM Switcher software used a 64bit like installer but needed a 32bit environment to run this was just a hint for what kind of problems to expect.

Again make sure wine32 is installed although 64bit installer and application will be used, otherwise Blackmagic Installer will not partly install at all! Check the previous steps if apt states that wine32 package is not available.

Code: Select all
#see if wine32 is installed
apt-cache policy wine32

wine32:i386:
  Installed: (none)
  Candidate: 5.0-3ubuntu1

wine32:i386:
  Installed: 5.0-3ubuntu1
  Candidate: 5.0-3ubuntu1



Back to the terminal:
Code: Select all
env WINEPREFIX=~/.wine64 WINEARCH=win64 winecfg
#this will run wine64 the first time and make a bottle in ~/.wine64
#"Windows 7" is the default and tested through 8.2.3,
#for version 8.5 I changed it to "Windows 10" still testing
#just quit/close the window by pressing ok

env WINEPREFIX=~/.wine64 WINEARCH=win64 wine64 explorer
#this will run a windows explorer instance in a window

#Goto "My Computer">"Control Panel">"Add/Remove Programs" inside Applications tab use "Install"
#to manually install the msi files from mono/gecko.msi you downloaded earlier
#it lacks install status update for both *.msi  wait a couple of minutes
#the terminal may hint if its stalled that the installations were done, than close quit all wine windows

env WINEPREFIX=~/.wine64 WINEARCH=win64 winetricks -q vcrun2013 allfonts
#this will install extra stuff into .wine bottle
#if some components / fonts stall and or fail
#check if a wine popup window is open and close it (won't be shown in window list!)
#otherwise quit/stop command with CTRL+C


If you are re-installing and or upgrading existing Atem Control software continue here (you may also skip desktop icon/shortcut generation)!

Code: Select all
#remove previous Atem Switcher software
rm -r .wine64/drive_c/Program\ Files\ \(x86\)/Blackmagic\ Design
env WINEPREFIX=~/.wine64 WINEARCH=win64 wine64 explorer
#look for "Add/Remove Programes" again but this time install Atem Switcher software *.msi installer but don't quit after install!!!
#again DON'T quit/finish the FAILED install YET!


Open another terminal window and temporary backup the Blackmagic installed files because they will be deleted if the installer is officialy quit!
Code: Select all
cp -r ~/.wine64/drive_c/Program\ Files\ \(x86\)/Blackmagic\ Design ~/.
#this will copy over the installed BMD executables from the 64bit wine bottle to a temp place.


Now you can finish/quit the "failed" graphical ATEM Switcher installer since its files have been harvested.

Code: Select all
#copy/move back the failed installed Atem Switcher files to the 64bit wine environment
mv ~/Blackmagic\ Design ~/.wine64/drive_c/Program\ Files\ \(x86\)/

#navigate to BMD folder in the 64bit wine bottle
cd ~/.wine64/drive_c/Program\ Files\ \(x86\)/Blackmagic\ Design/Blackmagic\ ATEM\ Switchers/

#registers a dll into the 64bit wine bottle
env WINEPREFIX=~/.wine64 WINEARCH=win64 wine64 regsvr32 BMDSwitcherAPI64.dll

#Since Atem 7.x the executables are in a different folder
cd ATEM\ Software\ Control

#start the atem control software
env WINEPREFIX=~/.wine64 WINEARCH=win64 taskset -c 0 wine64 ATEM\ Software\ Control.exe


Desktop Icon/Shortcut "Atem Software Control":
Code: Select all
#copy paste following codeblock in terminal from 'tee... to last EOF'
tee ~/Desktop/BMD-atem-control.desktop <<EOF
[Desktop Entry]
Version=1.0
Type=Application
Terminal=true
Icon=mate-panel-launcher
Icon[en_US]=mate-panel-launcher
Name[en_US]=BMD-atem-control
Exec=env WINEPREFIX=/home/$USER/.wine64 WINEARCH=win64 taskset -c 0 wine64 /home/$USER/.wine64/drive_c/Program\\ Files\\ \\(x86\\)/Blackmagic\\ Design/Blackmagic\\ ATEM\\ Switchers/ATEM\\ Software\\ Control/ATEM\\ Software\\ Control.exe
Name=BMD-atem-control
EOF


Desktop Shortcut "ATEM-Mini-Pro XML stream editing":
Code: Select all
#backup original XML stream config file
cp /home/$USER/.wine64/drive_c/Program\ Files\ \(x86\)/Blackmagic\ Design/Blackmagic\ ATEM\ Switchers/ATEM\ Software\ Control/Streaming.xml /home/$USER/.wine64/drive_c/Program\ Files\ \(x86\)/Blackmagic\ Design/Blackmagic\ ATEM\ Switchers/ATEM\ Software\ Control/Streaming_copy.xml
#make shortcut
ln -s /home/$USER/.wine64/drive_c/Program\ Files\ \(x86\)/Blackmagic\ Design/Blackmagic\ ATEM\ Switchers/ATEM\ Software\ Control/Streaming.xml ~/Desktop/ATEM-MINI-Pro-stream-editing.xml


Issues:
Mentioned by austinginn, like jumping/flickering audio related LEDS/Buttons (ON/AFV) stroboscopic light in the audio tap (only happend once) but after setting "sound=disable" for winetricks it never came back.
Code: Select all
env WINEPREFIX=~/.wine64 WINEARCH=win64 winetricks sound=disabled


Notes:
If you want to run a older 32bit version of Atem Switchers, you should copy and install everything in a 32bit wine environment and register the 32bit dll file also remember the (X86) program files Windows folder thingy.

ATEM Mini Pro a/v sync:
The ATEM Mini (Pro) is prone to a/v sync using its USB connection which gets detected as 2 seperate devices, a webcam and a soundcard:

Code: Select all
[ 6530.192813] usb 2-1.2: new high-speed USB device number 3 using ehci-pci
[ 6530.302221] usb 2-1.2: New USB device found, idVendor=1edb, idProduct=be55, bcdDevice= 1.00
[ 6530.302226] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6530.302228] usb 2-1.2: Product: Blackmagic Design
[ 6530.302230] usb 2-1.2: Manufacturer: Blackmagic Design
[ 6530.302232] usb 2-1.2: SerialNumber: 8cfe8078d9aa41b2aea55b357d359851
[ 6530.303336] uvcvideo: Found UVC 1.50 device Blackmagic Design (1edb:be55)
[ 6530.304755] uvcvideo 2-1.2:1.4: Entity type for entity Camera 1 was not initialized!
[ 6530.304972] input: Blackmagic Design: Blackmagic D as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.4/input/input15
[ 6530.374032] usbcore: registered new interface driver snd-usb-audio


Altering the ATEM Mini Pro XML its remote ethernet streaming capabilities from public sites like
Youtube or Twitch with a additional "custom" local or remote rtmp listening server can mitigate these issues with the cost of extra latency and or compression.

Edit the streaming XML file mentioned earlier and copy the whole "Facebook" <service></service> block and rename "Facebook" to "custom" and change the URL to the URL of your receiving server or OBS-Studio machine "rtmp://192.168.1.111:1935". Also change framerates/bitrates if needed. In the Atem Control Software select this "custom" streaming destination.

On the local OBS-Studio machine we will start a "ffmpeg" instance which will listen and receive the stream from the Atem Mini Pro if the "On Air" button gets pressed on that device. Than that ffmpeg instance will re-stream to a local UDP port which OBS-Studio media source can connect to instead of the USB port.

Open a terminal/shell/command prompt:
Code: Select all
ffmpeg -re -f live_flv -listen 1 -i rtmp://192.168.1.111:1935 -vcodec copy -acodec copy -f mpegts udp://127.0.0.1/44444 -stats -loglevel error


Press "On Air" on the Atem Mini Pro!

In OBS studio add a "Media Source" and uncheck "Local File" and uncheck "Restart playback when source becomes active" and in the input section use the following address:
Code: Select all
udp://127.0.0.1:44444


Windows 7 users:
This ethernet/stream based workaround vs direct USB connection might also be a usable solution for Windows 7 users with a ATEM Mini (Pro / ISO). Because Windows 7 cannot install the USB device for the ATEM Mini (PRO/ISO) for webcam/video usage, it will give a error in "Device Manager" as in 'This device cannot start'. Any streaming program that does accept stream as input might work. For conference app's you may need to look for a virtual webcam tool?


Now your Atem Mini Pro output should show up in your OBS_Studio scene via its ethernet connection instead of USB with hopefully less a/v sync issues.
Last edited by Walter Sonius on Thu Feb 18, 2021 12:14 pm, edited 21 times in total.
Offline

Ian Morrish

  • Posts: 580
  • Joined: Sun Jan 18, 2015 9:24 pm
  • Location: New Zealand

Re: howto: ATEM Switchers 8.0 on Ubuntu Linux 19.04 using wi

PostThu Jun 13, 2019 7:20 pm

v7.5.2 and v8 probably won't run in a 32bit wine environment, as they don't run on Windows 32bit either. Previous versions are fine.
Regards,
Ian Morrish
Video Integrated Scripting Environment
(Windows PowerShell with ATEM driver + more)
https://ianmorrish.wordpress.com
Offline

Natanja Rorije

  • Posts: 5
  • Joined: Fri Nov 13, 2015 11:43 pm

Re: howto: ATEM Switchers 8.0 on Ubuntu Linux 19.04 using wi

PostTue Jul 09, 2019 2:27 pm

Thank you for this workaround!!
----------------------------------------------------------------
Update: sorry my bad, I have removed my post about not working, because after a clean install it is working like a charm.

So this howto is correct and my server was wrong but is now good ;-)
Offline
User avatar

canezila

  • Posts: 15
  • Joined: Wed Nov 13, 2019 11:43 pm
  • Real Name: Brian Clem

Re: howto: ATEM Switchers 8.x on Ubuntu Linux 20.04 using wi

PostFri Aug 14, 2020 7:49 pm

Wow. This is mighty fine work!

I STILL cant believe that BlackMagic doesnt offer linux by default with the ATEM.
Offline

Knudsen

  • Posts: 27
  • Joined: Fri Jul 10, 2020 12:13 pm
  • Real Name: Jon Paulsen

Re: howto: ATEM Switchers 8.x on Ubuntu Linux 20.04 using wi

PostFri Aug 14, 2020 10:54 pm

canezila wrote:Wow. This is mighty fine work!

I STILL cant believe that BlackMagic doesnt offer linux by default with the ATEM.


Yup, the penguin Rox.
Offline

Walter Sonius

  • Posts: 105
  • Joined: Wed May 03, 2017 9:53 am

Re: howto: ATEM Switchers 8.x on Ubuntu Linux 20.04 using wi

PostTue Aug 18, 2020 12:14 pm

canezila wrote:...
I STILL cant believe that BlackMagic doesnt offer linux by default with the ATEM.


I guess the audio specific code which gets disabled in the "issue" section is probably the main challenge for a default Linux version albeit Alsa/PulseAudio or Jack. Most of the interface which is QT framework is easily supported on all major OS.

For instance just using OBS-Studio with the USB audio output from the "Atem Mini Pro" with pulseaudio instead of alsa makes OBS studio instantly trap and crash. Before it would work again the project scenes file had to be edited manually to get rid of all the alsa/pulse references...
Offline
User avatar

canezila

  • Posts: 15
  • Joined: Wed Nov 13, 2019 11:43 pm
  • Real Name: Brian Clem

Re: howto: ATEM Switchers 8.x on Ubuntu Linux 20.04 using wi

PostSat Aug 22, 2020 2:41 pm

I have my atem mini working on pop os 20.04. The setup that works is:
ethernet from atem mini to my network switch.
usbc from atem mini to the laptop
ethernet from network switch to laptop

Works great!

But here is my question:
I also work at school and I do not have access to my network for my computer to find the atem mini.
Now it doesn't find the atem mini. If I plug it straight into my laptop that doesn't work, either. I tried using an empty network switch (not plugged into any network, just the laptop and atem to see if they could find each other.) and that didn't work. Running this way in a win10 VM works as it finds the atem mini. But it needs the usbc to run.

On my Linux machine, am I missing out on configuring the network parameters?

________________________________________________________________________________

**update**

I ran ifconfig and found the device.
The network number started with 169....
Once I plugged in my internet into the network switch it worked.
I was able to remove the network signal and still work.
It should work now when I am at work.

Obviously my understanding of networking is very low.
Sorry for bringing the IQ of this thread down
Offline

Walter Sonius

  • Posts: 105
  • Joined: Wed May 03, 2017 9:53 am

Re: howto: ATEM Switchers 8.x on Ubuntu Linux 20.04 using wi

PostSun Sep 13, 2020 8:30 am

Hi Brian to quote yourself, gaining more insight on ipv4 networking will improve your problem solving abilities. Sometimes limitations are from external factors like a school or corporate LAN although your commen sense knowledge makes it work in a home/controlled environment, more insight gives you options where to look for a solution.
Although network debugging will not be the course of this topic, but to respond on one of your findings. The 169.254.x.x addressing you noticed is only in absence of DHCP server or lack of manual IP assigining (by using just a laptop and a network switch with atem mini pro) with the assistence of zero-conf tools a "Link local subnet" was setup.

Using a modern linux desktop with a graphical network manager applet can be very assistive in learning to use different networks/configs on different places.

The following ipv4 terms may help:

https://en.wikipedia.org/wiki/Private_network
Private / Link-local - blocks / addressing / subnets

https://en.wikipedia.org/wiki/Reserved_IP_addresses
Public - blocks / addressing

WAN / LAN
Router/Switch/Hub/Ap/Bridging
DHCP / STATIC - addressing
DHCP - range / leasetime
MAC address / ARP
ping/icmp
Routing / NAT / GATEWAY / DNS
VLAN

Wireshark
Offline
User avatar

Hedgespoken

  • Posts: 2
  • Joined: Thu Jan 21, 2021 11:31 am
  • Real Name: Tom Hirons

Re: howto: ATEM Switchers 8.x on Ubuntu Linux 20.04 using wi

PostWed Feb 10, 2021 2:11 pm

This is amazing work - thank you so much. I had just about resigned myself to having a Windows laptop for the first time in 20 years... I haven't tested it properly yet, but I have an install that launches and appears to be good, on Debian 10.
Offline

DroidU

  • Posts: 2
  • Joined: Mon Apr 03, 2023 11:24 am
  • Real Name: Berecz Kornel

Re: howto: ATEM Switchers 8.x on Ubuntu Linux 20.04 using wi

PostMon Apr 03, 2023 11:30 am

Has anyone managed to get ATEM Switchers 9.x working? Version 8.x works fine under Debian 11, but it seems that since the major version change, 9.x doesn't want to start anymore.
Offline

Rich_Brown

  • Posts: 1
  • Joined: Wed Jun 21, 2023 2:32 am
  • Real Name: Rich Brown

Re: howto: ATEM Switchers 8.x on Ubuntu Linux 20.04 using wi

PostWed Jun 21, 2023 3:00 am

The instructions Walter Sonius posted still work.

Tested with Linux Mint 21.1 Cinnamon, ATEM Mini Pro and software version 8.6.1.
Happily, I had an older version of the software sitting where I had downloaded it on my desktop so I didn't need to try and likely fail with version 9.x.x of the control software.

Wine installed a few of the .dll files in the wrong location - I copied them into the directory where the software was to run. The .dlls were:
MSCVP140.dll
VCRUNTIME140.dll
Qt5Core.dll
Qt5Network.dll
soxr.dll
vcomp140.dll
Wine listed them in error messages as the software was trying to start up so it wasn't too difficult to get things straightened out.

I added a second Ethernet configuration to set the laptop IP to 169.254.254.1 - this way I can use a plain Ethernet cable to link the laptop and ATEM whenever a couple 'real' network ports are unavailable.

Thank you Walter; everything I need works! (It would be so much easier if Blackmagicdesign opted to issue a Linux version of the control software.)
Offline

DroidU

  • Posts: 2
  • Joined: Mon Apr 03, 2023 11:24 am
  • Real Name: Berecz Kornel

Re: howto: ATEM Switchers 8.x on Ubuntu Linux 20.04 using wi

PostThu Aug 31, 2023 12:56 pm

In the meantime, we managed to get 9.0.2 working. vcrun2019 must be installed with winetricks. Unfortunately, the recently released 9.1 no longer starts at all. Tried under Debian 12 with Wine 8.0, it doesn't work either. After starting I get this error message:
Code: Select all
qt.qpa.window: SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2) failed: COM error 0x57: Invalid parameter.
Qt's default DPI awareness context is DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2. If you know what you are doing you can overwrite this default using qt.conf (https://doc.qt.io/qt-6/highdpi.html#configuring-windows)
0108:err:combase:RoGetActivationFactory Failed to find library for L"Windows.UI.ViewManagement.UISettings"
Any ideas?

Return to Live Production

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 70 guests