I have 181 TS files that I need to join before I can convert them to WMV format. Each of the TS files is appx 100MB for a grand total of appx 18GB once I have joined the files together. I can play each of the TS files in Windows Media Player just fine. The total runtime when joined should be about 2 1/2 hours of video, but when I played the joined fine, it only plays for about 35 seconds and stops, despite the 18GB file size.
I've tried two different programs to join the TS files: Nullpacketstripper and Total Commander. Both programs were able to join the TS files without any noticeable problems, but again, when i play back the joined TS file, it only shows a runtime of 35 seconds and stops playing as if that is the total time of the video.
I have done this before with another video that was a little smaller (the resultant TS file was about 11GB and it played entirely without problems). So I can't figure out why the joined TS file only plays for 35 seconds. Furthermore, if I load it up in Windows Media Encoder (or anything else), it will only encode those 35 seconds, so it appears that anything that plays the file thinks it is only 35 seconds long, despite it being 18GB in size!
Anyone know what might be causing the problem? Is there something embedding in the TS file that tells the player how long it is or how long to play? Any way to fix it?
Thanks!
+ Reply to Thread
Results 1 to 13 of 13
-
-
I downloaded HDTVtoMPEG2 as you suggested and the program itself worked flawlessly. I added all 181 TS files and watched it write them all to one large TS file. You can see a visual monitor of the video and it all looked good from beginning to end.
However, when I opened up the 18GB TS file in WMP, the same thing happened. It starts at the beginning and only shows 35 seconds of video. That's the total time that the player reports and it stops playing after that, despite the 18GB file size and the fact that everything looked good during the copy process.
Could there be some limit to how large a TS file can be? Or maybe one of the TS files is causing this to happen?
Strangely, if I just take a few of the TS files and join them together, they play like they should... the total time of all of the TS files. But when I do them all, it does this 35 second thing.
Any other suggestions? I could try joining them all except the last to see if there's a problem at the end?
EDIT: Okay, I tried joining them all except the last but the resultant TS file is unplayable... it just shows black screen and no audio I guess I don't understand how the joining of these files worked. I though it was a simple merging but there must be more to it since each of the individual TS files plays perfectly but when I join them all, something gets messed up. I'm not sure how many I can join before the problem occurs, but I've done 10 or so at a time and the joined file works fine. -
Load your first 100MB segment in Mpeg2Repair. If you're lucky, the app will ask you if you automatically want to process the other numbered files. You'll end up (hopefully), with a repaired 18GB TS file. This will take a while to run - a good hour on 18GB worth of files.
You can load all of the files up in one fell swoop using DGindex, then visually scrub through the file looking for weirdness. Not a foolproof method, though.
Sounds like you either have corruption in one or more of the files, or the PID channels in the Transport Streams are hopping around. -
Thanks, I'm running the program right now and it did ask me if I wanted it to check all of the TS files in the sequence. I'll report back when it is done.
-
Well, it did find some errors in 4 different TS files in the sequence, but I played each of them and they seem fine. I'm currently in the process of running the repair and hoping that the resultant file will play correctly. I really don't understand what the error log means or if the errors in the log would cause this play time problem. For what it's worth, here is the log:
***
Sequence Frame 63203(1-B) / Time 0:43:38 :
VideoWarning: Discontinuity of (4+) packet(s). First packet ending at offset 30415768 in file 0044.ts
Sequence Frame 126606(8-P) / Time 1:27:35 :
VideoWarning: Discontinuity of (10+) packet(s). First packet ending at offset 60830032 in file 0087.ts
VideoWarning: Discontinuity of (4+) packet(s). First packet ending at offset 60836988 in file 0087.ts
Sequence Frame 189541(6-B) / Time 2:10:59 :
VideoWarning: Discontinuity of (9+) packet(s). First packet ending at offset 91244484 in file 0130.ts
VideoWarning: Discontinuity of (8+) packet(s). First packet ending at offset 91247304 in file 0130.ts
Sequence Frame 253025(7-B) / Time 2:55:03 :
VideoWarning: Discontinuity of (10+) packet(s). First packet ending at offset 19944732 in file 0174.ts
Additional error(s) detected. Increase VerboseLogLevel in INI file for details.
FileInfo: Last video errors span 679 bytes at file offset 19943583 in file 0174.ts
VideoWarning: Discontinuity of (7+) packet(s). First packet ending at offset 19949244 in file 0174.ts
Sequence Frame 253026(11-P) / Time 2:55:03 :
AudioError: Corrupted AC3 frame of 2886 payload bytes at file offset 19914108 in file 0174.ts
AudioWarning: Timestamp gap of 0.032000 sec. ending at file offset 19914108 in file 0174.ts
Sequence Frame 261306(10-B) / Time 26:28:46 :
Info: End of MPEG2 sequence
Sequence Summary:
File Size Processed: 16.91 GB, Play Time: 03h:00m:49s
1280 x 1088, 29.97 fps (24.09 fps Telecine), 65.00 Mbps (12.62 Mbps Average).
Average Video Quality: 63.94 KB/Frame, 0.38 Bits/Pixel.
AC3 Audio: 2/0 Channels (L, R) (Dolby Surround), 48.0 kHz, 384 kbps.
Dialog Normalization: -31.0 dB
1 of 261306 video frames found with errors.
1 of 339034 audio frames found with errors.
679 corrupted video bytes in file.
0.000000 seconds of video timestamp gaps.
0.032000 seconds of audio timestamp gaps.
Sequence Frame 1(0-B) / Time 26:28:46 :
AudioError: Corrupted AC3 frame of 2072 payload bytes at file offset 53365700 in file 0179.ts
AudioWarning: Timestamp gap of -10966.555922 sec. ending at file offset 53365700 in file 0179.ts
Sequence Frame 15(13-B) / Time 26:28:46 :
VideoWarning: TemporalRef gap of 1012. Timestamp gap of 84477.066873 sec. ending at file offset 53492940 in file 0179.ts
Sequence Frame 3978(13-B) / Time 0:00:35 :
Info: End of MPEG2 sequence
Sequence Summary:
File Size Processed: 17.13 GB, Play Time: 03h:03m:21s
1280 x 1088, 29.97 fps (0.36 fps Telecine), 65.00 Mbps (12.60 Mbps Average).
Average Video Quality: 4255.26 KB/Frame, 25.22 Bits/Pixel.
AC3 Audio: 2/0 Channels (L, R) (Dolby Surround), 48.0 kHz, 384 kbps.
Dialog Normalization: -31.0 dB
1 of 3978 video frames found with errors.
2 of 343812 audio frames found with errors.
679 corrupted video bytes in file.
84477.066873 seconds of video timestamp gaps.
10966.587922 seconds of audio timestamp gaps.
End of Log -
Wow, this is frustrating. So my PC spent about 45 minutes repairing and creating the new TS file and it does the same thing! However, I did discover something interesting:
If I open the file in WMP, it plays for 35 seconds and stops. The progress bar goes from beginning to end as if the video is only 35 seconds long. It's just the first 35 seconds of the video.
I also have Nero ShowTime on my PC and I opened the file in that player instead. The progress bar in Showtime also shows 35 seconds but it continues to play beyond the 35 seconds! I can't jump ahead of back and the progress bar just stops at the end, but the video keeps on playing. So though the file is reporting the wrong play time, the merged video is apparently all there (thus the large resultant TS file size).
While this may appear to offer a compromised solution, it really only lets me play the file on my PC. What I'm wanting to do is convert it to WMV format so I can stream it to my 360 like other TS files I have done this with successfully.
Unfortunately, if I try to encode the file in Windows Media Encoder, it just encodes the 35 seconds and stops. So the root of the problem is with the reported play time that is embedded in the file. I have no idea where that is stored or if there's a way to manually correct this so it reports the correct play time (which is just over 3 hours)???
It's frustrating knowing that the entire video is there but the player and encoders just see the wrong play time and stop playback/encoding because of it. Unfortunately, though MPEG2Repair found a few errors, it must not have found/corrected the incorrect play time.
Any additional help would be appreciated, but I understand if you guys don't want to waste anymore time helping me with this. -
Yeah, it can be frustrating, especially when the file is 18 friggin Gigs
Ok, we can do 2 different tests, but you're going to need at least an additional 18GB of free disk space - 40-60 GB preferably.
Download a copy of VideoRedo .
They have a 21 day evaluation version and the app is only $50 anyway. Best $50 I've ever spent on software. One of the few commercial video processing apps out there that doesn't have an equivalent freeware equal.
Open the 18GB file in VideoRedo and save as an MPG, NOT a Transport Stream File. Try the resulting file.
-----------------------------------------------------------------------------------------------------
The alternate free "Automated" Method
-----------------------------------------------------------------------------------------------------
Download this Zip file tp_fix.zip
Unzip to a folder
Place Your 18GB file into the same folder as these files
Rename the 18GB file to INPUT.TP
Double Click on Fixtp.bat
You'll hear a lot of hard drive grinding for a while. You should get a reconstructed mpeg2 file called OUTPUT.MPG Try using OUTPUT.MPG
----------------------------------------------------------------------------------------- -
Okay, I *think* I finally got it to work with the tools in your "alternate" method. It took a lot of trial an error though. The fixtp.bat file didn't work at first, even though I made sure the 18GB file was in the same directory and renamed properly. So I had to go to the DOS prompt and run the Xport, AC3Cutter, and Mplex tools manually.
I ran into problems when trying to multiplex the file to a .mpg file. Using the swiches that were used in the bat file, the Mplex command warned me right away that the bitrate was too low. I wasn't sure what to use so I took the -r switch out and let it decide. That seemed to help, and I thought it was going to get to the end, but it stopped just short of the end of the video (a minute or two early) and said that it encountered a different sequence or something and needed to start another file. Then I look at the different switches you can use and the -M supposedly made sure it wrote it all to one file even if it there are separate sequences.
So that worked, but when I played the file back in WMP, it was stuttery/jittery. But when I played it through the Media Center to my Xbox 360 (it can play MPG and WMV files) it played fine. So I'm currently encoding it to WMV and so far it's working fine.
Any reason why it would be stuttering on my PC? Could that buffer setting when I multiplexed it have something to do with that? My PC is not slow - I have an Athlon 64 X2 4600+ with 2GB of RAM on WinXP.
Again, thanks for your help and I think it's going to work! -
Yeah, that error message during muxing about bitrate is purely cosmetic and doesn't affect the actual file playback ability. The buffer parameter can have an effect on the playback. I think you can choose a value up to 1900 in the mplex.exe app.
In addition, the resulting .MPG file is meant purely as the input file for another encoder. Save your source Transport Streams until new repair apps emerge.
Thanks for having the skills and patience to go through the grief. Hope the movie isn't "Godfather III" or "Ghost Dad" -
Well, the file is still encoding... it should be done by tomorrow morning! So far so good, though.
As a followup, you mentioned the buffer setting can affect playback. How do you determine what value to use?
And I assume the buffer value only affects playback, right? It wouldn't come into play if I'm just using the resultant MPG to encode to another format, right?
I didn't want to tie up my PC for that long, so I'm having my laptop do the encoding so that's why it's taking so long. However, the file does stream flawlessly to my Xbox 360 (at least what's been encoded so far). Hopefully, it doesn't run into any problems further on.
-
It worked! Yippee! I haven't watched the whole video to see if there are any glitches but i did open it up in WMP and checked several areas and it seemed fine. I got the 18GB file down to about 4GB without much noticeable loss in quality and I can now stream it via my Xbox 360.
Thanks again for the help with a stubborn file!
Similar Threads
-
How do I solve this file joining problem?
By A_Shepherd in forum EditingReplies: 30Last Post: 2nd Sep 2010, 13:27 -
Is there a max file size when Joining avi files.
By admjim in forum ffmpegX general discussionReplies: 2Last Post: 14th Feb 2010, 03:41 -
Joining separated episode from VTS VOB file to AVI
By submerge in forum ffmpegX general discussionReplies: 51Last Post: 7th May 2008, 15:47 -
ASFBIN and Movica : Batch File Joining Possible ?
By Alterego in forum EditingReplies: 0Last Post: 12th Oct 2007, 03:18 -
I'm new to Joining multiple avi files into one big file....
By Lahori82 in forum EditingReplies: 4Last Post: 29th Aug 2007, 13:05