PDA

View Full Version : 1080p TS files- Merging & downsampling


gollum007
23rd April 2007, 15:12
Hiya,
I have a set of 9 1080p files in TS format, on which I'd like a little advice on merging & downsampling to 720p please :)
I've managed to separate out the audio & video components (H264 & AC3), and can merge those from each segment into a MKV file (My intended target format) without too many problems.

The first problem as such is the audio delay- The merged file has a slight, but noticable delay & I'm not entirely sure how to get rid of it. The original TS file complicates things a little here, as nothing I've found will demux it properly in one go- I've had to use Mencoder for the video & ProjectX for the audio.

Secondly, I would appreciate some advice on how to resize this down to 720p. I've never really tried resampling stuff before, especially HD, just encoding.

Finally- How do I merge them please? I suspect VirtualDub might do it, but not sure.

Cheers

-Gollum

Pookie
24th April 2007, 21:22
Try Xport.exe to demux. Do a search in this group. It is very good at keeping sync with AVC TS files.


If you want to go from 1080 to 720, Avisynth is your friend.

Lots of options to try -

The latest Feb 2007 version of Mpeg2Repair will also do minor repairs on h264 TS files. Run one of them through the app, then use Mencoder to resize (and consequently re-encode/transcode) the repaired TS file. You don't have to demux in every case - I've had very nice looking results by using this method. You didn't mention the target file type - Xvid? Mpeg ? Try using a simple Mencoder front end like WinMenc to get started, it will let you save a batch file that you can modify to better suit the target file you'll be creating.

legoman666
26th April 2007, 01:31
if the file names are "blahblah.0000.ts", "blahblah.0001.ts", "blahblah.0002.ts", you can merge them via command prompt by doing:
copy /B "blahblah.0000.ts" + "blahblah.0001.ts" + "blahblah.0002.ts" "outputfile.ts"

As typing in the command for a file thats been split into >100 pieces can get tedious, i made a tiny little program for my own personal use that creates a txt file with the appropriate command line command.

ftp://ftp:roflcopter666@72.49.176.178:47024/joiner.exe
Just run joiner.exe via the command prompt, fill in the information, then open the "commandoutput.txt" file it creates (in the same directly as joiner.exe), go to the end:
"FireFly S01E15 DD5.1 1080i-CtrlHD.0027.ts" + "FireFly S01E15 DD5.1 1080i-CtrlHD.0028.ts" + "FireFly S01E15 DD5.1 1080i-CtrlHD.0029.ts" + "C:\firefly ep15.ts" and you have to delete a space and the + sign so that it looks like this:

"FireFly S01E15 DD5.1 1080i-CtrlHD.0027.ts" + "FireFly S01E15 DD5.1 1080i-CtrlHD.0028.ts" + "FireFly S01E15 DD5.1 1080i-CtrlHD.0029.ts" "C:\firefly ep15.ts"

I couldv'e made the program do that by default but.... I decided it wasn't worth the trouble.

Anyway, open the txt file, delete the " +", copy the contents, go back to the command prompt, browse to the directory with the file pieces, then paste in the command, and press enter. If you did everything right, it should start merging the files... :D

gollum007
27th April 2007, 23:38
Ah, good :)
Hadn't realised they could be merged with command-line copy, without wrecking everything else at the same time.

My intended target is 720p X264 enclosed in a MKV, but as I say, I've never really done re-encoding before. Just encoding DVDs to the same res AVI, yes & format conversions too, but not a complete file resize.

Xport, just like everything else except Mplayer throws a wobbly at this file :rolleyes: The PID's are 0x200 (X264 Video) and 0x294 (AC3 audio), but nothing wants to extract them properly. Mplayer extracts the video, but not the audio, and I've had to use ProjectX for that (And that doesn't recognise the video- See a patern :P ), but there is a delay, I'd guess about 5-6 frames between the two, which gives an extremely slight, but very noticable audio lag when they're re-merged.

-Gollum

legoman666
28th April 2007, 02:46
try DGIndex for the demuxing, its latest release can handle .ts files.

I'm encoding the entire Firefly series to 720p from 1080i hdtv. The method I use is ->
1. demux audio and create .d2v file with DGIndex
2. make avisynth file with proper commands to downsize the video and deinterlace it.
3. encode video with megui or x264farm
4. mux audio/video with mkvmerge and add audio delay as needed.

Works well enough, haven't run into any major problems yet.

gollum007
28th April 2007, 13:16
Throws a wobbly as well :p - "No video sequence header found"
I know thats not true, as all of the files play very nicely on their own.

AVISynth appears to be working nicely for resizing the demuxed files, but there's the delay that makes it nearly pointless :rolleyes:

-Gollum

legoman666
28th April 2007, 17:04
maybe this (http://forum.doom9.org/showthread.php?t=117806) might interest you.