Closed tio-trom closed 2 years ago
I'm affected, too.
I believe i found the error in the following line: https://github.com/Chocobozzz/PeerTube/blob/37a5d6318b8ce9a3784234751a74b7f15095d5c6/server/helpers/youtube-dl/youtube-dl-cli.ts#L156
We should invoke python3
here. But is this debian-specific? And do we need to fix that upstream, or write a patch file?
I'm affected, too.
I believe i found the error in the following line: https://github.com/Chocobozzz/PeerTube/blob/37a5d6318b8ce9a3784234751a74b7f15095d5c6/server/helpers/youtube-dl/youtube-dl-cli.ts#L156
We should invoke
python3
here. But is this debian-specific? And do we need to fix that upstream, or write a patch file?
Or we patch the peertube sources or we wait to Bullseye Yunohost 11 being released
I have proposed a PR to PeerTube.
I upgraded my peertube to the one with the fix. Same exact issue I see.
Same here: Upgraded ynh_peertube, but issue is not solved.
Thanks for your feedback.
@yalh76 Well, I didn't do well my job. The problem here is that people who already migrated to 4.0.0 don't benefit from the patch.
That's because I put the instruction to load the patch in this condition: https://github.com/YunoHost-Apps/peertube_ynh/blob/master/scripts/upgrade#L154
Maybe something like would do the job:
should_patch=$([ -d "../sources/patches-$(ynh_app_upstream_version)" ] && echo "yes" || echo "no")
if [ "$upgrade_type" == "UPGRADE_APP" || "$should_patch" == "yes"]
then
....
[ "$should_patch" == "yes" ] && cp -a "../sources/patches-$(ynh_app_upstream_version)" "../sources/patches"
....
fi
What do you think?
I'll try to find some time to test that (properly) and propose a PR.
Edit: this way has the drawback of reinstalling (ynh_setup_source
) PeerTube while upgrading to any version 4.0.0~ynh*
, can it be an issue?
Or users can force upgrade from the command line:
yunohost app upgrade peertube -u https://github.com/YunoHost-Apps/peertube_ynh --force
with update from command line (like above) it works for some yt links, but for some it does not.
for testing: not working with: https://www.youtube.com/watch?v=D9Ihs241zeg
Seems to kinda work now after I forced the upgrade...
@tio-trom Did you try "my" yt link above? For me it still does not work.
@AkselRocks Have you attempted the trick from @yalh76?
https://github.com/YunoHost-Apps/peertube_ynh/issues/295#issuecomment-1016777851
@tio-trom Did you try "my" yt link above?
Yah doesn't work with that video. I wonder why.
@tio-trom Did you try "my" yt link above?
Yah doesn't work with that video. I wonder why.
Have you taken a look at the peertube logs (journalctl -u peertube
)?
I get a MaxBufferError when I attempt to fetch this video from PeerTube, do you have the same output?
Feb 17 21:57:02 zeteo peertube[9136]: "err": { Feb 17 21:57:02 zeteo peertube[9136]: "stack": "MaxBufferError: Command failed: /usr/bin/python3 /home/yunohost.app/peertube/storage/bin/yt-dlp --dump-json -f bestvideo[vcodec^=avc1][height=720]+bestaudio[ext=m4a]/bestvideo[vcodec!=av01][vcodec!=vp9.2][height=720]+bestaudio/bestvideo[vcodec^=avc1][height<=720]+bestaudio[ext=m4a]/bestvideo[vcodec!=av01][vcodec!=vp9.2]+bestaudio/best[vcodec!=av01][vcodec!=vp9.2]/best https://www.youtube.com/watch?v=D9Ihs241zeg\nmaxBuffer exceeded\n{\"id\": \"D9Ihs241zeg\", \"title\": \"Chimamanda Ngozi Adichie: The danger of a single story | TED\", \"formats\": [{\"format_id\": \"sb2\", \"format_note\": \"storyboard\", \"ext\": \"mhtml\", \"protocol\": \"mhtml\", \"acodec\": \"none\", \"vcodec\": \"none\", \"url\": \"https://i.ytimg.com/sb/D9Ihs241zeg/storyboard3_L0/default.jpg?sqp=-oaymwENSDfyq4qpAwVwAcABBqLzl_8DBgjD4rPVBQ==&sigh=rs$AOn4CLCwtpDUuiO51mzo-dbMRXh4DmTiQg\", \"width\": 48, \"height\": 27, \"fragments\": [{\"path\": \"https://i.ytimg.com/sb/D9Ihs241zeg/storyboard3_L0/default.jpg?sqp=-oaymwENSDfyq4qpAwVwAcABBqLzl_8DBgjD4rPVBQ==&sigh=rs$AOn4CLCwtpDUuiO51mzo-dbMRXh4DmTiQg\", \"duration\": 1156.0}], \"audio_ext\": \"none\", \"video_ext\": \"none\", \"format\": \"sb2 - 48x27 (storyboard)\", \"resolution\": \"48x27\", \"http_headers\": {\"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36\", \"Accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8\", \"Accept-Encoding\": \"gzip, deflate\", \"Accept-Language\": \"en-us,en;q=0.5\", \"...
and this can be explained by the very long JSON extracted by the command run:
/usr/bin/python3 /home/yunohost.app/peertube/storage/bin/yt-dlp --dump-json -f 'bestvideo[vcodec^=avc1][height=720]+bestaudio[ext=m4a]/bestvideo[vcodec!*=av01][vcodec!*=vp9.2][height=720]+bestaudio/bestvideo[vcodec^=avc1][height<=720]+bestaudio[ext=m4a]/bestvideo[vcodec!*=av01][vcodec!*=vp9.2]+bestaudio/best[vcodec!*=av01][vcodec!*=vp9.2]/best' 'https://www.youtube.com/watch?v=D9Ihs241zeg'
That may be an issue to PeerTube here… Though I don't know whether this can be fixed =/.
Yes I get the same MaxBufferError.
Yes I get the same MaxBufferError.
Alright! I guess this is not the same issue as the original one (which stated that the import failed due to the wrong python version being used for yt-dlp to be executed).
May we let you search and maybe fill an issue to the PeerTube project? https://github.com/Chocobozzz/PeerTube/issues
Hi,
I increased buffer size in https://github.com/Chocobozzz/PeerTube/commit/8296984de4b085231fb1a96c8456a2d79a8ded0c Available in 4.1 (stable release planned for this week)
Hi,
I increased buffer size in Chocobozzz/PeerTube@8296984 Available in 4.1 (stable release planned for this week)
Hi @Chocobozzz. Thanks a lot for your answer and your work!
Should be fixed by now, I guess we can close the issue? Do you agree @yalh76 @tio-trom
works for me (and "my" yt link above). :+1:
The latest Peertube 4.0 depends on Python versions 3.6 and above. But since I would not want to mess with the other yunohost applications I have installed on the same server and manually upgrade to a newer Python version, what can be done?
So basically I cannot import any videos via the url.