Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
22nd February 2020, 02:27 | #1 | Link |
Registered User
Join Date: Jun 2006
Posts: 397
|
Can ffmpeg remux h264 while skipping bad frames?
Whether the problem is the raw h264 or the container frames, and ideally recovering as much as possible.
I thought maybe -err_detect can help, but it just allows everything through. Last edited by shae; 22nd February 2020 at 02:31. |
22nd February 2020, 16:13 | #3 | Link |
Registered User
Join Date: Jun 2006
Posts: 397
|
Any other tool that can help?
I have a video that mostly plays fine, but with a few bad spots that cause a freeze for a few seconds each. I'm hoping to cut out these, without reencoding. Last edited by shae; 22nd February 2020 at 17:24. |
22nd February 2020, 18:05 | #5 | Link |
Registered User
Join Date: Jun 2006
Posts: 397
|
It will surely be noticed, but after a broken segment I want to keep everything starting from the next semi-valid delta frame.
Anyway, turns out it can be done with Avidemux (though manually). For each good segment I set markers and direct-copied to a new file, then finally joined them all. Apparently copying raw frame data as-is is possible even when the range markers are on non-I frames. And a correction: it actually wasn't H264, it's MPEG4 part 2, maybe ASP. |
22nd February 2020, 19:43 | #6 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,990
|
I believe that Avidemux will re-encode just the partial decoded gops [also same for old MPeg2Cut2 and mpg2 files, long time since I used either one].
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
25th February 2020, 11:03 | #8 | Link | |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,099
|
Quote:
Neither AviDemux nor Mpeg2Cut2 can perform "Smart Rendering", i.e. just reencode the GOP where a cut point is requested. For MPEG2 the only free smart render solution is still Cuttermaran. And for H264 clips I am not aware of any free tools which can do this. A lot of commercial video editors like the offerings by Magix, Cyberlink, Pinnacle, Pegasys and others claim that they can do smart rendering for H.264 and even H.265, but several test reports revealed that this is not really true. For cutting H.264 clips at key frames there are several free solutions, but the only half way working solution for cutting at random frames is VidCutter. Looks like it has been abandoned, but I find it very useful. It works better with MP4 containers than with MKV, and it really helps to replace the included FFmpeg version with a current version. |
|
25th February 2020, 11:52 | #9 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,990
|
Quote:
Thanx Mani.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|