In the General documentation of MP4Box there is this warning: MP4Box creates a temp file in this temporary directory, and then renamed it to the output name. If the final destination folder and the temporary folder are not on the same partition of the drive MP4Box will fail.
Is this still true? I tested it with my rev 4214 (compiled for windows). Source and target files were on a SD card. -tmp was pointing to the HD. A temporary file was created on the HD and the target was happily saved on the SD card. Usage: to cat a couple of files. Will a -tmp on another drive ever fail? If so, under which circumstances?
All those I/O errors seem to indicate non-writeable directories (or even too small tmp-directories). There is none that indicates a rename was attempted and did not succeed, as far as I can see.
What makes you think so?
I'm open because I think it would be great to come with a fix for that.
See the quotes below. My own experience: 3 source files on a SD card, -tmp pointing to %temp% on the HD. On the HD the first phase was done (appending 3 files into 1), then the writing of the ISO file used the HD as input and the SD card as output.
This error makes me think you have some right issues on your server. Could
you log in on the server and launch MP4Box on your files? What do you get?
I also found an option that is now broken: -tmp C:\
Using this option under Windows 7 causes an I/O error - presumably because
it tries to write to a protected location on the C drive.
I think the problem I am seeing is size related … basically happening
when the file grows past 4 GB and starts using 64-bit addressing
The explanation we have is that the unix "rename" command we rely on has this limitation:
Of course if you don't have enought right or space you'll fail too with this I/O error.
I'll have a look at the code later and I'll let you know here. What is your aim? Do you want to deploy GPAC on a high number of platform and you want to be sure it will work?
Maybe you will need a rename when using mp4box -inter 500 on 1 file. But when -catting several files into 1, the process goes in two phases: (1) appending the files into a temp files and (2) using the temp file as input for writing the ISO file. I do not see why the temp file could not be on another partition or even on another drive. And my tests proves it works with 190MB files.
Aim: we have got about 120 users all over the world that use FFmpeg & MP4Box to upload video recordings to our server. Sometimes they run into space limitations on the SD card and then the only way out is to use the HD as temporary storage. Privacy concerns urge us to make HD usage as small as possible, preferably even none at all. Platform: all kinds of Windows machines.
Indeed the -cat operation does not require a temp directory on the same partition, since it does not involve any call to rename. What file sizes do you use ? And what is your MP4Box command line ? Do you get a seg fault or a IO error ?
I do not get any fault. It just works. I was confused by this warning in the General Documentation: "MP4Box creates a temp file in this temporary directory, and then renamed it to the output name. If the final destination folder and the temporary folder are not on the same partition of the drive MP4Box will fail."
Glad you reassured me that this is not true when -catting files into 1 file.
even better if it works! I'll update the doc
I've definitely fixed the limitation in commit 4257.