Giter VIP home page Giter VIP logo

Comments (19)

numberwolf avatar numberwolf commented on May 28, 2024 1

You are welcome.

X265 is a encoder, not decoder; I use the FFmpeg decoder of hevc for the player core;
About 1080P, I have not test case of 1080p, but I think here's no problem with 1080P, maybe play not fluently with 4K.

I will test cases of 1080p and 4k, then update readme.md with result. ^_^

from h265web.js.

adminy avatar adminy commented on May 28, 2024 1

Thanks Again :)

So then if you are using ffmpeg decoder, then you must be using openhvec as it is what ffmpeg are using. Unless they defaulted to libde265.

Sorry yeah I realised x265 was an encoder after I sent that previous comment. HM12 is what I had in mind.

It would be really nice to do a comparison of hm12 vs libde265 vs openhevc to see how they do in transcompiled javascript.

from h265web.js.

numberwolf avatar numberwolf commented on May 28, 2024 1

Yes, I use the decoder which ffmpeg are using.

For decoder of wasm, there is a lot of room for improvement~~

"It would be really nice to do a comparison of hm12 vs libde265 vs openhevc to see how they do in transcompiled javascript."

It's a good idea, I will consider about to do this test.

I am a media backend engineer(c++/golang), but I was so interest at web develop, It makes me feel relaxing and happy~~ ~~ ^^
I think future of multimedia will be better on brower. ^
^

from h265web.js.

numberwolf avatar numberwolf commented on May 28, 2024

Wasm made my myself.
This file not in this project.

I make it by c & cpp & decoder to decode media file.

from h265web.js.

adminy avatar adminy commented on May 28, 2024

and you are not open sourcing that yes?

I am impressed by the size of the transcompiled file. usually it's quite large but you managed to do it under 1mb. well done. On top of that you are decoding both hevc and aac. I wonder how well the parsing of hvec and aac files your decoder really is. does it support all hvec features?

from h265web.js.

numberwolf avatar numberwolf commented on May 28, 2024

Yes , not open source now, because I want to optimize it better;

I upload one demo here: http://hevc.realrace.cn , hevc is a standard of video codec, it support all hevc feature.
I had test it with the video(720p,1000kbps,25fps) on chrome(MACOS), it play fluently.

About aac decoder, I use the webaudio to do that, it's a nice tech on web platform~

from h265web.js.

numberwolf avatar numberwolf commented on May 28, 2024

I write a new readme in englinsh yesterday, hope it can help you to use h265web.js ^_^

from h265web.js.

adminy avatar adminy commented on May 28, 2024

Thanks for the english version. Which c decoder is this based on? x265 or beamr?

Also can 1080p play fluently?

from h265web.js.

adminy avatar adminy commented on May 28, 2024

I converted an mp4 file and tried the mp4 html file, it was very out of sync with audio and the audio was cutting. while the video seemed to have a yuv to rgb conversion error. because it looked horrible.

Let me fork this and refactor your code. Then I'll try and fix the video colorspace conversion issue.

Screenshot 2020-07-23 at 01 36 05

from h265web.js.

numberwolf avatar numberwolf commented on May 28, 2024

Its seem like that your mp4's pixel format is not yuv420p? Or maybe not BT601 or 709?
The standard is I420 supported

from h265web.js.

adminy avatar adminy commented on May 28, 2024

I created a PR, up to you if you want to merge, if not I'll just work from forked.

But I also uploaded the example file I used. You can play around with what I have and let me know what you think.

It's not just the video pixel that is the problem, the audio is even worse after 4 seconds.

command I used to generate the video was:

ffmpeg -i input.mkv -c:v libx265 -c:a aac -preset ultrafast -x265-params lossless=1 -vtag hvc1 -t 10 video.mp4

Also can you upload the C source so I can help with that too?

Meanwhile I will be further refactoring the front-end until I'm happy enough with it.

~ ^^

from h265web.js.

numberwolf avatar numberwolf commented on May 28, 2024

Thx ,I will review the code and make test, then merge your code~~

How can I talk to your without github issue ( some IM tools? like QQ wechat?) , Because I have not checking the issue every day.

from h265web.js.

numberwolf avatar numberwolf commented on May 28, 2024

I have review your [pull request], good code~

The server.js 's port need modify to 8999 , because 80 always has been used to local server.

command I used to generate the video was:
ffmpeg -i video.mp4.0 -vcodec libx265 -acodec aac -preset ultrafast -maxrate 1000k -bufsize 1000k -vtag hvc1 -t 10 video.mp4
ffmpeg -i video.mp4.0 -vcodec libx265 -acodec aac -preset ultrafast -maxrate 1000k -bufsize 1000k -vtag hev1 -t 10 video.mp4

image

Have you compute or use ffprobe to dump the video's attribute (video bitrate) ?
I found the problem not in 'vtag : hvc1 and hev1' I Found different between you and me : I have't use the 'lossless', because this feature cause the bitrate become too big to play render. (I test the badcase : if bitrate >= X0000+ will have problem with render)

^_^~~

Config your git config of email and name, then when you pull request, will show in the contribution list~~

git config user.name
git config user.email

from h265web.js.

numberwolf avatar numberwolf commented on May 28, 2024

Some bugs in the player.js (stop operation) and I have push code and fixed it. ^_^~

from h265web.js.

adminy avatar adminy commented on May 28, 2024

Yeah, I configured the git, it's not a big deal anyways.

I did some more cleaning, and sorry more feature removal ... because I didn't find it to be particularly "working". So I created another PR. There is one more to come with GUI updates and maybe MP4 parser cleanup.

There was one feature which I actually wanted to keep so I'll add it back when I'm done with the gui design. (the fixed)

So in terms of ffmpeg, I tried your command, still getting the green output. It's a colour conversion issue for sure!

Communication, I don't have wechat anymore, and you need an invitation to register, but I have discord: @adminy#8202

from h265web.js.

numberwolf avatar numberwolf commented on May 28, 2024

OK, I will download the discord.

So in terms of ffmpeg, I tried your command, still getting the green output. It's a colour conversion issue for sure!

How about your media attribute? Maybe some difference in codec params, because the codec attributes are very complex , and have influence with player.

I think it caused by your yuv format, is yuyv or not 420P, I will add the method to convert format and test it.

Or you can give me your bad case source vidoe and output video's link, I will test.~~

from h265web.js.

numberwolf avatar numberwolf commented on May 28, 2024

I did the codec work, So I test many cases with different pixel formats of yuv; I found the problem that caused by yuv pixel fomat, I am sure。
(with transcoding cmd: ffmpeg -i video1.mp4 -vcodec libx265 -acodec aac -pix_fmt yuv422p16be -y video.mp4)

Capture:

image

So I write this notice to readme.md , and I recommend that you should add the attribute of pix_fmt to yuv420p,
like this:

ffmpeg -i video1.mp4 -vcodec libx265 -acodec aac -pix_fmt yuv420p -y video.mp4

About Codec:
pixel format means yuv format in frame. Example: I420 and 420SP have different ways to decode and show, I recommand a tools thar you can preview the yuv file and analyse it.

link : http://xvideo.video/#/YuvEye
This tool is free and better than GLYUVPlayer , you can try it
image

It's a software support win/macos (chinese language)
1st step. regist a account, and a vertify email will send to your mail address, you need to click the link , then your accoud could be login.
2nd step. login and use it

Translate ch => eng

注册 => regist
邮箱 => email
密码 => password
验证 => vertify
点击 => click

from h265web.js.

adminy avatar adminy commented on May 28, 2024

Yes that makes sense. But I would rather have the conversion done right in the canvas rather than generate another source. I'm sure there are a lot of 10 bit videos out there.

from h265web.js.

numberwolf avatar numberwolf commented on May 28, 2024

I will add the convert step in the wasm by c++, because js's performance is too poor to do this job

from h265web.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.