Since around August 2020, the youtube api always returns a 404 error when uploading a vidéo and setting a playlist for the video:
2020-09-15 07:59:30,318 - Prismedia - INFO: Youtube: Uploading video... 2020-09-15 07:59:38,487 - Prismedia - INFO: Youtube : Video was successfully uploaded. 2020-09-15 07:59:38,487 - Prismedia - INFO: Youtube: Watch it at https://youtu.be/jXYGroTqufA (post-encoding could take some time) 2020-09-15 07:59:38,487 - Prismedia - INFO: Youtube: Configuring playlist... 2020-09-15 07:59:38,819 - Prismedia - CRITICAL: Youtube: <HttpError 404 when requesting https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&alt=json returned "Video not found.">
However, the playlist is correctly set despite the error...
According to test, video appears as "deleted" in the playlist interface while the transcoding is not finished.
The problem is still present with fully up to date google-api libs (release in september 2020), and API documentation has not changed since age.
Currently I suspect that something changed inside youtube itself, and now when a video is transcoding, it "does not exist", perhaps something related with the content ID where Youtube does not publish video until their bot scan it entirely..
As a consequence, when we try to add the video in the playlist, it works BUT something broke as the video is not really existent, and so we get the 404...
At the moment, expect no help from youtube as their "support" is on stackoverflow (lol) and their bug tracker is literally full of bots opening tickets and discussing with themselves since at least 6 month, with no developer present to close bot ticket or answer real questions.
I'll dig if I found something that can help, but I honestly think that their API is fucked up at the moment, and the best solution could be to just ignore this 404...