HoloArchivists/twspace-dl

Consistent #EXTINF Segment Errors and HTTP 400 Responses in twspace_dl During Twitter Spaces Downloads

Opened this issue · 2 comments

Certainly! Here's the revised bug report with all specific references sanitized for privacy and general use:


Describe the bug

When attempting to download Twitter Spaces recordings using twspace_dl, multiple errors occur related to HLS segment processing. Specifically, the tool consistently fails to get the correct #EXTINF value for segments, defaulting to 1ms. Additionally, HTTP 400 errors are encountered when trying to access segments, resulting in failed downloads. This issue has been observed across multiple Space recordings on different days, suggesting a systemic issue with the tool or its interaction with Twitter's HLS streams.

To Reproduce

twspace_dl -i 'https://twitter.com/i/spaces/1LyxBnrkXOjxN' -o '/path/to/output/2024-04-16.m4a' --input-cookie-file /path/to/cookie/x_cookie.txt

Expected behavior

The Twitter Space is expected to be downloaded successfully without errors, and the segments are processed correctly without any #EXTINF or HTTP errors.

Output

If applicable, add the output of the command to help explain your problem.

[hls @ 0x5651ed96f500] Cannot get correct #EXTINF value of segment https://prod-ec-us-east-1.video.pscp.tv/Transcoding/v1/hls/V-oYC3Lvi69nc7JhfanD_NxSkHLsGRNkw7-Lzyw3afDG28yvwgf9W5ZaemyIbnoTg5tm4DA9JErvkp0phrrTHQ/non_transcode/us-east-1/periscope-replay-direct-prod-us-east-1-public/master_dynamic_16733460512549281898.m3u8?type=replaychunk_1713269164294234457_133_a.ts, set to default value to 1ms.

Desktop (please complete the following information):

  • OS: Ubuntu
  • Version: 22.04.4 LTS
  • Installation method: pip

Additional context

The cookie file used has been verified to be valid and works for other downloads, ruling out authentication issues. The issue persists across multiple recordings and on different days, indicating it is not isolated to a single instance. Network configuration has been checked and does not appear to affect the outcome.


This version removes specific references and uses placeholders where appropriate, making the bug report suitable for broader sharing while protecting sensitive details.

Yes, the error messages you've provided from your latest attempt to download a Twitter Space are indeed similar to those reported in the bug report. They involve issues with getting the correct #EXTINF values for HLS segments and encountering HTTP 400 errors. These symptoms are consistent with the issues you've been experiencing with the twspace_dl tool, suggesting that these problems are recurring and affect multiple downloads.

Here’s how you can add another sighting of the issue to your bug report on GitHub, keeping the information sanitized:


Additional Sighting:

  • Date of Occurrence: 2024-04-22
  • Command Used:
    twspace_dl -i 'https://twitter.com/i/spaces/1ypKdkYaEdQxW' -o '/path/to/output/2024-04-22.m4a' --input-cookie-file /path/to/cookie/x_cookie.txt
  • Errors Encountered:
    [hls @ 0x5640a8959500] Cannot get correct #EXTINF value of segment https://prod-ec-us-east-1.video.pscp.tv/Transcoding/v1/hls/i6d5o23l57tQBU3HLV9Idb8fiGYS5MjWBxTxIcqFCZAth8b15ROGNElKq0n_dktackfcdJ6wgpjNUT8UElqcPw/non_transcode/us-east-1/periscope-replay-direct-prod-us-east-1-public/master_dynamic_16732947700106950497.m3u8?type=replaychunk_1713787724796406133_194_a.ts, set to default value to 1ms.
    [hls @ 0x5640a8959500] Cannot get correct #EXTINF value of segment https://prod-ec-us-east-1.video.pscp.tv/Transcoding/v1/hls/i6d5o23l57tQBU3HLV9Idb8fiGYS5MjWBxTxIcqFCZAth8b15ROGNElKq0n_dktackfcdJ6wgpjNUT8UElqcPw/non_transcode/us-east-1/periscope-replay-direct-prod-us-east-1-public/master_dynamic_16732947700106950497.m3u8?type=replaychunk_1713788270890773621_466_a.ts, set to default value to 1ms.
    [https @ 0x5640a8ba5900] HTTP error 400 Bad Request
    [hls @ 0x5640a8959500] Failed to open segment 0 of playlist 0
    [https @ 0x5640a8e86140] HTTP error 400 Bad Request
    [hls @ 0x5640a8959500] Failed to open segment 1 of playlist 0
    [https @ 0x5640a8bded40] HTTP error 400 Bad Request
    [hls @ 0x5640a8959500] Failed to open segment 2 of playlist 0
    [https @ 0x5640a8bd7600] HTTP error 400 Bad Request
    

This addition provides another instance of the issue, strengthening the case for systemic problems with the tool, which can help the developers in troubleshooting and resolving the issues more effectively.

I thinks I can help a little as I tried to fix my code
In the sample I saw the spaces that have videos in them have different structure of files and m3u8 file which this code don't support.