Coder Social home page Coder Social logo

mp4fixer's Introduction

FIX YOUR MP4 FILE FOR FREE WITH PERL OPENSOURCE TOOL WET ULTIMATE SOLUTION

What it is?

This utility is designed to recover broken / deleted / unfinished files mp4 / mov / 3gp, inside of which was h264 video. In principle, it can work with AVI, MKV, M4V and other containers, but sound restoration can be harder.

If you shoot a video on a camera, phone, action camera, record video from the screen or from drones, then it is possible that this utility will be useful to you. If your drone crashes into a tree at high speed and you want to try to pull out the last half second of video, then this utility can also help. Sometimes from nothing you can get additional frames.

What is needed?

To restore the files you need:

  1. The broken files or images of the card / flash drive / disk where the video was recorded
  2. A new (SEPARATE) disk with sufficient free space.
  3. A machine running Linux or Windows, perl, ffmpeg / ffprobe / ffplay
  4. To restore aac-sound, you need faad2 (libfaad-dev package) + gcc (to compile aacfixer utility)
  5. Sample of good recorded file. The file must be written with the same settings on the same device as the corrupted file.

How to use it?

  1. If you have a deleted video / not finalized / there was an emergency shutdown, first get an image from it using the winhex utility or similar. You can also try to recover files, but you can lost few seconds. Linux users can point the card directly, like /dev/sdX, but having a backup when restoring data is always a good idea.
  2. Take the old video file or shoot a new video that will be recorded under the same conditions as the one being restored. Be sure to record it exactly under the same conditions, including even shaking on the screen (same bitrate), if it was - so we will find exactly what we are looking for. The length of the video is 20 seconds, but if you feed more - it's ok.
  3. You need to run:

                   perl fixer.pl <good_file.mp4> <bad_file.mp4> <output_prefix>

How it works?

To begin, intermediate files are created:

  • *-headers.aac - the file that you will need later to restore the sound
  • *-headers.h264 - the video file that will be used to create headers
  • *-nals.txt - temporary file, with reference video packets. Under Windows 7, this file is created long for an unknown reason to me. This file is needed to "learn" the features of the encoding of the sample file
  • *-nals-stat.txt is what we "learned". If something goes wrong - send this file.
  • *-stat.mp4 - temporary file, actually a copy of the sample file, only without sound, cropped up to 20 seconds.

At the very end of the work will be created:

  • *-out-video.h264 - restored video
  • *-out-audio.raw - the restored audio. To be precise - just what was between the video.

All files will be created in the current directory, from where you run the script.

You can take any player, for example ffplay and play *-out-video.h264, but with sound it will be a bit more complicated.

About restoring sound:

Different video cameras can write sound differently. At a minimum, it can be in different formats.

  1. If the sound was in mp3 format, then you can simply rename *-out-audio.raw to file.mp3 and open it with any player.
  2. If the sound was in PCM format (and its subspecies, such as ULAW), as some Sony video cameras do, then you can easily save it if you convert it to WAV by typing something like:

ffmpeg -f s16le -ar 48000 -ac 2 -i somefile-out-audio.raw -c copy output.wav

Of course, you will need to choose the parameters for your device. 3. If the audio was in AAC format, as the most popular version, then we compile the attached utility:

                    gcc aac.c -L. -lfaad -lm -o aacfixer

(assuming that you compiled the faad2 library and put the files libfaad.a and neaacdec.h in the current directory)

Now run:

./aacfixer somefile-headers.aac somefile-out-audio.raw

And after a while the files will appear:

  • <prefix>-pure.wav - is what was decoded
  • <prefix>-pure-adts.aac - similarly, only without recoding

Bruteforce is used for recovering sound, so the operation can be slow.

If something went wrong:

Remember that this code was written for my internal needs in just 3 days and is not required to work in all cases. In addition to these three days, I spent another week writing this text, because if something does not work, then do not worry much. If you do not succeed, create an issue and do the following:

  • Upload a reference file somewhere, lasting from 10 to 20 seconds. Use services like GoogleDrive or DropBox. Do not send it to the mail or to services where there are no direct links for download, such as mega.co.nz
  • Upload sample of broken file, size not more than 50 megabytes
  • Describe the model of the device on which this file was recorded or the name of the programs after which it was created. Was it restored or just copied from the device.
  • What happened (the drone flew into a tree, free space ran out, an emergency shutdown)
  • On which system did you try to run this utility and what went wrong

The code was written to work on as many platforms as possible, do not depend on binaries and be as simple as possible, so its effectiveness was not the goal. Again, I only spent 3 days writing this code.

Money money money

If for some reason you want to give me money, you can do it through:

  • Bitcoin: 1bU17VMyvxYfCN257AiHrPPca1bszuLna
  • Ether: 0x39b64f347b7702ddb1f8B06A25575598d624b783

Remember that I am unemployed and I really need money. If you make a money transfer, then I can use my data recovery superpowers and help you with a vengeance. However, the strength depends on the amount of money.

Users of the latest GoPro, Xiao / Xiaomi Yi 4k and some drones

These video cameras are built on Ambarella chipsets and have almost the same stuffing. For example, my Yi4k is built on the Ambarella A9SE chipset and like GoPro, it also writes an additional preview along with the main stream. This preview is used for the mobile application. Inside the firmware there are still rudiments of the video editor, it not visible to the user, probably it will be used in future versions. This leads to the fact that 2 different files are written simultaneously and are mixed on the card itself. And if it is restored as one piece, then at the output we get a lot of broken segments. Do not try to restore such data with regular data recovery software like R-Studio, they will be broken! If you want to try your luck, then take the whole image and experiment on it.

Fortunately, as the owner of such a video camera, I can experiment a lot with it and with different recording modes. And I'm an expert in file systems, so I'm going to release a utility for low-level work with a flash card. Below is a screenshot of this utility, one day it will unmistakably restore files. But not now. While I do not have enough motivation to complete the project, so let it be just a small preview.

Direct Disk View (ClusterView)

Other tools:

I decided to look for other utilities and compete with them. Yes, it's been written more for fun, but if I can compete with the professional tools?

I wrote a primitive script that read random pieces from a file and then combined them together. You can also try it, it's called montage.pl, because it practically allows you to video editing in binary form! Of course, after such a "video editing", the files will be unusable, but is it possible to restore them?

To my great surprise, many commercial utilities could not do anything, they could not even explain what they not like, and open source, such as untrunc, required some effort and patching to simply compile them, but still did not work. But let's not talk about the bad. Then there will be those things that gave at least some result:

  • mp4repair.org - data recovery service. Usually I ignore such services, but this service surprised me. It's not only able to show previews for the broken file, but did not even require a reference file for this, and everything was done right in the browser! However, the price is high. Unfortunately, they told me that it is better not to restore my test file, that it will be very expensive. This really disappointed me. I tried to correspond with technical support, but unfortunately, I did not achieve anything, so I can not recommend them.
  • http://slydiman.me/eng/mmedia/recover_mp4.htm - the result is almost like mine, only in the mp4 container, which in theory, should better recover the synchronization of audio and video. I could not play the result in VLC, but ffplay showed me an almost similar picture that I have. However, the author does not post new versions and seems to have decided to monetize his project. I knew about this project before writing my own. Not open source, which was the reason for creating my project.

Unfortunately, as we see, the choice is not great. And with the publication of this project, the choice has become wider!

Contact the author

If for some reason you want to write to me personally, then write to the mail [email protected] This is not my primary email, so do not expect an early reply. You can create an issue with the text "check mail".

If your question concerns the production of video in general, then it is better to ask it here: https://video.stackexchange.com is a small but very good video production community

Greetings:

A huge thanks to the participants stackoverflow: szatmary, Mulvya, VC.One. Slydiman, for not implementing my feature requests and not publishing source code. And also to sufferers with SJCAM from our conference, which motivated me to do this!

License:

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

Что это такое?

Эта утилита предназначена для восстановления битых / удаленных / недописанных файлов mp4 / mov / 3gp, внутри которых было h264 видео. В принципе, может работать с AVI, MKV, M4V и другими контейнерами, но восстановление звука может быть осложнено.

Если вы снимаете видео на фотоаппарат, телефон, видеокамеру, записываете видео с экрана или с дронов, то возможно, что данная утилита вам пригодиться. Если ваш дрон впечатался в дерево на большой скорости и вы хотите попробовать вытащить последние полсекунды видео, то эта утилита тоже может помочь. Иногда из небытия можно достать дополнительные кадры.

Что потребуется?

Для восстановления работоспособности файлов нам нужно:

  1. Битые файлы или образы карточки/флешки/диска, куда было записано видео
  2. Новый (ОТДЕЛЬНЫЙ) диск с достаточным объемом свободного места.
  3. Машина под управлением Linux или Windows, perl, ffmpeg/ffprobe/ffplay
  4. Для восстановления aac-звука нужен будет faad2 + gcc
  5. Образец исправного файла. Файл должен быть записан с теми же настройками на том же устройстве, что и поврежденный файл.

Как это использовать?

  1. Если у вас видео было записано на sdcard и удалено/не финализировано/было аварийное отлючение, то для начала снимите с нее образ при помощи утилиты winhex или ей подобной. Вы конечно можете попытаться восстановить файлы, но вы можете потерять несколько секунд. Пользователи Linux могут указать карту напрямую, как /dev/sdX, однако иметь резервную копию при восстановлении данных - это всегда хорошая идея.
  2. Возьмите старый или снимите новый видеоролик, который будет записан при тех же условиях, что и восстанавливаемый. Обязательно записывать его ровно при тех же условиях, включая даже тряску на экране, если она была - так мы найдем ровно то, что ищем. Длительность ролика 20 секунд, но если скормить больше - ничего страшного.
  3. Нужно запустить

perl fixer.pl <good_file.mp4> <bad_file.mp4> <output_prefix>

Как это работает?

Для начала создаются промежуточные файлы:

  • *-headers.aac - файл, который понадобится для восстановления звука
  • *-headers.h264 - файл видео, который будет использован для создания заголовков
  • *-nals.txt - временный файл, внутри которого будут разобраны пакеты. Под Windows 7 этот файл создается долго по неизвестной мне причине. Этот файл нужен, чтобы "научиться" особенностям кодирования файла-образца
  • *-nals-stat.txt - это то, чему мы "научились". Если что-то пойдет не так - пришлите этот файл.
  • *-stat.mp4 - временный файл, фактически копия файла-образца, только без звука, обрезанная до 20 секунд.

В самом конце работы будут созданы:

  • *-out-video.h264 - восстановленное видео
  • *-out-audio.raw - восстановленное аудио. Если быть точным - только то, что было между видео.

Все файлы будут создаты в текущей директории, откуда вы запускаете скрипт.

Вы можете взять любой плеер, например ffplay и проиграть *-out-video.h264, а вот со звуком будет немного сложнее.

О восстановлении звука:

Разные видеокамеры по разному могут писать звук. Как минимум, он может быть в разных форматах.

  1. Если звук был в формате mp3, то вы можете просто переименовать *-out-audio.raw в file.mp3 и открыть его любым плеером.
  2. Если звук был в формате PCM (и его подвидах, таких как ULAW), как это делают некоторые видеокамеры от Sony, то вы легко можете спасти его, если сконвертируете его в WAV, введя что-то вроде: ffmpeg -f s16le -ar 48000 -ac 2 -i somefile-out-audio.raw -c copy output.wav Конечно, вам нужно будет подобрать параметры для своего устройства.
  3. Если звук был в формате AAC, как самый популярный вариант, то компилируем прилагаемую утилиту:

gcc aac.c -L. -lfaad -lm -o aacfixer

(предполагается, что вы скомпилировали библиотеку faad2 и положили файлы libfaad.a и neaacdec.h в текущую директорию)

Теперь запускаем:

./aacfixer somefile-headers.aac somefile-out-audio.raw

И после некоторого времени появятся файлы:

  • <prefix>-pure.wav - то, что удалось декодировать.
  • <prefix>-pure-adts.aac - аналогично, только без перекодирования

При восстановлении звука используется брутфорс, потому быстро не будет.

Если что-то пошло не так:

Помните, что данный код был написан для своих внутренних нужд всего за 3 дня и не обязан работать во всех случаях. В дополнении в этим трем дням я потратил еще неделю, чтобы написать этот текст, потому если что-то не работает, то не надо сильно переживать Если у вас что-то не получается, то создайте issue и сделайте следующее:

  • Выложите куда-то файл-образец, длительностью от 10 до 20 секунд. Выкладывайте на сервисы вроде GoogleDrive или DropBox. Не надо присылать это в почте или заливать на сервисы, где нет прямых ссылок, такие как mega.co.nz
  • Выложите образец битого файла, весом не более 50 мегабайт
  • Опишите модель устройства на котором был записан данный файл или название программ, после которых он появился. Был ли он восстановлен или просто скопирован с устройства.
  • Что случилось (дрон влетел в дерево, кончилось место, аварийное отключение)
  • На какой системе вы пытались запускать эту утилиту и что пошло не так

Код был написан так, чтобы работать на как можно большем количестве платформ, не зависеть от бинарных сборок и быть как можно проще, поэтому его эффективность не являлась целью. Опять же, на написание этого кода я потратил всего 3 дня.

Деньги-деньги-деньги

Если по какой-то причине вы хотите мне дать денег, то можете сделать это через:

  • Bitcoin: 1bU17VMyvxYfCN257AiHrPPca1bszuLna
  • Ether: 0x39b64f347b7702ddb1f8B06A25575598d624b783

Помните, что я безработный и деньги мне очень нужны. Если вы сделаете денежный перевод, то я смогу воспользоваться своей магией восстановления данных и помочь вам с удвоенной силой. Впрочем, сила зависит от денежной суммы.

Пользователям последних GoPro, Xiao / Xiaomi Yi 4k и некоторых дронов

Данные видеокамеры построены на чипсетах от Ambarella и имеют почти одинаковую начинку. К примеру, моя Yi4k построена на чипсете Ambarella A9SE и как и GoPro, она пишет вместе с основным потоком еще и дополнительное превью. Это превью используется для мобильного приложения. Внутри прошивки есть еще зачатки видеоредактора, но пользователю они не видны, вероятно это будет в будущих версиях. Это приводит к тому, что 2 разных файла пишутся одновременно и перемешиваются на самой карточке. И если это восстановить как один кусок, то на выходе у нас получается много битых сегментов. Не пытайтесь восстанавливать такие данные обычными программами вроде R-Studio, они будут битыми! Если вы хотите попытать счастья, то снимите образ целиком и экспериментируйте уже над ним.

К счастью, как обладатель такой видеокамеры, я могу много экспериментироваться с ней и с разными режимами записи. А еще я являюсь экспертом в области файловых систем, поэтому собираюсь выпустить утилиту для низкоуровневой работы с флеш-картой. Ниже представлен скриншот этой утилиты, однажды она будет безошибочно восстанавливать файлы. Но не сейчас. Пока у меня нет достаточной мотивации для завершения проекта, поэтому пусть это будет лишь маленьким превью.

Direct Disk View (ClusterView)

Другие утилиты:

Я решил поискать другие утилиты и посоревноваться с ними. Да, это все было написано скорее для забавы, но смогу ли я тягаться с профессиональными средствами?

Мной был написан примитивный скрипт, который читал случайные куски из файла и потом склеивал их вместе. Вы тоже можете попробовать, он называется montage.pl, так как практически позволяет монтировать видеофайлы! Конечно, такую нарезку проиграть невозможно, но можно ли ее восстановить?

К моему великому удивлению, многие коммерческие утилиты не смогли абсолютно ничего, даже просто объяснить, что им не нравится, а опенсорсные, такие как untrunc, потребовали определенных усилий и патчинга, чтобы их просто собрать, но все равно не заработали. Но не будем о плохом. Далее будут те вещи, которые дали хоть какой-то результат:

  • mp4repair.org - сервис по восстановлению данных. Обычно я обхожу стороной такие сервисы, но этот сервис меня удивил. Он не только смог показать превью для битого файла, но даже не потребовал референсного файла для этого, а сделано было все прямо в браузере! Впрочем, цена высока. К сожалению, мне написали, что мой тестовый файл лучше не восстанавливать, что это будет очень дорого, а на последующие письма просто не ответили. Это очень меня разочаровало. Я пытался переписываться с техподдержкой, но к сожалению, так и не добился ничего, так что я не могу рекомендовать их.
  • http://slydiman.me/eng/mmedia/recover_mp4.htm - результат практически как у меня, только в mp4 контейнере, что в теории, должно лучше сказаться на синхронизации аудио и видео. Я не смог проиграть результат в VLC, но ffplay показал мне почти аналогичную картинку, что и у меня. Правда автор не выкладывает новые версии и похоже, решил монетизировать свой проект. О этом проекте я знал еще до написания собственного. Не опенсорс, что и было причиной создания моего проекта.

Увы, как мы видим, выбор не велик. И с публикацией этого проекта, выбор стал шире!

Написать автору

Если по какой-то причине вы хотите написать мне лично, то пишите на почту [email protected] Это не основной мой емейл, потому не ждите скорого ответа. Вы можете создать issue с текстом "проверь почту".

Если же ваш вопрос касается производства видео в целом, то лучше задайте его тут: https://video.stackexchange.com - маленькое, но очень хорошее сообщество по производству видео

Приветы:

Огромная благодарность участникам stackoverflow: szatmary, Mulvya, VC.One. Slydiman, за нереализацию моих фич-реквестов и не публикацию исходников. А так же страдальцам с SJCAM из нашей конференции, которые сподвигли меня на это!

Лицензия:

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

mp4fixer's People

Contributors

bookkojot avatar pemre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mp4fixer's Issues

aac.c errors/warnings

On running gcc aac.c -L. -lfaad -lm -o aacfixer, to fix the audio, I got the error message aac.c:88:15: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration]
This was fixed by editing the aac.c file and adding a line for #include <time.h> to the includes (near the top of the file).

I also go the error aac.c:118:8: warning: type defaults to ‘int’ in declaration of ‘uid’ [-Wimplicit-int]
It seems to be the line static uid=0; should be static int uid=0;

Avoid artefacts when restoring.

I have been able to restore my video file using your tool, but I have some artefacts when scene changes like this:

vlcsnap-2020-10-04-16h23m36s045

Is the artefact is generated using your tool or do you think it's in my original file ?
For reference the video I'm trying to restore is a live video streaming recorded using VLC.
I have no artefacts at all on a good file.

bug on aac.c

There is a bug on aac.c, line 187

NeAACDecHandle h=NeAACDecOpen();

in order to fix it, just chang it to

h=NeAACDecOpen();

it is the reason a lot of people is complaining about crashes, seg-fault, etc. Quite silly once you find it. I bet someone ctrl+c, ctrl+v that part of the code, isn't that right, bookkojot?
:)

Recover Kazam mux file to mp4

From this question I see you to try your project. But actually I have zero undestanding about media format. How to do that exactly in command?

aacfixer hangs and produces no usable output

aacfixer seems to run for several minutes, but after a while it hangs and stops doing anything. I've let it run for an hour to see if it picks up again, but it doesn't. It produces the expected output files, but one is 0 bytes and the other is 25k.

Stats

Не могу понять, что я делаю не так, но получаю ошибку "stat" не является внутренней или внешней командой, исполняемой программой или пакетным файлом.

Unable to play h64 video

Hello,
I've just tried this project after realizing that untrunc cannot recover files bigger than ~4GB, and I'm having issues recovering this mp4. I ran the tool and after a lot of messages like Got! 65638 bytes and 362 shit, I saw the following output:

  File: testing-out-video.h264
  Size: 10664699948	Blocks: 20829504   IO Block: 4096   regular file
Device: fe04h/65028d	Inode: 55325937    Links: 1

I then attempted to play the video with ffplay and just saw an endless stream of the following errors:

[NULL @ 0x7f0b8c002900] non-existing PPS 0 referenced
    Last message repeated 4 times
[h264 @ 0x7f0b8c1ecd40] non-existing PPS 0 referenced
[h264 @ 0x7f0b8c1ecd40] decode_slice_header error
[h264 @ 0x7f0b8c1ecd40] no frame!
[NULL @ 0x7f0b8c002900] non-existing PPS 0 referenced
[h264 @ 0x7f0b8c209040] non-existing PPS 0 referenced
[h264 @ 0x7f0b8c209040] decode_slice_header error
[h264 @ 0x7f0b8c209040] no frame!
[NULL @ 0x7f0b8c002900] non-existing PPS 0 referenced
[h264 @ 0x7f0b8c005600] non-existing PPS 0 referenced
[h264 @ 0x7f0b8c005600] decode_slice_header error
[h264 @ 0x7f0b8c005600] no frame!
[NULL @ 0x7f0b8c002900] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x7f0b8c01b280] non-existing PPS 0 referenced
[h264 @ 0x7f0b8c01b280] decode_slice_header error
[h264 @ 0x7f0b8c01b280] no frame!
[NULL @ 0x7f0b8c002900] non-existing PPS 0 referenced
[h264 @ 0x7f0b8c0a3e40] non-existing PPS 0 referenced
[h264 @ 0x7f0b8c0a3e40] decode_slice_header error
[h264 @ 0x7f0b8c0a3e40] no frame!
[NULL @ 0x7f0b8c002900] non-existing PPS 0 referenced

I also ran aacfixer to try and recover the sound and got about 30 seconds worth of audio back, but the tool segfaulted. Let me know if I can provide any other information that would be helpful to debug. I'm afraid I can't upload a sample of the broken file because its quite large (~14GB).

Thanks!

Segfault on aacfixer

Добрый день!

Пробую кучу утилит и сервисов для восстановления одного видео из отпуска. На GitUp Git2 писал видео отрывками, используя функцию паузы записи (назначив её на боковую клавишу), а по окончании забыл нажать на кнопку полного окончания записи, сразу выключив камеру (хотя запись была на паузе).

Утилиты и сервисы видеопоток восстанавливают хорошо, не исключение и ваша программа. Но вот со звуком беда.
Например, после утилиты звук recover_mp4 какой-то рваный, с паузами, а местами и вовсе ускоренный (даже в плеере секунды бегут быстрее), и если потом муксовать ffmpeg'ом h264 и aac потоки, то в итоговом видео вообще никакой синхронизации - звук кончается на пару минут быстрее видео. Но на данный момент - это самый лучший результат, если говорить о звуке.
Есть ещё сервис fix.video - там в тестовом бесплатном сэмпле восстановленного файла слышно всего пару каких-то щелчков первую секунду, а далее вообще нет звука.
Пока пишу этот issue - жду окончания обработки видео на сервисе restore.media - это как раз монетизационная онлайн-версия утилиты recover_mp4.

Конкретно с вашей программой aacfixer возникает "Ошибка сегментирования":

./aacfixer fixer-headers.aac fixer-out-audio.raw 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

Using parameters:
samplerate:44100, channels:2
Consumed 332, got samples: 0, 10000000 bytes remain
Consumed 332, got samples: 0, 9999672 bytes remain
Consumed 332, got samples: 0, 9999344 bytes remain
Consumed 332, got samples: 0, 9999016 bytes remain
Consumed 332, got samples: 0, 9998688 bytes remain
Consumed 332, got samples: 0, 9998360 bytes remain
Consumed 332, got samples: 0, 9998032 bytes remain
Consumed 332, got samples: 0, 9997704 bytes remain
Consumed 332, got samples: 0, 9997376 bytes remain
Consumed 333, got samples: 0, 9997048 bytes remain
Consumed 332, got samples: 0, 9996720 bytes remain
Consumed 332, got samples: 0, 9996392 bytes remain
Consumed 334, got samples: 0, 9996064 bytes remain
Consumed 332, got samples: 0, 9995736 bytes remain
Consumed 330, got samples: 0, 9995408 bytes remain
Consumed 332, got samples: 0, 9995084 bytes remain
Consumed 332, got samples: 0, 9994756 bytes remain
Consumed 332, got samples: 0, 9994428 bytes remain
Consumed 332, got samples: 0, 9994100 bytes remain
Consumed 332, got samples: 0, 9993772 bytes remain
Consumed 332, got samples: 0, 9993444 bytes remain
Consumed 332, got samples: 0, 9993116 bytes remain
Consumed 333, got samples: 0, 9992788 bytes remain
Consumed 332, got samples: 0, 9992460 bytes remain
Consumed 332, got samples: 0, 9992132 bytes remain
Consumed 332, got samples: 0, 9991804 bytes remain
Consumed 332, got samples: 0, 9991476 bytes remain
Consumed 332, got samples: 0, 9991148 bytes remain
Consumed 332, got samples: 0, 9990820 bytes remain
Consumed 332, got samples: 0, 9990492 bytes remain
Consumed 332, got samples: 0, 9990164 bytes remain
Consumed 332, got samples: 0, 9989836 bytes remain
Consumed 332, got samples: 0, 9989508 bytes remain
Consumed 332, got samples: 0, 9989180 bytes remain
Consumed 333, got samples: 0, 9988852 bytes remain
Consumed 332, got samples: 0, 9988524 bytes remain
Consumed 332, got samples: 0, 9988196 bytes remain
Consumed 332, got samples: 0, 9987868 bytes remain
Consumed 332, got samples: 0, 9987540 bytes remain
Consumed 332, got samples: 0, 9987212 bytes remain
Consumed 347, got samples: 0, 9986884 bytes remain
Consumed 322, got samples: 2048, 9986544 bytes remain
Ошибка сегментирования (сделан дамп памяти)

Система Ubuntu 16.04.4 LTS
Чтобы скомпилировать aacfixer, устанавливал пакеты libfaad2 libfaad-dev, версии:

apt-show-versions libfaad2 faad libfaad-dev 
faad:amd64/xenial 2.8.0~cvs20150510-1 uptodate
faad:i386 not installed
libfaad-dev:amd64/xenial 2.8.0~cvs20150510-1 uptodate
libfaad-dev:i386 not installed
libfaad2:amd64/xenial 2.8.0~cvs20150510-1 uptodate
libfaad2:i386 not installed

Содержимое nals-stat.txt:

$VAR1 = [
          {
            'id' => 0,
            'max' => 0,
            'min' => 16777215
          },
          {
            'min' => 13896,
            'printbytes' => {
                              '019a0006' => 1,
                              '019a0008' => 1,
                              '419a000d' => 1,
                              '419a0006' => 1,
                              '019a0002' => 1,
                              '419a000b' => 1,
                              '419a000f' => 1,
                              '419a0004' => 1,
                              '019a0004' => 1,
                              '019a000b' => 1,
                              '419a0002' => 1,
                              '419a0009' => 1,
                              '019a000f' => 1,
                              '019a000d' => 1
                            },
            'max' => 143236,
            'bytes' => {
                         '��' => 1,
                         'A�' => 1
                       },
            'id' => 1
          },
          {
            'min' => 16777215,
            'max' => 0,
            'id' => 2
          },
          {
            'min' => 16777215,
            'max' => 0,
            'id' => 3
          },
          {
            'max' => 0,
            'id' => 4,
            'min' => 16777215
          },
          {
            'min' => 62676,
            'printbytes' => {
                              '65888000' => 1
                            },
            'max' => 267356,
            'id' => 5,
            'bytes' => {
                         'e��' => 1
                       }
          },
          {
            'min' => 16777215,
            'id' => 6,
            'max' => 0
          },
          {
            'min' => 16777215,
            'max' => 0,
            'id' => 7
          },
          {
            'max' => 0,
            'id' => 8,
            'min' => 16777215
          },
          {
            'id' => 9,
            'max' => 0,
            'min' => 16777215
          },
          {
            'min' => 16777215,
            'id' => 10,
            'max' => 0
          },
          {
            'id' => 11,
            'max' => 0,
            'min' => 16777215
          },
          {
            'min' => 16777215,
            'id' => 12,
            'max' => 0
          },
          {
            'min' => 16777215,
            'id' => 13,
            'max' => 0
          },
          {
            'id' => 14,
            'max' => 0,
            'min' => 16777215
          },
          {
            'min' => 16777215,
            'max' => 0,
            'id' => 15
          },
          {
            'max' => 0,
            'id' => 16,
            'min' => 16777215
          },
          {
            'max' => 0,
            'id' => 17,
            'min' => 16777215
          },
          {
            'min' => 16777215,
            'max' => 0,
            'id' => 18
          },
          {
            'min' => 16777215,
            'max' => 0,
            'id' => 19
          },
          {
            'max' => 0,
            'id' => 20,
            'min' => 16777215
          },
          {
            'min' => 16777215,
            'id' => 21,
            'max' => 0
          },
          {
            'min' => 16777215,
            'id' => 22,
            'max' => 0
          },
          {
            'min' => 16777215,
            'id' => 23,
            'max' => 0
          },
          {
            'max' => 0,
            'id' => 24,
            'min' => 16777215
          },
          {
            'max' => 0,
            'id' => 25,
            'min' => 16777215
          },
          {
            'min' => 16777215,
            'max' => 0,
            'id' => 26
          },
          {
            'min' => 16777215,
            'max' => 0,
            'id' => 27
          },
          {
            'max' => 0,
            'id' => 28,
            'min' => 16777215
          },
          {
            'min' => 16777215,
            'max' => 0,
            'id' => 29
          },
          {
            'min' => 16777215,
            'id' => 30,
            'max' => 0
          },
          {
            'id' => 31,
            'max' => 0,
            'min' => 16777215
          }
        ];

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.