1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Automobilista 2 Auto Director for Broadcasts

Discussion in 'Automobilista 2 - General Discussion' started by RnageyRover, Jun 24, 2023.

  1. RnageyRover

    RnageyRover Member AMS2 Club Member

    Joined:
    Aug 8, 2022
    Messages:
    51
    Likes Received:
    56
    Hi All,
    Linked is AMS2 Auto Director running in Simhub. Automobilista 2 Auto Director
    There are limited keyboard commands available, Up, down, enter for drivers, u to change across to cameras, left right, enter for camera type. Thats it.
    Auto Director runs in SimHub monitoring AMS2 in UDP mode.
    In UDP mode it can give data in Spectator, Broadcast and Replay.



    Auto Director has some basic rules.
    • Smallest gap is the most dominant
    • It wont show you in the pits unless you enter with the camera on you cos pits are boring
    • It has a small bias for leading cars
    • It wont change camera if the next change is within 1 of the current camera, it's jarring and it's the same battle
    So it cant do too much fancy stuff. changing cameras is very jarring, so I'm not doing it yet

    To Install:
    • Import the dash into simhub
    • Run TestAuto4.Exe
    To Operate:
    • Start AMS2
    • Run simhub dash
    • RunTestAuto4.Exe and give it the simhub dash OBS address
    • Tell TestAuto4.Exe How many drivers
    • Be in Spectator or Broadcast mode
    • Start the race
    • Start
    • TestAuto4.Exe Press enter
    • Chrome will start running selenium
    • Click driver 1 and leave the game in focus
    • TestAuto4.Exe will press the buttons for you.
    Enjoy Auto Director!

    RangeyRover
     
    Last edited: Apr 2, 2024
    • Like x 6
    • Winner x 5
    • Agree x 1
    • Useful x 1
    • Optimistic x 1
  2. hb22

    hb22 Member

    Joined:
    Jul 25, 2022
    Messages:
    62
    Likes Received:
    30
    Sounds very good! I wonder if it could be good to have the options to auto switch to any car that leaves the track or makes contact with track or cars?
     
  3. RnageyRover

    RnageyRover Member AMS2 Club Member

    Joined:
    Aug 8, 2022
    Messages:
    51
    Likes Received:
    56
    RaceRoom Auto director does that, but to be honest I don't like it as it never switches the camera in time for the incident.
     
    • Informative Informative x 1
  4. RnageyRover

    RnageyRover Member AMS2 Club Member

    Joined:
    Aug 8, 2022
    Messages:
    51
    Likes Received:
    56
    Auto director version for replays, Need to have simhub set to UDP mode for this to work.
     
    • Friendly Friendly x 1
  5. RnageyRover

    RnageyRover Member AMS2 Club Member

    Joined:
    Aug 8, 2022
    Messages:
    51
    Likes Received:
    56
    Also works in Spectate mode on live races, Simhub data isnt available until after the first lap, but after that it does good.
     
    • Like Like x 1
  6. RnageyRover

    RnageyRover Member AMS2 Club Member

    Joined:
    Aug 8, 2022
    Messages:
    51
    Likes Received:
    56
    Simhub dash for the overlay. To use as a Director or spectator change AMS2 to UDP mode in simhub, and use the OBS browser overlay in the streaming software.
    Auto director is a python based script that opens chrome and presses up, down and enter on your system to change cameras.

    I've taken a different direction with this and discovered that simhub can get useful data in Replays, Spectator and Broadcasters modes when switched to UDP.
    This means that we cant use gary swallows excellent plugin however as it doesn't work in that mode.

    What we have now is an Auto director that works in race mode only (for now) for Replays, Spectator and Broadcasters.

    It's driven by the simhub overlay. The simhub overlay gets the data from the streamers AMS2 and we use the OBS browser option of simhub to get the overlays into the stream. I was helped with the GFX (as thats not my thing ) by @Scotty_g of CASS Thanks Mate

    The python script (it's really a script glued together as an .exe) reads invisible text from the overlay to determine which racer to show, and opens a chrome instance of the overlay, reads it, and presses up, down and enter on your system to change cameras.

    Auto Director is too big to upload here, you can grab it at Automobilista 2 Auto Director - Updates

    It targets the smallest gap to view.
    Example of use here:
     

    Attached Files:

    Last edited: Sep 18, 2023
  7. RnageyRover

    RnageyRover Member AMS2 Club Member

    Joined:
    Aug 8, 2022
    Messages:
    51
    Likes Received:
    56
    Also, if this ever gets read by anyone at Reiza, please please give us an API or keyboard commands to change cameras without the overlay being on the screen.
    Please add a comment if you are looking for broadcast options for your leagues, let Reiza know we would love to help promote the game!
     
    • Agree Agree x 4
  8. Wolfgang Herold

    Wolfgang Herold I Like Liveries :) AMS2 Club Member

    Joined:
    Apr 3, 2016
    Messages:
    2,284
    Likes Received:
    1,368
    we demanded that from SMS since 2015 when pC2 development started.
    A simple interface where you can send external commands for camera control and driver switching.
    Also here in the forum it was done several times
     
  9. RnageyRover

    RnageyRover Member AMS2 Club Member

    Joined:
    Aug 8, 2022
    Messages:
    51
    Likes Received:
    56
    Ok, well I won't hold my breath waiting then. I hope if we can make a decent Auto Director, and show the potential, it might give a compelling reason for Reiza to take action, as it will result in more online promotion of the sim.
     
  10. Wolfgang Herold

    Wolfgang Herold I Like Liveries :) AMS2 Club Member

    Joined:
    Apr 3, 2016
    Messages:
    2,284
    Likes Received:
    1,368
    the functionality is here ( Director + Broadcaster )
    All we need is the interface
     
  11. RnageyRover

    RnageyRover Member AMS2 Club Member

    Joined:
    Aug 8, 2022
    Messages:
    51
    Likes Received:
    56
    That's true.
    I'm also running the Auto Director in Spectator & Replays, as well as Director/Broadcaster
    It's hard to find a Director Broadcaster Pair. You don't need to if you run in spectator mode, in fact you can spectate and Auto Direct on any open Multiplayer race. I'd just like the interface to get out of the way and we have this whole problem cracked.
     
  12. RnageyRover

    RnageyRover Member AMS2 Club Member

    Joined:
    Aug 8, 2022
    Messages:
    51
    Likes Received:
    56
    This is the Auto Director working with the data available in Director mode.
     
    Last edited: Sep 22, 2023
    • Like Like x 1
  13. RnageyRover

    RnageyRover Member AMS2 Club Member

    Joined:
    Aug 8, 2022
    Messages:
    51
    Likes Received:
    56

    Auto director working with replays in UDP mode
     
    • Like Like x 2
  14. Canarindamix

    Canarindamix New Member AMS2 Club Member

    Joined:
    Jul 30, 2023
    Messages:
    11
    Likes Received:
    14
    Thanks for that, I gave it a try with a replay of an event we had this week, worked pretty well, but for some reason the dashboard seems to be missing all the nice parts :p It shows only text for some reason. I've tried to open it in edit mode in simhub, it looks the same, I mean I don't see any elements there that would produce the same look as you have in your videos. Is it possible you uploaded an unfinished version maybe?



    After a while the script was stuck on one car for some reason (if I remember well the driver crashed and rage quit the session :D) and wouldn't show anything else anymore.
     
  15. RnageyRover

    RnageyRover Member AMS2 Club Member

    Joined:
    Aug 8, 2022
    Messages:
    51
    Likes Received:
    56
    Really happy to see someone using it!
    I've fixed the pit bugs today, I hope.
    Here's the latest, the png that is the background is definitely in the ressources file, I checked.
    you can see in this example I had the same bug, I hope ive fixed it.
     

    Attached Files:

    • Like Like x 1
  16. Canarindamix

    Canarindamix New Member AMS2 Club Member

    Joined:
    Jul 30, 2023
    Messages:
    11
    Likes Received:
    14
    Thanks! So I think the problem is that in the version you uploaded to racedepartment, the dashboard which is included is the v0.1, not this v0.2. I Imported this v0.2 and now it looks like on your video.
    If you post a version of the script with your (potential) fix for the pit I can try it with my replay to see if that works there too ;)

    Also, when the script asks for the number of cars, should I include the safety car?
     
  17. RnageyRover

    RnageyRover Member AMS2 Club Member

    Joined:
    Aug 8, 2022
    Messages:
    51
    Likes Received:
    56
    Hi mate,
    The smarts are actually in the simhubdash not the python script, that just does as it's told by the dash. As long as you add more than the drivers you are good, the only thing that is used for is to find position 1 again, if it presses too many times it doesn't matter.
    I only made v0.2 today, and just made V0.3 for you with all the pits smarts in I hope.
    Off to bed in Oz, let me know how you go.
    Edit, and it does work with replay, for sure, if you are in UDP mode in simhub
     

    Attached Files:

    • Like Like x 1
  18. Canarindamix

    Canarindamix New Member AMS2 Club Member

    Joined:
    Jul 30, 2023
    Messages:
    11
    Likes Received:
    14
    Hi there, I gave it another try and this time there was no monkey business, it managed the whole race properly ;)
    Thanks a lot for the bug fixes!
     
    • Like Like x 1
  19. RnageyRover

    RnageyRover Member AMS2 Club Member

    Joined:
    Aug 8, 2022
    Messages:
    51
    Likes Received:
    56
    That's excellent news. I'm working on a new version that can accommodate Practice and Qualification.
     
  20. RnageyRover

    RnageyRover Member AMS2 Club Member

    Joined:
    Aug 8, 2022
    Messages:
    51
    Likes Received:
    56
    Looks like I still have some bug fixes to do looking at your replay, it occasionally doesn't get the correct driver, I'm assuming because the race position has changed, and then the GFX aren't on the correct driver, also, Battle for 0rd? I really need to fix that lol
     

Share This Page