shaka-project / shaka-packager

A media packaging and development framework for VOD and Live DASH and HLS applications, supporting Common Encryption for Widevine and other DRM Systems.
https://shaka-project.github.io/shaka-packager/
Other
1.9k stars 496 forks source link

error: generic:18 Failed to write playlist #1387

Closed avivais closed 1 month ago

avivais commented 2 months ago

System info

Operating System: Alpine Linux v3.19 Shaka Packager Version: v3.0.4

Issue and steps to reproduce the problem

Packager Command:

'/usr/local/bin/packager' 'in=/shared_videos/6287a3f6cd72794eb014ffe5/videos/661cf7319cde716a380768e7/661cf7343ae384a9a2015783/video.mp4,stream=video,segment_template=661cf7343ae384a9a2015783_$Number$.ts,playlist_name=661cf7343ae384a9a2015783.m3u8' 'in=/shared_videos/6287a3f6cd72794eb014ffe5/videos/661cf7319cde716a380768e7/661cf7343ae384a9a2015784/video.mp4,stream=video,segment_template=661cf7343ae384a9a2015784_$Number$.ts,playlist_name=661cf7343ae384a9a2015784.m3u8' '--segment_duration=3' '--hls_master_playlist_output=video.m3u8'

Get the following error consistently:

E0415 09:45:35.650083 402 file.cc:91] Failed to replace file '661cf7343ae384a9a2015784.m3u8' with '/tmp/packager-tempfile-192-9e259564452a297d-1', error: generic:18 E0415 09:45:35.650134 402 media_playlist.cc:505] Failed to write playlist to: 661cf7343ae384a9a2015784.m3u8 E0415 09:45:35.650139 402 simple_hls_notifier.cc:255] Failed to write playlist 661cf7343ae384a9a2015784.m3u8 E0415 09:45:35.650143 402 packager_main.cc:625] Packaging Error: 3 (INVALID_ARGUMENT): Failed to flush Hls. 

Same command with v2.6.1 works as expected

cosmin commented 2 months ago

This seems like a permission error when taking the temporary output file and moving it to the destination path. What happens if you just run the following:

touch /tmp/packager-tempfile-192-9e259564452a297d-1
mv /tmp/packager-tempfile-192-9e259564452a297d-1 661cf7343ae384a9a2015784.m3u8

from the same working directory where you are running packager from?

cosmin commented 2 months ago

The error seems potentially related to #1386 , is there a similar sshfs setup by chance?

github-actions[bot] commented 1 month ago

Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen in a comment.