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

High delay streaming with avi files #4905

Open
RC128tech opened this issue Apr 30, 2024 · 3 comments
Open

High delay streaming with avi files #4905

RC128tech opened this issue Apr 30, 2024 · 3 comments

Comments

@RC128tech
Copy link

RC128tech commented Apr 30, 2024

System and IINA version:

  • macOS 10.14.6 and 14.4.1
  • IINA Version 1.3.4

Expected behavior:

Immediately start of the video file

Actual behavior:

There is a large delay when starting a filetype .avi/mpeg4 format from a NAS.
It takes measured from the double-click up to 10 seconds until the video is starting.
During this time the Beach Ball is spinning.

Steps to reproduce:

Use some old video files. The NAS is mounted via Samba, but it is not faster with AFP.

How often does this happen?

Always.

@low-batt
Copy link
Contributor

low-batt commented May 5, 2024

In IINA's settings on the Network tab at the top there is an Enable cache option:
cache-settings

Uncheck that option. Restart IINA. Try playing a file from the NAS. Did the behavior change?

@krackers
Copy link

krackers commented May 5, 2024

It could be possible that the file is badly muxed, so that libav requires seeking back and forth (e.g. audio and video packets are at separate ends of the file instead of interleaved properly). Is this all files, or just a specific file?

Also I don't know much about media codec, but I've heard that avi is a particularly bad container format in that it doesn't properly support notion of DTS (decode stamp) or PTS (presentation stamp). See https://ffmpeg.org/pipermail/ffmpeg-devel/2011-February/104434.html

Almost any absurd combination of problem that can be imagined actually
exist. The most obnoxious one is probably AVI: the AVI format has no
timestamps whatsoever. The best timing information it provides is the
assumption that each packet code for exactly one frame, and each frame has
exactly the same duration. Thus, the packet number can more or less be
used as a DTS, but that's all.

It's quite possible that avi is not good for streaming over high-latency network, perhaps try remuxing into proper mp4 container?

@RC128tech
Copy link
Author

RC128tech commented May 7, 2024

I disabled the cache already. But I found the solution a few minutes ago:

I created in /private/etc a config file nsmb.conf with the content

[default]
protocol_vers_map=2

After a reboot everything is working fine, also with activated network cache.
Weird, in Mavericks this file didn't exist and playing movies from NAS always worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants