untrunc icon indicating copy to clipboard operation
untrunc copied to clipboard

ffmpeg error while trying to crop a restored video !

Open sahiltripathi2898 opened this issue 4 years ago • 3 comments

First I tried to restore the broken video and got the fixed video .

image

image

Then I tried to crop the first 3 mins of the fixed video using ffmpeg and got this error .

image

Does someone know how to solve this error ?

I want to restore a broken video (corrected reference video is provided) and then crop the fixed video for a time interval of what was the length of corrupted video before restoring .

sahiltripathi2898 avatar Mar 19 '21 07:03 sahiltripathi2898

Since untrunc is heuristic based, sometimes invalid samples are added to the resulting file. In these cases this often goes unnoticed, since video-players usually just ignore such invalid samples. However ffmpeg seems to not ignore these, and instead abort the transcoding process.

I currently don't have a suitable sample to test this, but maybe using -err_detect ignore_err is helpful here, link to docs.

If you send me your files I could try to adjust the heuristics a bit. Also if the transcoding should still fail, I could try to find out if there are other workarounds..

anthwlock avatar Apr 08 '21 18:04 anthwlock

https://drive.google.com/drive/folders/115Ym_f5zAbQvh2v-_67q8ecUXTtQmIKQ?usp=sharing Here are the 2 videos , 3.mp4 is the working video and 3-a.mp4 is the video to be restored . After restoring can you crop the restored video (or fixed video) to the length of 3-a.mp4 video (original corrupted video) .

sahiltripathi2898 avatar Apr 14 '21 07:04 sahiltripathi2898

Just fyi you are trying to 'trim' a video, not 'crop' it. Trimming refers to a temporal outtake. Cropping refers to taking a sub-region of the video in 2D space.

clort81 avatar Oct 21 '22 15:10 clort81