当前位置:网站首页>How does easydss, an online classroom / online medical live on demand platform, separate audio and video data?

How does easydss, an online classroom / online medical live on demand platform, separate audio and video data?

2022-06-24 16:18:00 Tsingsee green rhino video

With all of TSINGSEE Green rhino video cloud edge architecture products are the same ,EasyDSS The VOD platform can transmit and record audio and video data synchronously , But in part of the scene , The project needs to separate the live video and audio streams , Separate access to audio stream data .

For example, in the case we share in this article , Generated from live streaming data ts Files have video streams and audio streams , But in fact, the streaming end only pushes audio stream data , To meet the needs of customers , Live data only needs to generate audio stream data , In this way, when playing data with the mobile phone, you can also hear the sound when the screen is locked , But at present, if there are both audio and video streams , Mobile phone lock screen will cause audio and video streams to stop playing simultaneously .

Here we need to separate the video stream and audio stream before getting the data . In the interface for downloading videos of a specified period of time , take ts The document was converted into MP4 file , And then MP4 Separate the video from the file , All that's left is audio data output to MP4 file .

Check the output of live data again , Only the audio stream is output .

The reference codes are as follows :

if ty == "0" {
   var params1 []string
   params1 = append(params1, "-i", mp4PathTmpAudio)
   params1 = append(params1, "-acodec", "copy", "-vn", mp4Path)
   //params = append(params, mp4Path)
   cmd := exec.Command(EasyTrans(), params1...)
   cmd.Start()
   cmd.Wait()
   fmt.Println(cmd.Args)
   efile.RemoveFile(mp4PathTmpAudio)
}

Of course, in audio coding , To ensure the standard of audio coding , Otherwise, there will be problems such as unable to play or audio recognition failure . Of course EasyDSS It also supports users to actually download and deploy tests , Welcome to .

原网站

版权声明
本文为[Tsingsee green rhino video]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/04/20210428185131865t.html