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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > HDTV / DVB / TiVo
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th February 2008, 09:41   #1  |  Link
hkazemi
Registered User
 
Join Date: Jan 2008
Posts: 63
Library of broken mpeg2 transport stream .ts samples

I think it would be a good idea to create a collection, a library, of broken mpeg2 transport stream .ts samples.

The samples would be cut from the full stream without any editing and pre-processing, and kept under 30 seconds for both space and copyright reasons. (Longer samples could be made if that was the only way to demonstrate the error.) The majority of the samples would be real-world captures, especially from ATSC and DVB over the air broadcasts.

The intended use of this collection would be to provide developers and testers of MPEG2, ATSC, and DVB tools a list of 'known bad' files that they should attempt to be able to repair or handle gracefully. The solutions the authors developed would ideally go into open source stream repair tools meant for the better handling of recorded broadcasts. At present, there is a vacuum amongst open-source tools capable of handling broken streams, and no single existing tool (open source, freeware, or payware) has a complete fix for broken streams.

From what I gather amongst forum posts here, on AVSForum, on the VideoRedo forums, and on Videohelp.com, the best tools for repairing streams and dealing with sync issues seem to be:
1.) mpeg2repair (Wizziwig/mwilczyn) (free, closed source) (low level stream repairs + optional turning of corrupt macroblocks all black)
2.) VideoRedo Plus/TVSuite (DanR) (15 day trial, $50/$75) (esp. the QuickStream Fix feature; higher level stream repairs)
3.) MPEG StreamClip (squared5) (free, closed source)
4.) xport.exe (drmpeg / dr1394) (free, open source) (.ts demuxer)
5.) AC3 Cutter (GaveUp) (free, open source) (for patching AC3 bitrate headers only, not for cutting)

As it stands, patches to handle broken streams and broken mpegs have all been added piece-by-piece to these tools, and other tools as well such as DGIndex/DGDECODE (neuron2).

Another goal is to assist in finding ways to more elegantly handle different types of stream corruption. This includes corrupt macroblocks, audio glitches (pops/blips), and loss of sync either in the original file, or when demuxed. Here are some ideas:

1.) for AC3 substreams, this means figuring out how to properly handle concatenated audio, as is sometimes seen when the main program is 5.1 AC3 with 2.0 stereo AC3 for the commercials. The changing bitrate appears to throw off many container formats (incl MKV) (or at least the existing tools used to mux the AC3 audio into the containers). (GaveUp's AC3 Cutter is a tool that can patch the bitrate headers to workaround sync issues caused by commercials in a .ts having different bitrates from the rest of the stream.)
Note: this changing audio bitrate may also be usable as a way to automatically detect commercials, in addition to volume level changes, black frames, and frequent scene changes.

2.) AC3 streams may also be repairable by first silencing the damaged audio section and then interpolating the audio from the good samples before and after the damaged area.

3.) in streams with multiple audio tracks (e.g. both a 5.1 and a 2.0 audio channel, the damaged AC3 packet may only be affecting that piece of one channel, so the proper audio may be extracted from the other channel and merged into the desired channel. This would cause a loss of some information (if going from 2.0 to 5.1) but would probably be less obvious than complete audio silence.

4.) for bad macroblocks, an idea is to use some of the MV tools used in motion compensated deinterlacing (see McBob or McBob) to interpolate the corrupted blocks from nearby blocks on the same frame (spatial interpolation) and from equivalent blocks on prior or subsequent frames (temporal interpolation). I think this would be easiest to do on B frames, then P frames. I think I frames would be the hardest, as they are likely to show a scene change...a thorough scene search might help here to find other I frames likely to be of the same scene.

5.) another repair idea is to merge multiple damaged captures of the same content. This can work when the damaged areas are different on each capture, as is likely in broadcast content. This applies to both the audio and video streams.

The concepts outlined above could be expanded to other stream types like H.264/AVC streams, with a subsection in the library for each stream type. If written as open source tools, the benefits would help projects help one-another, from making HDTV more reliable under MythTV, to better transcodes through Avisynth to x264.

Does anyone know of such a broken mpeg collection?
Any further thoughts on this?
hkazemi is offline   Reply With Quote
Old 23rd February 2008, 23:17   #2  |  Link
hkazemi
Registered User
 
Join Date: Jan 2008
Posts: 63
Collection
https://netfiles.umn.edu/users/kaze0...nstreamlibrary

Crashes DGAVC preview:
http://neuron2.net/board/viewtopic.php?t=1085

Many field order transitions (poor signal quality, processed by mpeg2repair and videoredo):
https://netfiles.umn.edu/users/kaze0...ts?uniq=r0l69t
hkazemi is offline   Reply With Quote
Old 24th February 2008, 04:38   #3  |  Link
pc_speak
Old Batch Hacker
 
Join Date: Oct 2006
Location: At Home
Posts: 78
All sorts of files.
http://www1.mplayerhq.hu/MPlayer/samples/
pc_speak is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:13.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.