oneam / h264bsd Goto Github PK
View Code? Open in Web Editor NEWA simple h264 software decoding library
License: Other
A simple h264 software decoding library
License: Other
I'm trying to compile the project with the flag "H264Dec_NEON", but the project is not compiling. Does this project support Neon? What else do I need to add or do to successfully compile it?
Thanks
Hi,
I'm just wondering if you have tested the wasm version in a NodeJS environment and if you could share how to set it up.
Hi devs,
I am using js version of the lib. In my case the player HW is low spec and it is not expected to be able to render all frames recieved. The data (live stream) are recieved via websocket as a stream.
It seems the decoder is trying to render all the received frames (decreased fps?), so over time the playback is getting more and more behind the streamed data a couple seconds (delayed)
Is there any way to instruct decoder to skip queued data until next keyframe is received, or can you think of any better strategy for my case?
thanks
Test iOS why do I use a H264 file to replace your test file and can't decode it.
When I try to decode this: video.h264.zip
it is triggering this error:
https://github.com/oneam/h264bsd/blob/master/src/h264bsd_byte_stream.c#L218
Why? I don't know much about h264 so I don't know what's going on
hi, i got a error when i use this lib
ERROR: frame_mbs_only_flag,
ERROR: SEQ_PARAM_SE,
Similarly to broadway.js it doesn't seem to support cabac. Would such support be possible?
Hi!
I am experimenting with your library for H264 decoding. The first time the stream is played, it works really well, but I'm having a problem playing the same stream twice (to simulate looping). The problem seems to come from h264bsdExtractNalUnit which modifies the input stream, possibly to try to fix malformed data. The stream was encoded with x264 and plays well in all video players i have tried.
Do you know of any workaround to fix this issue? Thanks!
-Mat
Hi there!
Thanks for this great project. I ported it yesterday to a microcontroller-platform with quite acceptable performance. However I have some constraints regarding RAM memory here.
The examples are making a malloc() of the full-size of the test-videos. So that the whole h264-video is basically in RAM.
How to efficiently deal with this library when having quite big videos and only buffer small amounts in RAM?
I double checked here at this point:
u32 result = h264bsdDecode(&dec, byteStrm, len, 0, &readBytes);
It returns me basically how much it was reading from the byte-stream, but it doesn't give me information in advance how much data it will consume. I guess this depends on frame-type it was processing.
But this makes it very hard to efficiently rebuffer data from e.g. an SD-Card to the stream.
Do you have any hints for this?
Thanks!
I have a question, not an issue, how do I save a frame to bmp or jpeg file?
Regards!
hi, first of all thx for this project and giving a shoutout to broadway.js
i am currently maintaining broadway.js and its great to see other projects picking up the spirit.
i tried to use the h264 sources in your repos to build a native node module.
unfortunately when i build it in 64 bit i get a segmentation fault error.
i created a makefile you can use in linux to reproduce the error in 64bit mode.
i also tried to fix some of the pointer arithmetic but i was not successful in getting it run:
soliton4@98ab48e
to reproduce type
cd make
make
./binfile ../test/test_640x360.h264
since i need this for a commercial project i am currently working on it would be great if you could offer any assistance.
are the h264 sources from you? if not can you point me to the origin?
thx
sol
I think Uglify is depreciated, so we should swap to terser
Hi, could you fill in the details for licensing?
Hello,
I am having trouble processing some H.264 streams. After using h264bsdDecode()
and getting H264BSD_PIC_RDY
, sometimes h264bsdNextOutputPicture()
returns a NULL
pointer.
In the end, for a 122 images stream (122 times H264BSD_PIC_RDY, and 122 frames produced by ffmpeg when used to convert the .264 file to png), I may end up being able to decode 112 of them.
Those streams are specifically those extracted from MP4 generated by Safari on iPhones using the html MediaRecorder api (mimeType 'video/mp4;codecs="avc1.42001e"
for instance). ffprobe shows that they are baseline 3.1 profiles, exactly as similar files produced on Macs (which do work). The only difference I can see is that iPhone files seem to be full color range, but patching this info does not seem to change the result.
Any lead or clue would be greatly appreciated.
Cheers,
Alban
I would like to make a request, if it's not too much to ask. I would really like to see an example on how to safe frames into bmp files. I see the h264bsdNextOutputPictureBGRA but I can't figure out how to get from that to a bmp.
hi, I'm trying to use the library with some mp4 I downloaded from the internet (from here https://dvdloc8.com/clip.php?movieid=8419&clipid=2)
and getting an error, H264BSD_ERROR. when trying the files in the test folder it works.
so I'm guessing I don't understand something. Both files are played with vlc player.
Can you help me understand if this library can decode some "regular" mp4?
This isn't an issue.
I need to rebuild this project because there is a problem when using several projects built by emscripten.
The cause is because those projects use the default namespace 'Module' of emscripten.
So, I need to change the default namespace and rebuild this project.
I found the Rakefile
file in wasm
folder and I could guess that this file is used to build the project.
Unfortunately, I don't know anything about Rakefile
.
@oneam please tell me how to build this project by using Rakefile
.
Also, I need the version of emscripten as well.
I need to rebuild this project on Ubuntu 18.04 64bit.
Uncaught TypeError: module._memcpy is not a function
at H264bsdDecoder.queueInput (h264bsd_decoder.js:147)
at onMessage (h264bsd_worker.js:19)
When decoder parce NAL header, it not skip emulation prevention byte.
Test header
00 00 00 01 67 42 C0 1E D9 00 A0 2F F9 70 11 00
00 03 00 01 00 00 03 00 32 0F 16 2E 48 00 00 00 01
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.