KrzYVideoFixer v1.07 by Mr_KrzYch00 Tries to recover video file by splitting it into working chunks then merging together as MP4 file. This will not make Your damaged video file work as new of course. This tool just cuts damaged fragments that result in weird video player behaviour or make Youtube converter hang at 95% processing. Requires ffprobe and ffmpeg in the same directory or in PATH in order to run properly. Make sure to have ffmpeg and ffprobe in the same working directory as kvf or in PATH variable. The program itself takes ~500KB of RAM to run, the rest is used by ffprobe and ffmpeg. WARNING! If the video has variable frame rate, make sure to finetune the program using -s and/or -t switches as the program is designed mainly for cfr files. Sometimes some files may have start timestamp not start near 0 seconds. In such case make sure to first use -f -dts -s9999999999 to first copy over whole video stream or use ffmpeg -i [input] -c copy [output]. If You fail to do so the resulting file may differ in size a lot than the original and it may contain a lot of stream bugs such as repeated video parts, wrong video parts being cut. The reason for this is that chunks use timestamps coppied from original file in order to properly check for repeated video parts basing on timestamps, while ffprobe reports exact beginning timestamp shift in input video file and ffmpeg doesn't care for them while seeking from the start while not having start argument passed (which is usually the case for first chunk). Changelog: v1.08 WIP - Improved chunk extraction detection, - accept floats for -t argument, - fix warning messages flood on -ia switch, - added T: indicator in extracting chunk message being total time extracted. - added -p switch that stands for high precission test chunks analysing, this works with video and audio making test chunks being extracted every single frame instead of keyframe. May take more time but cut less video. - Add optional 1-3 parameter to -ia switch to ignore audio for: 1 - input only, 2 - test chunks only, 3 - both (default). - Fixed incorrect behavior on N/A time frames, - Added long frame time jump detection on test chunks (additional to old data detection that already exists)m - Added -line switch to not line break on error messages to avoid high flood on very damaged video files, especially with -p switch. - remove not needed data returned by ffprobe to reduce memory/cpu overhead. v1.07 - added information about first frame start time, if it's too high the first chunk will be incorrectly extracted, so make sure it's near 0 seconds, if not, CTRL+C and use -f -dts -s999999999 to copy whole stream without timestamps and then re-run kvf. v1.06 - Added support for input file and path with space by using "". - Fixed crash on linux systems. v1.05 - Added -ia switch that ignores audio being stable on video drops, - Fixed incorrect audio stable detection on long A/V missing frames, and improved it as well. - Disable pts/dts mismatch, as this is actually how P-frames work. - Don't scan audio if last audio frame time is > last video frame time or audio stream ended early, - Change process priority to Idle, impacts ffmpeg/ffprobe subprocesses as well (works on both, windows and linux). v1.04 - Fixed not properly checking for keyframes on very damaged video parts that resulted in many chunks with repeated start times. - Confirm each video drop with audio stream, if no audio stream is damaged in that video part, don't cut that part as the audio still provides valid A/V sync. The downside to this is that video will have still frames but audio will keep playing - Added autodetection of update interval for scanning video message basing on CPU calculation speed. - Added pts/dts mismatch detection, such frames will be skipped when they are close to video drop, - endo was removed for the above reason, there will be always -0.1s from error part, - Added colors in terminal for both linux and windows version. v1.03 - improved detection of proper key frame time to start extracting chunk from by doing small test chunks and checking for unstable audio. LOOP [FIRST 30 SEC FROM NEXT CHUNK START TIME]: IF: [1st/2nd audio frm diff] > [2nd/3rd audio frm diff]*1.5 -- OR -- [2nd/3rd audio frm diff] > [1st/2nd audio frm diff]*1.5 YES: ENDLOOP MOVE TO THE NEXT KEY FRAME AND RESTARTLOOP ENDIF RESET VALUES ENDLOOP --> - increased default sensitivity from 10 to 20 frames, - added ascn switch to scan the file using audio instead of video stream, this method is faster and less cpu intensive on multithreaded systems. Unstable audio checks are disabled in this mode. - removed kfo# switch as the audio out of sync detection is sufficient. - endo# is now 1 instead of 2 by default, meaning 0.1s. - added beep when done. v1.02 - added -dts switch to disable copying TS that may fix even more damaged outputs on certain files, however, some files may first require to get full video with disabled TS by using these switches: -f -dts -s9999999999 then re-run kvf with default or fine-tuned switches. - added kfo# and endo# which are offsets that affect chunk extracting: * kfo# is # * 0.1s and by default is set to 1, meaning 0.1s, this is key frame +time offset to send to ffmpeg to start extracting chunk, ffmpeg jumps to closest key frame at given start offset. If You set it to 10 or 20 it may be possible for chunks to start at 2nd or 3rd key-frame after damaged part. * endo# is # * 0.1s and by default is set to 2, meaning 0.2s, this is the chunk end offsetting from last frame found in working video chunk. Sometimes it may be required to increase the default value if video file still keeps jumping time, because ffmpeg time offsetting is never extracting till exact time value. v1.01 - fixed incorrect detection of frame times for some video files, - added ERROR if 1st and 2nd frame times are the same, - made -n switch correctly write new lines. v1.00 - initial release. Interesting Comprison: - Zyxel NSA220 performance: 1/7th~1/8th real time speed (armv5 build) - Odroid U3: 8x real time speed (armv7 build) [this is mostly ffprobe/ffmpeg speed on these systems] Usually it's sufficient to run program 2 times. Once to fix, once to confirm the output. However, on very damaged video files it may be necessary to do it 3 times as example below shows: ------------------------------------------------------------------- e:\VLCPortable>kvf -s12 349834500000.flv KrzYVideoFixer v1.05 by Mr_KrzYch00 -> Detecting a minimum of 12 missing frames! |/ Extracting chunk #01: 0 to 3:25:00.7 (L: 3:25:00.7) |/ Extracting chunk #02: 3:25:11.5 to 3:55:11.1 (L: 0:29:59.6) !--> Audio unstable at keyframe: 3:55:12.9, trying next |/ Extracting chunk #03: 3:55:13.9 to 6:05:13.9 (L: 2:10:00.0) !--> Audio unstable at keyframe: 6:05:16.6, trying next |/ Extracting chunk #04: 6:05:17.6 to 6:55:00.7 (L: 0:49:43.1) !--> Audio unstable at keyframe: 7:45:02.3, trying next |/ Extracting chunk #05: 7:45:03.4 to 7:45:35.3 (L: 0:00:31.9) ?-> Video drop detected at: 7:45:36.8~7:45:42.52, but audio is stable! !--> Audio unstable at keyframe: 7:45:42.9, trying next |/ Extracting chunk #06: 7:45:44.0 to 7:55:04.1 (L: 0:09:20.1) !--> Audio unstable at keyframe: 7:56:08.0, trying next |/ Extracting chunk #07: 7:56:09.1 to 8:02:44.5 (L: 0:06:35.4) !--> Audio unstable at keyframe: 8:02:51.3, trying next |/ Extracting chunk #08: 8:02:52.4 to 8:05:51.1 (L: 0:02:58.7) !--> Audio unstable at keyframe: 8:05:53.3, trying next |/ Extracting chunk #09: 8:05:54.4 to 8:08:36.4 (L: 0:02:42.0) !--> Audio unstable at keyframe: 8:08:43.3, trying next ?-> Video drop detected at: 8:08:44.3~8:08:47.05, but audio is stable! |/ Extracting chunk #10: 8:08:47.2 to 8:35:43.8 (L: 0:26:56.6) !--> Audio unstable at keyframe: 8:36:06.1, trying next |/ Extracting chunk #11: 8:36:07.2 to 8:55:09.3 (L: 0:19:02.1) !--> Audio unstable at keyframe: 8:55:31.4, trying next |/ Extracting chunk #12: 8:55:32.5 to 8:57:51.8 (L: 0:02:19.3) !--> Audio unstable at keyframe: 8:58:08.0, trying next |/ Extracting chunk #13: 8:58:09.4 to 8:58:16.8 (L: 0:00:07.4) !--> Audio unstable at keyframe: 8:58:39.0, trying next ?-> Video drop detected at: 8:58:24.6~8:58:38.99, but audio is stable! |/ Extracting chunk #14: 8:58:40.2 to 8:58:50.3 (L: 0:00:10.1) ?-> Video drop detected at: 8:59:12.7~8:59:18.99, but audio is stable! !--> Audio unstable at keyframe: 8:59:19.6, trying next !--> Audio unstable at keyframe: 8:59:36.2, trying next |/ Extracting chunk #15: 8:59:37.7 to 8:59:41.6 (L: 0:00:03.9) ?-> Video drop detected at: 8:59:43.2~8:59:50.99, but audio is stable! !--> Audio unstable at keyframe: 8:59:51.6, trying next |/ Extracting chunk #16: 8:59:52.7 to 9:00:07.7 (L: 0:00:15.0) !--> Audio unstable at keyframe: 9:00:16.6, trying next !--> Audio unstable at keyframe: 9:00:17.6, trying next |/ Extracting chunk #17: 9:00:23.5 to 9:00:24.9 (L: 0:00:01.4) !--> Audio unstable at keyframe: 9:00:40.1, trying next |/ Extracting chunk #18: 9:00:41.3 to 9:00:50.4 (L: 0:00:09.1) !--> Audio unstable at keyframe: 9:01:05.6, trying next |/ Extracting chunk #19: 9:01:06.7 to 9:01:24.8 (L: 0:00:18.1) ?-> Video drop detected at: 9:01:36.2~9:01:42.99, but audio is stable! !--> Audio unstable at keyframe: 9:01:44.2, trying next |/ Extracting chunk #20: 9:01:45.7 to 9:34:35.7 (L: 0:32:50.0) ?-> Video drop detected at: 9:34:37.3~9:34:39.03, but audio is stable! !--> Audio unstable at keyframe: 9:34:40.0, trying next ?-> Video drop detected at: 9:34:43.6~9:34:55.13, but audio is stable! !--> Audio unstable at keyframe: 9:34:55.6, trying next ?-> Video drop detected at: 9:34:59.2~9:35:11.16, but audio is stable! !--> Audio unstable at keyframe: 9:35:12.0, trying next ?-> Video drop detected at: 9:35:15.6~9:35:27.20, but audio is stable! !--> Audio unstable at keyframe: 9:35:28.0, trying next !--> Audio unstable at keyframe: 9:35:44.2, trying next |/ Extracting chunk #21: 9:35:45.4 to 9:35:49.3 (L: 0:00:03.9) WARNING! Last audio frame>video frame: 9:36:09.91>9:35:59.16, ignoring audio! WARNING! Last audio frame>video frame: 9:36:09.91>9:36:07.12, ignoring audio! !--> Audio unstable at keyframe: 9:36:15.1, trying next |/ Extracting chunk #22: 9:36:16.2 to 9:36:19.7 (L: 0:00:03.5) ?-> Video drop detected at: 9:36:21.2~9:36:31.12, but audio is stable! !--> Audio unstable at keyframe: 9:36:32.0, trying next |/ Extracting chunk #23: 9:36:33.1 to 9:44:35.5 (L: 0:08:02.4) ?-> Video drop detected at: 9:44:37.0~9:44:39.12, but audio is stable! !--> Audio unstable at keyframe: 9:44:40.1, trying next |/ Extracting chunk #24: 9:44:41.2 to 9:44:52.4 (L: 0:00:11.2) !--> Audio unstable at keyframe: 9:45:05.6, trying next |/ Extracting chunk #25: 9:45:11.8 to 9:45:25.1 (L: 0:00:13.3) ?-> Video drop detected at: 9:45:26.7~9:45:35.23, but audio is stable! !--> Audio unstable at keyframe: 9:45:35.6, trying next |/ Extracting chunk #26: 9:45:36.7 to 9:45:46.2 (L: 0:00:09.5) !--> Audio unstable at keyframe: 9:45:55.6, trying next |/ Extracting chunk #27: 9:45:56.7 to 9:46:09.2 (L: 0:00:12.5) ?-> Video drop detected at: 9:46:10.7~9:46:15.15, but audio is stable! !--> Audio unstable at keyframe: 9:46:16.0, trying next |/ Extracting chunk #28: 9:46:17.6 to 9:46:19.6 (L: 0:00:02.0) ?-> Video drop detected at: 9:46:21.2~9:46:31.14, but audio is stable! !--> Audio unstable at keyframe: 9:46:31.5, trying next |/ Extracting chunk #29: 9:46:32.6 to 9:46:35.6 (L: 0:00:03.0) !--> Audio unstable at keyframe: 9:46:47.5, trying next !--> Audio unstable at keyframe: 9:46:48.5, trying next ?-> Video drop detected at: 9:46:49.5~9:46:56.14, but audio is stable! |/ Extracting chunk #30: 9:46:56.4 to 9:47:00.0 (L: 0:00:03.6) !--> Audio unstable at keyframe: 9:47:20.3, trying next |/ Extracting chunk #31: 9:47:21.7 to 9:47:35.1 (L: 0:00:13.4) !--> Audio unstable at keyframe: 9:47:44.2, trying next ?-> Video drop detected at: 9:51:35.7~9:51:45.34, but audio is stable! |/ Extracting chunk #32: 9:47:45.3 to 9:51:46.0 (L: 0:04:00.7) !--> Audio unstable at keyframe: 9:51:51.4, trying next !--> Audio unstable at keyframe: 9:51:52.5, trying next !--> Audio unstable at keyframe: 9:51:53.6, trying next !--> Audio unstable at keyframe: 9:51:59.2, trying next !--> Audio unstable at keyframe: 9:52:16.3, trying next WARNING! Last audio frame>video frame: 9:52:27.71>9:52:17.73, ignoring audio! ?-> Video drop detected at: 9:52:18.7~9:52:31.17, but audio is stable! |/ Extracting chunk #33: 9:52:31.4 to 9:52:33.6 (L: 0:00:02.2) !--> Audio unstable at keyframe: 9:52:50.4, trying next |/ Extracting chunk #34: 9:52:51.6 to 9:52:58.7 (L: 0:00:07.1) !--> Audio unstable at keyframe: 9:53:13.8, trying next ?-> Video drop detected at: 9:53:18.6~9:53:19.85, but audio is stable! |/ Extracting chunk #35: 9:53:14.9 to 9:53:19.9 (L: 0:00:05.0) !--> Audio unstable at keyframe: 9:53:28.1, trying next !--> Audio unstable at keyframe: 9:53:29.3, trying next ?-> Video drop detected at: 9:53:37.2~9:53:51.17, but audio is stable! |/ Extracting chunk #36: 9:53:35.5 to 9:53:59.3 (L: 0:00:23.8) !--> Audio unstable at keyframe: 9:54:16.6, trying next !--> Audio unstable at keyframe: 9:54:35.0, trying next |/ Extracting chunk #37: 9:54:36.1 to 9:54:39.3 (L: 0:00:03.2) ?-> Video drop detected at: 9:54:40.9~9:54:47.16, but audio is stable! !--> Audio unstable at keyframe: 9:54:47.2, trying next |/ Extracting chunk #38: 9:54:48.4 to 9:54:49.6 (L: 0:00:01.2) !--> Audio unstable at keyframe: 9:55:05.8, trying next |/ Extracting chunk #39: 9:55:07.1 to 9:55:17.3 (L: 0:00:10.2) !--> Audio unstable at keyframe: 9:55:30.9, trying next |/ Extracting chunk #40: 9:55:32.0 to 9:55:35.1 (L: 0:00:03.1) !--> Audio unstable at keyframe: 9:55:46.2, trying next |/ Extracting chunk #41: 9:55:47.3 to 9:55:49.7 (L: 0:00:02.4) !--> Audio unstable at keyframe: 9:56:02.0, trying next |/ Extracting chunk #42: 9:56:03.1 to 11:15:01.7 (L: 1:18:58.6) !--> Audio unstable at keyframe: 11:15:18.5, trying next |/ Extracting chunk #43: 11:15:19.6 to 11:35:20.2 (L: 0:20:00.6) !--> Audio unstable at keyframe: 11:35:22.0, trying next |/ Extracting chunk #44: 11:35:23.1 to 12:21:03.8 (L: 0:45:40.7) !--> Audio unstable at keyframe: 12:21:16.7, trying next |/ Extracting chunk #45: 12:21:17.8 to 13:46:58.6 (L: 1:25:40.8) !--> Audio unstable at keyframe: 13:47:05.0, trying next !--> Audio unstable at keyframe: 13:47:06.0, trying next ?-> Video drop detected at: 13:47:17.9~13:47:19.32, but audio is stable! |/ Extracting chunk #46: 13:47:12.1 to 13:47:22.6 (L: 0:00:10.5) !--> Audio unstable at keyframe: 13:47:35.4, trying next !--> Audio unstable at keyframe: 13:47:36.4, trying next WARNING! Last audio frame>video frame: 13:47:41.16>13:47:38.40, ignoring audio! ?-> Video drop detected at: 13:47:38.9~13:47:43.32, but audio is stable! !--> Audio unstable at keyframe: 13:47:43.8, trying next |/ Extracting chunk #47: 13:47:44.9 to 13:47:48.2 (L: 0:00:03.3) !--> Audio unstable at keyframe: 13:48:00.7, trying next ?-> Video drop detected at: 13:48:03.8~13:48:07.66, but audio is stable! |/ Extracting chunk #48: 13:48:01.8 to 14:13:28.1 (L: 0:25:26.3) !--> Audio unstable at keyframe: 14:13:40.4, trying next |/ Extracting chunk #49: 14:13:41.5 to 15:00:24.7 (L: 0:46:43.2) ?-> Video drop detected at: 15:00:26.2~15:00:31.50, but audio is stable! !--> Audio unstable at keyframe: 15:00:32.2, trying next |/ Extracting chunk #50: 15:00:33.3 to 15:06:18.7 (L: 0:05:45.4) ?-> Video drop detected at: 15:06:20.3~15:06:23.55, but audio is stable! !--> Audio unstable at keyframe: 15:06:24.4, trying next |/ Extracting chunk #51: 15:06:25.5 to 15:10:10.8 (L: 0:03:45.3) !--> Audio unstable at keyframe: 15:10:17.5, trying next |/ Extracting chunk #52: 15:10:18.6 to 15:14:45.4 (L: 0:04:26.8) ?-> Video drop detected at: 15:14:47.1~15:14:55.61, but audio is stable! !--> Audio unstable at keyframe: 15:14:56.1, trying next |/ Extracting chunk #53: 15:14:57.2 to 15:15:53.9 (L: 0:00:56.7) !--> Audio unstable at keyframe: 15:16:01.1, trying next |/ Extracting chunk #54: 15:16:02.2 to 15:16:58.5 (L: 0:00:56.3) !--> Audio unstable at keyframe: 15:17:05.6, trying next |/ Extracting chunk #55: 15:17:06.7 to 15:18:03.5 (L: 0:00:56.8) !--> Audio unstable at keyframe: 15:18:11.1, trying next |/ Extracting chunk #56: 15:18:12.2 to 15:19:50.3 (L: 0:01:38.1) !--> Audio unstable at keyframe: 15:20:02.9, trying next |/ Extracting chunk #57: 15:20:04.0 to 15:22:18.0 (L: 0:02:14.0) !--> Audio unstable at keyframe: 15:22:24.9, trying next |/ Extracting chunk #58: 15:22:26.0 to 15:28:46.2 (L: 0:06:20.2) !--> Audio unstable at keyframe: 15:28:58.7, trying next |/ Extracting chunk #59: 15:28:59.8 to 15:29:40.1 (L: 0:00:40.3) !--> Audio unstable at keyframe: 15:29:46.6, trying next |/ Extracting chunk #60: 15:29:47.7 to 15:30:05.5 (L: 0:00:17.8) !--> Audio unstable at keyframe: 15:30:18.1, trying next |/ Extracting chunk #61: 15:30:19.2 to 15:45:35.0 (L: 0:15:15.8) ?-> Video drop detected at: 15:45:36.5~15:45:43.73, but audio is stable! !--> Audio unstable at keyframe: 15:45:44.3, trying next |/ Extracting chunk #62: 15:45:45.4 to 15:54:40.7 (L: 0:08:55.3) !--> Audio unstable at keyframe: 15:54:48.7, trying next |/ Extracting chunk #63: 15:54:49.8 to 15:55:10.8 (L: 0:00:21.0) !--> Audio unstable at keyframe: 15:55:23.1, trying next |/ Extracting chunk #64: 15:55:24.2 to 15:58:54.5 (L: 0:03:30.3) !--> Audio unstable at keyframe: 15:59:04.8, trying next |/ Extracting chunk #65: 15:59:05.9 to 16:04:16.3 (L: 0:05:10.4) !--> Audio unstable at keyframe: 16:04:28.7, trying next |/ Extracting chunk #66: 16:04:29.8 to 16:07:06.1 (L: 0:02:36.3) !--> Audio unstable at keyframe: 16:07:12.8, trying next |/ Extracting chunk #67: 16:07:13.9 to 16:07:20.9 (L: 0:00:07.0) ?-> Video drop detected at: 16:07:22.5~16:07:27.76, but audio is stable! !--> Audio unstable at keyframe: 16:07:28.0, trying next ?-> Video drop detected at: 16:14:15.0~16:14:15.76, but audio is stable! |/ Extracting chunk #68: 16:07:29.1 to 16:19:24.1 (L: 0:11:55.0) !--> Audio unstable at keyframe: 16:19:27.8, trying next ?-> Video drop detected at: 16:19:25.7~16:19:27.80, but audio is stable! |/ Extracting chunk #69: 16:19:28.9 to 16:20:54.7 (L: 0:01:25.8) !--> Audio unstable at keyframe: 16:21:07.2, trying next |/ Extracting chunk #70: 16:21:08.3 to 16:30:39.6 (L: 0:09:31.3) !--> Audio unstable at keyframe: 16:30:51.7, trying next |/ Extracting chunk #71: 16:30:52.8 to 16:33:13.0 (L: 0:02:20.2) ?-> Video drop detected at: 16:33:14.6~16:33:19.74, but audio is stable! !--> Audio unstable at keyframe: 16:33:19.9, trying next |/ Extracting chunk #72: 16:33:21.0 to 16:39:35.9 (L: 0:06:14.9) ?-> Video drop detected at: 16:39:37.5~16:39:43.80, but audio is stable! !--> Audio unstable at keyframe: 16:39:44.2, trying next |/ Extracting chunk #73: 16:39:45.3 to 16:41:08.4 (L: 0:01:23.1) ?-> Video drop detected at: 16:41:10.0~16:41:11.80, but audio is stable! !--> Audio unstable at keyframe: 16:41:11.9, trying next |/ Extracting chunk #74: 16:41:13.0 to 16:46:07.4 (L: 0:04:54.4) ?-> Video drop detected at: 16:46:09.0~16:46:15.79, but audio is stable! !--> Audio unstable at keyframe: 16:46:16.6, trying next |/ Extracting chunk #75: 16:46:17.7 to 16:47:43.0 (L: 0:01:25.3) !--> Audio unstable at keyframe: 16:47:55.8, trying next |/ Extracting chunk #76: 16:47:56.9 to 16:48:51.6 (L: 0:00:54.7) !--> Audio unstable at keyframe: 16:48:58.4, trying next |/ Extracting chunk #77: 16:48:59.5 to 16:52:54.2 (L: 0:03:54.7) !--> Audio unstable at keyframe: 16:53:06.5, trying next ?-> Video drop detected at: 16:53:07.9~16:53:11.88, but audio is stable! |/ Extracting chunk #78: 16:53:07.6 to 16:54:02.4 (L: 0:00:54.8) ?-> Video drop detected at: 16:54:04.0~16:54:07.88, but audio is stable! !--> Audio unstable at keyframe: 16:54:08.2, trying next |/ Extracting chunk #79: 16:54:09.3 to 17:00:57.1 (L: 0:06:47.8) ?-> Video drop detected at: 17:00:58.6~17:01:03.88, but audio is stable! !--> Audio unstable at keyframe: 17:01:04.5, trying next |/ Extracting chunk #80: 17:01:05.6 to 17:04:42.5 (L: 0:03:36.9) ?-> Video drop detected at: 17:04:44.1~17:04:47.88, but audio is stable! !--> Audio unstable at keyframe: 17:04:48.2, trying next |/ Extracting chunk #81: 17:04:49.3 to 17:06:20.5 (L: 0:01:31.2) ?-> Video drop detected at: 17:06:22.1~17:06:23.88, but audio is stable! !--> Audio unstable at keyframe: 17:06:24.0, trying next |/ Extracting chunk #82: 17:06:25.1 to 17:10:49.0 (L: 0:04:23.9) ?-> Video drop detected at: 17:10:50.6~17:10:55.88, but audio is stable! !--> Audio unstable at keyframe: 17:10:56.2, trying next |/ Extracting chunk #83: 17:10:57.3 to 17:16:30.5 (L: 0:05:33.2) ?-> Video drop detected at: 17:16:32.1~17:16:39.88, but audio is stable! !--> Audio unstable at keyframe: 17:16:40.0, trying next |/ Extracting chunk #84: 17:16:41.1 to 17:19:11.4 (L: 0:02:30.3) !--> Audio unstable at keyframe: 17:19:23.9, trying next |/ Extracting chunk #85: 17:19:25.0 to 17:23:25.8 (L: 0:04:00.8) !--> Audio unstable at keyframe: 17:23:37.3, trying next |/ Extracting chunk #86: 17:23:38.4 to 17:27:21.2 (L: 0:03:42.8) ?-> Video drop detected at: 17:27:22.7~17:27:27.86, but audio is stable! !--> Audio unstable at keyframe: 17:27:28.5, trying next |/ Extracting chunk #87: 17:27:29.6 to 17:31:26.7 (L: 0:03:57.1) ?-> Video drop detected at: 17:31:28.2~17:31:35.88, but audio is stable! !--> Audio unstable at keyframe: 17:31:36.1, trying next |/ Extracting chunk #88: 17:31:37.2 to 17:32:38.3 (L: 0:01:01.1) !--> Audio unstable at keyframe: 17:32:51.0, trying next |/ Extracting chunk #89: 17:32:52.1 to 17:35:00.0 (L: 0:02:07.9) !--> Audio unstable at keyframe: 17:35:07.2, trying next |/ Extracting chunk #90: 17:35:08.3 to 17:41:43.1 (L: 0:06:34.8) !--> Audio unstable at keyframe: 17:41:55.4, trying next |/ Extracting chunk #91: 17:41:56.5 to 17:43:28.4 (L: 0:01:31.9) ?-> Video drop detected at: 17:43:30.0~17:43:35.88, but audio is stable! !--> Audio unstable at keyframe: 17:43:36.2, trying next |/ Extracting chunk #92: 17:43:37.3 to 17:46:40.4 (L: 0:03:03.1) !--> Audio unstable at keyframe: 17:46:52.2, trying next |/ Extracting chunk #93: 17:46:53.3 to 17:47:29.7 (L: 0:00:36.4) ?-> Video drop detected at: 17:47:31.2~17:47:35.92, but audio is stable! !--> Audio unstable at keyframe: 17:47:36.8, trying next |/ Extracting chunk #94: 17:47:37.9 to 17:54:43.5 (L: 0:07:05.6) !--> Audio unstable at keyframe: 17:54:50.7, trying next |/ Extracting chunk #95: 17:54:51.8 to 17:59:36.1 (L: 0:04:44.3) !--> Audio unstable at keyframe: 17:59:47.9, trying next |/ Extracting chunk #96: 17:59:49.0 to 18:01:19.3 (L: 0:01:30.3) !--> Audio unstable at keyframe: 18:01:31.9, trying next |/ Extracting chunk #97: 18:01:33.0 to 18:02:16.2 (L: 0:00:43.2) ?-> Video drop detected at: 18:02:17.8~18:02:23.92, but audio is stable! !--> Audio unstable at keyframe: 18:02:24.0, trying next |/ Extracting chunk #98: 18:02:25.1 to 18:02:42.2 (L: 0:00:17.1) ?-> Video drop detected at: 18:02:43.7~18:02:47.92, but audio is stable! !--> Audio unstable at keyframe: 18:02:48.2, trying next |/ Extracting chunk #99: 18:02:49.3 to 18:03:06.3 (L: 0:00:17.0) ?-> Video drop detected at: 18:03:07.9~18:03:11.92, but audio is stable! !--> Audio unstable at keyframe: 18:03:12.2, trying next |/ Extracting chunk #100: 18:03:13.3 to 18:03:40.4 (L: 0:00:27.1) !--> Audio unstable at keyframe: 18:03:47.0, trying next |/ Extracting chunk #101: 18:03:48.1 to 18:06:50.2 (L: 0:03:02.1) !--> Audio unstable at keyframe: 18:06:56.6, trying next |/ Extracting chunk #102: 18:06:57.7 to 18:13:48.7 (L: 0:06:51.0) !--> Audio unstable at keyframe: 18:13:55.3, trying next ?-> Video drop detected at: 18:15:03.1~18:15:03.96, but audio is stable! |/ Extracting chunk #103: 18:13:56.4 to 18:17:24.5 (L: 0:03:28.1) !--> Audio unstable at keyframe: 18:17:31.9, trying next |/ Extracting chunk #104: 18:17:33.0 to 18:17:52.3 (L: 0:00:19.3) !--> Audio unstable at keyframe: 18:18:05.0, trying next |/ Extracting chunk #105: 18:18:06.1 to 18:20:23.3 (L: 0:02:17.2) !--> Audio unstable at keyframe: 18:20:33.0, trying next |/ Extracting chunk #106: 18:20:34.1 to 18:20:44.1 (L: 0:00:10.0) !--> Audio unstable at keyframe: 18:20:51.2, trying next |/ Extracting chunk #107: 18:20:52.3 to 18:24:00.2 (L: 0:03:07.9) !--> Audio unstable at keyframe: 18:24:12.3, trying next |/ Extracting chunk #108: 18:24:13.4 to 18:24:32.3 (L: 0:00:18.9) !--> Audio unstable at keyframe: 18:24:44.3, trying next |/ Extracting chunk #109: 18:24:45.4 to 18:36:20.7 (L: 0:11:35.3) !--> Audio unstable at keyframe: 18:36:24.0, trying next ?-> Video drop detected at: 18:36:22.3~18:36:23.95, but audio is stable! |/ Extracting chunk #110: 18:36:25.1 to 18:36:53.3 (L: 0:00:28.2) !--> Audio unstable at keyframe: 18:36:56.0, trying next ?-> Video drop detected at: 18:36:54.9~18:36:55.95, but audio is stable! |/ Extracting chunk #111: 18:36:57.1 to 18:37:57.9 (L: 0:01:00.8) !--> Audio unstable at keyframe: 18:38:10.4, trying next |/ Extracting chunk #112: 18:38:11.5 to 18:39:18.8 (L: 0:01:07.3) !--> Audio unstable at keyframe: 18:39:28.9, trying next |/ Extracting chunk #113: 18:39:30.0 to 18:46:52.8 (L: 0:07:22.8) !--> Audio unstable at keyframe: 18:46:59.5, trying next |/ Extracting chunk #114: 18:47:00.6 to 18:49:44.4 (L: 0:02:43.8) ?-> Video drop detected at: 18:49:46.0~18:49:51.93, but audio is stable! !--> Audio unstable at keyframe: 18:49:52.4, trying next ?-> Video drop detected at: 18:54:39.0~18:54:39.93, but audio is stable! WARNING! pts/dts N/A at frames: 18:59:07.9, 18:59:07.9 |/ Extracting chunk #115: 18:49:53.5 to 18:59:07.9 (L: 0:09:14.4) |/ Merging chunks -> 349834500000.flv__done__.mp4 The Operation Completed Successfully! |/ Waiting for audio scan to finish . . . e:\VLCPortable>kvf -s12 349834500000.flv__done__.mp4 KrzYVideoFixer v1.05 by Mr_KrzYch00 -> Detecting a minimum of 12 missing frames! ?-> Video drop detected at: 7:16:52.9~7:16:55.59, but audio is stable! |/ Extracting chunk #01: 0 to 8:52:21.7 (L: 8:52:21.7) !--> Audio unstable at keyframe: 8:52:31.5, trying next !--> Audio unstable at keyframe: 8:52:32.2, trying next |/ Extracting chunk #02: 8:52:33.4 to 8:52:45.5 (L: 0:00:12.1) !--> Audio unstable at keyframe: 8:52:47.1, trying next !--> Audio unstable at keyframe: 8:52:47.2, trying next !--> Audio unstable at keyframe: 8:53:03.0, trying next ?-> Video drop detected at: 8:52:51.0~8:53:02.95, but audio is stable! ?-> Video drop detected at: 12:43:59.6~12:44:01.04, but audio is stable! ?-> Video drop detected at: 12:44:09.9~12:44:13.81, but audio is stable! ?-> Video drop detected at: 15:07:00.4~15:07:01.25, but audio is stable! ?-> Video drop detected at: 15:44:16.2~15:44:20.19, but audio is stable! ?-> Audio drop detected at: 16:54:20.6, but video is stable! ?-> Video drop detected at: 17:02:18.6~17:02:19.43, but audio is stable! ?-> Video drop detected at: 17:39:59.2~17:40:00.16, but audio is stable! WARNING! pts/dts N/A at frames: 17:44:28.1, 17:44:28.1 |/ Extracting chunk #03: 8:53:04.1 to 17:44:28.1 (L: 8:51:24.0) |/ Merging chunks -> 349834500000.flv__done__.mp4__done__.mp4 The Operation Completed Successfully! |/ Waiting for audio scan to finish . . . e:\VLCPortable>kvf -s12 349834500000.flv__done__.mp4__done__.mp4 KrzYVideoFixer v1.05 by Mr_KrzYch00 -> Detecting a minimum of 12 missing frames! ?-> Video drop detected at: 7:16:52.9~7:16:55.59, but audio is stable! ?-> Video drop detected at: 12:43:29.8~12:43:31.20, but audio is stable! ?-> Video drop detected at: 12:43:40.1~12:43:43.97, but audio is stable! ?-> Video drop detected at: 15:06:30.6~15:06:31.41, but audio is stable! ?-> Video drop detected at: 15:43:46.4~15:43:50.35, but audio is stable! ?-> Audio drop detected at: 16:53:50.7, but video is stable! ?-> Video drop detected at: 17:01:48.8~17:01:49.59, but audio is stable! ?-> Video drop detected at: 17:39:29.4~17:39:30.32, but audio is stable! WARNING! pts/dts N/A at frames: 17:43:58.2, 17:43:58.3 Video file is not damaged! The Operation Completed Successfully! |/ Waiting for audio scan to finish . . . e:\VLCPortable> ------------------------------------------------------------------- Help switch: KrzYVideoFixer v1.05 by Mr_KrzYch00 Uses FFPROBE and FFMPEG to analyse and automatically remove corrupted video parts from video file. The corruption usually consists of video stream drops that may appear as still frames, video hangs, video time jumping ahead, YouTube converter infinite processing error etc. Good to scan FLV/RTSP stream files for corruptions. This operation is lossless for video parts that are not corrupted by using stream copy. By default the program detects video errors in a minimum of 1 second range after last key frame and has a senitivity of the difference between first and 2nd frame multiplied by 20 (usually 0.8s for 25fps), meaning if there are at least 20~21 frames missing and the chunk after first key frame found after broken video part is at least 1 second long the program will try to recover this video chunk. You can use these command line switches: -h - displays this help message, -f - force create mp4 file when there were no corruptions, -n - do not process anything just display stats, -dts - disable copying ts, some damaged streams may require it, -ascn - scan audio instead of video, may yeld different results, -ia - ignore audio stability scanning on test chunks, -s# - sensitivity, number of missing frames to detect (d:20), -t# - minimum chunk length to recover, in seconds (d:1), -u# - update interval for displaying analysing message (d:auto). Usage Make sure You have ffmpeg and ffprobe in the same directory as this program, in windows' PATH or in linux' /bin then run this command: kvf [input_file] The program will save the output file as input_file__done__.mp4 For more information refer to http://virtual.4my.eu/KrzYVideoFixer/readme.txt