Comments (4)
A python script to generate .txt
if you're interested
#!/usr/bin/env python3
import os
from utils import parse_nalu_lst
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument(dest='input', type=str)
parser.add_argument('--output', type=str)
args = parser.parse_args()
if args.output is None:
args.output = os.path.join(os.path.dirname(args.input), '{}.txt'.format(os.path.splitext(args.input)[0]))
fin = open(args.input, 'rb')
indexes = []
zero_count = 0
i = 0
while True:
x = fin.read(1)
if x == b'':
break
x = ord(x)
if x == 0:
zero_count += 1
elif x == 3:
pass
elif x == 1:
if zero_count == 2 or zero_count == 3:
indexes.append(i - zero_count)
zero_count = 0
else:
zero_count = 0
i += 1
indexes.append(i)
with open(args.output, 'w') as fout:
for i in range(len(indexes) - 1):
print(indexes[i + 1] - indexes[i], file=fout)
print('saved to "{}"'.format(args.output))
from wfs.js.
The problem is in .txt
. The following command works now.
ffprobe yyyyyyy.264 -show_frames | grep pkt_size | awk '{ print substr($1,10,length($1)) }' > yyyyyyy.txt
It seems .264
must be in Baseline Profile. Maybe it's about codecs for fmp4. I'll come back later.
from wfs.js.
txt文件是必须的吗?里边的数据是每一帧的长度吗?
from wfs.js.
from wfs.js.
Related Issues (20)
- 一个页面中多个video,多路视频窜屏怎么解决 HOT 3
- 如何修改fMP4封装的帧率 HOT 1
- 视频播放cpu占用过高有什么解决方案么?
- win7无法正常播放 HOT 1
- Is It support H265 format? HOT 1
- 忽然不加载的问题。
- 版本支持
- AAC 裸流可否完善下
- How to play AAC RAW data
- chrome tab页切换引起播放延迟加大 HOT 2
- 解码出现大量花屏 HOT 3
- 找出nal起始位置 0x00,0x00,0x00或者0x00,0x00,0x00,0x01
- PIPELINE_ERROR HOT 2
- 请问支持Annex-B格式?
- Loading is displayed when playing
- 谷歌浏览器无法显示
- Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause() HOT 2
- 请问怎么自动播放啊? HOT 1
- 关于长时间播放,出现视频卡住,如何解决 HOT 1
- 播放视频的帧率是 60帧的话,播放的延迟会越来越长
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wfs.js.