FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 17
  1. #1
    Join Date
    Mar 2012
    Location
    Frankfurt
    Posts
    85

    Repair VIDEO with ffmpeg

    Some video files re corrupted. Recording made an error.

    How can I repair mp4 or wmv.

    Like this?

    Code:
    recover_mp4_to_h264.exe good.MP4 --avcc
    
    recover_mp4_to_h264.exe bad.MP4 bad.h264 bad.aac --android
    
    ffmpeg -i bad.aac -acodec libvo_aacenc -b:a 96k fixed.aac
    
    ffmpeg -r 30 -i bad.h264 -i fixed.aac -vcodec copy -acodec copy -bsf:a aac_adtstoasc fixed.mp4

  2. #2
    Join Date
    Jan 2010
    Posts
    7,168

    Re: Repair VIDEO with ffmpeg

    recover_mp4_to_h264.exe sounds like a Windows program. I've never tried it. Doing a quick google indicates that there are a few other tools, but apparently, success depends upon how badly corrupted the original file is.

  3. #3
    Join Date
    Mar 2012
    Location
    Frankfurt
    Posts
    85

    Re: Repair VIDEO with ffmpeg

    Thank You for help.
    Why are the file damaged?
    Battery became empty and so the machine could not close the file.
    So I cannot play it.

    So the error is only at the end of the file.

    Is it possible

    I open file without control with ffmpeg and I copy into a new container the file minus 3 minutes, the end.
    Is this an idea?

  4. #4
    Join Date
    Mar 2012
    Location
    Frankfurt
    Posts
    85

    Re: Repair VIDEO with ffmpeg

    https://github.com/ponchio/untrunc

    I found that.
    I could install but its not running. Error message: File not found.

  5. #5
    Join Date
    Jan 2010
    Posts
    7,168

    Re: Repair VIDEO with ffmpeg

    find out the length of the video, then you can do ffmpeg -i myfile -t <however_many_seconds--minus 3 minute> outfile

  6. #6
    Join Date
    Mar 2012
    Location
    Frankfurt
    Posts
    85

    Re: Repair VIDEO with ffmpeg

    Can I do it without knowing the length ?

    Just save one minute for a check up.

    Thank You.

    ffmpeg -i myfileme.mp4 -t <120> save.mp4


    Is this ok for saving 2 minutes?

  7. #7
    Join Date
    Mar 2012
    Location
    Frankfurt
    Posts
    85

    Re: Repair VIDEO with ffmpeg

    ffmpeg -i test.mp4 -t 00:01:00 aus.mp4

    This is the order.

    And it works with fine files and I can cut but the damaged file was not accepted.

  8. #8
    Join Date
    Jan 2010
    Posts
    7,168

    Re: Repair VIDEO with ffmpeg

    It may have corrupted metadata. If it isn't accepted by ffmpeg, you could try mencoder (which I haven't used in a long time and may even use ffmpeg, I'm not sure.) Otherwise, you may be out of luck.

    HOWEVER, I AM NO EXPERT. You can try googling for other solutions.

  9. #9
    Join Date
    Mar 2012
    Location
    Frankfurt
    Posts
    85

    Re: Repair VIDEO with ffmpeg

    Thank You for Your help.

    Can You explain me or us

    why is it


    ./untruc

    and

    not

    untrunc

    what is the ./

    ?

    Regards


    ***


    I could find:


    https://de.wikipedia.org/wiki/MEncoder

    But there is noting written about repair.....?
    Last edited by matheandcreate; 2nd June 2017 at 08:19 PM.

  10. #10
    Join Date
    Jan 2010
    Posts
    7,168

    Re: Repair VIDEO with ffmpeg

    Hrrm, I posted an answer and it seems to have disappeared. Maybe I closed it too soon.

    Anyway, as far as an explanation of using ./ here's a fairly detailed one.

    https://askubuntu.com/questions/3206...rent-directory

  11. #11
    Join Date
    Mar 2012
    Location
    Frankfurt
    Posts
    85

    Re: Repair VIDEO with ffmpeg

    Thank You.
    I did compile.

    So I cannot say untrunc but ./untrunc.

    Ok so far.
    But its not starting.

  12. #12
    Join Date
    Jan 2010
    Posts
    7,168

    Re: Repair VIDEO with ffmpeg

    Did it compile successfully. Did the compilation possibly fail?

  13. #13
    Join Date
    Mar 2012
    Location
    Frankfurt
    Posts
    85

    Re: Repair VIDEO with ffmpeg

    Did it compile successfully. Did the compilation possibly fail?

    No
    Compilation was fine.
    And it did create files, I think nessessary files.
    I can post a list.

    Thank You.

  14. #14
    Join Date
    Jan 2010
    Posts
    7,168

    Re: Repair VIDEO with ffmpeg

    By the way, to get the duration of a video (generally, probably won't work in this case, since you say ffmpeg won't accept it) one can use ffprobe -hide_banner myvideo which will give various information, including duration. To just get the duration

    ffprobe myfile 2>&1 |grep Duration

    (It prints out to STDERR).

  15. #15
    Join Date
    Mar 2012
    Location
    Frankfurt
    Posts
    85

    Re: Repair VIDEO with ffmpeg

    Sorry

    Bad concentration.

    I do
    ./untrunc

    ERROR Message

    bash ./untrunc : (((in German language) cannot find file?

    How can I delete the error message

    I said ./untrunc box.mp4 destroy.mp4
    destroy is wrong
    box.mp4 is a correct mp4.

    What did I do wrong?

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 62
    Last Post: 28th November 2017, 07:58 PM
  2. [FFMPEG] Encoding video with [2|3]-Pass
    By sea in forum Media software
    Replies: 0
    Last Post: 13th August 2014, 02:44 PM
  3. add title to video with ffmpeg? is it possible?
    By tunisiano1978 in forum Using Fedora
    Replies: 2
    Last Post: 24th June 2010, 10:44 PM
  4. blank video using ffmpeg convesion to mp4
    By samfraser in forum Using Fedora
    Replies: 1
    Last Post: 8th May 2008, 10:56 PM
  5. ffmpeg - recording video, but no sound...
    By code_astronomer in forum Using Fedora
    Replies: 2
    Last Post: 27th April 2006, 06:54 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •