HLS transcoding fail after uploading a video with : Cannot read properties of undefined (reading 'storage')

When I upload a video the transcoding is failing with this log :

{"level":"info","message":"Optimize transcoding job for 6794c890-5410-4b01-8d39-213bdc1f1d1a ended.","label":"video.mydomain.com:443","tags":["transcoding","6794c890-5410-4b01-8d39-213bdc1f1d1a"],"payload":
{"type":"optimize-to-web-video","videoUUID":"6794c890-5410-4b01-8d39-213bdc1f1d1a","isNewVideo":true,"hasChildren":true,"quickTranscode":false},"timestamp":"2024-10-03T10:32:38.358Z"}

{"level":"info","message":"Processing transcoding job builder in job d19e239c-9883-49e0-9be3-93cb8eb2706f.","label":"video.mydomain.com:443","timestamp":"2024-10-03T10:32:38.377Z"}

{"level":"info","message":"Processing transcoding job a7360282-869d-495a-a7ba-0fa8ff600b91.","label":"video.mydomain.com:443","tags":["transcoding","6794c890-5410-4b01-8d39-213bdc1f1d1a"],"timestamp":"2024-10-03T10:32:38.384Z"}

{"level":"info","message":"Handling HLS transcoding job for 6794c890-5410-4b01-8d39-213bdc1f1d1a.","label":"video.mydomain.com:443","tags":["transcoding","6794c890-5410-4b01-8d39-213bdc1f1d1a"],"payload":{"type":"new-resolution-to-hls","videoUUID":"6794c890-5410-4b01-8d39-213bdc1f1d1a","resolution":1080,"fps":30,"copyCodecs":true,"isNewVideo":true,"separatedAudio":false,"deleteWebVideoFiles":true,"hasChildren":false},"timestamp":"2024-10-03T10:32:38.415Z"}

{"level":"error","message":"Cannot execute job a7360282-869d-495a-a7ba-0fa8ff600b91 in queue video-transcoding.","label":"video.mydomain.com:443","payload":
{"type":"new-resolution-to-hls","videoUUID":"6794c890-5410-4b01-8d39-213bdc1f1d1a","resolution":1080,"fps":30,"copyCodecs":true,"isNewVideo":true,"separatedAudio":false,"deleteWebVideoFiles":true,"hasChildren":false},"err":
{"stack":"TypeError: Cannot read properties of undefined (reading 'storage')
    at VideoPathManager.makeAvailableVideoFiles (file:///var/www/peertube/versions/peertube-v6.3.1/dist/core/lib/video-path-manager.js:47:27)
    at handleHLSJob (file:///var/www/peertube/versions/peertube-v6.3.1/dist/core/lib/job-queue/handlers/video-transcoding.js:72:41)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.processVideoTranscoding [as video-transcoding] (file:///var/www/peertube/versions/peertube-v6.3.1/dist/core/lib/job-queue/handlers/video-transcoding.js:34:9)
    at async Object.wrapPromiseFun (file:///var/www/peertube/versions/peertube-v6.3.1/dist/core/lib/plugins/hooks.js:8:24)
    at async Worker.processJob (/var/www/peertube/versions/peertube-v6.3.1/node_modules/bullmq/dist/cjs/classes/worker.js:453:28)
    at async Worker.retryIfFailed (/var/www/peertube/versions/peertube-v6.3.1/node_modules/bullmq/dist/cjs/classes/worker.js:638:24)","message":"Cannot read properties of undefined (reading 'storage')"},"timestamp":"2024-10-03T10:32:38.467Z"}

Other infos :

Thanks !

Hi,

Can you share the video URL?

Yes, sure :

Thanks !

Can you enable debug logs and paste more logs? I can’t reproduce. And what is your ffmpeg version?

My ffmpeg version:

$ ffmpeg -v
ffmpeg version 5.1.6-0+deb12u1 Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14)

Logs are activated but that’s really verbose :crazy_face:

Here is a log when it crashes:
link to the log file

And can you send me the original file you uploaded?

Here it is

Thanks !

If it can helps the original video is in 1080p and when uploading the video is encoded in 406p,
I don’t know why because my configuration is set to 720p :man_shrugging:

but it is still failling and flagged « Transcoding failed »

Thanks! It should be fixed by Fix detecting video stream rotation · Chocobozzz/PeerTube@b02f1ae · GitHub