xxxily / h5player

This software supports all audio and video websites, such as TikTok, YouTube, Bilibili, TED, Instagram, Twitter, etc. Features include: variable playback speed, screen capture, video download, custom settings, and extensions, etc., providing you with a pleasant online audio and video playback experience.
https://h5player.anzz.top
GNU General Public License v3.0
3.05k stars 254 forks source link

JPG support for screenshots #596

Open seriousgigi opened 9 months ago

seriousgigi commented 9 months ago

hello, this script used to save screenshots as JPG instead PNG before v3.4.4

can we please get JPG/PNG option with new version?

i take a lot of screenshots and this is the reason why i started to use this script in the beginning but size of PNG screenshots are 4x bigger than JPG ones.

please make JPG default again or give us an option to do that.

xxxily commented 9 months ago

目前默认就是JPG 格式,具体代码在这:https://github.com/xxxily/h5player/blob/master/dist/h5player.js#L3347

seriousgigi commented 9 months ago

目前默认就是JPG 格式,具体代码在这:https://github.com/xxxily/h5player/blob/master/dist/h5player.js#L3347

it still downloads in PNG format.

size of jpg screenshot in 1080p video is around 500-600 KB while PNG is around 2.5 MB

please take a screenshot with v3.4.4 and current one. you will see the bug.


apart from this issue there is another one;

sometimes this script doesnt download screenshots instead it opens screenshots on a new tab. and that new tab can only be saved in PNG format. please look into this too.

xxxily commented 9 months ago

目前默认就是JPG 格式,具体代码在这:https://github.com/xxxily/h5player/blob/master/dist/h5player.js#L3347

it still downloads in PNG format.

size of jpg screenshot in 1080p video is around 500-600 KB while PNG is around 2.5 MB

please take a screenshot with v3.4.4 and current one. you will see the bug.

apart from this issue there is another one;

sometimes this script doesnt download screenshots instead it opens screenshots on a new tab. and that new tab can only be saved in PNG format. please look into this too.

脚本的最新版本是v3.7.11,请使用最新版本进行截图,如果还有问题,请提供具体的网址,以便我这边进行复现。

seriousgigi commented 9 months ago

i am already using v3.7.11 and it saves as PNG. i already told you v3.4.4 is the last one works. from that version all of new versions are saving as PNG

do you want me to upload a video to proof?

xxxily commented 9 months ago

i am already using v3.7.11 and it saves as PNG. i already told you v3.4.4 is the last one works. from that version all of new versions are saving as PNG

do you want me to upload a video to proof?

是的,请提供更多有效的信息,以便我这边进行复现,例如浏览器版本,具体的网站地址,操作步骤等,没复现的话,没法修复该bug

seriousgigi commented 9 months ago

no need for specific websites since it doesnt work at any video streaming sites such as youtube or chaturbate for example. i use opera browser, windows 10 and using your script with tampermonkey's latest version.

using "shift + s" to capture screenshots.

if these are not enough i can upload a video later.

xxxily commented 9 months ago

no need for specific websites since it doesnt work at any video streaming sites such as youtube or chaturbate for example. i use opera browser, windows 10 and using your script with tampermonkey's latest version.

using "shift + s" to capture screenshots.

if these are not enough i can upload a video later.

建议你换edge或chrome浏览器试试,目前最新的脚本的代码中默认就是JPG格式的,在youtube 上使用"shift + s" 进行截图默认存的就是JPG格式的截图,如果换了浏览器还是不正常,你上传下操作的视频看下是什么问题吧,我这边实在没法复现你这个问题

seriousgigi commented 9 months ago

let me say smth i just realized. the type is JPG (or JPEG) as you said but the file size is 3-4x bigger than usual jpg because it is not compressed. 1920x screenshot cant be larger than 1mb. it's size is usually around 500-600 KB

Screenshot (441) (2jpg)

you can see the file is actually PNG by opening it on pro image viewer like acdsee. when i open this jpg screenshot on acdsee it says it is png. so the jpg is just on the name not reality.

Screenshot (442) (2jpg)

note: if i convert your screenshot with 90 quality setting to jpg the file size is reducing to 350 KB.

if you dont believe just test it by yourself;

  1. take a screenshot of any video on youtube with latest version.
  2. downgrade your script to v3.4.4 and then take same screenshot with this version
  3. compare file sizes of both files. you will see the screenshot taken with v3.4.4 is around 600 KB while other is around 2 MB
xxxily commented 9 months ago

let me say smth i just realized. the type is JPG (or JPEG) as you said but the file size is 3-4x bigger than usual jpg because it is not compressed. 1920x screenshot cant be larger than 1mb. it's size is usually around 500-600 KB

Screenshot (441) (2jpg)

you can see the file is actually PNG by opening it on pro image viewer like acdsee. when i open this jpg screenshot on acdsee it says it is png. so the jpg is just on the name not reality.

Screenshot (442) (2jpg)

note: if i convert your screenshot with 90 quality setting to jpg the file size is reducing to 350 KB.

if you dont believe just test it by yourself;

  1. take a screenshot of any video on youtube with latest version.
  2. downgrade your script to v3.4.4 and then take same screenshot with this version
  3. compare file sizes of both files. you will see the screenshot taken with v3.4.4 is around 600 KB while other is around 2 MB

感谢您的耐心反馈,已经理解你的意思,也排查出了bug的原因,下个版本将修复该问题

seriousgigi commented 9 months ago

hello! thx for latest update that fixed the problem.

only one problem left. i dont know how to explain but sometimes on some sites or some video players, when you take screenshot it opens new tab and shows screenshot in that new tab instead saving the screenshot. and when it does that the image is always in PNG format.

i can give an example for this but the site i am trying is p*rn site. so i dont know if sharing that link is allowed here...

xxxily commented 9 months ago

这是因为部分网站不允许直接截图,只能新开tab标签,采用预览的形式手动保存截图。

seriousgigi commented 9 months ago

yes but it again saves screenshots in PNG format in this way. can you change that to jpg like you did for last time? it would be amazing if you pull this off :)

seriousgigi commented 9 months ago

also in that way screenshots are saved with name: "download" instead video title and time. is there anything you can do to change this behavior?