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

[Bug] Gelbooru videos webm format error #1048

Closed
XCanG opened this issue Oct 5, 2020 · 3 comments
Closed

[Bug] Gelbooru videos webm format error #1048

XCanG opened this issue Oct 5, 2020 · 3 comments

Comments

@XCanG
Copy link

XCanG commented Oct 5, 2020

When you have post with video and format is webm, gallery-dl create mp4 file and looks like get error and skip, as file have 0 bytes in size.

To reproduce issue, try to pick any video under webm tag and download it.

@kattjevfel
Copy link
Contributor

gelbooru seems to offer both webm and mp4, even if tagged as webm. In fact when viewing an image the video actually playing is the mp4, but when clicking "Original image" I get the webm version. Not quite sure which is the "proper" one to get.

Either way it worked just fine and it is indeed a proper mp4 file.

katt@main ~ » gg -v https://gelbooru.com/index.php\?page\=post\&s\=view\&id\=5590187\&tags\=webm
[gallery-dl][debug] Version 1.15.1-dev
[gallery-dl][debug] Python 3.8.6 - Linux-5.8.13-21-tkg-upds-x86_64-with-glibc2.2.5
[gallery-dl][debug] requests 2.24.0 - urllib3 1.25.10
[gallery-dl][debug] Starting DownloadJob for 'https://gelbooru.com/index.php?page=post&s=view&id=5590187&tags=webm'
[gelbooru][debug] Using GelbooruPostExtractor for 'https://gelbooru.com/index.php?page=post&s=view&id=5590187&tags=webm'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): gelbooru.com:443
[urllib3.connectionpool][debug] https://gelbooru.com:443 "GET /index.php?page=dapi&s=post&q=index&tags=id%3A5590187&pid=0 HTTP/1.1" 200 None
[gelbooru][debug] Using download archive '/mnt/jupiter/Temp/gallery-dl/archives/gelbooru.sqlite3'
[gelbooru][debug] Active postprocessor modules: [ExecPP, UgoiraPP]
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): mp4.gelbooru.com:443
[urllib3.connectionpool][debug] https://mp4.gelbooru.com:443 "GET /images/44/66/446656ec3e73615937651b12c3368371.mp4 HTTP/1.1" 200 23486114
/mnt/jupiter/Temp/gallery-dl/gelbooru/gelbooru_5590187.mp4
[postprocessor.exec][debug] Running '['gallery-dl_postprocessing_selector.sh', 'mp4', '/mnt/jupiter/Temp/gallery-dl/gelbooru/gelbooru_5590187.mp4']'
katt@main ~ » file /mnt/jupiter/Temp/gallery-dl/gelbooru/gelbooru_5590187.mp4
/mnt/jupiter/Temp/gallery-dl/gelbooru/gelbooru_5590187.mp4: ISO Media, MP4 Base Media v1 [IS0 14496-12:2003]

I also downloaded both versions (you can just change the .mp4 to .webm) and they're basically identical in quality and are encoded correctly.

katt@main ~ » file 446656ec3e73615937651b12c3368371.*
446656ec3e73615937651b12c3368371.mp4:  ISO Media, MP4 Base Media v1 [IS0 14496-12:2003]
446656ec3e73615937651b12c3368371.webm: WebM
katt@main ~ » md5sum 446656ec3e73615937651b12c3368371.* 
54f3edca05f19144410a004e1199f4bb  446656ec3e73615937651b12c3368371.mp4
e3702384b1dcaad7414f3171305ba078  446656ec3e73615937651b12c3368371.webm

@XCanG
Copy link
Author

XCanG commented Oct 5, 2020

Try https://gelbooru.com/index.php?page=post&s=view&id=3752131, it trying to download mp4 with 0 bytes, but should webm.

@mikf
Copy link
Owner

mikf commented Oct 6, 2020

You can use -o api=false as a workaround for the time being.

Gelbooru seems to transition to a new system and domain for videos and has changed thedownload URLs in API responses to the new format for all videos, even though only newer video files are supported at the moment.

$ gallery-dl -g "https://gelbooru.com/index.php?page=post&s=view&id=3752131"
https://mp4.gelbooru.com/images/71/a7/71a7804d2d0ec16e4df74873821e7c22.mp4

$ gallery-dl -g -o api=false 'https://gelbooru.com/index.php?page=post&s=view&id=3752131'
https://img2.gelbooru.com/images/71/a7/71a7804d2d0ec16e4df74873821e7c22.webm

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

No branches or pull requests

3 participants