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

How can I save a video call ? #4185

Closed
SmWork78 opened this issue Nov 28, 2024 · 2 comments
Closed

How can I save a video call ? #4185

SmWork78 opened this issue Nov 28, 2024 · 2 comments

Comments

@SmWork78
Copy link

Describe the feature

I'm writing a video call server in C++ that allows video calls, and I want to save the video. How can I do that?
Note: I'm testing the program on a virtual machine ubuntu server that doesn't have a webcam.

    virtual void onCallMediaState(OnCallMediaStateParam& params)
   {
       CallInfo callInfo = getInfo();
       for (unsigned media_index = 0; media_index < callInfo.media.size(); media_index++)
       {
           if (callInfo.media[media_index].type == PJMEDIA_TYPE_AUDIO)
           {
               AudioMedia audioMedia = getAudioMedia(media_index);
               saveAudioMedia(audioMedia, media_index);
           }
           if (callInfo.media[media_index].type == PJMEDIA_TYPE_VIDEO)
           {
              // Error
               VideoMedia videoMedia = getEncodingVideoMedia(media_index);
           }
       }
   }

And I got this error:

call.cpp  .....getEncodingVideoMedia() error: no encoding slot (recvonly?) (status=70004) [../src/pjsua2/call.cpp:630]
  1. What should I do to be able to save a video call on a server that doesn't have a webcam?
  2. How can I save a video call?

Describe alternatives you've considered

No response

Additional context

No response

@SmWork78
Copy link
Author

SmWork78 commented Dec 1, 2024

Can you help me?

@sauwming
Copy link
Member

sauwming commented Dec 2, 2024

You need to implement the video recorder yourself.
Check avi_player for video player implementation, now you need to do something similar for recording.
Check also wav_writer which does the same but for audio.

@sauwming sauwming closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants