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

Integrate h264 #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Integrate h264 #4

wants to merge 3 commits into from

Conversation

radekg
Copy link
Owner

@radekg radekg commented Jan 12, 2023

Bit of a pointless exercise because the h264 data (codec?) does not appear to be working. Per documentation in the code. Anyway, I've added media format selection when reading from storage. First step towards abstracting storage from the main recording app.

@@ -193,6 +193,15 @@ func (svc *WebRTCService) CreatePlaybackConnection(client *PeerClient) error {
svc.recordingsLock.Lock()
defer svc.recordingsLock.Unlock()

// Allow us to receive 1 audio track, and 1 video track
if _, err = client.pc.AddTransceiverFromKind(webrtc.RTPCodecTypeAudio); err != nil {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't do anything useful...

@@ -204,7 +213,7 @@ func (svc *WebRTCService) CreatePlaybackConnection(client *PeerClient) error {
svc.logger.Info("I have an AV data", "data-id", id, "video-length", avr.video.Len())

// Create a video track
videoTrack, videoTrackErr := webrtc.NewTrackLocalStaticSample(webrtc.RTPCodecCapability{MimeType: webrtc.MimeTypeVP8}, "video", "pion")
videoTrack, videoTrackErr := webrtc.NewTrackLocalStaticSample(webrtc.RTPCodecCapability{MimeType: webrtc.MimeTypeH264}, "video", "pion")
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, one needs the correct mime type for H264 video.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant