如何使用AES密钥对hls播放列表进行编码

时间:2019-02-12 10:26:43

标签: video ffmpeg aes hls

我正在尝试使用以下命令通过aes键对hls播放列表进行编码:

import { Component, OnInit } from '@angular/core';
import {Chart} from 'chart.js';
import { DataService } from "src/app/data.service";

@Component({
  selector: 'app-about',
  templateUrl: './about.component.html',
  styleUrls: ['./about.component.scss']
})
export class AboutComponent implements OnInit {
  BarChart = [];
  BarChart1 = []; 
  dataChart = [];
  volumeSales = [];
  i : number;
  constructor(private _emp: DataService) { 
    this._emp.getSales().subscribe(data => 
      {
        this.dataChart = data;
        this.dataChart = this.dataChart[0]
       // this.volumeSales.push(this.dataChart[`year${2}`]['volumeSales']);
       for(let i=1;i<=5;i++)
        {
          this.volumeSales.push(this.dataChart[`year${i}`]['volumeSales']);
        }
      });
  }
  ngOnInit() {
    this.BarChart = new Chart('barChart', {
      type: 'bar',
    data: {
     labels: ["Year1", "Year2", "Year3", "Year4", "Year5"],
     datasets: [{
         data: this.volumeSales,
     }]
   }
    });
} 
}

但是我得到这个回应:

ffmpeg -i v-0576p-1400k-libx264-s1.mp4 -encryption_key 775dbf7289c4cc5847becd571f536ff2 -encryption_kid 800aacaa522958ae888062b5695db6bf -encryption_scheme cenc-aes-ctr -vcodec copy stream.m3u8

这是演示播放列表:

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5649899b9980] could not find corresponding track id 1
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5649899b9980] could not find corresponding trex
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5649899b9980] error reading header
./angel-one-clear/v-0576p-1400k-libx264-s1.mp4: Invalid data found when processing input 

有人可以使用这种编码的演示或示例吗?

0 个答案:

没有答案