awss3hlsink: Put object request failed
Describe your issue
Video transcoding fails while converting mp4 to hls, resulting in partial playlist.
Expected Behavior
Video transcoding succeeds with no errors and creates a playlist for the complete input video.
Observed Behavior
Video transcoding fails with error message and does not generate several hls file segments.
Setup
- Operating System: Linux/Debian 12 x86_64
- Device: Computer
- gst-plugins-rs Version: commit c701aa6f (main branch as of Tue Jul 2 19:30:34 2024)
- GStreamer Version: 1.22.0
-
Command line:
gst-launch-1.0 filesrc location=video.mp4 ! decodebin ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720 ! x264enc bitrate=2000 ! h264parse ! awss3hlssink endpoint-uri=http://localhost:9000 bucket=aru force-path-style=true access-key=minioadmin key-prefix=vod secret-access-key=minioadmin hlssink::max-files=0 hlssink::playlist-length=0 hlssink::target-duration=10 hlssink::location=%05d.ts hlssink::playlist-location=index.m3u8
Steps to reproduce the bug
- vide.mp4 exists, minio server is online, and gst-plugin-aws is built in debug mode and added to GST_PLUGIN_PATH
- open terminal
- type
gst-launch-1.0 filesrc location=video.mp4 ! decodebin ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720 ! x264enc bitrate=2000 ! h264parse ! awss3hlssink endpoint-uri=http://localhost:9000 bucket=aru force-path-style=true access-key=minioadmin key-prefix=vod secret-access-key=minioadmin hlssink::max-files=0 hlssink::playlist-length=0 hlssink::target-duration=10 hlssink::location=%05d.ts hlssink::playlist-location=index.m3u8
- wait until gstreamer panics and exits
How reproducible is the bug?
Always
Terminal output
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Redistribute latency...
Redistribute latency...
Redistribute latency...
Redistribute latency...
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
Redistribute latency...11.6 %)
Redistribute latency...
Redistribute latency...23.2 %)
Redistribute latency...
Redistribute latency...34.9 %)
Redistribute latency...
Redistribute latency...46.6 %)
Redistribute latency...
Redistribute latency...58.3 %)
Redistribute latency...
Redistribute latency...70.0 %)
Redistribute latency...
Redistribute latency...81.6 %)
Redistribute latency...
Redistribute latency...93.3 %)
Redistribute latency...
Got EOS from element "pipeline0".
Execution ended after 0:00:17.782294325
Setting pipeline to NULL ...
ERROR: from element /GstPipeline:pipeline0/GstAwsS3HlsSink:awss3hlssink0: Could not write to resource.
Additional debug info:
net/aws/src/s3hlssink/imp.rs(285): gstaws::s3hlssink::imp::S3HlsSink::s3_request (): /GstPipeline:pipelin
e0/GstAwsS3HlsSink:awss3hlssink0:
Put object request failed
Freeing pipeline ...
Error with GST_DEBUG=awss3hlssink:6 env var
0:00:17.862805238 60869 0x55a6a12b04c0 DEBUG awss3hlssink net/aws/src/s3hlssink/imp.rs:210:<gstaws::s3hlssink::imp::S3Upload as core::ops::drop::Drop>::drop: Send S3 key vod/index.m3u8 of data length 294 succeeded
0:00:17.862812838 60869 0x55a6a12b04c0 DEBUG awss3hlssink net/aws/src/s3hlssink/imp.rs:951:<gstaws::s3hlssink::imp::S3HlsSink as gstreamer::subclass::bin::BinImpl>::handle_message:<awss3hlssink0> Got EOS, dropping control channel
Got EOS from element "pipeline0".
Execution ended after 0:00:17.287261088
Setting pipeline to NULL ...
0:00:17.863740746 60869 0x7fc09c2d3990 ERROR awss3hlssink net/aws/src/s3hlssink/imp.rs:278:gstaws::s3hlssink::imp::S3HlsSink::s3_request:<awss3hlssink0> Put object request for S3 key vod/index.m3u8 of data length 280 failed with error Cancelled
ERROR: from element /GstPipeline:pipeline0/GstAwsS3HlsSink:awss3hlssink0: Could not write to resource.
Additional debug info:
net/aws/src/s3hlssink/imp.rs(285): gstaws::s3hlssink::imp::S3HlsSink::s3_request (): /GstPipeline:pipeline0/GstAwsS3HlsSink:awss3hlssink0:
Put object request failed
0:00:17.863844507 60869 0x7fc09c2d3990 INFO awss3hlssink net/aws/src/s3hlssink/imp.rs:344:gstaws::s3hlssink::imp::S3HlsSink::s3_request:<awss3hlssink0> Exiting S3 request thread
0:00:17.869739237 60869 0x55a6a126d2c0 INFO awss3hlssink net/aws/src/s3hlssink/imp.rs:400:gstaws::s3hlssink::imp::S3HlsSink::stop:<awss3hlssink0> Stopping S3 request thread
0:00:17.869760967 60869 0x55a6a126d2c0 ERROR awss3hlssink net/aws/src/s3hlssink/imp.rs:410:gstaws::s3hlssink::imp::S3HlsSink::stop:<awss3hlssink0> Failed to stop S3 request thread: sending on a closed channel
Freeing pipeline ...
Related non-duplicate issues
Additional Information
Replacing awss3hlssink with hlssink2 or awss3sink works just fine. The total number of segments generated with hlssink2 is 9. With awss3hlssink, the final playlist is incomplete, unseekable, and is missing the last 2 segments.