从mp4文件读取samplebuffer

问题描述

我正在尝试从mp4文件中读取音频和视频中的样本缓冲区。为此,我想使用hasinkit库来流式传输这些内容。我需要一个功能来在相​​机和本地文件之间切换流内容

当我使用AVCapture会话时,一切正常,但是在使用本地文件时,一切却没有按计划进行。这是文件阅读器的代码。如果我第一次使用AVAssetReader,这是我做错了什么,请告诉我。

这是我当时编写的代码

LocalFileReader类

from django.urls import reverse
from django.db import models


# Create your models here.

class Table(models.Model):
    name = models.CharField(max_length = 100,unique=True)


class Day(models.Model):
    # this spesific the table the those days belong to
    table = models.ForeignKey(Table,on_delete=models.CASCADE)
    name = models.CharField(max_length = 10)
    # here we get this day lessons info in a list of dictionaris in a form of json
    lessons = models.TextField(null=True)

    def __str__(self):
        return self.table.name +' : ' + self.name

# here the class contain a lesson information
class Lesson(models.Model):
    table = models.ForeignKey(Table,on_delete = models.CASCADE)
    name = models.CharField(max_length = 50) 

    def __str__(self):
        return self.name

}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)