Menu

Handling of large file size could be better (lost video)

Q&A
Anonymous
2021-02-23
2021-05-02
  • Anonymous

    Anonymous - 2021-02-23

    Hi,

    I recently lost some long-running footage I wanted to use for time lapse using an old phone of mine. I can't complain too much since Open Camera enabled me to use the phone's camera in ways it doesn't support out the box, so for that I should say thanks.

    However one thing I wanted to work correctly was when a file reaches it's maximum size for the recording to continue in a new file, so I went to settings and enabled "restart on max file size" and set the max file size to the device default. I was expecting this restart to happen at 4GB. Instead something more unexpected happened...

    When the 4gb file limit rolls around the app SEEMS too still be recording, but it appears to be chucking the subsequent data into the void as the file is already full. No "restart of recording' happens... and the initial 4gb file is not terminated properly, so it's unplayable (atom data was never written as I don't think open camera saw 4GB as being the "default limit").

    I could recover some of the footage using "untrunc" to properly close the files. However any data beyond the 4gb point was lost. (Not a big deal, but could be for someone else)

    I've worked around this for the time being by setting the max filesize to 2GB.
    I'm not sure exactly what the problem is here so I can only propose some solutions I would consider ... is the device misreporting the maximum "default file size" (I'm not sure what this setting is as open camera doesn't report what the actual value is...) and maybe if that were correctly determined OC would behave as expected.

    Maybe the solution is a warning that using the default dangerous...

    Perhaps OC should have a 4GB option, and/or have that be the default instead of the "device default" which seems to not work correctly.

    ... It would be cool to be able to specify an arbitrary file size as it would've been cool to set something like 3.9GB instead (to have enough space for OC to write the last bits of the file correctly, but maximize file sizes)

    I'm not an expert at the android API, but another route could be for OC to detect that it's hit the limit (Android, Filesystem, or MP4 limit? - but... result is the same) and take mitigating actions...

    As said, I don't know the exact solution. But video just going into the ether by default is non-optimal. :)

    Cheers, and much thanks for the app!
    Chris.

     
  • Mark

    Mark - 2021-03-08

    Thanks for the info. In theory the device default should be the safer option - it means Open Camera doesn't specify any max filesize to the camera API, and it should be up to the device to stop if it hits a maximum file length. I don't believe it's possible to detect a max limit, and I think that could depend on many factors.

    True, it is an ommission not to have a 4GB option, I can add that to the list of options.

    What device is this by the way? And can the problem be reproduced, even if the restart option is disabled? (To make it hit the limit quicker, one can set to 4K and maybe increase the bitrate under Settings/"Video settings".)

     
    • Anonymous

      Anonymous - 2021-05-02

      Hi Mark,

      The device is an LG G4. Recording to the SD card.

      I could reliably reproduce the problem with restart option enabled. I'll have a go at it disabled and revert the soonest.

      Cheers,
      Chris.

       

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.