Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two audio streams are being combined into one #270

Closed
TCDHughes opened this issue Sep 10, 2023 · 11 comments
Closed

Two audio streams are being combined into one #270

TCDHughes opened this issue Sep 10, 2023 · 11 comments

Comments

@TCDHughes
Copy link

Hi Ponchio,

Through your software (and other forks), I have been able to recover the video stream from a Shadowplay (H.264) MP4 that is otherwise unreadable -- thank you very much!

Unfortunately, when I try to recover the audio portion, I either get fragments of audio, or the two AAC audio streams AAC are merged, interleaving approximately every second or so. This seems a bit like issue #241, but unlike those users, Wondershare Recoverit cannot fix my file.

I tried breaking the file down into 1 second pieces and stitching each alternate piece together to recover the two streams, but fragments of the other audio channel would still get through, suggesting that the alternation time is not one second. I then tried to look at the waveform, but it's very difficult to see where one stream properly ends and another starts, much of the time.

I have the video and known good clip on Google drive (https://drive.google.com/drive/folders/1A0oywyMasSBCpZTeSZW8Kk9TKFbPN5lT?usp=drive_link). If you'd be willing to take a look, I'd appreciate it :)

Again, thanks for releasing the project to the public, it is much better than that repair_mp4 tool that's floating around.

Cheers.

@ponchio
Copy link
Owner

ponchio commented Sep 12, 2023 via email

@ponchio
Copy link
Owner

ponchio commented Sep 15, 2023 via email

@TCDHughes
Copy link
Author

TCDHughes commented Sep 16, 2023

Hi Federico,

I'm thrilled to hear that fixing this file fully may be possible.

I'd love to give you a trimmed version of the MP4, but I'm not sure how to do so. I've tried using ffmpeg but it rejects the request due to a lack of moov atom. I can't open the file in any video or audio editor either, so am not able to trim it that way. If you have a different method in mind, I'm happy to try it.

Otherwise, I think there are a few things we can try.

First, you suggested that the file might have downloaded wrong. Can we test that with a checksum? I'm tech literate but this is not my background, so I may be ignorant about what checksums actually do. The MD5 hash is: 1550bb4d4ab2f423715ddd522e9abf6d

Second, I have uploaded the interleaved audio file to the same google drive as the footage. Perhaps you would have better luck splitting out the audio packets from this file? It's an MP3 so I suspect it won't work, but I don't know how MP3 works in comparison to AAC. I may be able to get an AAC version, but I will have to check this.

Third, if neither of these options work, I am happy to try running what you've got so far on my PC, perhaps mine will have better luck.

Finally, if nothing works I can try to make a new, shorter corrupt file to work with. I'm not sure how the first file got corrupted, but I'm sure I can replicate it with a bit of work.

Thanks again for all the effort! I'm very excited to get this all fixed up :)

@ponchio
Copy link
Owner

ponchio commented Sep 16, 2023 via email

@TCDHughes
Copy link
Author

Hey Federico,

I took a look at the sample in my video editor and it looks amazing! Please let me know when would be a good time to download :)

Thanks for the amazing work! I'll send a tip your way -- you've definitely earned a few cold beers on me :)

Cheers,
-Tom Hughes

@ponchio
Copy link
Owner

ponchio commented Sep 17, 2023 via email

@gonzalez-agirre
Copy link

Hi Federico,

I have a file with the same problem but with 4 audio streams. Can you provide me with instructions to fix the audio? It's quite important recording that I would like to recover.

Best.

@ponchio
Copy link
Owner

ponchio commented Dec 16, 2023 via email

@gonzalez-agirre
Copy link

Hello Ponchio,

I'm sharing with you a Google Drive folder with 3 files:

  • reference_original.mp4: This is the first part of the streaming. We started the streaming at a lower resolution, then stopped and changed to 1080p (this is the reason why I have an uncorrupted reference!). The audio setting is identical to the corrupted video.
  • reference_upscaledvideo.mp4: This is the "reference_original.mp4," but with the video scaled to 1080p. Using this trick, I was able to recover the video since the lower resolution reference wasn't restoring the video properly.
  • broken-shortened.mp4: These are the first 200 MB of the corrupted video (the corrupted video is 30 GB in total). If needed, I could find a way to upload the entire file.

It would be incredible to recover the audio as we put a lot of effort into organizing the event's streaming. If you need anything else, please let me know.

Thank you very much for your help.

@ponchio
Copy link
Owner

ponchio commented Dec 19, 2023

Wasn't hard, the audio packet are just interleaved.

If you can compile the code just uncomment #define QUADAUDIO at line 1364 of mp4.cpp, otherwise send me the large file and I will run the code for you (my line is a tad slow, might take a while to reupload).

@gonzalez-agirre
Copy link

Dear Federico,

You're a genious, it worked!

I hope to see my donation promply converted into beer.

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants