-
Notifications
You must be signed in to change notification settings - Fork 229
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
Repaired video "too long" and won't play #280
Comments
Sure, send it!
I have already seen some videos with multiple audio channels, but usually
the problem
is that the different audio gets mixed.
I will gladly have a look.
F.
…On Mon, Apr 15, 2024 at 9:38 PM dopeless ***@***.***> wrote:
Ciao, I've tried to repair some prores videos from Aromos Ninja 5 with no
luck.
The created file won't play, and it's length is some 10 times longer, that
it should be
I've also tried the forked version (https://github.com/anthwlock/untrunc)
- it could restore video, but sound is a white noise.
I've tried Grau - it restores video, but audio alternates between normal
sound and white noise.
I've got four audio channels, and i think that's the problem (I've read
multiple threads about problems with multichannel sound).
But I'm pretty sure, the video can be fully restored.
Can I send you a sample to take a look?
Thank you.
—
Reply to this email directly, view it on GitHub
<#280>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUDV27UQ4CU2PIZE6MYMQTY5QUDVAVCNFSM6AAAAABGH63JPKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2DINBWGY4DEMQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hello, have you had a chance to take a look at the videos? I've sent them to you via email a month ago, and still got no answer. Thanks. |
Hi, it took me a while because of the codec and some nasty behaviour of the
encoder (coupled with a pretty busy month), but yes, I managed:
You can recover the video here: http://78.134.70.236/baby.mp4
Actually the problem was not the number of channels but a very strange
thing.[
Raw audio (non compressed) is just values (usually 16 bits or 24 bits)
interleaved (channel 0, 1, 2, 3, 0, 1, 2, 3...) and a certain number
consecutive samples are stored in a chunk.
The formula to compute the size of the chunk is (bits/8)*channels*number of
samples, in your case the reported number of channels is 24024.
BUT the chunks are actually composed of 24064 samples. It took me a while
to discover this discrepancy. I have no idea, why!
That's the reason for the alternating noise.
There was some other small problems (tmcd codec is tricky, and I had to
just look for the first video packet).
In case you want to reproduce it you need to pull the code, uncomment a
line in codec_pcm (left as a reminder for myself) and use the option -b
99840 to find the first video packet starting point.
Ciao,
Federico.
…On Tue, May 14, 2024 at 12:36 PM dopeless ***@***.***> wrote:
Hello, have you had a chance to take a look at the videos? I've sent them
to you via email a month ago, and still got no answer. Thanks.
—
Reply to this email directly, view it on GitHub
<#280 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUDV24P6TEWWROAJ4WMBOLZCHSJVAVCNFSM6AAAAABGH63JPKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBZHA2TQMRVGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hi, first of all - thank you so much for taking time to fix it. P.S. And what does the -b option do? |
As you know you need a working video with the same characteristics. if you run untrunc -a good.mp4, you will see each chunk size and offset. In your case the size reported is 288288 which /12 is 24024 (because it is computed from the data written in the atom stsz. This can happens usually for padding (zero or random) , but in your case the additional 480 bytes seems filled with audio samples, can for memory alighment, for page allocations etc. In your case the extra length is constant, contains audio, the sequence of video/audio is very regular, it could very possibly that I am wrong in interpreting the values (I tried to follo the documentation, but it sucks, when it exists). Anyway unless you changed the audio parameters it is very likely that all the mp4 have the same problem and solution. -b instructs untrunc on where the mdat (the atom containing the packets) starts, we only need to point it at the beginning of packet and in our case video packets are easier to spot. If you want to spot a video packet use a hexeditor (bless for ubuntu works great), search for the ascii text "icpf", and the video packet starts 4 bytes before (works only for your video codec apch, obviously) (you can use the -a options to get the offsets in the good video). |
That was much mor, than a "bit". |
Ciao, I've tried to repair some prores videos from Aromos Ninja 5 with no luck.
The created file won't play, and it's length is some 10 times longer, that it should be
I've also tried the forked version (https://github.com/anthwlock/untrunc) - it could restore video, but sound is a white noise.
I've tried Grau - it restores video, but audio alternates between normal sound and white noise.
I've got four audio channels, and i think that's the problem (I've read multiple threads about problems with multichannel sound).
But I'm pretty sure, the video can be fully restored.
Can I send you a sample to take a look?
Thank you.
The text was updated successfully, but these errors were encountered: