FLV files larger than 4GB do not open with the correct duration

Started by rcdrone, January 19, 2017, 07:42:29 AM

Previous topic - Next topic

rcdrone

I have a bunch of FLV recordings from OBS, and the ones over 4GB only load partially, like the file size might be getting 64-bit -> 32-bit truncated or something. I tried the 2.6.18 64-bit GUI programs for both Windows and Linux, and they both have the same problem.

I also tried following the VS 2015 build instructions at http://avidemux.org/smif/index.php/topic,17302.0.html to see if I could debug it myself, but I got stuck not knowing where to get msys64 (is it msys2?), or where to get the files for the mingw skeleton. I tried to hack my way through stuff and was able to build ffmpeg, but then avidemux_core complained about a missing pthread.h, and I gave up.

Jan Gruuthuse

If your storage is FAT32: that is a problem: max file size is 4GB. Windows: NTFS should be fine?

rcdrone

All my Windows drives are NTFS, and my Linux drive is ext4.


rcdrone

I took a 7.51 GB FLV and converted it with mkvtoolnix to a 5.83 GB MKV (don't know why it got smaller). The FLV loads incorrectly into avidemux as being 3h 8m, but the MKV loads correctly as 6h 42m. So it seems the 4GB+ problem is specific to FLV files.

Jan Gruuthuse

OBS recordings from your desktop or some other source. (DVB, Game console, ...) Could be anything. You do run latest OBS recording software?

rcdrone

I always upgrade OBS Studio when it nags. Are other programs creating FLV files larger than 4GB that avidemux is able to load correctly? VLC correctly handles all my FLV files.

Jan Gruuthuse

Did not come across any mentioning of 4GB and FLV issues. As said before could be anything.

rcdrone

I feel like this should be relatively simple to debug if I could get a little bit better build instructions for Windows. I can build fine on Linux (Ubuntu 16.04), but I'm not really proficient with that platform, and don't want to go through a lot of trial and error to find a competent C++ debugger, and attempt to configure it for this project.

Jan Gruuthuse

Perhaps here: https://msys2.github.io/ ? If you have further issues with building perhaps start a new thread.

rcdrone

I just did some printf debugging with a Linux build, and got large FLVs working by fixing up the FLV demuxer code. There's several spots where a 32-bit size is used rather than a 64-bit type, or perhaps off_t, The plugin also ignores the TimestampExtended field of FLV tags, which causes timestamps larger than 24 bits to be truncated. It would be nice to have all this fixed going forward.

eumagga0x2a


rcdrone

Thread has been started in the Patch gallery forum: http://avidemux.org/smif/index.php/topic,17438.0.html

I based the patch on the master branch of mean00/avidemux2 using git format-patch. I hope that's what you guys are expecting. Let me know if you have any questions.

fofu01

How do  you apply that patch to avidemux? And has anyone tried it?

eumagga0x2a

The patch in question has been included into Avidemux on Jan 22. However, there haven't been any nightly builds for Windows since Jan 19.

You could read up about how to use patch here and about git-apply here, or go straight to the minimum of the information required for patching Avidemux here. This assumes that you build Avidemux from source yourself, which is quite easy on Linux. Windows builds are generated on Linux too!

While Avidemux builds I use locally include this commit, I don't have FLV videos long enough to verify myself that the issue is fixed, but logically it should (and it works for the author of the patch).