anthwlock / untrunc

Restore a truncated mp4/mov. Improved version of ponchio/untrunc
GNU General Public License v2.0
1.9k stars 182 forks source link

program crash #45

Closed Shogoot closed 4 years ago

Shogoot commented 4 years ago

I was happy to find this in a windows version as i didn't get the Linux version to work. Im too new to Linux i gues and i cannot run the program properly it seems. Anyways, this is regarding the Win version. I load the GUI, load a reference from same camera and day, load truncated mp4 file and hit repair, the program starts working for about a min then crashes, i can see in a split second it's writing something to the log (set to -v) and the crash, i don't get to read what is writing.

Any help will be appreciated.

Files used can be found here with a video of crash, you can se some log file text there that i dont understand

https://drive.google.com/open?id=10uf6xAZQ8DlceaBGk4ugwPTzwQc5lIuA

anthwlock commented 4 years ago

If you send me the files (healthy+broken) I will take a look.

So the GUI crashes and you can't read the log. Have you tried using the CLI on windows?

Shogoot commented 4 years ago

If you send me the files (healthy+broken) I will take a look.

So the GUI crashes and you can't read the log. Have you tried using the CLI on windows?

i edited my post with link to files, and i did not try the CLI

Shogoot commented 4 years ago

update. Did try CLI

PS C:\Users\smnlp\Downloads\untrunc_x64> .\untrunc.exe -s -sv -vv 'C:\Users\smnlp\Google Drive\Escalada\share\untrunc crashfiles\20200reference.mp4' 'C:\Users\smnlp\Google Drive\Escalada\share\untrunc crashfiles\20200329080756.mp4' > 'C:\Users\smnlp\Documents\untrunc_vv_verbose.txt' | type 'C:\Users\smnlp\Documents\untrunc_vv_verbose.txt'
[NULL @ 00000000026d16a0] Opening 'C:\Users\smnlp\Google Drive\Escalada\share\untrunc crashfiles\20200reference.mp4' for reading
[file @ 00000000026d2d60] Setting default whitelist 'file,crypto'
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000000026d16a0] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000000026d16a0] ISO: File Type Major Brand: mp42
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000000026d16a0] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000000026d16a0] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000000026d16a0] rfps: 29.916667 0.007426
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000000026d16a0] rfps: 30.000000 0.003770
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000000026d16a0] rfps: 240.000000 0.008164
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000000026d16a0] rfps: 240.000000 0.003822
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000000026d16a0] rfps: 29.970030 0.003670
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000000026d16a0] Before avformat_find_stream_info() pos: 10906328 bytes read:36727 seeks:1 nb_streams:2
[h264 @ 00000000026e4ce0] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 00000000026e4ce0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 00000000026e4ce0] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 00000000026e4ce0] Reinit context to 640x480, pix_fmt: yuv420p
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000000026d16a0] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000000026d16a0] After avformat_find_stream_info() pos: 34447 bytes read:102263 seeks:2 frames:48
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\smnlp\Google Drive\Escalada\share\untrunc crashfiles\20200reference.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2020-03-29T18:52:43.000000Z
    com.android.version: 7.0
  Duration: 00:00:05.00, start: 0.000000, bitrate: 17443 kb/s
    Stream #0:0(eng), 1, 1/90000: Video: h264 (Baseline), 1 reference frame (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709, left), 640x480, 0/1, 17015 kb/s, SAR 1:1 DAR 4:3, 29.90 fps, 29.97 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      rotate          : 90
      creation_time   : 2020-03-29T18:52:43.000000Z
      handler_name    : VideoHandle
    Side data:
      displaymatrix: rotation of -90.00 degrees
    Stream #0:1(eng), 47, 1/48000: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)
    Metadata:
      creation_time   : 2020-03-29T18:52:43.000000Z
      handler_name    : SoundHandle
[aac @ 00000000026d6580] Multiple frames in a packet.
PS C:\Users\smnlp\Downloads\untrunc_x64>

@anthwlock untrunc_vv_verbose.txt file is in the folder mentioned above

Shogoot commented 4 years ago

Accidentally closed

anthwlock commented 4 years ago

https://github.com/anthwlock/untrunc/commit/669662b1b05bac327bf2920608214df2c33f73a0 introduced a bug. I fixed it in the latest commit. Please tell me if you still experience the crash.

Shogoot commented 4 years ago

yepp crashed again. [image: image.png]

Capture

want me to run cli version and verbose?

On Sun, Apr 12, 2020 at 8:51 PM Anthon Lockwood notifications@github.com wrote:

669662b https://github.com/anthwlock/untrunc/commit/669662b1b05bac327bf2920608214df2c33f73a0 introduced a bug. I fixed it in the latest commit. Please tell me if you still experience the crash.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/anthwlock/untrunc/issues/45#issuecomment-612659983, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKAWV44E76YRFUWE6H6MSR3RMIER7ANCNFSM4MF645XA .

-- <||>Smn Lpz<||>

Shogoot commented 4 years ago

i started running cli verision, i thinks it been at it for some 3 hrs now. The -vv logfile has a lot of this: skipping 14751 at 1737763720 / 1737763752 skipping 8898326 at 1737778741 / 1737778773 skipping 2210520 at 1746677347 / 1746677379 skipping 2224663 at 1748888143 / 1748888175 skipping 11155146 at 1751113080 / 1751113112 skipping 17878124 at 1762268500 / 1762268532 skipping 2225522 at 1780146896 / 1780146928 skipping 2245872 at 1782372700 / 1782372732 skipping 2211620 at 1784618846 / 1784618878 skipping 2233443 at 1786830738 / 1786830770 skipping 2202811 at 1789064451 / 1789064483 skipping 4448454 at 1791267532 / 1791267564 skipping 2251858 at 1795716258 / 1795716290 skipping 4452449 at 1797968390 / 1797968422 skipping 4438811 at 1802421115 / 1802421147 skipping 11127381 at 1806860198 / 1806860230 skipping 11154678 at 1817987847 / 1817987879 skipping 11174677 at 1829142801 / 1829142833 skipping 11099788 at 1840317748 / 1840317780 skipping 4507106 at 1851417810 / 1851417842 skipping 13347063 at 1855925188 / 1855925220 skipping 3852 at 1869272517 / 1869272549 skipping 2249659 at 1869276641 / 1869276673 skipping 4429610 at 1871526572 / 1871526604 skipping 8900983 at 1875956450 / 1875956482 skipping 13405502 at 1884857709 / 1884857741 skipping 3806 at 1898263487 / 1898263519 skipping 8840579 at 1898267565 / 1898267597 skipping 11125479 at 1907108416 / 1907108448

files is also in shared folder and is 1360kb loooooooooooong. Hopefully it helps you debug :)

anthwlock commented 4 years ago

Can you give me more information about the used camera? Brand + Name/Model-Number?

Edit: Samsung? Samsung SM-C101?

i thinks it been at it for some 3 hrs now.

It didn't stop by itself, right?

Shogoot commented 4 years ago

i had to stop it.

Galaxy S6

Modellnummer: SM-G920F

On Tue, Apr 14, 2020 at 3:37 PM Anthon Lockwood notifications@github.com wrote:

Can you give me more information about the used camera? Brand + Name/Model-Number?

i thinks it been at it for some 3 hrs now.

It didn't stop (by itself), right?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/anthwlock/untrunc/issues/45#issuecomment-613447500, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKAWV4Z35KPSDY5PWCJNNO3RMRRJVANCNFSM4MF645XA .

anthwlock commented 4 years ago

It seems like Samsung puts some kind of meta-data at the beginning of each track. This caused unusual short NAL-Units, which (untill https://github.com/anthwlock/untrunc/commit/b036f185360bc602e7849a7a7777c74beff7d5f4) were rejected. Additionally I found two bugs, fixed in https://github.com/anthwlock/untrunc/commit/0c32042fc015d1159d51951921d77e5504eaec28. Those caused the crash.

Shogoot commented 4 years ago

Thanks for your effort, the program now dont crash, but the result of the repaired file is useless :_/

image

anthwlock commented 4 years ago

You have to choose the right reference file! I tested it with 20200reference.mp4, and was able to recover 32min 28sec. When I use 2020reference_02.mp4 I get a similar result as you got.

Shogoot commented 4 years ago

your absolutely right. its was the ref file, strange though both ref files are from same camera. closing this issue :) thanks"