Author Topic: Why is Avidemux overwriting all my MP4's with 00:08.342 or 00:10 second files?  (Read 479 times)

OnYourDrugs

  • Newbie
  • *
  • Posts: 4
When I use Avidemux to open a mp4 and use the Save Audio feature (Audio>Save Audio), the existing file is overwritten, even though I never saved or asked the software to do a thing aside from open it.  I'm not sure if it destroys the original when it is initially opened or not, but I'm not experimenting with it any longer until I know what it's doing.  I didn't even know software could do this without a users permission.  Only the first 8.342 secs remains of a few dozen multi-gigabyte video files. Both my MP4's and the mp3's I made from them are now left with 00:08.342 or 00:10 of content.  Please advise as soon as possible.

Also, is there any way to recover the gigabytes of lost footage?  I've been using windows since v2.0 and I've never seen this happen before now.

Here are my specs:
Win 10 Build 1803
Windows Version 17134.471
Core i7-7800X - ASUS RAMPAGE VI Extreme - 32GB DDR4
ASUS GTX 1050
Drive Affected: All I tried (3)
No Viruses or Malicious software found
No files recoverable using full versions of Wondershare Data Recovery and Recuva
« Last Edit: January 12, 2019, 06:13:04 PM by OnYourDrugs »

dosdan

  • Full Member
  • ***
  • Posts: 134
I tried with with the latest nightly build from http://www.avidemux.org/nightly/win64/

With ADM, the nightly's are usually a better bet than the official release. This was Win64 build 190118 i.e. 19th Jan 2019.  I made a safety copy of a 2 minute clip I had and used this copy in case the bug was present.

I loaded the safety copy, clicked on Audio | Save Audio and accepted the suggested .AAC  filename.

No problem.

I then maked the "A" point at the start of the timeline and "B" approx 1 minute into it, and then repeated the audio extraction test.

No problem.



Dan.
« Last Edit: January 08, 2019, 10:23:13 PM by dosdan »

dosdan

  • Full Member
  • ***
  • Posts: 134
I noticed in your original msg that you were using a multi-GB source file, so I loaded a 3.5GB MP4 (this time I didn't bother with a safety copy). I extracted from it an .AAC file (the audio stream compression format used inside an .MP4 container).  I then switched the Audio Format from "Copy" to "MP3" and then used Audio | Save Audio again to make a .MP3 version.

The .AAC and the .MP3 extractions were fine, and the original .MP4 was unaffected.

Your original message wasn't that clear. I hope you didn't try to save the extracted .AAC audio stream using the same name but specifying a .MP4 file extension and in the same directory as the original .MP4. That would be catastrophic and would probably corrupt the original .MP4 i.e.

Source: c:\test\testfile.mp4
Extracted audio stream: c:\test\testfile.mp4 instead of c:\test\testfile.aac

Dan.
« Last Edit: January 08, 2019, 11:29:58 PM by dosdan »

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 2896
I hope you didn't try to save the extracted .AAC audio stream as an .MP4 with the same name and in the same directory as the original .MP4. That would be catastrophic and would probably corrupt the original .MP4.

One would get the usual prompt from the Windows Explorer asking whether you are sure to overwrite the file. Only if one ignores the prompt and confirms overwriting, dataloss happens.

I tried this with the 2.7.1 release too, which didn't have the fancy automatic addition of file name extension for audio yet (the feature was added on Aug 7, 2018), no danger unless you recklessly ignore all warnings.

OnYourDrugs

  • Newbie
  • *
  • Posts: 4
Here is a RAR containing all my data files as well as the logs, etc from there.  I wasn't using the nightly build.  This one is a month or so old, I think. Version 2.7.1.  I would also upload the video files in question, but they are too big for the forum.  So here is a Google Drive link, instead. Let me know if anything else is needed...

https://drive.google.com/drive/folders/1lQzKTPgqYSBa6PRkIOdjLqEN2jnDZcKa?usp=sharing

OnYourDrugs

  • Newbie
  • *
  • Posts: 4
Oops! I forgot to add the update that it only requires the opening of the file, or appears to.  Also, the file details are possibly being misreported by Win10.  Not that the video is fixed, but when I copied another file back to replace one that was "edited" to 8 sec., it continued to report it as 8 secs.  In fact, some of these files are of different sizes, many a few hundred mb, so maybe the data is still intact?  I'm still trying to figure it all out....  Sorry my video is trash.  I should use something openly available off the web.  Anyone know of something like that.

Thank you so much for the help!  Sorry if I did anything to make this harder.

-oyd

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 2896
Thank you for the sample. The video is interesting because Avidemux sees only the first ~8 seconds of it while mpv plays the presumable full duration of 5 minutes 22 seconds, so something must be peculiar with the mp4 container structures.

The logs don't contain any video or audio writing operations and pure loading should not result in any modification of the file. By the way, Avidemux opens mp4 files in read-only mode: https://github.com/mean00/avidemux2/blob/master/avidemux_plugins/ADM_demuxers/Mp4/ADM_mp4.cpp#L301 ("rb").


OnYourDrugs

  • Newbie
  • *
  • Posts: 4
Hrmmm...  Sounds like it was the OBS Studio software that made it broken, yeah?  I'm already feeling like an idiot now, for not testing video from another source.  Please forgive for the trouble.  This was something I have had for a month, but it was only randomly happening...  I was assuming that was the fault of OBS, but then yesterday, I watched the files in the directory refresh and saw the length was different and assumed the issue was with Avidemux...

I figure that it goes like this:
1-OBS Studio 22.x Makes a MP4 file with bad container code/corrupted data (as it is known to do)
2-It's file states in one format/container/header it's actual length, but also, a DIFFERENT format/protocol/header says it's 8 seconds
3-Avidemux reads data field with 8 seconds, Win 10 does as well.  Probably something (that VLC media player doesn't do) gives Win 10 an open file command, detects the corruption and attempts to fix it by changing the flag/field/data with the correct time making it worse...

This is all speculation.  Thanks for the enlightening info so far!  It looks like I might want to start a similar thread on the OBS forum....