Jump to content

Could ffprobe timeout param be configured?


Go to solution Solved by Luke,

Recommended Posts

Posted

I use davfs to mount files from a WebDAV server to a local directory.

Emby server can scan these videos normally, but when using ffprobe to extract their video information, it reports an error: 'file:/media/webdav/aliyun/test/test.mp4: Input/output error'. This problem does not occur with videos stored on a local physical hard drive.

Could this be an issue with ffmpeg?

Posted

I don't know if I can help you but the same thing happened to me when I put my share drive and I ran out of bandwidth available from google drive so check if you make transfers regularly, perhaps via FTP if the transfer fails then it's the same error I was having

  • 4 weeks later...
Posted

Can the timeout duration be configured? I am using WebDAV mounting for a file size of 600MB, but with a speed of only 10MB/s, it is impossible to complete the ffprobe operation within 30 seconds.

Posted
 I use davfs to mount files from a WebDAV server to a local directory.
Emby server can scan these videos normally, but when using ffprobe to extract their video information, it reports timeout.
Video file is about 700MB, but my server download speed is only 10MB/s . It is impossible to complete the ffprobe operation within 20-30 seconds.

Could ffprobe timeout param be configured?

I manually executed the command and the result was 1 minute and 10 seconds.

 time ffprobe "/media/webdav/aliyun/emby/动漫/更新/狩龙人拉格纳/S01/狩龙人拉格纳.S01E12.mp4" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data
real    1m 10.71s
user    0m 0.04s
sys     0m 0.01s

 

Size of this video

du -s /media/webdav/aliyun/emby/动漫/更新/狩龙人拉格纳/S01/狩龙人拉格纳.S01E12
579801  /media/webdav/aliyun/emby/动漫/更新/狩龙人拉格纳/S01/狩龙人拉格纳.S01E12.mp4


 

embyserver.txt

  • Solution
Posted

Hi, we'll increase the timeout for the next release. Thanks.

Posted

 

Thanks a lot for accepting my suggestions!

I still got some questions:

  1. I've noticed that if ffprobe fails, I am unable to retrieve basic information about a video. At the same time, this video cannot record playback progress when played. Are these two issues related?
  2. It seems that once a video is successfully probed with ffprobe for the first time, subsequent probes do not occur. Is there a caching mechanism involved?
  3. If the second point is valid, then can I perform the ffprobe operation in advance on the server where the video files are stored (my video files and Emby server are on two different servers), and save the information to a file for Emby to read? This would replace the need for Emby to perform ffprobe operations. Is this approach feasible?
Posted

Hi, yes these are all connected because saving the progress requires knowing the runtime of the video, and that information is discovered during the media probe.

Quote

If the second point is valid, then can I perform the ffprobe operation in advance on the server where the video files are stored (my video files and Emby server are on two different servers), and save the information to a file for Emby to read? This would replace the need for Emby to perform ffprobe operations. Is this approach feasible?

Hi, currently there is no way to do this.

Posted

Thanks,looking forward to the next release.

  • Thanks 1
Posted
On 12/26/2023 at 1:02 PM, Luke said:

Hi, we'll increase the timeout for the next release. Thanks.

Hi Luke. I tried version 4.8.0.64 and was pleasantly surprised to find that the timeout for ffprobe has been increased from 30 seconds to 60 seconds, which solved most of the problems. However, when dealing with some larger video files, 60 seconds still seems a bit conservative.

Is it possible to make this timeout value configurable, allowing users to set it freely?

solved:
/media/webdav/aliyun/emby/动漫/完结/银魂/S01/银魂.S01E03.mkv

still time out:
/media/webdav/aliyun/emby/动漫/更新/石纪元/S03/石纪元.S03E20.mp4
/media/webdav/aliyun/emby/动漫/更新/石纪元/S03/石纪元.S03E12.mp4

embyserver.txt

  • Thanks 1
Posted

Thanks for testing. More options are possible for future updates. Thanks.

  • 5 months later...
StefftheE
Posted (edited)

Really would appreciate the feature if that timeout was in the config, because i'm running into the same issue. Why does ffprobe need to fetch the whole file in the first place? I've got a workaround by letting the crawler job restart every hour. then it catches the files from local davfs cache ...

you could also estimate the timeout by the filesize .. getting the size should be relatively cheap.

Edited by StefftheE
Posted
5 hours ago, StefftheE said:

Really would appreciate the feature if that timeout was in the config, because i'm running into the same issue. Why does ffprobe need to fetch the whole file in the first place? I've got a workaround by letting the crawler job restart every hour. then it catches the files from local davfs cache ...

you could also estimate the timeout by the filesize .. getting the size should be relatively cheap.

Hi, probing doesn't pull the contents of the entire file. Usually just the headers in the file.

StefftheE
Posted
On 5/28/2024 at 8:39 PM, Luke said:

Hi, probing doesn't pull the contents of the entire file. Usually just the headers in the file.

Ok, then, the root of the problem is davfs, which fetches the whole file, when opened. do you have any suggestions despite not using dav as media source?

Posted

Have you tried rclone for comparison purposes?

StefftheE
Posted

Thanks for the tip, rclone works wonderfully.

  • Thanks 1
henryZZZZZ
Posted
13 hours ago, Luke said:

Have you tried rclone for comparison purposes?

Your reply has resolved a confusion of mine, making me realize that ffprobe actually reads the entire file information.

I switched from davfs to rclone, and the analysis time for newly added files is now negligible. That is crazy.

Posted
6 hours ago, henryZZZZZ said:

Your reply has resolved a confusion of mine, making me realize that ffprobe actually reads the entire file information.

I switched from davfs to rclone, and the analysis time for newly added files is now negligible. That is crazy.

HI, so it's better for you with rclone than davfs?

henryZZZZZ
Posted
1 minute ago, Luke said:

HI, so it's better for you with rclone than davfs?

yep

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...