Page 1 of 5 123 ... LastLast
Results 1 to 15 of 70

Thread: tytompg: Now with transport stream support, plus tstompg

  1. #1
    Join Date
    Nov 2002
    Posts
    1,076

    tytompg: Now with transport stream support, plus tstompg

    Here's a new version of tytompg that also supports series3 TY/TMF streams. Ie series 1 thru 3 are supported in a single application.
    I've also included a separate application, tstompg which can be used to convert mpeg2 transport streams to mpeg2 program streams (.ts to .mpg). With tstompg one can still process series3 TY/TMF streams with s3tots and convert to .mpg later.

    tstompg may also be used in lieu of other ts to mpg conversion programs such as videoredo or hdtvtompeg2.

    tstompg uses the same multiplexer as tytompg, and so it's able to maintain a/v sync even when faced with the non-dvd compliant mpeg tricks found in some dtv/ota broadcasts.

    The existing UI for tytompg applies; there are two new options:
    -p Append to existing output file instead of overwriting
    -3 Assume source file is series 3 TY. This is necessary when the source file has been pre-chopped with tychopper or the like, or when the -s switch is used to skip over the master chunk.
    Last edited by bcc; 03-21-2009 at 03:17 PM.

  2. #2
    Join Date
    Dec 2003
    Posts
    267
    Congrats, this sounds like a great enhancement to tytompg! And thanks again for continuing to provide mac versions. I don't want to hijack this thread, but I noticed this version works on 10.5 "out of the box". I'm curious, were you able to figure out the issue, or did you just pre-apply my workaround? We can take this over to the mac support thread if you'd prefer...

    P.S. This is *completely* off topic, but I was wondering if you know of any good tools to take an MPEG-4 TS and convert it to a PS? I got a new AVCHD video camera that records as TS streams, and I can't find anything that will convert it directly to a MP4 PS file without re-encoding it.

  3. #3
    Join Date
    Sep 2006
    Posts
    648
    Quote Originally Posted by mr_zorg View Post
    P.S. This is *completely* off topic, but I was wondering if you know of any good tools to take an MPEG-4 TS and convert it to a PS? I got a new AVCHD video camera that records as TS streams, and I can't find anything that will convert it directly to a MP4 PS file without re-encoding it.
    If you mean AVC/AC3/M2TS (aka AVCHD) by MPEG-4 TS and you mean PES stream (like .mpg, .vob, and .evo), RemuxTool will do it by the end of the week. I was planning on this for MPEG-2 video, but it should work for AVC as well. I have most of the structures in place, I just have to refactor some code.

    If you mean to an MP4 container (.mp4 file) this should do it:
    Code:
    ffmpeg -i 00000.MTS -acodec copy -vcodec copy out.mp4
    Last edited by dburckh; 01-23-2008 at 04:56 AM. Reason: Added MP4

  4. #4
    Join Date
    Nov 2002
    Posts
    1,076
    Quote Originally Posted by mr_zorg View Post
    Congrats, this sounds like a great enhancement to tytompg! And thanks again for continuing to provide mac versions. I don't want to hijack this thread, but I noticed this version works on 10.5 "out of the box". I'm curious, were you able to figure out the issue, or did you just pre-apply my workaround? We can take this over to the mac support thread if you'd prefer...
    Thanks. For mac support I just took your commands and made them into a makefile rule:
    Code:
    ifeq ($(OSTYPE),darwin)
         strip -o ../mac-x86/$@ $@
         xxd ../mac-x86/$@ | sed -e "s/ffff ffff 1000/0100 0000 1000/" | xxd -r - ../mac-x86/$@
         chmod +x $@
    endif
    The resulting binary doesn't run under opendarwin but I assumed it'd be portable for "real" users. Yes probably a separate thread would be good if there are actual mac specific issues.
    Quote Originally Posted by mr_zorg View Post
    P.S. This is *completely* off topic, but I was wondering if you know of any good tools to take an MPEG-4 TS and convert it to a PS? I got a new AVCHD video camera that records as TS streams, and I can't find anything that will convert it directly to a MP4 PS file without re-encoding it.
    No, I haven't had a use for converting mpeg4s yet so I'm not fully up on it. The videoredo folks are claiming to be working on it I notice. I suspect ffmpeg with the xvid library and -vcodec copy -acodec copy might be able to do it. Same for vlc...

  5. #5
    Join Date
    Dec 2003
    Posts
    267
    Quote Originally Posted by dburckh View Post
    If you mean AVC/AC3/M2TS (aka AVCHD) by MPEG-4 TS and you mean PES stream (like .mpg, .vob, and .evo), RemuxTool will do it by the end of the week. I was planning on this for MPEG-2 video, but it should work for AVC as well. I have most of the structures in place, I just have to refactor some code.

    If you mean to an MP4 container (.mp4 file) this should do it:
    Code:
    ffmpeg -i 00000.MTS -acodec copy -vcodec copy out.mp4
    Sorry, I'm not a real guru on the video terminology... Yes, I think what I meant was to get the MTS into an MP4 file. I'll try that with ffmpeg... Thanks!

    P.S. I should probably say that any further discussions about this should NOT take place here. I really don't want to hijack BCC's thread any more than I already have... But thanks for the info!

  6. #6
    Join Date
    Mar 2005
    Posts
    235
    I've run into a file that tytompg chokes on, but s3tots seems ok with. Here's a partial output from both apps if it tells you anything.

    tytompg: Copyright (c) 2004-2008 B.C. <bcc24x7@gmail.com>
    Multiplexer version 1.0, Demuxer version 1.0
    Source is ty+.ty+ ; Destination is xxx
    TY set video,audio pid: 40,41. Audio is AC3
    error: Cannot fit Video buffer, size 184 offset 524183

    s3tots: Copyright (c) 2004-2007 B.C. <bcc24x7@gmail.com>
    Version 1.0, Source is ty+.ty+, dest is xxx
    TY set video,audio pid: 40,41. Audio is AC3
    Warning: Continuity error for stream 40, packet 6240

  7. #7
    Join Date
    Mar 2005
    Posts
    235
    I've been testing this release on s3 hd content, and the resulting mpg's play fine on the PC, but the audio is choppy when I transfer them back to the tivo using TiVo Desktop. Is there additional processing I should do on the file before I transfer them back?

  8. #8
    Join Date
    Nov 2002
    Posts
    1,076
    Quote Originally Posted by jkozee View Post
    error: Cannot fit Video buffer, size 184 offset 524183
    When my muxer prints a "cannot fit video" error before even reporting the video resolution, it means that it never found a video start code in the video stream. This may mean that your recording had no good video signal. I assume you get the same results from tstompg. I've seen this once in a recording, where I had to skip a few chunks before the video stream was valid (cablecard tuner problem?) Try using -s to skip a few chunks. Also does the video play back fine when you try to play the .ts directly?

    To fix this cleanly I can make the muxer smarter about skipping over garbage at the beginning of the recording.

  9. #9
    Join Date
    Mar 2005
    Posts
    235
    Quote Originally Posted by bcc View Post
    When my muxer prints a "cannot fit video" error before even reporting the video resolution, it means that it never found a video start code in the video stream. This may mean that your recording had no good video signal. I assume you get the same results from tstompg. I've seen this once in a recording, where I had to skip a few chunks before the video stream was valid (cablecard tuner problem?) Try using -s to skip a few chunks. Also does the video play back fine when you try to play the .ts directly?

    To fix this cleanly I can make the muxer smarter about skipping over garbage at the beginning of the recording.
    Yes same results on tstompg. It seems that -s on tstompg and tytompg also gives errors.
    tstompg: Recording too short to determine a/v sync
    tytompg: Could not find sufficient stream information to demux.

    Using -s on s3tots works, then running tstompg on the resulting ts completes successfully, so your assessment of corrupt data seems correct, but requires two steps to correct.

    Yes, the original ts plays fine on the PC and this recording was also a CC.

  10. #10
    Join Date
    Mar 2005
    Posts
    235
    Just some more info on the choppy mpgs. It looks like the ones that cause trouble are cable card recordings. Would content protection cause the choppy sound when transferring back?

  11. #11
    Join Date
    Nov 2002
    Posts
    1,076
    Quote Originally Posted by jkozee View Post
    Yes same results on tstompg. It seems that -s on tstompg and tytompg also gives errors.
    tstompg: Recording too short to determine a/v sync
    tytompg: Could not find sufficient stream information to demux.
    Well yes you can't skip so many chunks as to leave your recording too short to sync up the a/v streams.

    Using -s on s3tots works, then running tstompg on the resulting ts completes successfully, so your assessment of corrupt data seems correct, but requires two steps to correct. Given that you also have a continuity error at packet 6240, I'd expect skipping 6240*188/131072=8 chunks would be about right.

  12. #12
    Join Date
    Nov 2002
    Posts
    1,076
    Quote Originally Posted by jkozee View Post
    I've been testing this release on s3 hd content, and the resulting mpg's play fine on the PC, but the audio is choppy when I transfer them back to the tivo using TiVo Desktop. Is there additional processing I should do on the file before I transfer them back?
    Yes, I did mention to you in private that I was seeing some dropped audio upon inserting to the s3. Do you see any errors reported on your tivo? It seems to me the tivo is not allowing for enough audio buffer (per the specs it should handle 1 second worth of audio buffering).

    Try a pass thru videoredo.

    I probably need to tweak my muxer to try and keep the virtual audio buffer less full, in order to keep the s3s happy.

  13. #13
    Join Date
    Mar 2005
    Posts
    235
    Quote Originally Posted by bcc View Post
    Well yes you can't skip so many chunks as to leave your recording too short to sync up the a/v streams.

    Using -s on s3tots works, then running tstompg on the resulting ts completes successfully, so your assessment of corrupt data seems correct, but requires two steps to correct. Given that you also have a continuity error at packet 6240, I'd expect skipping 6240*188/131072=8 chunks would be about right.
    I didn't explaint this very well. What I was trying to say is that skipping chunks using tytompg directly didn't work.

    So this worked:
    3stots -s 8 -i ty.ty -o ts.ts
    tstompg -i ts.ts -o mpg.mpg

    But this didn't:
    tytompg -s 8 -i ty.ty -o mpg.mpg

    And neither did this (not sure if -s is intended for tstompg):
    3stots -i ty.ty -o ts.ts
    tstompg -s 8 -i ts.ts -o mpg.mpg


    Quote Originally Posted by bcc
    Yes, I did mention to you in private that I was seeing some dropped audio upon inserting to the s3. Do you see any errors reported on your tivo? It seems to me the tivo is not allowing for enough audio buffer (per the specs it should handle 1 second worth of audio buffering).
    Sorry, your PM said you were seeing issues when inserting S1 recordings onto your S3. It didn't even occur to me that this might be related. I did do some more testing and some HD transfers worked and some didn't. I'll try to check the logs and see if there are any errors, but I'm not sure what to look for.

    Quote Originally Posted by bcc
    Try a pass thru videoredo.
    Seems like a must have utility. Guess it's time to spend some money

    Quote Originally Posted by bcc
    I probably need to tweak my muxer to try and keep the virtual audio buffer less full, in order to keep the s3s happy.
    I'm sure I speak for many when I say all of your efforts are appreciated very much

  14. #14
    Join Date
    Nov 2002
    Posts
    1,076
    Quote Originally Posted by jkozee View Post
    Sorry, your PM said you were seeing issues when inserting S1 recordings onto your S3. It didn't even occur to me that this might be related. I did do some more testing and some HD transfers worked and some didn't. I'll try to check the logs and see if there are any errors, but I'm not sure what to look for.
    What I left out is that the s1 recording is the only test that I had done The problem seems to be a general one with inserting .mpg on the s3.

    I notice that videoredo is only muxing the audio at 25% of the maximum delay whereas I was muxing at 80%. At 80% s3 tivos drop audio (and log errors to /var/log/kernel), even though I'm being compliant by never overflowing the virtual buffer. When I mux the audio at 25%, the s3 plays the audio back smoothly. Looks like tivos aren't keeping a big enough audio buffer. I'll build a new image that uses the 25% level to keep the s3 happy.
    Quote Originally Posted by jkozee View Post
    [videoredo]Seems like a must have utility. Guess it's time to spend some money
    You can buy videoredo if you want. But when I mention videredo it's just to use it as a workaround or for troubleshooting. The intent is for tytompg to never require a subsequent videoredo step (ie I'll perform the necessary mpeg fixups for free).
    Quote Originally Posted by jkozee View Post
    I'm sure I speak for many when I say all of your efforts are appreciated very much
    Thanks. Now that .tivo extraction is widely available, and descrambling is officially supported at tivocommunity, interest has certainly dropped.

  15. #15
    Join Date
    Nov 2002
    Posts
    1,076
    Quote Originally Posted by jkozee View Post
    Yes same results on tstompg. It seems that -s on tstompg and tytompg also gives errors.
    tstompg: Recording too short to determine a/v sync
    tytompg: Could not find sufficient stream information to demux.
    When using -s with tytompg, and you skip the master chunk, then you lose its ability to auto-detect the type of TY file, and it assumes s1/s2. If you're using an s3 TY file you have to add a -3 switch, else you see the error you mention. I had noted this in post #1.

    As for tstomp, I had not made -s/-n work with that. I'll make it work (but where the units are tranport stream packets - 188 bytes, not chunks).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •