Closed ChdDongyang closed 1 year ago
@ChdDongyang The tracks that come in via WebRTC only contain raw media data. To put them together into a single file, you'll need to compile them using a codec of some sort. I think it's outside the scope of this project.
If you'd like to move this to the discussion area we could open up the conversation and work on this.
Thanks your reply. I'm a beginner in the field of audio and video processing. I don't know that in the onTrack method, I can only receive video and audio separately. I will study this knowledge more deeply. Be more cautious when proposing issue in the future.
@ChdDongyang check out my project: https://github.com/Charles92011/webrtc-java-experimental-server
It's a server designed specifically for experimenting with webrtc-java, it has examples of how to save audio and video. You should be able to insert a pot-processing phase to marry the two together.
@Charles92011 Thank you very much, I get it !
Now, I can save video and audio separately, and then use tools such as ffmpeg to process it. I want to know whether it is possible to save the video containing audio directly, instead of saving the videoframe as a picture, then synthesizing the video, and finally adding the audio track. Thank you very much!