Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OBS Times are always zero in the command output and the csv file even though recording occurs #25

Closed
paulsp opened this issue Dec 6, 2023 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@paulsp
Copy link
Contributor

paulsp commented Dec 6, 2023

tm-switcher v1.7.2
OBS Times are always zero in the command output and the csv file even though recording occurs

Command line output

? Which audience display automation would you like to enable? 
? Start and stop recording for each match?  Yes

[2023-12-06T03:39:51.040Z] info: [00:00:00] Audience display changed to IN_MATCH
[2023-12-06T03:39:51.158Z] info: [00:00:00] Q 5 started on field 3 [OBS: Blue Field, ATEM: none]
[2023-12-06T03:39:59.101Z] info: [00:00:00] Q 5 ended on field 3 
[2023-12-06T03:41:14.249Z] info: [00:00:00] Q 5 activated on field 2 [OBS: Green Field, ATEM: none]
[2023-12-06T03:41:15.276Z] info: [00:00:00] Audience display changed to IN_MATCH
[2023-12-06T03:41:15.397Z] info: [00:00:00] Q 5 started on field 2 [OBS: Green Field, ATEM: none]
[2023-12-06T03:41:23.298Z] info: [00:00:00] Q 5 ended on field 2 

tm_switcher_2023-12-06_times.csv

TIMESTAMP,OBS_TIME,MATCH,TEAMS
2023-12-06T03:39:51.177Z,00:00:00,Q 5,2 9 21 5
2023-12-06T03:41:15.411Z,00:00:00,Q 5,2 9 21 5

OBS Recordings Directory

paul@hummingbird Movies % ls -lt | head
total 99984
-rw-r--r--  1 paul  staff    386303 Dec  5 22:41 2023-12-06T03-41-15.396Z_2_9_21_5.mp4
-rw-r--r--  1 paul  staff    393807 Dec  5 22:40 2023-12-06T03-39-51.147Z_2_9_21_5.mp4
@brenapp brenapp self-assigned this Dec 6, 2023
@brenapp brenapp added the bug Something isn't working label Dec 6, 2023
@brenapp brenapp added this to the v1.8.0 milestone Dec 6, 2023
@paulsp
Copy link
Contributor Author

paulsp commented Dec 6, 2023

After some testing, I have identified the following "timestamps" states.

  • Not recording/streaming. [00:00:00] is currently displayed
  • Match recording by tm-switcher. [00:00:00] is currently displayed
  • Recording/streaming is active, enabled and managed by OBS. The current recording/streaming timestamp is displayed.
  • Recording/streaming is enable, paused, and managed by OBS. The current recording/streaming timestamp is displayed without indication the recording is paused. As a result subsequent matches would have the timestamp.

Suggested timestamps:

  • Not recording and not streaming [ ]
  • Match Recording and not streaming [recorded match filename]
  • Recording/streaming and active [ timestamp d ] where d is S for Streaming and R for Recording
  • Recording/streaming and paused [ timestamp dP] where d is S for Streaming and R for Recording. P = Paused

For the CSV file a state column can be added so the "timestamp" column would be the actual timestamp and the state, "R"/"RP"/..., can be in the state column.

@brenapp
Copy link
Owner

brenapp commented Dec 7, 2023

Yep, the current stream time logic is as follows:

// Get the current "stream time" in seconds
let timecode = "00:00:00";

if (recordStatus && recordStatus.outputActive && !recordingOptions.recordIndividualMatches) {
    timecode = recordStatus.outputTimecode;
} else if (streamStatus && streamStatus.outputActive) {
    timecode = streamStatus.outputTimecode;
};

return timecode;

The use cases I was thinking about here were:

  1. The user is streaming, is not recording, and does not have record matches enabled. In this case, the time code should always be the stream code
  2. The user is recording the entire event in one recording, and not streaming. The time code should be the recording timecode
  3. The user is streaming, and has record matches enabled. The time code should be the stream time.

The situation you were testing, where the user is not streaming, not recording, AND has record individual matches, I'm not sure what the OBS_TIME output should be. No answer really makes sense IMO. I'm thinking it should just leave the column instead of displaying 00:00:00.

@paulsp
Copy link
Contributor Author

paulsp commented Dec 7, 2023

The situation I was initial testing was only recording individual matches. When not recording or steaming or recording individual is done, the timecode data should be omitted or a non-timestamp value is preferred.

When individual match recording, as configured in tm-switcher, It is possible for OBS recording to be enable and disabled during the tournament, i.e. the OBS operator forgot to enable recording until match 7 or reenable recording after lunch. This should be reflected in the tm-switcher log and CSV file.

@brenapp
Copy link
Owner

brenapp commented Dec 8, 2023

Fixed by adopting #28 in 8eebab2

@brenapp brenapp closed this as completed Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants