Software to repair broken MPEG stream?
Hey folks
i have encoded a few vhs tapes to mpegts with an adtec edje2000 realtime network video encoder. The encoder works great and produces great quality mpeg video that is compatiable with dvd format without re-encoding the original capture i used ffmpeg Code:
ffmpeg udp://224.0.1.250:2000 -format mpegts -acodec copy -vcodec copy tape1.ts Code:
Input #0, mpegts, from 'tape.ts': I cut up the file with mpegstreamclip to dump the transports stream into the different mpg files for each chapter. I made sure "fix timecode breaks" and "fix stream with data breaks" were both selected. here is the ffprobe for the files Code:
Input #0, mpeg, from './track01.mpg': i tried to process the file with dvdauthor but got this Code:
#VIDEO_FORMAT=NTSC dvdauthor -o dvd/ -t ./track01.mpg so i fixed it with mencoder Code:
mencoder ../track01.mpg -of mpeg -oac copy -ovc copy -mpegopts format=dvd:tsaf -vf harddup -o ./track01_copy.mpg Code:
Input #0, mpeg, from 'track01_copy.mpg': Code:
VIDEO_FORMAT=NTSC dvdauthor -o dvd/ -t ./track01_copy.mpg Code:
VIDEO_FORMAT=NTSC dvdauthor -o dvd/ -T If i burn the dvd or play in VLC the are a some spots where the video is still damaged and freezes because and the audio/video becomes out of sync. Is there any software that can sanitize a mpeg ts/ps and replace areas of damaged video with blank video or something? seems as all programs can detect the errors, but none can handle them? |
Take a look at Restream. Some of its "fixer" abilities are mentioned here: Correct MPEG Field Order (Fix MPEG with Restream)
Download here: http://www.digitalfaq.com/forum/vide...eg-repair.html It will probably stay glitchy-looking, however. To fully remove or hide stream errors, you'll have to manually repaint the bad frames. No software exists to automatically fix this, because it would honestly take some kind of AI (artificial intelligence) to be able to determine what is "noise" vs what is simply a busy frame of content. Another tool that works, with varying success, is PVAStrumento, a discontinued tool. (Official site.) All this one really does it drop video frames when the accompanying audio goes out of sync. That was a common problem in past years, with certain stream sources (DVB) and really crappy MPEG-1/MPEG-2 capturing software (PowerVCR II, for example). |
I split the video into elementary streams with mpegstreamclip and ran the video through restreamer
I selected correct sequence extension length and reset timestamps remuxed shows the following Code:
$ mplex -f 8 -o 01_remuxed.mpg ./01.m2v ./01.mpa video plays smoother, but audio sync is bad perhaps worse after the point of damaged frames this is a sample of vlc errors Code:
00 motion_type at 0 1 EDIT i just reread your post. I dont have a real good understanding of mpeg2 isnt there a timecode in the mpeg2 that it can resync to? If theres a skipor if it see the same errors vlc sees, rewrite the bad frames with black frames? |
There are lot of ways to build MPEG streams, and not all of them are able to compensate for glitches. For example, a common problem caused by dropped frames during MPEG captures is audio sync, because the audio doesn't also drop. So you end up with a audio file that is longer than the video, yet muxed together as a complete mess.
Broadcasted long-GOP transport streams generally dump bad data and resume with in-sync content at the next good received packet. (However, from time to time, you will find low-budget channels or re-broadcast ops that use bad gear/methods, and can show a channel for hours out of sync!) Once a mess is created, you'd have to fix this manually. Or with a computer, using a kind of AI that doesn't yet exist, and can perform to the same level as a human. A common problem is also converting TS to program stream, which is known to muck up the a/v sync. That's the reason PVAStrumento was created, even if it did work poorly, and comes from an era where that was a bigger problem. The MPEG goes from bad to worse. You're not alone -- I ruined a video capture about 7 years ago, from live TV. At least you still have the original tape, and can make another attempt. From what I can gather in your first post, it looks like the unstable analog stream, possibly mixed with your choice of capture software/method, caused it. That's exactly how this used to happen, back in 2001-2004. Your capture appliance looks nice, so it may be mostly isolated to the computer hardware and capture software, as well as the already-mentioned lack of TBC (unstable analog input). How fast is this computer? MPEG encoding can really stress a CPU and system I/O (hard drive). That may be the cause of your drops. Did you read the Guide for Dropped Frames & Audio Sync Errors? That may be worth reading. Are you sure your gigabit ethernet is up to the task? Short CAT6 cables, for example, will help. Same for having a quality ethernet card in the computer. It's obvious you're getting lost data in the chain of hardware. It may simply be due to analog loss, where the TBC would fix it. Or it could be cumulative errors, between a mix of analog and computer (drives, CPU, ethernet, etc). And that's always the most frustrating type of error -- the accumulated ones. The only thing worse than that are cascading errors, which can look like cumulative errors early into troubleshooting. |
mr admin. thanks for the reply.
i spent my entire day goofin around. im gonna take a break from this until my TBC i just bought on ebay comes in the mail. I think im loosing data when the tracking on the vcr goes wacky and the encoder stops encoding. Also i am going to try a direct connection from the network encoder directly to the PC with a crossover cable. The udp multicast traffic put out by this thing is massive and my switch might not be up to the task ( IGMP ). the tbc is a sony mpu-f100a, hope it works |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.