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

Multiple audio chuncks not correctly found #241

Open
studyfranco opened this issue May 4, 2022 · 8 comments
Open

Multiple audio chuncks not correctly found #241

studyfranco opened this issue May 4, 2022 · 8 comments

Comments

@studyfranco
Copy link

Hello,

Your software work good, but on my file it not able to find the right audio chunks.
Found 2818206 packets. Found 1098164 chunks for avc1 Found 0 chunks for mp4a Found 1720042 chunks for mp4a
When I listen the fixed file, I am able to know the problem: It merge the two audio. Each chunck are put one after.

If you have a SFTP and 300Go of space I can send you the files.

@ponchio
Copy link
Owner

ponchio commented May 4, 2022

Ciao,
this is a tricky problem: how can the software guess which stream the chunk belongs?

     It is very camera dependent: for example we might notice that the camera always saves the chunks in a specific order (interleaves the chunks, for example).
     
     You can send me the files using wetransfer (for example) with my email (ponchio@gmail.com), but I don't need 300 GB of data, i need just some relatively short sample video (100/200 MB should be enough, with some luck) both working and truncated.
     
     Then I can update the code for detecting multple audio channel and check for interleaved chunks.
     
     If the chunks are saved 'randomly', then the problem might not have an easy solution (other than trying to analyze the audio and educately guess, but that is a little bit out of the scope of this little software).

@studyfranco
Copy link
Author

The only file I have, is the one with 100GB, how cut it in multiple part ?
I think the chuck are not save randomly. Because when I listen the fixed file, I listen the audio1 and after audio2 in same order in regular interval.

@ponchio
Copy link
Owner

ponchio commented May 4, 2022

Just send me the working sample (taken as usual from the same source, with the same parameters). It should be enough for me to update the code.

@ONMYBEAT
Copy link

ONMYBEAT commented May 8, 2022

I am probably having the exact same problem and came across this thread by searching. I am trying to repair an mp4 file with 1 video + 3 audio tracks and am trying untrunc by trial and error. You seemed to be having trouble sending large files, so I will share what information I have.
It is a Japanese service, but there is Gigafile. https://gigafile.nu/
This is a very good service to send up to 300GB per file to the other party and it is free.

Using the GoogleTranslate extension for Chrome, you can see what is written and it is easy to use.

Since this is my problem as well, I am mentioning it as a way to support studyfranco and ponchio.

@ponchio
Copy link
Owner

ponchio commented May 11, 2022

Thanks for the suggestion. If you have the same problem and want to send me some samples, I will have a look at them.

@ONMYBEAT
Copy link

ONMYBEAT commented May 12, 2022

Ciao, poncio.

Thanks for your concern. In conclusion, my problem is solved. The software that solved the problem was Repairit from wondershare. This software was perfectly capable of repairing the Multiple streams of audio tracks in isolation.

Is the problem in this thread how to find the audio chunks?

I have found literature that seems to do that, although not in English. In MP4, H.264 is stored in NAL Unit and AAC in ADTS format, but there are others. In the case of the person described here, H.264 was the same as NAL Unit, but AAC was raw data (RDB: Raw Data Block) with no ADTS header (and not necessarily one block during H.264), although RDB has what looks like a header as follows However, since AAC has variable-length blocks, block boundaries cannot be determined by simple conditional branching.

The RDB also included a record of the investigation into AAC chunk identification, AAC block boundary identification, etc., as well as repair methods. I could only understand those knowledge, but I can't program it, so I can't reflect it.

If you already knew this, please ignore it. If it seems to give you a hint, try calling them using GoogleTranslate. It might help you.

https://yaritakunai.hatenablog.com/entry/repair-corrupt-mp4

I hope your program will be able to perfectly restore Multiple audio, since it is not possible to do it for the anthwlock version or untrunc-w, and development has been terminated.

@studyfranco
Copy link
Author

studyfranco commented May 12, 2022 via email

@studyfranco
Copy link
Author

studyfranco commented Oct 11, 2022 via email

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