Saturday, September 22, 2018

OBS Black/Frozen Screen Issue

Recently I went back to streaming and tried to improve my setup and use Streamlabs OBS (SLOBS), a variant of the popular Open Broadcaster Software (OBS) which includes a really nice app for iOS and Android which lets you control you broadcast.

My only issue about SLOBS (and/or OBS) in general is when you stream some games, its a hit or miss experience. Most of the reported issues include a black screen (but with audio) or in my experience, frozen frames as I transition from one part of a game to another.

I had the time to do some trial and error testing yesterday and listed below is the pre-requisites and some quick summary of my setup. Take note of the terminologies used throughout this post.

Terminologies
  • SLOBS/OBS - Streaming software, liberally used interchangeably in this post. 
  • Source - This is where an input of OBS is coming from. This can be a webcam, computer screen, full screen application, a webpage, an image, etc.
  • Display Capture - Captures your whole screen regardless of what application you are running
  • Game Capture - Captures several types of game windows, any full screen application, target app, etc.
  • Overlay - Any software that puts information on top of a window (ie. stats, readings, quick controls, etc)
  • Anti-cheat hook - An option in SLOBS/OBS where the window listener will mimic user behaviour to avoid triggering anti-cheat applications
  • Blizzard games - Anything launched within the Battle.net launcher. This includes Diablo 3, Overwatch, Starcraft, World of Warcaft, etc.
  • Other games - Any other game outside of Battle.net titles.
Pre-requisites
  1. Run as Administrator - Run SLOBS as Administrator
  2. New game, new stream - If you are changing a game, it is advisable to stop the stream, close the game, start the new game and start a new stream. I had issues where OBS failed to capture the new full screen application after relaunching, at times even the display capture fails to stream it properly.
  3. Disable overlays you don't use - The only overlay I want is the MSI Afterburner so that I can track my CPU/GPU usage and temp when I'm watching my recording. The NVidia game stream overlay and the Windows 10 Game Mode should be disabled since OBS tends to panic with so much overlays.
  4. Disable anti-cheat hook - Disable the anti-cheat hook for game capture. This is one of the recommendations found from scouring the forums about black screen issues. 
Setup your SLOBS/OBS

Below is my SLOBS/OBS desktop app setup which has 4 scenes:

  • Stand By - For the standby image, the source is just an image
  • Blizz (Game; No Overlay) - Which includes a Game Capture source with overlay unchecked, anti-cheat hook unchecked
  • Other Games (Disp Cap) - For all other games with a Display Capture source
  • Other Games (Game Cap) - For all other games with a Game Capture source with overlay checked and anti-cheat hook unchecked
In my SLOBS app, I start with the Stand By scene and just toggle to the other scenes as needed. 


Final Notes

Please keep in mind that the tests performed here is not a complete and exhaustive test on what works for what games all the time. It is always better to preview your OBS using a second monitor or hope that the SLOBS mobile app would include a feature to preview your stream before hitting that "Go Live" button. 

The combination of SLOBS desktop and mobile app completely removes the need for an expensive device like an Elgato Stream Deck. While it is lacking in some of the aspects like: Why cant it properly handle overlays? Why does it panic if you have too many of the same sources in too many scenes? For a free application, I'm not one to complain. I do feel that at times it is disappointing to go back to my stream and see that nothing was captured. 

Here are Some of my TLDRs;
  • Blizzard games doesnt like overlay (and display capture)
  • Other games is ok with overlay using Display Capture
  • PUBG doesnt like Game Capture (with or w/o overlay)
  • Use Display Capture as much as possible

Sunday, April 14, 2013

Self Signed SSL Certificates

Ever wondered how to enable SSL or HTTPS on your site? If you dont want to pay for commercial SSL certificates, you could create self signed certificates for your site by following the instructions here:

https://www.digitalocean.com/community/articles/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-12-04

The instructions in the site above will make your default site HTTPS enabled. If you prefer having a commercial SSL, save your certificate files and key files in your server and edit the location on the /etc/apache2/sites-enabled/default to point to the directory where you stored those files.

Sunday, December 2, 2012

Report-a-Potty

In line with the nationwide Sanitation Hackathon organized by several organizations here in the philippines and abroad, I mentored for one of the GDG chapters here in Davao.

After my presentation yesterday, I myself attempted to do a quick hack on how to help in the sanitation problems faced here and abroad.


Using Google Maps Javascript API and a supposedly a little bit of PHP (but I became to busy to continue the rest of the application) I've created a webapp which does a simple basic thing: get your current location and report/tag it as an offender. This is in hoping that the corresponding establishments and local government units to improve the sanitation of their provided restroom facilities.



Unfortunately, since im one of the mentors for the Davao participants, I wont be able to join the submission of entries. Its a nice proof of concept though :) 

The source code could be viewed (since its all just a bunch of HTML and JavaScript. The app is available at http://tinyurl.com/pogzsanhack 


Friday, September 21, 2012

LTE and the Unlocked iPhone 5


So heres the deal, theres a new iPhone out there and its got the new blazing LTE. If you're planning to get one buying from countries which have unlocked options (Canada, Singapore, Hong Kong) doesnt necessarily merit that you'll get LTE compatibility wherever you go.

In the iPhone 5 website, theres a little asterisk there. Pretty sneaky if you ask me, that they have created 2 different models probably using 2 different LTE chips.

GSM model A1428*: UMTS/HSPA+/DC-HSDPA (850, 900, 1900, 2100 MHz); GSM/EDGE (850, 900, 1800, 1900 MHz); LTE (Bands 4 and 17) 
GSM model A1429*: UMTS/HSPA+/DC-HSDPA (850, 900, 1900, 2100 MHz); GSM/EDGE (850, 900, 1800, 1900 MHz); LTE (Bands 1, 3, 5)
- From: http://www.apple.com/iphone/specs.html

So what does this mean? If you're planning to get an unlocked unit from other country, LTE speeds might not be compatible with yours. From Wikpedia, theres a working list of LTE bands per country.

With me residing in the Philippines it seems that the LTE band in the Philippines is LTE Band 1 and 3 (GSM model A1429). But what if im travelling outside? US or Canada perhaps? I think what better way to explain this by plotting it into a spreadsheet.



So, how do you look at the graph? Normally, you would be sourcing your phone from somehere its factory unlocked. Either Hong Kong, Singapore, Canada (or US once they make it available in the Apple Store) So, look for the country where your unlocked iPhone will be originating. Most likely that the iPhone that will be sold there will be using that LTE band (duh). After, look for the country you will be using your phone. For me, I will be looking at the Philippines.

From here, it seems like the Philippines is using LTE band 1 and 3 (A1429) and the countries which will most likely sell an unlocked A1429 would be: Singapore, Hong Kong, Australia.

If you would notice, if I buy myself an A1429.. LTE features might not work when I fly to either Canada or the US. Sad.

Anyway, as a disclaimer, this spreadsheet was compiled September 2012 and may not reflect the changes once new carriers roll out new LTE infrastructure in the future.

Saturday, September 15, 2012

Comparing Prepaid Data Plans from Globe, Smart and Sun

Recently I have been thinking about those minor differences when it comes to subscribing to a data plan here in the country. So far we're fortunate that we have lots of options but apparently, it takes some discerning as to what to subscribe to given the situation.

I have been in several instances wherein, I was at the beach with friends for 3 days. I would be getting a better deal if I subscribed into an unlimited data for 3 days rather than 1 day and resubscribe every time. Thinking about my consumption, since I didnt bring my laptop then (hey, it was Boracay!) the only thing I do with my iPhone was to check my mail and check in to 4square. Maybe an MB based subscription might be better.

On a recent trip, I was on the road going to the beach (again) but this time I have with me my laptop with the intention of squeezing in some work during the long travel time. I opted to subscribe for a 1 day unlimited since I knew for a fact that I would't be working on the way back.

So upon rummaging through the websites of our favorite telcos, I sorted the mobile dataplan for each. One is for MB based (currently sorted by the allocated MB) you may also cross reference it for the cost/MB ratio if you're getting a good deal.



Another, comparing the unlimited data plans. I sorted them according to the number of days you would be needing to be online. Again I also provided a column for cost/day ratio which you could try to pick if its just right for you.



Take note that these plans are for PREPAID sims only. I also did not include the hourly plan of Sun which doesnt really coincide with the MB chart.

Wednesday, June 13, 2012

Data Disaster

Several years ago, I was issued a white Macbook for work which I typically use for everything. I have my work files there, I have my personal files there and it has been part of my life. A colleague who was issued the same Macbook model woke up with an error with his Mac hard drive. 
Photo credit from here
As part of my work, I tried to recover whatever is recoverable in his drive. We had a Network Access Storage (NAS) which is seldom used but most of his files are in his Mac hard drive. Tough luck, after doing whatever I can to recover, I declared it dead. It was lucky that it was still under warranty but the files lost, or the time devoted to writing those files or creating those files will never be replaced. 

Soon enough, despite that warning, mine gave out. Died. Same error. Despite that earlier warning, I didnt back up either to the NAS or to any other storage. If felt like my life has been wiped clean. Source codes, documents, pictures, my life. Its hard to accept losing something that you've taken time to collect. Those pictures, that vacation, that exact moment, those kilo lines of code you wrote. Gone. 

I picked up whats left from fragments of my life scattered around. Some work files are in the NAS, some were in Google Docs, some in my old desktop PC, some in my laptop which was with my sister in Canada. As for the pictures, I had to pay Multiply to bulk download all my pictures in high res. I had to pay for my pictures. I kinda felt raped. Multiply was never fair to those people taking away data (see this post)

I bounced back after some time, I just thought to myself, any file that I wouldnt be looking for isnt probably needed anymore. After several years and several iterations of hardware, I found myself having too much spare hard drives either being given to me by my uncle as spare parts or part of my old PC. Old stuff, 40GB, 80GB, 120GB, 250GB IDE drives. Not much use slapped inside a PC. 

Lining them up to be loaded and labelled
It took some time for me to sort out everything in my digital life. In general, I have sorted into folders like: Pictures, Downloads, Documents, Music, Pogz Files (source codes and anything that doesnt fit anywhere else) and figured out that most of the folders, when organized properly are relatively small. Chunks of 10GB, 27GB and the largest are like 78GB, 40GB. Then I realized that maybe I could do a quarterly backup using my old drives. Its like a puzzle making combinations of folders fit in drives which had limited capacity. I end up with several drives and most of my folders backed up in 2 drives. I cant gamble the reliability of those old drives so having a secondary or tertiary backup would be great (since I have a lot of drives anyway). 

Yesterday, my netbook just gave up on me. Again, most of my files are there but thankfully, a part of the partition is still intact. I've been backing up since last night to my drives and would send the laptop to HP to claim its rightful warranty. 

My IDE poormans drive backup didnt save me this time, but it felt assuring that I do have some backups (even if its months back) rather than starting my life from scratch. 

To those who might ask: Why not buy dedicated cloud storage for backup? Dropbox? Google Drive? Amazon S3 + ZManda? 

To tell you the truth, I have considered that option. It would be a whole lot cheaper and more reliable than what I do, or compared to buying NAS drives or portable hard drives. But the problem is, despite my downstream hitting around 2Mbps, my upstream is a measly 512Kbps. The total filesize of all my folders is around 170gb. I have files which also exceeds upload limits. 

Then again, being partially safe, is better than not being safe. 




Sunday, October 2, 2011

[Programming] XMPP and Office Guru (Part 2)

Since my last post, I had a really hard time making XMPP work using XMPP severs for Linux. Luckily, there was an easier way of doing things without the messy details of installing and hosting your own XMPP server. From this post, How to Write Your Own IM Bot in Less Than 5 Minutes (http://www.labnol.org/internet/tutorial-create-bot-for-gtalk-yahoo-messenger/4354/) I found out that there is a service called IMified which 'hosts' your bots and calls a specific page to do all the processing. As an overview, below is a simple diagram on how IMified works.


So going back to our previous problem, how do we create a location monitoring application which accepts user input thru IM and then displays it to a screen? So with my IMified bot in place, what I did was to code a simple PHP page which accepts POST parameters from IMified and processes it accordingly. Below is the source code for the page which accepts the values sent from IMified

<?PHP
/* 
IMified Message Handler
Allan Paul "Pogz" Sy Ortile
June 2011

IMified sends information through POST requests 
which in turn is then handled by this page.
For the complete list of POST values sent, you
may consult http://www.imified.com/developers/api
for more details. 
*/

$user = $_POST['user'];
$msg = $_POST['msg'];
// Time stamp to log what time the message was recieved
$time = time();

// Connect to database
$con = mysql_connect("host","username","password");
if (!$con)
	{
	die('Could not connect: ' . mysql_error());
	}
else 
	{
	// Select the database to use
	mysql_select_db("db_name", $con);

	// Ass the message to the table in the database	
	mysql_query("UPDATE tbl_user SET time = '$time', location = '$msg' WHERE ymuser = '$user' ");

	// Bot reply to user
	echo "Hi " . $user . "! Your current location has been logged! ";
	mysql_close($con);
	}

?>

If we would trace what is happening between the user, the IMified service and the webserver you may refer to the steps below:

1.) ymuser sends "currently at the office" to the ymchatbot hosted by IMified
2.) IMified processes the message and then passes the POST values to the page located in our webserver
$_POST['user']; now contains the value ymuser
$_POST['msg']; now contains "currently at the office"
3.) The accepting page now processes the POST values sent which is then saved to a database along with a timestamp generated from the PHP code.
4.) The accepting page replies with "Hi ymuser! Your current location has been logged!"

So now, the values are saved into our MySQL database which is then picked up by another page which is just a regular PHP page. The source code could be found below:

<?PHP
/* 
Location Output Page
Allan Paul "Pogz" Sy Ortile
June 2011
*/

// Connect to database
$con = mysql_connect("host","username","password");
if (!$con)
	{
	die('Could not connect: ' . mysql_error());
	}
else 
	{
	// Use database and table
	mysql_select_db("db_name", $con);

	// Do query and pick only the ones in the SMS team and order it by latest timestamp
	$result = mysql_query("SELECT * FROM tbl_user WHERE team = 'SMS' ORDER BY time DESC ");
	
	// Display unique recent post
	echo "<body bgcolor='#FFFFEE'>
	<div align='center'>
	<table border='1'>
	<tr>
	<th align='center'><b><font size='+2' 'verdana'>USERNAME</b></font></th>
	<th width='250' align='center' ><b><font size='+2' 'verdana'>TIME</b></font></th>
	<th width='550'><b><font size='+2' 'verdana'>LOCATION</b></font></th>
	</tr>";
	
	// Some output mumbojumbo
	while($row = mysql_fetch_array($result))
	{
	$human_time = date('d-m-y H:i',$row['time']);
	echo "<tr>";
	echo "<td align='center'><font size='+2' face='verdana'>" . $row['dlsuuser'] . "</font></td>";
	echo "<td align='center'><font size='+1' face='verdana'><b>" . $human_time . "</b></font></td>";
	echo "<td><font size='+2' face='verdana'>" . $row['location'] . "</font></td>";	
	echo "</tr>";
	}
	echo "</table>
	</div></body>";

	mysql_close($con);
	}

?>

The database schema contains the following fields: uid, ymuser, dlsuuser, time, location, team. All of which are text values save for uid and time which are integer values. So, you might be wondering why I opted having a ymuser field and a dlsuuser field. The two fields just does a mapping of the persons YM id with its corresponding work userid. Its just for formalization.

From our infrastructure monitoring screen, I just added an iframe which just calls the page where the results are displayed.

Its pretty much straight forward.