ponchio / untrunc

Restore a damaged (truncated) mp4, m4v, mov, 3gp video. Provided you have a similar not broken video.
GNU General Public License v2.0
1.62k stars 227 forks source link

How to install on FreeBSD 13.1? #257

Closed rajhlinux closed 1 year ago

rajhlinux commented 1 year ago

I did the following:

git clone --recurse-submodules https://github.com/ponchio/untrunc

Shows:

Cloning into 'untrunc'...
remote: Enumerating objects: 803, done.
remote: Counting objects: 100% (37/37), done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 803 (delta 18), reused 8 (delta 7), pack-reused 766
Receiving objects: 100% (803/803), 316.58 KiB | 3.56 MiB/s, done.
Resolving deltas: 100% (542/542), done.
Submodule 'libav' (https://github.com/libav/libav.git) registered for path 'libav'
Cloning into '/usr/home/user/untrunc/libav'...
remote: Enumerating objects: 256221, done.        
remote: Total 256221 (delta 0), reused 0 (delta 0), pack-reused 256221        
Receiving objects: 100% (256221/256221), 86.69 MiB | 28.82 MiB/s, done.
Resolving deltas: 100% (200536/200536), done.
Submodule path 'libav': checked out 'c4642788e83b0858bca449f9b6e71ddb015dfa5d'

Then I entered: cd untrunc/libav

I then entered : ./configure

Which shows:

install prefix            /usr/local
source path               .
C compiler                gcc
C library                 default
ARCH                      x86 (generic)
big-endian                no
runtime cpu detection     no
standalone assembly       yes
x86 assembler             nasm
MMX enabled               yes
MMXEXT enabled            yes
3DNow! enabled            yes
3DNow! extended enabled   yes
SSE enabled               yes
SSSE3 enabled             yes
AVX enabled               yes
XOP enabled               yes
FMA3 enabled              yes
FMA4 enabled              yes
i686 features enabled     yes
CMOV is fast              yes
EBX available             yes
EBP available             yes
debug symbols             yes
optimize for size         no
optimizations             yes
static                    yes
shared                    no
network support           yes
threading support         pthreads
safe bitstream reader     yes
External libraries:

External libraries providing hardware acceleration:
vdpau                                                                        

Libraries:
avcodec                   avdevice                  avfilter                 
avformat                  avresample                avutil                   
swscale                                                                      

Programs:
avconv                    avplay                    avprobe                  

Enabled decoders:
aac                       aac_latm                  aasc                     
ac3                       adpcm_4xm                 adpcm_adx                
adpcm_ct                  adpcm_ea                  adpcm_ea_maxis_xa        
adpcm_ea_r1               adpcm_ea_r2               adpcm_ea_r3              
adpcm_ea_xas              adpcm_g722                adpcm_g726               
adpcm_ima_amv             adpcm_ima_apc             adpcm_ima_dk3            
adpcm_ima_dk4             adpcm_ima_ea_eacs         adpcm_ima_ea_sead        
adpcm_ima_iss             adpcm_ima_qt              adpcm_ima_smjpeg         
adpcm_ima_wav             adpcm_ima_ws              adpcm_ms                 
adpcm_sbpro_2             adpcm_sbpro_3             adpcm_sbpro_4            
adpcm_swf                 adpcm_thp                 adpcm_vima               
adpcm_xa                  adpcm_yamaha              aic                      
alac                      alias_pix                 als                      
amrnb                     amrwb                     amv                      
anm                       ansi                      ape                      
ass                       asv1                      asv2                     
atrac1                    atrac3                    atrac3p                  
aura                      aura2                     avs                      
bethsoftvid               bfi                       bink                     
binkaudio_dct             binkaudio_rdft            bmp                      
bmv_audio                 bmv_video                 brender_pix              
c93                       cavs                      cdgraphics               
cdxl                      cfhd                      cinepak                  
clearvideo                cljr                      cllc                     
comfortnoise              cook                      cscd                     
cyuv                      dca                       dds                      
dfa                       dnxhd                     dpx                      
dsicinaudio               dsicinvideo               dss_sp                   
dvbsub                    dvdsub                    dvvideo                  
dxa                       dxtory                    dxv                      
eac3                      eacmv                     eamad                    
eatgq                     eatgv                     eatqi                    
eightbps                  eightsvx_exp              eightsvx_fib             
escape124                 escape130                 exr                      
ffv1                      ffvhuff                   fic                      
flac                      flashsv                   flashsv2                 
flic                      flv                       fmvc                     
fourxm                    fraps                     frwu                     
g2m                       g723_1                    gif                      
gsm                       gsm_ms                    h261                     
h263                      h263i                     h264                     
hap                       hevc                      hnm4_video               
hq_hqa                    hqx                       huffyuv                  
iac                       idcin                     iff_byterun1             
iff_ilbm                  imc                       indeo2                   
indeo3                    indeo4                    indeo5                   
interplay_dpcm            interplay_video           jpeg2000                 
jpegls                    jv                        kgv1                     
kmvc                      lagarith                  loco                     
mace3                     mace6                     magicyuv                 
mdec                      metasound                 mimic                    
mjpeg                     mjpegb                    mlp                      
mmvideo                   motionpixels              mp1                      
mp1float                  mp2                       mp2float                 
mp3                       mp3adu                    mp3adufloat              
mp3float                  mp3on4                    mp3on4float              
mpc7                      mpc8                      mpeg1video               
mpeg2video                mpeg4                     msa1                     
msmpeg4v1                 msmpeg4v2                 msmpeg4v3                
msrle                     mss1                      mss2                     
msvideo1                  mszh                      mts2                     
mvc1                      mvc2                      mxpeg                    
nellymoser                nuv                       on2avc                   
opus                      paf_audio                 paf_video                
pam                       pbm                       pcm_alaw                 
pcm_bluray                pcm_dvd                   pcm_f32be                
pcm_f32le                 pcm_f64be                 pcm_f64le                
pcm_lxf                   pcm_mulaw                 pcm_s16be                
pcm_s16be_planar          pcm_s16le                 pcm_s16le_planar         
pcm_s24be                 pcm_s24daud               pcm_s24le                
pcm_s24le_planar          pcm_s32be                 pcm_s32le                
pcm_s32le_planar          pcm_s8                    pcm_s8_planar            
pcm_u16be                 pcm_u16le                 pcm_u24be                
pcm_u24le                 pcm_u32be                 pcm_u32le                
pcm_u8                    pcm_zork                  pcx                      
pgm                       pgmyuv                    pgssub                   
pictor                    pixlet                    png                      
ppm                       prores                    ptx                      
qcelp                     qdm2                      qdraw                    
qpeg                      qtrle                     r10k                     
r210                      ra_144                    ra_288                   
ralf                      rawvideo                  rl2                      
roq                       roq_dpcm                  rpza                     
rscc                      rv10                      rv20                     
rv30                      rv40                      s302m                    
sanm                      screenpresso              sgi                      
sgirle                    shorten                   sipr                     
smackaud                  smacker                   smc                      
sol_dpcm                  sp5x                      srt                      
sunrast                   svq1                      svq3                     
tak                       targa                     tdsc                     
theora                    thp                       tiertexseqvideo          
tiff                      tmv                       truehd                   
truemotion1               truemotion2               truemotion2rt            
truespeech                tscc                      tscc2                    
tta                       twinvq                    txd                      
ulti                      utvideo                   v210                     
v210x                     v410                      vb                       
vble                      vc1                       vc1image                 
vcr1                      vmdaudio                  vmdvideo                 
vmnc                      vorbis                    vp3                      
vp5                       vp6                       vp6a                     
vp6f                      vp7                       vp8                      
vp9                       vqa                       wavpack                  
webp                      wmalossless               wmapro                   
wmav1                     wmav2                     wmavoice                 
wmv1                      wmv2                      wmv3                     
wmv3image                 wnv1                      ws_snd1                  
xan_dpcm                  xan_wc3                   xan_wc4                  
xbm                       xl                        xsub                     
xwd                       yop                       zerocodec                
zlib                      zmbv                                               

Enabled encoders:
a64multi                  a64multi5                 aac                      
ac3                       ac3_fixed                 adpcm_adx                
adpcm_g722                adpcm_g726                adpcm_ima_qt             
adpcm_ima_wav             adpcm_ms                  adpcm_swf                
adpcm_yamaha              alac                      alias_pix                
ass                       asv1                      asv2                     
bmp                       cinepak                   cljr                     
comfortnoise              dnxhd                     dpx                      
dvbsub                    dvdsub                    dvvideo                  
eac3                      ffv1                      ffvhuff                  
flac                      flashsv                   flv                      
g723_1                    gif                       h261                     
h263                      h263p                     huffyuv                  
jpegls                    ljpeg                     mjpeg                    
mp2                       mpeg1video                mpeg2video               
mpeg4                     msmpeg4v2                 msmpeg4v3                
nellymoser                pam                       pbm                      
pcm_alaw                  pcm_f32be                 pcm_f32le                
pcm_f64be                 pcm_f64le                 pcm_mulaw                
pcm_s16be                 pcm_s16le                 pcm_s24be                
pcm_s24daud               pcm_s24le                 pcm_s32be                
pcm_s32le                 pcm_s8                    pcm_u16be                
pcm_u16le                 pcm_u24be                 pcm_u24le                
pcm_u32be                 pcm_u32le                 pcm_u8                   
pcx                       pgm                       pgmyuv                   
png                       ppm                       prores                   
qtrle                     ra_144                    rawvideo                 
roq                       roq_dpcm                  rv10                     
rv20                      sgi                       sunrast                  
svq1                      targa                     tiff                     
utvideo                   v210                      v410                     
vorbis                    wmav1                     wmav2                    
wmv1                      wmv2                      wrapped_avframe          
xbm                       xsub                      xwd                      
zlib                      zmbv                                               

Enabled hwaccels:
h264_vdpau                hevc_vdpau                mpeg1_vdpau              
mpeg2_vdpau               mpeg4_vdpau               vc1_vdpau                
wmv3_vdpau                                                                   

Enabled parsers:
aac                       aac_latm                  ac3                      
adx                       bmp                       cavsvideo                
cook                      dca                       dirac                    
dnxhd                     dpx                       dvbsub                   
dvdsub                    flac                      gsm                      
h261                      h263                      h264                     
hevc                      mjpeg                     mlp                      
mpeg4video                mpegaudio                 mpegvideo                
opus                      png                       pnm                      
rv30                      rv40                      tak                      
vc1                       vorbis                    vp3                      
vp8                                                                          

Enabled demuxers:
aac                       ac3                       adx                      
aea                       aiff                      amr                      
anm                       apc                       ape                      
asf                       ass                       au                       
avi                       avs                       bethsoftvid              
bfi                       bink                      bmv                      
c93                       caf                       cavsvideo                
cdg                       cdxl                      daud                     
dfa                       dirac                     dnxhd                    
dsicin                    dss                       dts                      
dv                        dxa                       ea                       
ea_cdata                  eac3                      ffmetadata               
filmstrip                 flac                      flic                     
flv                       fourxm                    g722                     
g723_1                    g729                      gsm                      
gxf                       h261                      h263                     
h264                      hevc                      hls                      
hnm                       idcin                     iff                      
ilbc                      image2                    image2pipe               
ingenient                 ipmovie                   iss                      
iv8                       ivf                       jv                       
latm                      lmlm4                     lxf                      
m4v                       matroska                  mjpeg                    
mlp                       mm                        mmf                      
mov                       mp3                       mpc                      
mpc8                      mpegps                    mpegts                   
mpegtsraw                 mpegvideo                 mpjpeg                   
msnwc_tcp                 mtv                       mv                       
mvi                       mxf                       mxg                      
nc                        nsv                       nut                      
nuv                       ogg                       oma                      
paf                       pcm_alaw                  pcm_f32be                
pcm_f32le                 pcm_f64be                 pcm_f64le                
pcm_mulaw                 pcm_s16be                 pcm_s16le                
pcm_s24be                 pcm_s24le                 pcm_s32be                
pcm_s32le                 pcm_s8                    pcm_u16be                
pcm_u16le                 pcm_u24be                 pcm_u24le                
pcm_u32be                 pcm_u32le                 pcm_u8                   
pmp                       pva                       qcp                      
r3d                       rawvideo                  rl2                      
rm                        roq                       rpl                      
rso                       rtp                       rtsp                     
sap                       sdp                       segafilm                 
shorten                   siff                      smacker                  
smjpeg                    smush                     sol                      
sox                       spdif                     srt                      
str                       swf                       tak                      
thp                       tiertexseq                tmv                      
truehd                    tta                       tty                      
txd                       vc1                       vc1t                     
vmd                       voc                       vqf                      
w64                       wav                       wc3                      
wsaud                     wsvqa                     wtv                      
wv                        xa                        xmv                      
xwma                      yop                       yuv4mpegpipe             

Enabled muxers:
a64                       ac3                       adts                     
adx                       aiff                      amr                      
asf                       asf_stream                ass                      
au                        avi                       avm2                     
cavsvideo                 crc                       dash                     
daud                      dirac                     dnxhd                    
dts                       dv                        eac3                     
f4v                       ffmetadata                filmstrip                
flac                      flv                       framecrc                 
framemd5                  g722                      g723_1                   
gif                       gxf                       h261                     
h263                      h264                      hds                      
hevc                      hls                       ilbc                     
image2                    image2pipe                ipod                     
ismv                      ivf                       latm                     
m4v                       matroska                  matroska_audio           
md5                       mjpeg                     mlp                      
mmf                       mov                       mp2                      
mp3                       mp4                       mpeg1system              
mpeg1vcd                  mpeg1video                mpeg2dvd                 
mpeg2svcd                 mpeg2video                mpeg2vob                 
mpegts                    mpjpeg                    mxf                      
mxf_d10                   null                      nut                      
oga                       ogg                       oma                      
opus                      pcm_alaw                  pcm_f32be                
pcm_f32le                 pcm_f64be                 pcm_f64le                
pcm_mulaw                 pcm_s16be                 pcm_s16le                
pcm_s24be                 pcm_s24le                 pcm_s32be                
pcm_s32le                 pcm_s8                    pcm_u16be                
pcm_u16le                 pcm_u24be                 pcm_u24le                
pcm_u32be                 pcm_u32le                 pcm_u8                   
psp                       rawvideo                  rm                       
roq                       rso                       rtp                      
rtp_mpegts                rtsp                      sap                      
segment                   smjpeg                    smoothstreaming          
sox                       spdif                     spx                      
srt                       swf                       tg2                      
tgp                       truehd                    vc1t                     
voc                       wav                       webm                     
wv                        yuv4mpegpipe                                       

Enabled protocols:
concat                    crypto                    ffrtmphttp               
file                      gopher                    hls                      
http                      httpproxy                 icecast                  
md5                       mmsh                      mmst                     
pipe                      rtmp                      rtmpt                    
rtp                       sctp                      srtp                     
tcp                       udp                       unix                     

Enabled filters:
aformat                   amix                      anull                    
anullsink                 anullsrc                  asetpts                  
asettb                    ashowinfo                 asplit                   
asyncts                   atrim                     channelmap               
channelsplit              color                     compand                  
copy                      crop                      drawbox                  
fade                      fieldorder                format                   
fps                       framepack                 gradfun                  
hflip                     hwdownload                hwmap                    
hwupload                  join                      lut                      
lutrgb                    lutyuv                    movie                    
negate                    noformat                  null                     
nullsink                  nullsrc                   overlay                  
pad                       pixdesctest               resample                 
rgbtestsrc                scale                     select                   
setdar                    setpts                    setsar                   
settb                     showinfo                  shuffleplanes            
split                     testsrc                   transpose                
trim                      unsharp                   vflip                    
volume                    yadif                                              

Enabled bsfs:
aac_adtstoasc             chomp                     dump_extradata           
extract_extradata         h264_metadata             h264_mp4toannexb         
h264_redundant_pps        hevc_metadata             hevc_mp4toannexb         
imx_dump_header           mjpeg2jpeg                mjpega_dump_header       
mov2textsub               mpeg2_metadata            noise                    
null                      remove_extradata          text2movsub              
trace_headers             vp9_raw_reorder           vp9_superframe           
vp9_superframe_split                                                         

Enabled indevs:
alsa                      oss                       sndio                    
v4l2                                                                         

License: LGPL version 2.1 or later

I then entered make, I get the following:

make: "/usr/home/user/untrunc/libav/Makefile" line 3: Invalid line type
make: "/usr/home/user/untrunc/libav/Makefile" line 4: Invalid line type
make: "/usr/home/user/untrunc/libav/Makefile" line 5: Invalid line type
make: "/usr/home/user/untrunc/libav/Makefile" line 6: Invalid line type
make: "/usr/home/user/untrunc/libav/Makefile" line 7: Invalid line type
make: "/usr/home/user/untrunc/libav/Makefile" line 8: Invalid line type
make: "/usr/home/user/untrunc/libav/Makefile" line 9: Invalid line type
make: "/usr/home/user/untrunc/libav/Makefile" line 11: Invalid line type
make: "/usr/home/user/untrunc/libav/Makefile" line 18: Invalid line type
make: "/usr/home/user/untrunc/libav/Makefile" line 20: Invalid line type
make: "/usr/home/user/untrunc/libav/Makefile" line 21: Invalid line type
make: "/usr/home/user/untrunc/libav/Makefile" line 22: Invalid line type
make: "/usr/home/user/untrunc/libav/Makefile" line 37: Invalid line type
make: "/usr/home/user/untrunc/libav/Makefile" line 40: Invalid line type
make: "/usr/home/user/untrunc/libav/Makefile" line 52: warning: duplicate script for target "%.o" ignored
make: "Makefile" line 49: warning: using previous script for "%.o" defined here
make: "/usr/home/user/untrunc/libav/Makefile" line 55: warning: duplicate script for target "%.o" ignored
make: "Makefile" line 49: warning: using previous script for "%.o" defined here
make: "/usr/home/user/untrunc/libav/Makefile" line 61: warning: duplicate script for target "%.o" ignored
make: "Makefile" line 49: warning: using previous script for "%.o" defined here
make: "/usr/home/user/untrunc/libav/Makefile" line 62: warning: duplicate script for target "%.o" ignored
make: "Makefile" line 49: warning: using previous script for "%.o" defined here
make: ./tools/: read error: Is a directory

Machine:

OS: FreeBSD 13.1-RELEASE-p5 amd64 
Shell: sh 
Resolution: 3840x2160 
DE: Plasma 5.24.7 
WM: KWin 
Theme: [Plasma], Breeze [GTK2/3] 
Icons: [Plasma], breeze-dark [GTK2/3] 
Terminal: konsole 
CPU: AMD FX-8350 (8) @ 3.991GHz 
GPU: Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] 
Memory: 9719MiB / 32684MiB

Thanks.

rajhlinux commented 1 year ago

Got it to work on using FreeBSD's built in compat Linux system.