Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shortvideo的json里给出的filesize是错误的 #752

Open
landall opened this issue Dec 1, 2023 · 9 comments
Open

shortvideo的json里给出的filesize是错误的 #752

landall opened this issue Dec 1, 2023 · 9 comments

Comments

@landall
Copy link

landall commented Dec 1, 2023

MD5是对的。
但filesize偏大很多,不知道是mirai-api-http的问题,还是上游mirai的问题,还是压根理解错了这个数字的意思?

@landall
Copy link
Author

landall commented Dec 1, 2023

比如某个fileSize=1955436的文件,实际大小是1878775

传给QQ的这个文件,本身大小是1878775,所以也没有压缩等因素。1955436应该就是个错误的数据。

@ryoii
Copy link
Collaborator

ryoii commented Dec 1, 2023

有没有加上了封面大小的可能

@landall
Copy link
Author

landall commented Dec 1, 2023

有没有加上了封面大小的可能

传给我的thumbnail是空的,所以不清楚是不是那样就对得上了。

@landall
Copy link
Author

landall commented Dec 1, 2023

另外一个可能带来坑的地方,是我看群聊里文件名格式好多:
/storage/emulated/0/Android/data/com.tencent.mobileqq/Tencent/MobileQQ/shortvideo/4FC80FCDC6CCEAE8AB14AD99840CCB22/6180284537307523522049351433.mp4
/storage/emulated/0/Pictures/WeiXin/mmexport1701339551039.mp4

我自己测试时发的都是不带路径的:
4eaae49fbe88b206210022d0c4c8775e.mp4

不知道这里是不是埋了什么坑。

@ryoii
Copy link
Collaborator

ryoii commented Dec 1, 2023

按 core 的说法是提供了文件名就使用文件名,否则就是用md5做为文件名

@ryoii
Copy link
Collaborator

ryoii commented Dec 1, 2023

有没有加上了封面大小的可能

传给我的thumbnail是空的,所以不清楚是不是那样就对得上了。

这里是指接受到的封面是null?

@landall
Copy link
Author

landall commented Dec 1, 2023

有没有加上了封面大小的可能

传给我的thumbnail是空的,所以不清楚是不是那样就对得上了。

这里是指接受到的封面是null?

恩。"thumbnailUrl":null,没有其他多余的字段了。

比如这个:
{"type":"ShortVideo","videoId":"30510201000436303402010002045069132f02037a13f7020419031f6f0204656989ef04104fc80fcdc6cceae8ab14ad99840ccb2202037a1aff02010004140000000866696c65747970650000000431303033","fileMd5":"4FC80FCDC6CCEAE8AB14AD99840CCB22","fileSize":374725,"fileFormat":"avi","filename":"/storage/emulated/0/Android/data/com.tencent.mobileqq/Tencent/MobileQQ/shortvideo/4FC80FCDC6CCEAE8AB14AD99840CCB22/6180284537307523522049351433.mp4","videoUrl":"http://203.205.249.204:80/qqdownload?ver=537161402&rkey=3081fd0201010481f53081f202010102010002041885f8bb0481a6333035313032303130303034333633303334303230313030303230343530363931333266303230333761313366373032303431393033316636663032303436353639383965663034313034666338306663646336636365616538616231346164393938343063636232323032303337613161666630323031303030343134303030303030303836363639366336353734373937303635303030303030303433313330333033330204656989f004350000000866696c657479706500000004313030330000000b646f776e656e63727970740000000130000000047175696300000001310400&filetype=1003&videotype=0&subvideotype=0&term=unknow&video_codec=0","thumbnailUrl":null}

@ryoii
Copy link
Collaborator

ryoii commented Dec 1, 2023

只能去猜不同客户端实现不一样导致上传的文件名就不一样

仔细看了眼代码,mirai 确实是不会返回封面地址的。只能说现在的协议实现还不完善

鉴于现在协议分析环境,只能说勉强能用就行吧

@landall
Copy link
Author

landall commented Dec 1, 2023

如果不是mirai-api-http这里手滑了,我再确认一阵,就把这个问题提给mirai core了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants