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

🐛 特定弹幕处理报错 #269

Closed
4 tasks done
lc4t opened this issue May 21, 2024 · 2 comments · Fixed by yutto-dev/biliass#27
Closed
4 tasks done

🐛 特定弹幕处理报错 #269

lc4t opened this issue May 21, 2024 · 2 comments · Fixed by yutto-dev/biliass#27

Comments

@lc4t
Copy link
Contributor

lc4t commented May 21, 2024

问题简述

INFO  未提供 SESSDATA无法下载会员专享剧集哟投稿视频MesAbout me女性视角的答案】【英语翻唱INFO  开始处理视频MesAbout me女性视角的答案】【英语翻唱INFO  共包含以下 4 个视频流INFO  * 0 [AVC ] [ 852x480 ] <480P 清晰 > #3
 INFO    1 [HEVC] [ 852x480 ] <480P 清晰 > #3
 INFO    2 [HEVC] [ 640x360 ] <360P 流畅 > #3
 INFO    3 [AVC ] [ 640x360 ] <360P 流畅 > #3
 INFO  共包含以下 3 个音频流INFO  * 0 [MP4A] <320kbps >
 INFO    1 [MP4A] < 64kbps >
 INFO    2 [MP4A] <128kbps >
WARNING:root:Invalid comment: '[449,425,"1-1",2,"对我来说太吵闹了",0,0,0,0,500,0,true,"微软雅黑",1,"M544,512L545,511L545,510L546,510L547,510L547,509L547,508L548,508L549,507L550,507L551,506L551,505L552,504L553,504L554,504L555,504L555,503L556,503L556,502L557,502L557,501L558,501L559,500L559,499L560,499L561,499L561,498L562,498L562,497L563,497L56'
WARNING:root:Invalid comment: '[449,425,"1-1",2,"但我还是吻了你",0,0,0,0,500,0,true,"微软雅黑",1,"M378,527L379,527L381,526L383,526L384,525L389,522L390,521L392,521L393,521L395,521L396,521L396,520L397,520L398,520L398,519L400,519L401,517L402,515L403,514L404,513L404,512L405,512L406,512L407,512L407,511L408,511L409,510L410,510L411,510L411,509L412'
WARNING:root:Invalid comment: '[449,425,"1-1",2,"但我还是吻了你",0,0,0,0,500,0,true,"微软雅黑",1,"M378,527L379,527L381,526L383,526L384,525L389,522L390,521L392,521L393,521L395,521L396,521L396,520L397,520L398,520L398,519L400,519L401,517L402,515L403,514L404,513L404,512L405,512L406,512L407,512L407,511L408,511L409,510L410,510L411,510L411,509L412'
WARNING:root:Invalid comment: '[449,425,"1-1",2,"我想知道一切",0,0,0,0,500,0,true,"微软雅黑",1,"M398,439L398,438L399,438L400,437L402,437L402,436L404,435L405,434L406,434L407,434L408,433L409,433L409,432L410,432L411,432L411,431L412,431L413,431L414,431L414,430L416,429L417,429L418,429L419,428L420,428L421,428L421,427L422,427L422,426L423,426L424,'
WARNING:root:Invalid comment: '[449,425,"1-1",2.4,"我不能从你身上移开视线了",0,0,0,0,500,0,true,"微软雅黑",1,"M260,502L260,503L262,503L265,502L266,502L267,501L268,501L270,501L271,501L276,501L279,501L281,501L282,501L283,501L283,500L284,500L284,499L285,499L286,499L286,498L287,498L288,498L289,496L291,495L292,494L294,491L295,489L296,489L296,488L297,'
WARNING:root:Invalid comment: '[449,425,"1-1",2.1,"我还是爱上了你",0,0,0,0,500,0,true,"微软雅黑",1,"M311,509L312,509L312,508L314,508L315,507L316,507L317,506L318,506L318,505L320,504L322,504L323,504L324,504L325,503L327,502L328,502L329,502L330,501L332,500L336,498L338,498L339,498L339,497L340,497L342,496L344,495L345,495L346,495L347,495L348,494L3'
WARNING:root:Invalid comment: '[449,425,"1-1",2,"回到只有你和我的那些时光",0,0,0,0,500,0,true,"微软雅黑",1,"M332,449L334,449L337,449L339,449L341,449L343,449L345,449L346,449L347,449L347,448L348,448L349,448L349,447L350,447L351,447L351,446L353,446L354,446L354,445L355,444L356,444L357,444L357,443L358,443L360,442L360,441L362,441L363,441L363,440L365,43'
WARNING:root:Invalid comment: '[449,425,"1-1",2,"一些言语把我击垮了",0,0,0,0,500,0,true,"微软雅黑",1,"M283,514L284,514L285,514L286,514L288,513L289,513L290,513L292,513L292,512L293,512L295,511L296,510L297,510L298,510L299,509L302,506L304,505L306,503L307,500L308,500L309,498L310,498L310,497L311,497L312,497L313,497L313,498L315,498L315,499L316,499L3'
WARNING:root:Invalid comment: '[449,425,"1-1",2,"我想要留下来给你道歉",0,0,0,0,500,0,true,"微软雅黑",1,"M489,508L490,507L491,507L493,506L494,505L495,504L496,503L498,503L500,502L502,501L506,499L506,498L508,497L509,497L510,497L510,496L511,496L512,496L513,495L514,495L515,495L516,495L517,495L518,495L519,495L520,495L521,495L522,495L523,495L523,494L'
WARNING:root:Invalid comment: '[449,425,"1-1",2,"虽然我的心碎裂成了两半……",0,0,0,0,500,0,true,"微软雅黑",1,"M400,445L401,445L402,445L402,444L404,444L405,443L408,440L410,439L410,438L413,438L414,438L415,438L416,438L418,437L419,437L420,436L423,435L424,435L427,435L428,435L430,434L434,434L436,434L437,434L438,434L439,434L440,434L440,433L441,433L443,4'
Traceback (most recent call last):
  File "/opt/homebrew/bin/yutto", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/lib/python3.12/site-packages/yutto/__main__.py", line 59, in main
    run(args_list)
  File "/opt/homebrew/lib/python3.12/site-packages/yutto/utils/funcutils/as_sync.py", line 37, in sync_func
    return asyncio.run(async_func(*args, **kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 685, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.12/site-packages/yutto/__main__.py", line 328, in run
    current_download_state = await start_downloader(
                             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.12/site-packages/yutto/processor/downloader.py", line 287, in start_downloader
    write_danmaku(
  File "/opt/homebrew/lib/python3.12/site-packages/yutto/utils/danmaku.py", line 77, in write_danmaku
    write_ass_danmaku(xml_danmaku, "xml", file_path, height, width)
  File "/opt/homebrew/lib/python3.12/site-packages/yutto/utils/danmaku.py", line 48, in write_ass_danmaku
    Danmaku2ASS(
  File "/opt/homebrew/lib/python3.12/site-packages/biliass/biliass.py", line 625, in Danmaku2ASS
    return ProcessComments(
           ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.12/site-packages/biliass/biliass.py", line 464, in ProcessComments
    ass.WriteCommentBilibiliPositioned(i, width, height, styleid)
  File "/opt/homebrew/lib/python3.12/site-packages/biliass/biliass.py", line 213, in WriteCommentBilibiliPositioned
    lifetime = float(comment_args.get(3, 4500))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: float() argument must be a string or a real number, not 'NoneType'

复现方式

yutto https://www.bilibili.com/video/av1440943

环境信息

  • OS: macOS
  • Python: Python 3.12.2
  • yutto: yutto 2.0.0-beta.38
  • FFmpeg: 6.1.1

额外信息

No response

一点点的自我检查

  • 充分阅读 README.md,特别是与本 issue 相关的部分
  • 如果是网络问题,已经检查网络连接、设置是否正常,并经过充分测试认为这是 yutto 本身的问题
  • 本 issue 在 issuesdiscussion 中并没有重复问题
  • 确认所希望下载的资源是本人有权限获取的,yutto 不提供任何超出本人权限的资源下载方式
@lc4t
Copy link
Contributor Author

lc4t commented May 21, 2024

看起来是biliass的问题..

@SigureMo
Copy link
Member

SigureMo commented May 21, 2024

倒是可以通过修改 biliass 绕过上述问题,但仍会出现一些 warning

image

但这从源数据上就是不合法的

image

(这些好像都是特殊弹幕,视频里的歌词)

看起来数据少了一部分,[ 没有闭合

这可能会导致这些弹幕无法生成,但貌似没啥更好的办法……

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

Successfully merging a pull request may close this issue.

2 participants