设置 AAR 构建名

android.libraryVariants.all { variant ->
    variant.outputs.each { output ->
        def outputFile = output.outputFile
        if (outputFile != null && outputFile.name.endsWith('.aar')) {
            def fileName = "Your aar package name"
            output.outputFile = new File(outputFile.parent, fileName)
        }
    }
}

Rebuild your project, you will find the aar package file at build/outputs/aar

手动导入 AAR 包

Alt none

  • Add Flat Repositories
      flatDir {
           dirs   'libs'
      }
    
  • Add Dependencies
    dependencies {
       compile 'groupName:libName:[email protected]'
    }
    

    MUST end with @aar

ADTS AAC 格式说明

Alt none Alt none

使用 mediastreamsegmenter 创建实时 HLS 流

XAMPP Setting Alt none

mediastreamsegmenter -s 10 -f /Applications/XAMPP/htdocs/hls/  127.0.0.1:2222

VLC Open Source Setting Alt none

VLC Streaming/Saving Setting Alt none

VLC Open File

Play Live HLS Stream

ffplay http://192.168.0.102/hls/prog_index.m3u8

使用 mediafilesegmenter 生成 HLS 切片

文件流化

mediafilesegmenter -B TEST -i test.m3u8 -t 10 -f ./video  ~/Movies/test.mp4

-B 切片名
-i m3u8文件
-t 时间间隔
-f ts切片存放位置

Alt none