INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Is there a 2GB file limit for MC 30?  (Read 1263 times)

bahringe

  • Recent member
  • *
  • Posts: 24
Is there a 2GB file limit for MC 30?
« on: January 06, 2023, 07:21:59 am »

I've found these references.

https://stackoverflow.com/questions/21304711/2gb-limitation-java-input-stream#:~:text=2%20GB%20is,example%2D2gb.html
2 GB is a JVM limit it's related to Integer.MAX_VALUE

It' not well known and bug in code are everywhere.

https://issues.apache.org/jira/browse/HDFS-691
https://jira.springsource.org/browse/SPR-10881
Is there a limit on process input stream when using java?
Buffer a large file; BufferedInputStream limited to 2gb; Arrays limited to 2^31 bytes
Memory issues with InputStream in Java
In some situations there are a workaround http://todayguesswhat.blogspot.it/2012/07/file-download-java-servlet-example-2gb.html

Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: Is there a 2GB file limit for MC 30?
« Reply #1 on: January 06, 2023, 08:39:11 am »

MC is not written in java so those are irrelevant
Logged

bahringe

  • Recent member
  • *
  • Posts: 24
Re: Is there a 2GB file limit for MC 30?
« Reply #2 on: January 06, 2023, 09:11:02 am »

INTERACT FORUM >More >Old Versions >JRiver Media Center 26 for Windows >Java is not available

https://yabb.jriver.com/interact/index.php/topic,123481.0.html
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Is there a 2GB file limit for MC 30?
« Reply #3 on: January 06, 2023, 09:14:29 am »

INTERACT FORUM >More >Old Versions >JRiver Media Center 26 for Windows >Java is not available

https://yabb.jriver.com/interact/index.php/topic,123481.0.html

AFAIK the java runtime is only used to display blu ray menus from full disc rips. I'm not sure Blu Ray menus are even supported on Linux at the moment?  In any case, the parts of MC that deal with ordinary file playback aren't written in Java.
Logged

bahringe

  • Recent member
  • *
  • Posts: 24
Re: Is there a 2GB file limit for MC 30?
« Reply #4 on: January 06, 2023, 09:45:35 am »

Can you play a file larger than 2GB?
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: Is there a 2GB file limit for MC 30?
« Reply #5 on: January 06, 2023, 10:09:21 am »

Yes
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Is there a 2GB file limit for MC 30?
« Reply #6 on: January 06, 2023, 10:20:32 am »

Can you play a file larger than 2GB?

Yes. I do so every day (almost every video file I play is larger than 2GB, and I watch video most days).
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: Is there a 2GB file limit for MC 30?
« Reply #7 on: January 06, 2023, 11:17:50 am »

2 GB is a JVM limit it's related to Integer.MAX_VALUE

It' not well known and bug in code are everywhere.

It's extremely well known amongst developers (but bugs are common, yes). Computerland has moved to 64 bits quite some time ago, raising that limit from 2 GB to 8 EB (Long.MaxValue = 2^63 = 4,294,967,296 GB). The practical limit is a bit lower, but it's so high as to not matter anymore. Even the 32-bit version of MC will play files larger than 2^32 bits.
Logged

bahringe

  • Recent member
  • *
  • Posts: 24
Re: Is there a 2GB file limit for MC 30?
« Reply #8 on: January 06, 2023, 11:57:11 am »

What DSD256 files are you streaming as an example?
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: Is there a 2GB file limit for MC 30?
« Reply #9 on: January 06, 2023, 01:30:08 pm »

What DSD256 files are you streaming as an example?
What does that have to do with the thread title?
Logged

bahringe

  • Recent member
  • *
  • Posts: 24
Re: Is there a 2GB file limit for MC 30?
« Reply #10 on: January 06, 2023, 05:19:23 pm »

When streaming DSD256 greater than 2gb , playback abruptly stops. Please share what dsd256 files you are streaming successfully.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: Is there a 2GB file limit for MC 30?
« Reply #11 on: January 07, 2023, 03:56:02 am »

We were mostly talking about video, which can easily reach tens of GB. I don't use MC for audio, and Streaming in particular is a bit different than playing local files, so it is possible you found a bug or limitation. Though I've seen posts by users of DSD256 and even DSD512 and the issue hasn't been mentioned before. A 5.1 DSD512 file needs 500MB per minute, so it's over 2GB in just 4 minutes (talk about overkill...)
Logged
Pages: [1]   Go Up