Log in

View Full Version : How to fix(normalize) nonstandard DVB(MPEG2( stream


Anakunda
6th March 2010, 12:03
hi, one TV channel produces stream in unusual format
Despite that I can play it raw OK, there's many problems with A/V sync in conversion outputs
i dont know what is strange on it but it just makes problems on all recordings
is there a tool that can analyze the stream and fix it so that it can be processed by usual video processing tools

ronnylov
10th March 2010, 15:26
ProjectX is what I use.
But there are other alternatives like TS-Doctor or PVAStrumento.

Anakunda
11th March 2010, 07:26
OK, ProjectX doesnot solve this problem, but PVAstrumento does. Here's the list of alerts found in the stream by it. I wonder if there's a filter being able to correct this kind of alerts aswell (so that I won't have to preprocess nonstandart streams by PVAstrumento first)

PVAstrumento log:

***
*** PVAStrumento 2.1.0.22
*** running at 03-11-2010 07:18
***

Pre-Scanning input. May take some time.


Stream info for
G:\video\(pending)\2010 - Dispute Between Brothers.mpg

Found 1 video stream.
Found 1 MPEG audio stream.

VIDEO #1
Resolution 720 x 576 (full D1)
Aspect ratio is 4:3
Frame rate 25.00 fps
Nominal bitrate 15000000 bps
VBV size 224 kB
First PTS: 00:00:00.904

MPEG AUDIO #1
MPEG1, Layer 2
stereo, sampled at 48.0 kHz.
Bitrate 192 kbps
Each frame contains 24.0 ms audio (576 bytes)
First PTS: 00:00:00.801


==SCANNING==
Input: G:\video\(pending)\2010 - Dispute Between Brothers.mpg
Closing starting GOP.
Aiming for sync at 00:00:00.984
Cutting audio.
Audio stream 1 now starts at 00:00:00.993
Video stream 1 now starts at 00:00:00.984
Audio Format of stream 1 changed at 00:00:01.881
Splitting output.
Last fileset:
304360 total bytes read
Video 1: 16 frames, 00:00:00.640
Audio 1: 27 frames, 00:00:00.648

Sync estimate at EOF:
MPEG Audio #1 : sync

Video statistics
================
GOP length (min/avg/max):
4 / 8 / 12 [frames]
78250 / 144254 / 210258 [Bytes]
GOP bitrate (min/avg/max):
3504 / 3708 / 3912 [kbps]

NEW AUDIO FORMAT on stream 1:
MPEG1, Layer 2
single channel, sampled at 48.0 kHz.
Bitrate 192 kbps
Each frame contains 24.0 ms audio (576 bytes)
First PTS: 00:00:01.881

Re-syncing.
Closing starting GOP.
Aiming for sync at 00:00:02.184
Cutting audio.
Audio stream 1 now starts at 00:00:02.193
Video stream 1 now starts at 00:00:02.184
ALERT> PTS jump in video
Closing starting GOP.
Aiming for sync at 00:00:02.193
Streamstart seems to be in (reasonable) sync:
Video 1 starts at 00:00:02.184
Audio 1 starts at 00:00:02.193

Audio Format of stream 1 changed at 00:03:42.777
Splitting output.
Last fileset:
86660020 total bytes read
Video 1: 5509 frames, 00:03:40.360
Audio 1: 9182 frames, 00:03:40.368

Sync estimate at EOF:
MPEG Audio #1 : sync

Video statistics
================
GOP length (min/avg/max):
6 / 11 / 15 [frames]
92694 / 175978 / 348638 [Bytes]
GOP bitrate (min/avg/max):
2000 / 2970 / 5980 [kbps]

NEW AUDIO FORMAT on stream 1:
MPEG1, Layer 2
stereo, sampled at 48.0 kHz.
Bitrate 192 kbps
Each frame contains 24.0 ms audio (576 bytes)
First PTS: 00:03:42.777

Re-syncing.
Closing starting GOP.
Aiming for sync at 00:03:43.104
Cutting audio.
Audio stream 1 now starts at 00:03:43.113
Video stream 1 now starts at 00:03:43.104
ALERT> PTS jump in video
Closing starting GOP.
Aiming for sync at 00:03:43.113
Streamstart seems to be in (reasonable) sync:
Video 1 starts at 00:03:43.104
Audio 1 starts at 00:03:43.113

Audio Format of stream 1 changed at 00:03:43.113
Splitting output.
Last fileset:
0 total bytes read

Sync estimate at EOF:
MPEG Audio #1 : sync

NEW AUDIO FORMAT on stream 1:
MPEG1, Layer 2
single channel, sampled at 48.0 kHz.
Bitrate 192 kbps
Each frame contains 24.0 ms audio (576 bytes)
First PTS: 00:03:43.113

Re-syncing.
Closing starting GOP.
Aiming for sync at 00:03:43.584
Cutting audio.
Audio stream 1 now starts at 00:03:43.593
Video stream 1 now starts at 00:03:43.584
ALERT> PTS jump in video
Closing starting GOP.
Aiming for sync at 00:03:43.593
Streamstart seems to be in (reasonable) sync:
Video 1 starts at 00:03:43.584
Audio 1 starts at 00:03:43.593

[ Found a GOP with more than 15 pics.
This is not DVD compliant, but many players accept it.
See summary for total number at end. ]
Video Format changed at 00:25:19.464
Splitting output.
Last fileset:
498241604 total bytes read
Video 1: 32395 frames, 00:21:35.800
Audio 1: 53992 frames, 00:21:35.808

Sync estimate at EOF:
MPEG Audio #1 : sync

Video statistics
================
GOP length (min/avg/max):
6 / 11 / 18 [frames]
98046 / 172865 / 350502 [Bytes]
GOP bitrate (min/avg/max):
1752 / 2884 / 5537 [kbps]

NEW VIDEO FORMAT
Resolution 720 x 576 (full D1)
Aspect ratio is 16:9
Frame rate 25.00 fps
Nominal bitrate 15000000 bps
VBV size 224 kB
First PTS: 00:25:19.384


Closing starting GOP.
Aiming for sync at 00:25:19.464
Cutting audio.
Audio stream 1 now starts at 00:25:19.473
Video stream 1 now starts at 00:25:19.464
Audio Format of stream 1 changed at 00:25:20.073
Splitting output.
Last fileset:
191736 total bytes read
Video 1: 10 frames, 00:00:00.400
Audio 1: 17 frames, 00:00:00.408

Sync estimate at EOF:
MPEG Audio #1 : sync

Video statistics
================
GOP length (min/avg/max):
10 / 10 / 10 [frames]
181794 / 181794 / 181794 [Bytes]
GOP bitrate (min/avg/max):
3635 / 3635 / 3635 [kbps]

NEW AUDIO FORMAT on stream 1:
MPEG1, Layer 2
stereo, sampled at 48.0 kHz.
Bitrate 192 kbps
Each frame contains 24.0 ms audio (576 bytes)
First PTS: 00:25:20.073

Re-syncing.
Closing starting GOP.
Aiming for sync at 00:25:20.424
Cutting audio.
Audio stream 1 now starts at 00:25:20.433
Video stream 1 now starts at 00:25:20.424
ALERT> PTS jump in video
Closing starting GOP.
Aiming for sync at 00:25:20.433
Streamstart seems to be in (reasonable) sync:
Video 1 starts at 00:25:20.424
Audio 1 starts at 00:25:20.433

Video Format changed at 00:32:46.104
Splitting output.
Last fileset:
188470496 total bytes read
Video 1: 11140 frames, 00:07:25.600
Audio 1: 18567 frames, 00:07:25.608

Sync estimate at EOF:
MPEG Audio #1 : sync

Video statistics
================
GOP length (min/avg/max):
6 / 11 / 18 [frames]
22538 / 187377 / 516062 [Bytes]
GOP bitrate (min/avg/max):
751 / 3220 / 6943 [kbps]

NEW VIDEO FORMAT
Resolution 720 x 576 (full D1)
Aspect ratio is 4:3
Frame rate 25.00 fps
Nominal bitrate 15000000 bps
VBV size 224 kB
First PTS: 00:32:46.024


Closing starting GOP.
Aiming for sync at 00:32:46.104
Cutting audio.
Audio stream 1 now starts at 00:32:46.113
Video stream 1 now starts at 00:32:46.104
Audio Format of stream 1 changed at 00:32:46.761
Splitting output.
Last fileset:
75564 total bytes read
Video 1: 7 frames, 00:00:00.280
Audio 1: 12 frames, 00:00:00.288

Sync estimate at EOF:
MPEG Audio #1 : sync

Video statistics
================
GOP length (min/avg/max):
7 / 7 / 7 [frames]
68502 / 68502 / 68502 [Bytes]
GOP bitrate (min/avg/max):
1957 / 1957 / 1957 [kbps]

NEW AUDIO FORMAT on stream 1:
MPEG1, Layer 2
single channel, sampled at 48.0 kHz.
Bitrate 192 kbps
Each frame contains 24.0 ms audio (576 bytes)
First PTS: 00:32:46.761

Re-syncing.
Closing starting GOP.
Aiming for sync at 00:32:46.944
Cutting audio.
Audio stream 1 now starts at 00:32:46.953
Video stream 1 now starts at 00:32:46.944
ALERT> PTS jump in video
Closing starting GOP.
Aiming for sync at 00:32:46.953
Streamstart seems to be in (reasonable) sync:
Video 1 starts at 00:32:46.944
Audio 1 starts at 00:32:46.953

Video Format changed at 00:53:22.344
Splitting output.
Last fileset:
458872420 total bytes read
Video 1: 30883 frames, 00:20:35.320
Audio 1: 51472 frames, 00:20:35.328

Sync estimate at EOF:
MPEG Audio #1 : sync

Video statistics
================
GOP length (min/avg/max):
6 / 11 / 18 [frames]
72486 / 166345 / 485994 [Bytes]
GOP bitrate (min/avg/max):
1590 / 2782 / 8479 [kbps]

NEW VIDEO FORMAT
Resolution 720 x 576 (full D1)
Aspect ratio is 16:9
Frame rate 25.00 fps
Nominal bitrate 15000000 bps
VBV size 224 kB
First PTS: 00:53:22.264


Closing starting GOP.
Aiming for sync at 00:53:22.344
Cutting audio.
Audio stream 1 now starts at 00:53:22.353
Video stream 1 now starts at 00:53:22.344
Audio Format of stream 1 changed at 00:53:23.241
Splitting output.
Last fileset:
295620 total bytes read
Video 1: 13 frames, 00:00:00.520
Audio 1: 22 frames, 00:00:00.528

Sync estimate at EOF:
MPEG Audio #1 : sync

Video statistics
================
GOP length (min/avg/max):
13 / 13 / 13 [frames]
282798 / 282798 / 282798 [Bytes]
GOP bitrate (min/avg/max):
4350 / 4350 / 4350 [kbps]

NEW AUDIO FORMAT on stream 1:
MPEG1, Layer 2
stereo, sampled at 48.0 kHz.
Bitrate 192 kbps
Each frame contains 24.0 ms audio (576 bytes)
First PTS: 00:53:23.241

Re-syncing.
Closing starting GOP.
Aiming for sync at 00:53:23.424
Cutting audio.
Audio stream 1 now starts at 00:53:23.433
Video stream 1 now starts at 00:53:23.424
ALERT> PTS jump in video
Closing starting GOP.
Aiming for sync at 00:53:23.433
Streamstart seems to be in (reasonable) sync:
Video 1 starts at 00:53:23.424
Audio 1 starts at 00:53:23.433

Last fileset:
2543808 total bytes read
Video 1: 154 frames, 00:00:06.160
Audio 1: 257 frames, 00:00:06.168

Sync estimate at EOF:
MPEG Audio #1 : sync

Video statistics
================
GOP length (min/avg/max):
10 / 11 / 12 [frames]
127426 / 184140 / 257410 [Bytes]
GOP bitrate (min/avg/max):
2548 / 3101 / 4290 [kbps]

++ INFO:
++ 21 GOP(s) with more than 15 frames were found
++ This is not "DVD-compliant"
++ It _may_ cause problems in DVD-authoring or
++ with some DVD players


Needed time for the job 00:00:45 (hh.mm.ss)

(Autosaving log to G:\video\(pending)\2010 - Dispute Between Brothers.mpg.txt)

ronnylov
15th March 2010, 10:37
PVAStrumento is like a filter that corrects the issues by cutting out the bad parts and aligning audio with video.
So the output file should be fixed from the detected errors.
Sometimes ProjectX does not fix it then I try PVAStumento or other tools.

Even that it says it may not be DVD compliant the chance is good that it still will work in most DVD players.
If you want to be sure that there are no errors then you can reencode your video to a new file using a video encoder.

Looking at the log file it seems to change audio format PVAStrumento is set to split the file when the format is changed. Also the video aspect ratio flag is changed (maybe a new program starts or there are commercial breaks using different formats). I think there may be a setting in ProjectX too that can split on format change but it may not be active as default in ProjectX.

Anyway I always process my recorded DVB files with projectx before further processing to clean out errors that may cause problems. It is still faster than the alternative to reencode the video to make it fully DVD compliant. But even if I am going to reencode it I still do this to avoid audio sync problems in the source file.

Anakunda
17th March 2010, 14:38
Thanks alot for all the useful info. Yet I have two questions to PVAStrumento:

1. Is the fixed video output format .pva lossy any way against the original? (in another words, is the output transcoded)
2. What's the difference between saving fixed video as pva and ps, is any of the two format "better" for further processing?

RocketJet
18th March 2010, 07:51
I think more programs recognize PS format than PVA format.

ronnylov
22nd March 2010, 10:23
PVA format is the format of some technotrend DVB-cards. The only reason to save in pva format would be if you want to use the hardware MPEG-2 decoder on the DVB-card to decode the video and output it on the video output.

1) No it is not transcoded but it is repacked into another container format.
http://www.fileinfo.com/extension/pva

2) ps (program stream) is more like a normal mpg file.

I always use the demux function to create elementary files and then I import them into another software like DVD authoring, muxing or transcoding. I do not hink the muxing function in pvastrumento is the best one.

Anakunda
27th March 2010, 14:47
Finally things are not as perfect as I thought. Most video outputs suffer slight A/V missync (although not as bad as before) and one movie even didnot keep audio to the end.
So PVAstrumento is not almighty, I'm still seeking the tool to fix this thoroughly spoiled streams. I really hate the channel but they sometime play a movie worth recording.
There's still chance to fix it since I can play raw recordings OK in common video player (A/V sync OK)

Anakunda
10th April 2010, 14:25
BINGO found finally a program called Womble MPEG Video Wizard DVD which can fix even this TV stream resisting all other methods used so far.
Today after about 3 months of seeking I have successfully encoded a DVB recording, wouldn't ever think video encoding is such a BIG alchemy.

Ghitulescu
11th April 2010, 06:44
Instead of searching for software solutions, better recheck your antenna (cables, etc.) - no software can correct hardware issues.

Anakunda
11th April 2010, 09:32
Instead of searching for software solutions, better recheck your antenna (cables, etc.) - no software can correct hardware issues.

I would agree with that if that wasnot case of just one TV channel (I have mentioned it already in the starting post), so I assume the stream saved to my disc is pretty the same as what the broadcaster broadcasts.

Ghitulescu
11th April 2010, 10:44
ok, some broadcasters do indeed make use of settings that some/most software do not understand but pose no problems to HW decoders (SAT boxes etc.).

Anakunda
11th April 2010, 10:53
Yep it's highly possible their streams are at edge of hw playability as they are overfilled with commercial breaks, announces, info titlebars and other

Ghitulescu
12th April 2010, 07:41
I meant there something else - the HW manufacturers do have access to all the specs available (they are obliged to), while most freeware authors cannot afford to buy them, thus obtaining the info either from public sources or by reverse engineering some products.

This has nothing to do with publicity banners and stuff.