parsing - 用于播放的 mp4 解析
问题描述
我被要求从头开始创建一个视频播放器,所以我认为我错过了整个故事的某些部分。对于包含此信息的 mp4 文件,我应该关注哪些框才能播放文件中的流。我知道我应该遵循标准等等,但我所做的是我把文件弄乱了一点。我像这样转换视频/音频流:
h264 -> mjpeg || AAC -> mp3
为了更简单的解码“因为我从头开始写一切”
这是我试图支持的 mp4 文件中有关视频轨道的信息:
[trak] size=8+7753
[tkhd] size=12+80, flags=3
enabled = 1
id = 1
duration = 30034
width = 640.000000
height = 360.000000
[edts] size=8+28
[elst] size=12+16
entry_count = 1
entry/segment duration = 30034
entry/media time = 0
entry/media rate = 1
[mdia] size=8+7617
[mdhd] size=12+20
timescale = 15360
duration = 461312
duration(ms) = 30033
language = und
[hdlr] size=12+33
handler_type = vide
handler_name = VideoHandler
[minf] size=8+7532
[vmhd] size=12+8, flags=1
graphics_mode = 0
op_color = 0000,0000,0000
[dinf] size=8+28
[dref] size=12+16
[url ] size=12+0, flags=1
location = [local to file]
[stbl] size=8+7468
[stsd] size=12+160
entry_count = 1
[mp4v] size=8+148
data_reference_index = 1
width = 640
height = 360
compressor =
[esds] size=12+32
[ESDescriptor] size=5+27
es_id = 1
stream_priority = 0
[DecoderConfig] size=5+13
stream_type = 4
object_type = 108
up_stream = 0
buffer_size = 0
max_bitrate = 861041
avg_bitrate = 861041
[Descriptor:06] size=5+1
[fiel] size=8+2
[pasp] size=8+8
[stts] size=12+12
entry_count = 1
[stsc] size=12+16
entry_count = 1
[stsz] size=12+3612
sample_size = 0
sample_count = 901
[stco] size=12+3608
entry_count = 901
解决方案
what boxes should i be concerned about in order to play the streams within the file
每个盒子都是必需的。
推荐阅读
- android - 如何在同一应用程序中使用两个用户(司机和骑手)的共享偏好来维护两个不同的会话?
- linux - 如何在多个文件上使用 awk?
- mysql - 如何删除阻止我删除表的锁
- java - 使用多个地图实现搜索
- css - 我如何设置背景大小所有移动支持
- c++ - Win32 函数可以异步运行在同一个线程上吗?
- google-apps-script - 如何检查重复项并仅在 google-app-scripts 中附加唯一值?
- r - MICE 2l.pan 多级多重插补错误:不允许 pred 中的缺失值
- julia - Julia 的编译缓存是如何管理的?
- javascript - javascript 对象中的无休止的嵌套/引用