slhck / h26x-extractor Goto Github PK
View Code? Open in Web Editor NEWExtracts NAL units from H.264 bitstreams and decodes their type and content
License: MIT License
Extracts NAL units from H.264 bitstreams and decodes their type and content
License: MIT License
Hi,
I'm wondering if the extractor would be able to point out errors. I'm having a stream, which is extracted w/o visible complains, but both - ffplay and ffprobe - complain like so:
[h264 @ 0x7ff926819000] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x7ff926819000] decode_slice_header error
[h264 @ 0x7ff926819000] no frame!
even though the video is presented (ffplay). Any idea, what they might have problems with?
This code does not handle emulation prevention bytes properly.
Idea from https://gist.github.com/figgis/fd509a02d4b1aa89f6ef:
# 7.3.1.1
# Convert NAL data (Annex B format) to RBSP data
NumBytesInRbsp = 0
rbsp_byte = BitStream()
for i in xrange(NumBytesInNalUnit):
if (i+2) < NumBytesInNalUnit and s.peek('bits:24') == '0x000003':
rbsp_byte.append(s.read('bits:8'))
rbsp_byte.append(s.read('bits:8'))
# emulation_prevention_three_byte
s.read('bits:8')
else:
rbsp_byte.append(s.read('bits:8'))
NumBytesInRbsp = len(rbsp_byte)
s = rbsp_byte
Could be based on: https://gist.github.com/figgis/fd509a02d4b1aa89f6ef
Requires parsing of different NALUs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.