Skip to content

Add Tweet Sync Support #36

Description

@watfordjc

Feature Branch

Current feature branch for this issue: feature/issue-36/obs-1.

Progress

OBS Project

  • Migrate any relevant code from the C# library to StreamController.
  • Decide how to tell OBS to switch to a different displayed Tweet.
  • Use existing scripts to fetch a profile image if not already downloaded.
  • Work out how to implement Text to Speech.
    • Add text to speech for currently displayed Tweet.
    • Add ability to change preferred TTS audio output interface.
      • Currently hard-coded to the first render device containing "CABLE" in its FriendlyName falling back to the default render device.
    • Add TTS "limit to" options:
      • Enable TTS for Tweets and Retweets from particular accounts (e.g. @DHSCgovuk).
      • Enable TTS for Tweets matching key phrases (e.g. "critical incident").
    • Add PascalCase and camelCase word splitting.
    • Add initialism (non-pronounceable acronym) character splitting.
  • Fix issue with processing of Tweets stopping working until program restarted.
    • During a stream test it became apparent the Tweets source was no longer being updated and that a restart of Stream Controller was required.
    • Even when it is working, some Tweets cannot be parsed due to COMException.
      • Some try/catch statements are initially pointing at an issue with the verticalMessagePanel.ClearArea() call in DrawVerticalTweet().
      • Potentially fixed by commit e1d1d9d
  • Fix occasional clock delay during Tweet change at the top of the minute. At 60 FPS, saw the minute rollover take 15 frames longer than it should have.
    • Latency/lag issue fixed in commit e6777f9.
  • Fix issue in FileSystemWatcher_Changed() regarding dates and log file rollover.
  • Add a "profileImageAsBadge" boolean option to Tweet image generation. Some profile images have a white circular border nearly touching the edge of the profile picture, presumably for zoom/alignment tweaking when adding to a profile.
    • Work out how to emulate a badge press in Direct2D.
    • Potentially look into how to add depth so it looks more like a real badge.

Twitter API Project

  • Contemplate building Twitter API support into application.

UI Project

  • Create a preferences tab for mIRC log Tweet parsing… IRC Tweet Relay.

Windows Audio Project

  • Fix issue with default render device appearing to be set to default/null (or not updating) on turning off headphones.
    • Add configuration options for TTS output device, TTS monitor device, and whether default audio output should be used if monitor device is not available.

External Repositories

watfordjc/csharp-message-to-image-library

  • Create a Direct2D wrapper library.
    • Create a C++ library that uses Direct2D.
    • Create a way for C# code to interface with the C++ library.
    • Create a C# library.
  • Convert C# library from a WPF application to a library.
  • Convert Direct2D Wrapper Library to a git submodule.
  • Fix memleaks, possibly by using smart pointers.
    • Under investigation.

watfordjc/obs-shm-image-source

  • Look into creating an obs plugin:
    • Look into whether or not there is a way to remove the need to save the Tweet images to files. Can OBS access shared memory?
    • Consider using slideshow instead of image source.
      • Slide show images can be loaded into video memory before they are shown. Changing an image source's file property results in a minuscule delay in switching image while the new image is being loaded.
      • During a stream test it became apparent the lower third slideshow (hard-coded next slide hotkey of F20) wasn't automatically switching slides.
        • The next slide function is currently static void ss_next_slide(void *data) in obs-slideshow.c.
        • Work out if it is possible to call the function from a LUA script (will need to pass a struct slideshow as void *data).
        • Work out if it is possible to make a LUA script function available via obs-websocket.
        • The next version of OBS has media controls. obs-websocket is reporting MediaNext events on slide change and the next version of obs-websocket has a NextMedia request that documentation says currently "Supports only vlc media source (as of OBS v25.0.8)".
  • Use DXGI csharp-message-to-image-library#1 - Use DXGI

Background

With the work done on synchronising clock, weather, and slideshow changes, the only non-synced objects in OBS are the following:

  • Scene changes - I think I want to keep those as they are
  • Tweets - These are currently from a custom mIRC window and are cycled:
    • Every 5 seconds (timer time, not clock time) if there is no text to speech for the Tweet, or,
    • After text to speech has read the Tweet out.
  • Video content (i.e. FaceRig "webcam", game content, etc.) - can't sync without becoming a robot.

My Tweet panel could be changed in a number of ways, and it uses a number of interconnected parts that I haven't published the code for. This issue is going to be a tad complex and require making decisions about whether or not to change my current backend.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions