Comments (7)
From the comments to http://michael-peeters.blogspot.com/2019/03/hanging-m3u8-downloads-in-ffmpeg.html?m=1:
Apparently ffmpeg has a flag named "rw_timeout" that should enforce a read timeout on the TCP socket. By default it has a value of -1, meaning that in the worst case it would hang forever. I'll give that a try before I go tinyproxy.
Edit: Since it looks you're also using youtube-dl, you would be able to specify this flag like so: youtube-dl --external-downloader-args '-rw_timeout 10000000' ...
Have you tried that? If it works, then making yt-dlp pass -rw_timeout
would be easier than patching FFmpeg.
from ffmpeg-builds.
The patch from FFmpeg/FFmpeg@master...bsenftner:FFmpeg:master doesn't seem to be usable: it simply makes av_read_frame
call a given callback, but no default callback is provided. Apparently the patch was done to support that guy's ffvideo
, since the example uses the callback from ffvideo
:
AVFormatContext* p_format_context = avformat_alloc_context();
p_format_context->interrupt_callback.callback = FFVideo_FrameMgr::interrupt_callback;
p_format_context->interrupt_callback.opaque = mp_frameMgr;
from ffmpeg-builds.
From the comments to http://michael-peeters.blogspot.com/2019/03/hanging-m3u8-downloads-in-ffmpeg.html?m=1:
Apparently ffmpeg has a flag named "rw_timeout" that should enforce a read timeout on the TCP socket. By default it has a value of -1, meaning that in the worst case it would hang forever. I'll give that a try before I go tinyproxy.
Edit: Since it looks you're also using youtube-dl, you would be able to specify this flag like so: youtube-dl --external-downloader-args '-rw_timeout 10000000' ...Have you tried that? If it works, then making yt-dlp pass
-rw_timeout
would be easier than patching FFmpeg.
Yeah, I tried that before and it didn't change the behavior I described.
from ffmpeg-builds.
Sorry fat fingered the close comment.
The patch from FFmpeg/[email protected]:FFmpeg:master doesn't seem to be usable: it simply makes
av_read_frame
call a given callback, but no default callback is provided. Apparently the patch was done to support that guy'sffvideo
, since the example uses the callback fromffvideo
:AVFormatContext* p_format_context = avformat_alloc_context(); p_format_context->interrupt_callback.callback = FFVideo_FrameMgr::interrupt_callback; p_format_context->interrupt_callback.opaque = mp_frameMgr;
I see, well I guess then the only thing I can try would be the proxy unless you have another idea?
from ffmpeg-builds.
RSTP does not respect -rw_timeout
: https://fftrac-bg.ffmpeg.org/ticket/7609.
Try -timeout
and -stimeout
. There are also -reconnect
options.
If none work: you can try asking in the main repo to forcefully kill FFmpeg on timeout if it haven't written anything to stdout/stderr (not sure how it would interactive with resume download though).
from ffmpeg-builds.
RSTP does not respect
-rw_timeout
: https://fftrac-bg.ffmpeg.org/ticket/7609.Try
-timeout
and-stimeout
. There are also-reconnect
options.If none work: you can try asking in the main repo to forcefully kill FFmpeg on timeout if it haven't written anything to stdout/stderr (not sure how it would interactive with resume download though).
I tried the -timeout/-stimeout commands before but i give -reconnect a shot, I'll report back if this helps or I'll find something else.
thanks for the help so far :)
from ffmpeg-builds.
I tried out all the commands, none of them worked.
Randomly it still just hangs and then sits forever waiting, until I end it by 2x ctrl+c
I googled around some more and found a couple of people that describe the same issue but none with a solution.
So I guess I'll now wait until someone responds from the mailing list @ ffmpeg, if someone has any other idea what I can try in the meantime, I'll be happy to hear it.
from ffmpeg-builds.
Related Issues (20)
- Question : BtbN/FFmpeg-Builds vs yt-dlp/FFmpeg-Builds HOT 4
- Error when unpacking release executables - tar: This does not look like a tar archive HOT 2
- Downloads Lead to 404 HOT 2
- How to install alongside chocolatey version? HOT 1
- chapter markers to the video file does not work properly in ffmpeg-master-latest-win64 HOT 7
- Update builds and patches for FFmpeg 6.1 HOT 1
- Link to latest release branch in Readme still points to 4.4
- Missing macOS versions HOT 2
- installation instructions? HOT 1
- [Feature Request] Alpine Linux build HOT 1
- Bug: The `./build.sh` script is skipping the patch in `/patches` , confirmed on both master and release/6.1 builds. HOT 3
- HEVC-over-FLV has two standards, but FFmpeg only implements one of them. HOT 5
- [mov,mp4,m4a,3gp,3g2,mj2 @ 00000265dad6e740] moov atom not found pipe:0: Invalid data found when processing input HOT 1
- Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Cannot determine format of input stream 0:0 after EOF Error marking filters as finished Conversion failed! HOT 1
- [Question] What is this ID in the filename? HOT 2
- Build for ARMv8 Architecture? HOT 1
- win64 builds broken on Windows 7 as of Auto-Build 2024-05-11 HOT 10
- Rookie Question: What is the fundamental built for a MacOs space? HOT 2
- ERROR: Postprocessing: Conversion failed! HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffmpeg-builds.