CicadaPlayer icon indicating copy to clipboard operation
CicadaPlayer copied to clipboard

CicadaPlayer播放mp4多音轨视频时,怎么切换不同音轨?

Open bottle1024 opened this issue 5 years ago • 3 comments

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context Add any other context about the problem here.

bottle1024 avatar May 22 '20 07:05 bottle1024

CicadaPlayer开始定位的是一个网络播放器,这种需求目前还没有做,没有尝试过,可能切换不了,如果要加的话,应该也比较简单,可以复用多码率hls切语言的接口,可以提供一个sample流吗?

pingkai avatar May 22 '20 08:05 pingkai

可以用这条命令生成 ffmpeg -i input1.mp4 -i input2.aac -i input3.aac -map 0 -map 1 -map 2 -shortest output.mp4 CicadaPlayer hls多码率切换时selectTrack,实际的track是子m3u8(可能有多音轨)。 如果上层还需要切换音轨的话,是不是需要实现另一个selectTrack接口?

bottle1024 avatar May 22 '20 09:05 bottle1024

应该不用,复用现在的selectTrack应该就可以

pingkai avatar May 22 '20 09:05 pingkai