Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Compression Techniques FFmpeg: Validate Integrity of video (.mp4)

  • FFmpeg: Validate Integrity of video (.mp4)

    Posted by Simon Graham on July 11, 2016 at 1:46 pm

    Hoping someone can help me, I’ve found a lot of info online though it doesn’t seem to work.

    My aim: To validate the integrity of several hundred .mp4 which where downloaded over http. Due to connection issues, some of the videos are only partially downloaded. They show as correct video duration but the file size is significantly smaller. Videos play fine at start then cut off.

    Below are several commands I’ve used with FFmpeg with varying success:

    Scan Each Frame (Works, but takes very long time)
    ffmpeg -v error -i "File Name".mp4 -f null - >error.log 2>&1

    Scan 1 audio track (False negative)
    ffmpeg -v error -i "File Name".mp4 -map 0:1 -f null - >error.log 2>&1

    Scan Last 60sec (False negative, unless -sseof > or = video duration)
    ffmpeg -v error -sseof -60 -i "File Name".mp4 -f null - >error.log 2>&1

    I also would like to be able to run a batch scan of all files in folder, though can’t get it to work.

    Batch Scan Each Frame
    find . -type f -exec sh -c 'ffmpeg -v error -i "{}" -f null - > "{}".log 2>&1' \;
    Gives following error:

    Access denied - .
    File not found - -TYPE
    File not found - F
    File not found - -EXEC
    File not found - SH
    File not found - -C
    File not found - 'FFMPEG
    File not found - -V
    File not found - ERROR
    File not found - -I
    File not found - -F
    File not found - NULL
    File not found - -
    File not found - '
    File not found - \;

    Simon Graham replied 9 years, 11 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy