Difference between revisions of "OBS - Open Broadcast Studio"

From BATC Wiki
Jump to navigation Jump to search
 
(31 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Open Broadcast Studio is a free and open source software for video recording and live streaming.
+
Open Broadcast Studio is a free and open source software for video recording and live streaming. Used with a separate software video encoder, such as F1EJP's FreeStreamCoder, it can give a semi-professional look to the content sent to a Portsdown DATV transmitter. You can create scenes made up of multiple sources including window captures, images, text, browser windows, webcams, capture cards and more. This configuration produces an HD 1280 x 720 25 fps output configured for a H264 encoded 333kS/s FEC 3/4 transmission.
  
It enables high performance real time video/audio capturing and mixing. Create scenes made up of multiple sources including window captures, images, text, browser windows, webcams, capture cards and more.
+
[[File:Screenshot 2019-05-22 07.33.05.png|600px]]
  
[[File:Screenshot 2019-05-22 07.33.05.png|600px]]
+
=====Hardware=====
 +
You will need a capable PC. It should have an Intel i5-10500 processor or better, 16GB RAM, an SSD and ideally an nVidia graphics card that supports NVENC video encoding. GTX1050, GTX1070, GTX1660, RTX A2000, RTX3050 etc. or better are suitable models. It's also possible to use the QuickSync video encoder built into the Intel processor mentioned above or later versions with acceptable results.
 +
 
 +
Your Portsdown and PC must be connected to the same Ethernet network. Usually, you would add a cable from your Portsdown to a spare LAN port on the Internet router. Alternatively, use a small ethernet switch in the shack with a feed back to the router. Don't be tempted to use WiFi for either the Portsdown or the PC; the results will be disapointing.
 +
 
 +
The Portsdown 4 with either a Pluto or Lime SDR and the Raspberry Pi 3 based Portsdown 2020 with a BATC Filter/Modulator board can be used.
 +
 
 +
=====Software=====
 +
Your PC should be running Microsoft Windows 10 or 11 and be updated to the 22H2 release. If using an nVidia graphics card it is essential to use the latest drivers. See the nVidia website.
  
==Download==
+
Download OBS v27.2.4. It's not the latest version, but can be found (amongst others) from this archive: [https://www.filehorse.com/download-obs-studio-64/70331/download/ https:// www.filehorse.com/download-obs- ... /download/] and install it. Later versions will not work with the Virtual Camera below, so ignore any requests to upgrade to a newer version.
More details on the features and the program download from https://obsproject.com/
 
  
==Using OBS with Portsdown==
+
Download the Virtual Camera v2.05 plugin from here: [https://obsproject.com/forum/resources/obs-virtualcam.949/download https://obsproject.com/forum/resources/obs-virtualcam.949/download] Open the file and the installer should find the OBS installation and place the files in the right place.
  
OBS can be used as a fully flexible video source for the Portsdown DATV system. The program interfaces in to the Portsdown over a wired network connection via an ffmpeg script developed by Evariste F5OEO.
+
Download FreeStreamEncoder from here: http://www.vivadatv.org/viewtopic.php?f=78&t=1007 Create a folder in the root of your C: drive named F1EJP (C:\F1EJP). Copy the downloaded file to the new folder and extract the content of the zip archive to this folder.
  
===Preparing the system===
+
=====FreeStreamCoder configuration=====
  
====Software====
+
Once you have set the Portsdown up and connected to the network, get its IP address from the Info button at the bottom of the M2 menu. Typically it will be 192.168.1.xxx where xxx is a number from 2 to 253. Run the FreeStreamCoder and select the middle tab. On FreeStreamEncoder, select the Configuration tab. Use the Input drop down menu to select OBS + VirtualCam.
As well as downloading OBS (making sure you get the right version for your system ie 64bit/32bit) and ensuring it runs on your PC, you will also need to download ffmpeg from https://ffmpeg.org/ - ffmpeg should then be installed on your PC at C:/ffmpeg. If you are using a Windows PC then you will need to change some files to ones compiled with pthreads as the w32thread compiled files will cause instability problems with your UDP stream. You can download the files from here [https://github.com/jaskie/Server/wiki/files/ffmpeg-alternative-builds.7z Download]. Once downloaded copy all the files in the ffmpeg-4.0.2-pthreads folder to C:/ffmpeg and over write the original files.  
 
  
It is also useful to have VLC on the PC for testing, make sure you download the correct one for your system ie 64bit/32bit this will be important for later use with OBS - https://www.videolan.org/vlc/index.en-GB.html
+
Enter the Porstdown's IP address in the Output IP Address boxes and set the port to 10000. From the Encoder drop down menu select the appropriate entry depending on what hardware accelerated encoding is available. Leave the FPS setting at 25. Audio sample rate should be 48000. Audio sync can be adjusted later.
  
====Hardware====
+
Now select the DVB Tables tab. Enter your callsign and optionally the location in the top boxes. The rest can be left as default.
You will need to setup the Portsdown to talk to your PC via a network cable, WiFi wont work reliably. I set the Portsdown up with a fixed IP of 10.0.0.1 by adding the text ip=10.0.0.1 to the cmdline.txt file found in the root of your SD card.
 
  
Once you have set the Portsdown up and can confirm the network is working, you need to set up OBS.
+
Select the MPEG Transport Stream tab.  Set DVB to DVB-S2, Symbol Rate 333, FEC to 3/4, FEC frame to 64800, Codec to H264, Image size 1280 x 720, FPS to 25, Audio codec to AAC and Audi AAC kb/s to 64. Take note if you are using a BATC Filter/Modulator board, the DVB setting must be DVB-S. DVB-S2 is not supported. That completes the set up of FreeStreamCoder.
  
 
====OBS configuration====
 
====OBS configuration====
  
With OBS running click on the profile tab and then rename the default profile to 250Ks@3/4FEC.  
+
Open OBS. By default it opens with a single screen. To get a preview and program screen select the Studio Mode button in the Controls menu.
 +
 
 +
In the Controls menu select Settings and then Video on the left-hand side of the pop-up window. Set the top two resolution options to 1280 x 720. Lanczos gives the best Downscale filter results but you can play with this setting if the CPU loading is too high.
 +
 
 +
Now select the Audio settings menu. Change the default Global Audio Devices Mic/Auxilliary to a valid hardware device. This might be the integrated microphone of a C920 camera, if plugged in, for example. Sample Rate should be set to 48kHz and Channels to Stereo.
 +
 
 +
Next select the Tools menu from above the Preview screen. Click the VirtualCam button and then click the Start button in the window that appears. Also select the AutoStart check box and leave everything else as default. Close the window.
 +
 
 +
====Getting started with OBS====
  
Now click on the file tab and go to show the profile folder. Within that window you will see a file basic.ini, replace it with the file contained in the zip file below.  
+
This section is not intended to be an in-depth treatise on the use of OBS, but it should give enough detail to get a test card sent to the Portsdown. The test card image can be any a BMP, PNG or JPEG file of 1280 x 720 pixels resolution and should be placed in a folder in the C: drive root of the Windows PC. In the Scenes section click on the + button and with the Create New source button selected enter a suitable name for the test card in the pop-up dialogue. Click OK and with the new scene highlighted click on the + in the sources section.
[[File:Basic.zip|thumb|basic.ini]]
 
  
You can now duplicate this profile and rename them to suit your own choice of SR/FEC combination, I have 250Ks@3/4FEC, 333Ks@3/4FEC,500Ks@1/2FEC,500Ks@3/4FEC and 1Ms@1/2. For each profile you will need to change the muxrate, bitrate and FFVBitrate (video bitrate) values for your given choice of SR/FEC, this can be done from the settings, output (advance), recording or the ini file. Use this site http://www.satbroadcasts.com/DVB-S_Bitrate_and_Bandwidth_Calculator.html to work out your own choice of SR/FEC combinations. You will need to use the "netto ts bitrate" as this is in Mbps we need to multiply this by 1000000 to get bps for both the muxrate and bitrate, for the FFVBitrate (video bitrate) we need to multiply by 0.0006 and just round up to a whole number. So netto ts bitrate is 0.3721 x 1000000 = bitrate/muxrate = 372100 and FFVbitrate 372100 x 0.0006 = 223.26 = 223.
+
In the pop-up window, select image and then in the Create/Select window name the new source; note that this name must be different from the scene name. Now click OK and the properties page appears for the new scene. Use the browse button to bring up a File Explorer window to navigate to the location where the test card image file was stored. Select it and click OK. Click OK.
  
You can set the preview screens up to what ever takes your fancy but the FFRescaleRes should be appropriate for the SR in use so 768x576 or 352x288 are better suited to SR333/250 where as 1280x720 is better left to SR's of 500Ks and above.  
+
The test card image will appear in the preview screen. If it does not fill the screen, right mouse click the image and then select Transform from the pop-up menu and then from the next pop-up menu choose Fit to screen. The image will then fill the preview screen. To keep these settings, click on the lock symbol at the right-hand end of the highlighted source button in the sources section. Now click the Transition button between the two screens and the image will transfer to the Program screen.
  
Once OBS is set up you can test it's all working with VLC set to receive a network connection on udp://230.0.0.11:20000 and hitting the start recording button on OBS.
+
====Testing====
 +
Set the Portsdown to IPTS Monitor; the button can be found in menu M2. Click the start button in FreeStreamCoder. Now the playback in the Program screen will appear on the Portsdown's screen delayed by around 3 seconds if all is well.
  
===ffmpeg batch file===
+
====Using the system====
 +
Set the Portsdown to 333kS/s symbol rate, FEC 3/4, DVB-S2 modulation and the Encoder to IPTS in. Set the Output to to suit your SDR. Set the output frequency.
 +
Now click the Start button on the FreeStreamCoder and then the Tx button on the Portsdown. If all is well, the virtual LED on the FreeStreamCoder will change from Red to Green and a DATV output will appear at the RF output after a few seconds. When the transmission is stopped on the Portsdown, it's best to stop the FreeStreamCoder too.
  
You now need to download the batch file below and you will need to edit it to accommodate your choice of SR/FEC's, Callsign, Ip address.  
+
A final reminder that the Pluto cannot handle H265 in this configuration. Don't try it as it confuses the Pluto, but the Lime Mini and the BATC Filter/Modulator board can take both H265 and H264.
  
[[File:OBS2IPTSin.zip|thumb|OBS2IPTSin]]
+
====Conclusion====
 +
This is a reasonably stable configuration for standard HD in a 333kS/s transmission for most uses that amateurs need such as talking heads and videos without lots of fine moving detail. There's an acceptable delay of between 5 and 7 seconds between input and RF output. It has been run for over an hour without skipping frames on a Core i5-10500 PC with an nVidia RTX A2000 6GB graphics card. Your mileage may vary depending on your hardware specs. It should be used as a starting point for your own experiments with OBS and FreeSteamCoder.

Latest revision as of 14:13, 7 October 2023

Open Broadcast Studio is a free and open source software for video recording and live streaming. Used with a separate software video encoder, such as F1EJP's FreeStreamCoder, it can give a semi-professional look to the content sent to a Portsdown DATV transmitter. You can create scenes made up of multiple sources including window captures, images, text, browser windows, webcams, capture cards and more. This configuration produces an HD 1280 x 720 25 fps output configured for a H264 encoded 333kS/s FEC 3/4 transmission.

Screenshot 2019-05-22 07.33.05.png

Hardware

You will need a capable PC. It should have an Intel i5-10500 processor or better, 16GB RAM, an SSD and ideally an nVidia graphics card that supports NVENC video encoding. GTX1050, GTX1070, GTX1660, RTX A2000, RTX3050 etc. or better are suitable models. It's also possible to use the QuickSync video encoder built into the Intel processor mentioned above or later versions with acceptable results.

Your Portsdown and PC must be connected to the same Ethernet network. Usually, you would add a cable from your Portsdown to a spare LAN port on the Internet router. Alternatively, use a small ethernet switch in the shack with a feed back to the router. Don't be tempted to use WiFi for either the Portsdown or the PC; the results will be disapointing.

The Portsdown 4 with either a Pluto or Lime SDR and the Raspberry Pi 3 based Portsdown 2020 with a BATC Filter/Modulator board can be used.

Software

Your PC should be running Microsoft Windows 10 or 11 and be updated to the 22H2 release. If using an nVidia graphics card it is essential to use the latest drivers. See the nVidia website.

Download OBS v27.2.4. It's not the latest version, but can be found (amongst others) from this archive: https:// www.filehorse.com/download-obs- ... /download/ and install it. Later versions will not work with the Virtual Camera below, so ignore any requests to upgrade to a newer version.

Download the Virtual Camera v2.05 plugin from here: https://obsproject.com/forum/resources/obs-virtualcam.949/download Open the file and the installer should find the OBS installation and place the files in the right place.

Download FreeStreamEncoder from here: http://www.vivadatv.org/viewtopic.php?f=78&t=1007 Create a folder in the root of your C: drive named F1EJP (C:\F1EJP). Copy the downloaded file to the new folder and extract the content of the zip archive to this folder.

FreeStreamCoder configuration

Once you have set the Portsdown up and connected to the network, get its IP address from the Info button at the bottom of the M2 menu. Typically it will be 192.168.1.xxx where xxx is a number from 2 to 253. Run the FreeStreamCoder and select the middle tab. On FreeStreamEncoder, select the Configuration tab. Use the Input drop down menu to select OBS + VirtualCam.

Enter the Porstdown's IP address in the Output IP Address boxes and set the port to 10000. From the Encoder drop down menu select the appropriate entry depending on what hardware accelerated encoding is available. Leave the FPS setting at 25. Audio sample rate should be 48000. Audio sync can be adjusted later.

Now select the DVB Tables tab. Enter your callsign and optionally the location in the top boxes. The rest can be left as default.

Select the MPEG Transport Stream tab. Set DVB to DVB-S2, Symbol Rate 333, FEC to 3/4, FEC frame to 64800, Codec to H264, Image size 1280 x 720, FPS to 25, Audio codec to AAC and Audi AAC kb/s to 64. Take note if you are using a BATC Filter/Modulator board, the DVB setting must be DVB-S. DVB-S2 is not supported. That completes the set up of FreeStreamCoder.

OBS configuration

Open OBS. By default it opens with a single screen. To get a preview and program screen select the Studio Mode button in the Controls menu.

In the Controls menu select Settings and then Video on the left-hand side of the pop-up window. Set the top two resolution options to 1280 x 720. Lanczos gives the best Downscale filter results but you can play with this setting if the CPU loading is too high.

Now select the Audio settings menu. Change the default Global Audio Devices Mic/Auxilliary to a valid hardware device. This might be the integrated microphone of a C920 camera, if plugged in, for example. Sample Rate should be set to 48kHz and Channels to Stereo.

Next select the Tools menu from above the Preview screen. Click the VirtualCam button and then click the Start button in the window that appears. Also select the AutoStart check box and leave everything else as default. Close the window.

Getting started with OBS

This section is not intended to be an in-depth treatise on the use of OBS, but it should give enough detail to get a test card sent to the Portsdown. The test card image can be any a BMP, PNG or JPEG file of 1280 x 720 pixels resolution and should be placed in a folder in the C: drive root of the Windows PC. In the Scenes section click on the + button and with the Create New source button selected enter a suitable name for the test card in the pop-up dialogue. Click OK and with the new scene highlighted click on the + in the sources section.

In the pop-up window, select image and then in the Create/Select window name the new source; note that this name must be different from the scene name. Now click OK and the properties page appears for the new scene. Use the browse button to bring up a File Explorer window to navigate to the location where the test card image file was stored. Select it and click OK. Click OK.

The test card image will appear in the preview screen. If it does not fill the screen, right mouse click the image and then select Transform from the pop-up menu and then from the next pop-up menu choose Fit to screen. The image will then fill the preview screen. To keep these settings, click on the lock symbol at the right-hand end of the highlighted source button in the sources section. Now click the Transition button between the two screens and the image will transfer to the Program screen.

Testing

Set the Portsdown to IPTS Monitor; the button can be found in menu M2. Click the start button in FreeStreamCoder. Now the playback in the Program screen will appear on the Portsdown's screen delayed by around 3 seconds if all is well.

Using the system

Set the Portsdown to 333kS/s symbol rate, FEC 3/4, DVB-S2 modulation and the Encoder to IPTS in. Set the Output to to suit your SDR. Set the output frequency. Now click the Start button on the FreeStreamCoder and then the Tx button on the Portsdown. If all is well, the virtual LED on the FreeStreamCoder will change from Red to Green and a DATV output will appear at the RF output after a few seconds. When the transmission is stopped on the Portsdown, it's best to stop the FreeStreamCoder too.

A final reminder that the Pluto cannot handle H265 in this configuration. Don't try it as it confuses the Pluto, but the Lime Mini and the BATC Filter/Modulator board can take both H265 and H264.

Conclusion

This is a reasonably stable configuration for standard HD in a 333kS/s transmission for most uses that amateurs need such as talking heads and videos without lots of fine moving detail. There's an acceptable delay of between 5 and 7 seconds between input and RF output. It has been run for over an hour without skipping frames on a Core i5-10500 PC with an nVidia RTX A2000 6GB graphics card. Your mileage may vary depending on your hardware specs. It should be used as a starting point for your own experiments with OBS and FreeSteamCoder.