-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
screenshare: add rap processing for screen streams with audio (complements #11622) #11626
Merged
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0d48dd0
Re-add screenshare audio recording processing
germanocaumo fdbbffb
Improve screenshare audio recording sync:
germanocaumo 4928ca9
Mix screenshare audio with mics again to avoid playback autoplay prob…
germanocaumo 5b07244
Fix last commit
germanocaumo 409e3cb
read screenshare audio from archived dir insteaf of original path
germanocaumo 95fabfe
Merge branch 'develop' of https://github.com/bigbluebutton/bigbluebut…
germanocaumo 136f43e
Remove screenshare audio specific ffmpeg codec in recording processing.
germanocaumo 35104fb
number of inputs for amix command, remove old java deskshare events
germanocaumo ea375d6
remove trailing whitespaces
germanocaumo File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,5 +73,70 @@ def self.create_audio_edl(events, archive_dir) | |
return audio_edl | ||
end | ||
|
||
def self.create_deskshare_audio_edl(events, deskshare_dir) | ||
audio_edl = [] | ||
|
||
initial_timestamp = BigBlueButton::Events.first_event_timestamp(events) | ||
final_timestamp = BigBlueButton::Events.last_event_timestamp(events) | ||
filename = "" | ||
|
||
# Initially start with silence | ||
audio_edl << { | ||
:timestamp => 0, | ||
:audio => nil | ||
} | ||
|
||
events.xpath('/recording/event[@module="Deskshare" or (@module="bbb-webrtc-sfu" and (@eventname="StartWebRTCDesktopShareEvent" or @eventname="StopWebRTCDesktopShareEvent"))]').each do |event| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think the "Deskshare" module (I think that's the old java screensharing?) can ever have audio, so this should only look at the WebRTC events. |
||
filename = event.at_xpath('filename').text | ||
# Determine the audio filename | ||
case event['eventname'] | ||
when 'DeskshareStartedEvent', 'DeskshareStoppedEvent' | ||
filename = event.at_xpath('file').text | ||
filename = "#{deskshare_dir}/#{File.basename(filename)}" | ||
when 'StartWebRTCDesktopShareEvent', 'StopWebRTCDesktopShareEvent' | ||
uri = event.at_xpath('filename').text | ||
filename = "#{deskshare_dir}/#{File.basename(uri)}" | ||
end | ||
raise "Couldn't determine audio filename" if filename.nil? | ||
# check if deskshare has audio | ||
fileHasAudio = !BigBlueButton::EDL::Audio.audio_info(filename)[:audio].nil? | ||
if (fileHasAudio) | ||
timestamp = event['timestamp'].to_i - initial_timestamp | ||
# Add the audio to the EDL | ||
case event['eventname'] | ||
when 'DeskshareStartedEvent', 'StartWebRTCDesktopShareEvent' | ||
audio_edl << { | ||
:timestamp => timestamp, | ||
:audio => { :filename => filename, :timestamp => 0 } | ||
} | ||
when 'DeskshareStoppedEvent', 'StopWebRTCDesktopShareEvent' | ||
if audio_edl.last[:audio] && audio_edl.last[:audio][:filename] == filename | ||
# Fill in the original/expected audo duration when available | ||
duration = event.at_xpath('duration') | ||
if !duration.nil? | ||
duration = duration.text.to_i | ||
audio_edl.last[:original_duration] = duration * 1000 | ||
else | ||
audio_edl.last[:original_duration] = timestamp - audio_edl.last[:timestamp] | ||
end | ||
audio_edl << { | ||
:timestamp => timestamp, | ||
:audio => nil | ||
} | ||
end | ||
end | ||
else | ||
BigBlueButton.logger.debug " Screenshare without audio, ignoring..." | ||
end | ||
end | ||
|
||
audio_edl << { | ||
:timestamp => final_timestamp - initial_timestamp, | ||
:audio => nil | ||
} | ||
|
||
return audio_edl | ||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should explicitly set the number of inputs to the amix filter here, in case a number of inputs ≠ 2 is provided.