PDA

View Full Version : Pre-processing DVB-T captures?


evilclive
2nd April 2007, 02:05
I've been using a Freecom UK DVB-T USB stick to record TV programmes. The Freeview signal is never perfect when it comes down the aerial, but MPEG-2 error correction fixes any problems in playback.

However, if I try to demultiplex or transcode the recorded file, the audio wanders randomly out of synch.

After a lot of trial and error, I've found a method to produce an MPEG-2 file that remains in synch when transcoded:

[1] Use PVAStrumento's "Make PS" option to correct the MPEG-2 headers without demultiplexing the file.

[2] Use PVAStrumento to demultiplex the resulting file.

[3] Remultiplex it with TMPGEnc Plus (because DivX Converter works with multiplexed files).

I'm wondering whether all three steps are really required, or if there's a quicker way to achieve the same result.

LoRd_MuldeR
3rd April 2007, 00:33
Did you give ProjectX a try?

http://project-x.sourceforge.net/

evilclive
3rd April 2007, 22:59
Did you give ProjectX a try?

I very much doubt that will help.

The problem is that the MPEG-2 bitstream is being corrupted ever so slightly by the process of transmission and reception. Every so often I get weird anomalies, such as temporal errors in a GOP.

ProjectX streams the contents of a complete MUX to the hard disk, rather than demultiplexing it and streaming just one digital channel. I'd be very surprised if the recording stream of ProjectX doesn't contain exactly the same bit errors as the recording stream of my bog-standard DVB TV recorder.

In principle, PVAStrumento is the right tool to repair problems including incorrect time-stamps on the audio stream. A standard MPEG-2 player can do this automatically, simply by pairing off video and audio frames based on their proximity to each other within a MPEG-2 file.

Once the file is demultiplexed, this method of synchronisation becomes impossible. I need to the PVAStrumento's "Make PS" option to repair the MPEG-2 stream without demultiplexing it.

What I don't know, and haven't been able to discover by trial and error, is why I then need to demultiplex and remultiplex the supposedly repaired file, before I can bung it through a transcoder. Or indeed, if there's an option in PVAStrumento's complicated input box that would make these second and third steps unnecessary.

I forgot to say I'm a bit naughty, and I decline the option to discard entire GOPs whenever a frame contains an anomaly. I refuse to discard up to 18 video frames a time, when the MPEG-2 error correction can do a very good job of making the error unnoticeable.

Pookie
4th April 2007, 05:05
So you're capturing to an mpeg2 TS file ? You can automate the repair process pretty easily.

.NET 2.0 Required

http://tinyurl.com/26bg5x/mpeg2repair.zip
http://www.shuberg.org/utils/mpeg2repairCLI.zip
http://tinyurl.com/2cckyp/mjpegtools_180_P4_Win32_Muxxi.7z
http://alloy.mit.edu/alloy30/cygwin1.dll
http://jsoto.posunplugged.com/tools/delaycut_1212_exe.zip

Unzip, put all files into same folder




@echo off

:: This command alone might be enough -
mpeg2repairCLI.exe /R output.ts input.ts

:: Demux
xport output.ts 1 1 1

:: Fix Audio Errors if they Exist
delaycut -fixcrc silence -auto -out output.ac3 bits0001.mpa

:: Multiplex to Mpeg2-PS

mplex -f 3 -b 1800 -r 19200 -o output.mpg bits0001.mpv output.ac3


You might want to download the 2 week eval of VideoRedo and see if it will fix problems at the frame level. Also, I believe PVAstrumento has an automated method via the command line app Cpvas.exe . You'll need to create a template (or an "add to job" file) via the GUI. The default extension is .AJB - Look around for syntax, I don't know the app very well at all.

Contains the following:

offeryn pvas job v002017 # DO NOT DELETE THIS LINE
# Job Description
$JOB
# makeps <infile> <outfile>
makeps "E:\input.ts" "E:\output.mpg"
# Job Parameters
$PARMS
# program options
beep 1
loglevel 2
printvstats 1
numberall 1
fixstart 1
sync 1
dropgop 0
dropwronggop 0
ptsjitter 10
relaxpts 1
droplonger 0
strongaudio 1
TSfallback 1
relaxedts 1
dropscrambledts 0
setbr 1
setvbr 1
setavg 1
clearcdf 1
drope4 0
no_m2check 1
adjusttc 1
packsize 2048
splitvideoFMT 0
usevdrmarks 0
splitsize 0
overlap 1
spliteven 1
splitaudioFMT 0
splitontrack 0
audiooffsetacc 1
mp2beautify 1
mp2strictlen 1
vdrac3hack 0
goppts 1
writeidd 0
writeinfo 1
filenamedelay 1
$ENDS # end section

chongy5
8th April 2007, 11:09
What software are you using to record, just out of interest?

SeeMoreDigital
8th April 2007, 12:33
If your captures are MPEG-2 .TS files, have you tried running them thru' MPEG-2 repair (to correct any .TS anomalies) and then thru' HDTVtoMPEG2 to obtain an .MPG file?

RedDwarf1
9th April 2007, 03:47
Looking at this from "the other end"

Why not just get a better Freeview receiver? Freecom are known to have problems receiving/locking the signal. You could probably get an inexpensive one off eBay.
Check your aerial as well. Then all the messing around should be unnecessary.

Neuman
10th April 2007, 09:58
I have success with using just projectX.

But then agian I don't live in UK. Still my signal isn't perfect either. Try giving it a chance.