[英]Live555 to stream live video and audio in one RTSP stream
I have been able to stream video using live555 on its own as well as audio to stream using live555 on its own. 我已经能够单独使用live555进行视频流传输,也可以单独使用live555进行音频流传输。
But I want to have the video and audio playing on the same VLC. 但是我想在同一VLC上播放视频和音频。 My video is h264 encoded and audio is AAC encoded.
我的视频是h264编码的,音频是AAC编码的。 What do I need to do to pass these packets into a FramedSource.
我需要怎么做才能将这些数据包传递到FramedSource中。
What MediaSubsession/DeviceSource do I override, as this is not a fixed file but live video/live audio? 我要覆盖哪些MediaSubsession / DeviceSource,因为这不是固定文件而是实时视频/实时音频?
Thanks in advance! 提前致谢!
In order to stream video/H264 and audio/MPEG4-GENERIC in the same RTSP unicast session you should do something like : 为了在同一RTSP单播会话中流传输视频/ H264和音频/ MPEG4-GENERIC,您应该执行以下操作:
#include "liveMedia.hh"
#include "BasicUsageEnvironment.hh"
int main()
{
TaskScheduler* scheduler = BasicTaskScheduler::createNew();
BasicUsageEnvironment* env = BasicUsageEnvironment::createNew(*scheduler);
RTSPServer* rtspServer = RTSPServer::createNew(*env);
ServerMediaSession* sms = ServerMediaSession::createNew(*env);
sms->addSubsession(H264VideoFileServerMediaSubsession::createNew(*env, "test.264",false));
sms->addSubsession(ADTSAudioFileServerMediaSubsession::createNew(*env, "test.aac",false));
rtspServer->addServerMediaSession(sms);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.