Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FFmpeg Error #1109

Closed
pundoo opened this issue May 30, 2024 · 2 comments · Fixed by #1110
Closed

FFmpeg Error #1109

pundoo opened this issue May 30, 2024 · 2 comments · Fixed by #1110
Assignees
Labels
bug Something isn't working

Comments

@pundoo
Copy link

pundoo commented May 30, 2024

Describe the bug
FFmpeg throws the following error, when requesting through hysteria :

[tls @ 000001aedf626700] Error in the pull function.
[tls @ 000001aedf626700] IO error: End of file
[in#0 @ 000001aedf60a580] Error opening input: End of file
Error opening input file http://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4.
Error opening input files: End of file

To Reproduce
** standard http client

set HTTP_PROXY=http://127.0.0.1:1080
ffmpeg -i "https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4" -c copy out.mp4

Expected behavior
Tunnel HTTP CONNECT w/o immediately closing.

Logs

2024-05-30T13:36:29+00:00       ←[35mDEBUG←[0m  HTTP CONNECT request    {"addr": "127.0.0.1:29170", "reqAddr": "sample-videos.com:443"}
2024-05-30T13:36:29+00:00       ←[35mDEBUG←[0m  HTTP CONNECT closed     {"addr": "127.0.0.1:29170", "reqAddr": "sample-videos.com:443"}

Device and Operating System
Windows 10 PRO (v21H2)

Additional context
Works for HTTPS sites on Browser. FFmpeg works with other http proxy clients (such as Xray).

@pundoo pundoo added the bug Something isn't working label May 30, 2024
@haruue
Copy link
Collaborator

haruue commented May 30, 2024

I can reproduce this, but it seems like ffmpeg actively closed the connection after sending ClientHello.
We will investigate further.

ffmpeg-httpconnect.pcap.gz

@haruue haruue self-assigned this May 30, 2024
@haruue
Copy link
Collaborator

haruue commented May 30, 2024

I have addressed the issue and am fixing it now.

haruue added a commit that referenced this issue May 30, 2024
Go's resp.Write() adds a "Content-Length: 0" header and it seems that
ffmpeg doesn't like this and immediately closes the proxy connection.

close: #1109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants