PeerTube not importing more than 100 YouTube videos

Hi everyone! I’m having a weird issue where after syncing around 100 YouTube videos (98 to be specific), PeerTube no longer syncs any more videos. I do not think this is related to YouTube’s IP blocking, as I am using a HTTP proxy and there seem to be no errors in the logs regarding this. I previously mentioned this in the PeerTube Matrix server, but was directed here.

Roughly two days ago, I saw this in the logs. I proceeded to test the connection to the HTTP proxy, confirmed that it does work, and then I restarted PeerTube. After that, this log has not appeared again but PeerTube still doesn’t sync videos.

peertube-1  |     "message": "Command failed with exit code 1: /usr/bin/python3 /data/bin/yt-dlp --proxy 'http://PROXY' --skip-download --playlist-reverse --flat-playlist --playlist-end 10 --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]/bestvideo[ext=mp4]+bestaudio[ext=m4a]/best' 'https://www.youtube.com/@USERNAME'\n\nWARNING: [youtube:tab] timed out. Retrying (1/3)...\nWARNING: [youtube:tab] timed out. Retrying (2/3)...\nWARNING: [youtube:tab] timed out. Retrying (3/3)...\nWARNING: [youtube:tab] Unable to download webpage: timed out (caused by TransportError('timed out')). Giving up after 3 retries\nWARNING: [youtube:tab] timed out. Retrying (1/3)...\nWARNING: [youtube:tab] timed out. Retrying (2/3)...\nWARNING: [youtube:tab] timed out. Retrying (3/3)...\nERROR: [youtube:tab] @USERNAME: Unable to download API page: timed out (caused by TransportError('timed out'))",

I set my log level to debug and monitored the logs when I requested my channel to be synchronised. The only logs relating to YouTube are:

[videos.tld.com:443] 2025-10-21 23:12:42.232 info: Fetched 334 candidate URLs for sync channel NAME
[videos.tld.com:443] 2025-10-21 23:12:43.417 info: Finished synchronizing "NAME" successfully. {
”successes": 0
}

And debug: https://www.youtube.com/watch?v=ID is already imported for channel NAME, skipping video channel synchronization.However, this seems unlikely to affect the whole syncing process as it only refers to one specific video.

I verified that these are the only logs by running:
# Returns nothing
sudo docker compose logs | grep "yt-dl"
sudo docker compose logs | grep "youtube-dl"
sudo docker compose logs | grep "sign in"
sudo docker compose logs | grep "sign-in"
sudo docker compose logs | grep "signin"
sudo docker compose logs | grep "cookies"

# Returns some things but not errors
sudo docker compose logs | grep « bot »
sudo docker compose logs | grep « youtube »

I can confirm that there are no active import jobs in the Settings > System > Local Jobs panel.

Any help would be greatly appreciated.
Thanks.

Hi,

Can you try to remove, re-create the sync and provide peertube logs? Can you also check your video imports list tu understand if the sync didn’t create all the jobs, or if the jobs failed?

Hi! Sorry for a bit of a late reply.

Unfortunately, I’m experiencing some issues right now with my object storage provider so I have to get that fixed first before I can follow those steps. I wanted to let you know that I haven’t abandoned this issue, and I’ll get back to you as soon as possible when I can perform those steps.

Thanks.

1 Like

It looks like I’ve sorted out my object storage issue (finally!) so I tried removing my channel import and re-creating it. After I did so, it listed all the videos in the logs but since the previous synchronize job already got the new video information it said:
peertube-1 | [``videos.tld.com:443``] 2025-10-24 06:38:18.357 info: Finished synchronizing “NAME” successfully. {
peertube-1 | “successes”: 0
peertube-1 | }

After that, all the videos that were listed in the “List imports” section of the previous channel synchronization are gone and it says “No video import found”. However, I can see all the videos under the “Videos” tab listed as “To Import”, likely linked to the channel synchronization which I deleted. I’ve attached some screenshots to make this clearer.

No video imports listed under “View imports”

Previously synced videos listed as “To Import”

There are no pending or jobs in the “Local Jobs” tab under “after-video-channel-import”, “video-channel-import”, “video-file-import” or “video-import”. The only failed result is under “after-video-channel-import” which has this error and is linked to the old / deleted synchronization ID.

{
  "channelSyncId": 2 # NOTE THIS IS THE OLD / DELETED SYNCHRONIZATION ID
}

UnrecoverableError: child bull-videos.tld.com:video-import:05709801-9fcb-4828-a8f3-3ee5d748d9a1 failed
    at /app/node_modules/bullmq/dist/cjs/classes/worker.js:492:60
    at trace (/app/node_modules/bullmq/dist/cjs/utils.js:275:16)
    at Worker.trace (/app/node_modules/bullmq/dist/cjs/classes/queue-base.js:152:34)
    at Worker.processJob (/app/node_modules/bullmq/dist/cjs/classes/worker.js:481:21)
    at /app/node_modules/bullmq/dist/cjs/classes/worker.js:266:66
    at Worker.retryIfFailed (/app/node_modules/bullmq/dist/cjs/classes/worker.js:774:30)
    at Worker.mainLoop (/app/node_modules/bullmq/dist/cjs/classes/worker.js:266:41)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Worker.run (/app/node_modules/bullmq/dist/cjs/classes/worker.js:202:13)
    at async Promise.all (index 0)
    at async Promise.all (index 8)

Perhaps this is the reason why it stopped importing after around 100 videos..? I checked “video-channel-import” and the old / deleted synchronization job failed with the following error:

{
  "externalChannelUrl": "https://www.youtube.com/@NAME",
  "videoChannelId": 2, # NOTE THIS IS THE OLD / DELETED SYNCHRONIZATION ID
  "partOfChannelSyncId": 1
}

Error: Unknown channel sync specified in videos channel import
    at Object.processVideoChannelImport [as video-channel-import] (file:///app/dist/core/lib/job-queue/handlers/video-channel-import.js:19:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.wrapPromiseFun (file:///app/dist/core/lib/plugins/hooks.js:8:24)
    at async /app/node_modules/bullmq/dist/cjs/classes/worker.js:496:32
    at async Worker.retryIfFailed (/app/node_modules/bullmq/dist/cjs/classes/worker.js:774:24)

I hope I answered all of your questions. Just to recap, after recreating the channel synchronization job, no new videos have been listed for import under “List imports” or show in “Local jobs”.

Thanks!

Hi again! I’m just wondering if there are any updates since it’s been around 5 days now. There’s no particular rush until December (governmental and personal reasons). Thanks.

Can you enable debug logs on your peertube instance, re-create the sync and search for logs that contain channel-synchronization tag? (you can filter by tags in the admin web interface)

Thanks for the reply! I actually already had debug logging enabled when I recreated the sync before, so I just searched the logs for that tag. At the beginning it says:

info[26/10/2025, 5:36:53 pm] Fetched 22 candidate URLs for sync channel peertube_user.

{
  "targetUrls": [
    "https://www.youtube.com/shorts/ID",
    "https://www.youtube.com/shorts/ID",
    "https://www.youtube.com/shorts/ID",
    "https://www.youtube.com/shorts/ID",
    "https://www.youtube.com/watch?v=ID",
    "https://www.youtube.com/watch?v=ID",
    "https://www.youtube.com/watch?v=ID",
    "https://www.youtube.com/watch?v=ID",
    "https://www.youtube.com/watch?v=ID",
    "https://www.youtube.com/watch?v=ID",
    "https://www.youtube.com/watch?v=ID",
    "https://www.youtube.com/watch?v=ID",
    "https://www.youtube.com/watch?v=ID",
    "https://www.youtube.com/watch?v=ID",
    "https://www.youtube.com/watch?v=ID",
    "https://www.youtube.com/watch?v=ID",
    "https://www.youtube.com/watch?v=ID",
    "https://www.youtube.com/watch?v=ID",
    "https://www.youtube.com/watch?v=ID",
    "https://www.youtube.com/watch?v=ID",
    "https://www.youtube.com/watch?v=ID",
    "https://www.youtube.com/watch?v=ID"
  ],
  "tags": [
    "channel-synchronization"
  ]
}

After that, it says the following. Please note, the log doesn’t actually log “@USERNAME”, for example. I’m just obscuring usernames and names, etc. The logging works as expected.

debug[26/10/2025, 5:36:53 pm] Import candidate: https://www.youtube.com/shorts/ID

{
  "tags": [
    "channel-synchronization"
  ]
}

debug[26/10/2025, 5:36:53 pm] https://www.youtube.com/shorts/ID is already imported for channel youtube_user, skipping video channel synchronization.

{
  "channelSync": {
    "id": 3,
    "externalChannelUrl": "https://www.youtube.com/@USERNAME",
    "state": 2,
    "lastSyncAt": "2025-10-26T17:36:38.656Z",
    "videoChannelId": 2,
    "createdAt": "2025-10-24T06:37:42.624Z",
    "updatedAt": "2025-10-26T17:36:38.656Z",
    "VideoChannel": {
      "id": 2,
      "name": "NAME",
      "description": "DESCRIPTION",
      "support": null,
      "actorId": 5,
      "accountId": 3,
      "createdAt": "2025-10-17T05:50:58.139Z",
      "updatedAt": "2025-10-24T06:33:29.364Z",
      "Account": {
        "id": 3,
        "name": "NAME",
        "description": null,
        "actorId": 4,
        "userId": 2,
        "applicationId": null,
        "createdAt": "2025-10-17T05:50:58.133Z",
        "updatedAt": "2025-10-17T05:50:58.133Z"
      }
    }
  },
  "tags": [
    "channel-synchronization"
  ]
}

I used Control + F on my browser to search for the phrase “already imported for channel youtube_user, skipping video channel synchronization.” and it says there are more than 1,000 matches of this same log (obviously referencing a different YouTube video ID though). I confirmed this by highlighting all matches of the aforementioned phrase and scrolled the logs, finding that every log featured that phrase.

I assume that the first sync job failed somehow, and now that all the metadata for those videos are already listed in PeerTube, the new sync job skips them? I suppose I can remove all these “ghost” videos, but it took a while to get the metadata so if possible I’d like to avoid re-fetching all that metadata.

Thanks!

If I understand correctly, PeerTube corretly fetches all your youtube videos but the import tasks failed, so you have the videos listed in your account but the file could not be imported?

PeerTube correctly fetches all my YouTube videos, but it makes no import tasks so they don’t “fail” per se. Rather, import tasks just don’t get created. The videos to import are listed in my account but have the status of “To Import”.

Thanks.

Do you think it’s possible that the first sync created the import jobs and they failed? Since the import job exist (even in failed state), the sync job won’t re-create them. You can try to find your imports on my-library/video-imports web page

There are some import jobs that are listed as “SUCCESS” and “FAILED” but most of them are listed as “PENDING”. Is that what you are referring to?

Most of the videos are pending as shown in the following screenshot.

But there are some imports which are listed as successful and failed.

For reference, only about 100 of 400 import jobs are listed as either « SUCCESS » or « FAILED ». Around 300/400 are listed as « PENDING ».

Thanks!

Hi and thank you.

We improved video import and channel sync in Add ability to retry video imports · Chocobozzz/PeerTube@e30e5c9 · GitHub

Please, when you’ll upgrade to peertube v8 (planned for December), try to create another channel sync and check if you still have issues :slight_smile:

1 Like

Wow! Thanks so much for that. I can see that you’ve put in a lot of effort for that feature. I really appreciate it.

I feel bad asking this, since you’ve gone to so much trouble, but do you happen to know a more specific date within December? On December 10th a new government law will pass in my country which will require ID/face verification to use YouTube logged-in. Because I don’t want to do that, I will likely have to delete my YouTube account before December 10th which will therefore delete all my videos making it impossible to perform a channel sync to PeerTube.

If you think that v8 will release after December 10th then that’s completely fine, but I’ll have to try find another way to sync my videos so I’d just like a heads up if that will be necessary or the v8 update will release before December 10th. Hopefully that makes sense :slight_smile:

Just to be clear, it is not my intention at all to ask for the v8 update to be released earlier, I’d just like to know if you have a more specific date so I can plan ahead.

Thank very much!

PeerTube v8 is planned around December 10th, but we’ll release a RC in two weeks that you can use :slight_smile:

That’s absolutely incredible! I really appreciate that a lot, so I’ve donated to Framasoft.

I’ll hold off marking your comment as solved until I try the new feature on the RC, but I’m 99% sure this will be marked as solved once I can confirm everything works in the RC. :folded_hands: :smiley:

2 Likes