Page 26 of 44 FirstFirst ... 16242526272836 ... LastLast
Results 376 to 390 of 654

Thread: tyremux a GPLed TyStream demuxer and to be remuxer

  1. #376
    Join Date
    Aug 2002
    Posts
    319
    Ahh missed to tell one thing,

    Under Windows tydemux will return the A/V sync offset in milli seconds, and -1000 on error and 1000 on usage error.

    Under Unix (Linux, MacOSX) tydemux will return 0 on success, -1 on error and 1 on usage error.

    Cheers Olaf

  2. #377
    Join Date
    Jan 2003
    Location
    Hampshire, UK, Timezone: GMT
    Posts
    158

    Cool Automatic batch processing of ty files

    Here are some batch files to automate ty file processing.
    What I do is:
    Use the tivoweb export module to export to an nfs share on my PC
    Run the attached processall.bat file daily from the windows scheduler

    Before you use these batch files, edit them so the file paths etc. suit your environment.

    What they do:
    processall.bat runs splitmux.bat for every .ty file in a directory
    splimux.bat runs the ty file through tydemux and optionally mplex. The offset from tydemux is passed to mplex in the -O parameter.

    Log files are produced which can either be kept or auto deleted. The split files can also be kept or auto deleted as required. The original ty stream files can either be moved to an archive directory or deleted. Streams that fail to demux are moved to a bad files directory ready for analysis.


    splitmux.bat has lots of features controlled by variables at the top of the file. In-line comments describe their usage.

    Until mplex supports >2GB files, I recommend you turn on the option to keep split files. Does anyone have a fix for this yet? if not, can someone point me to the mplex source so I can get this fixed myself?

    When mplex is fixed, I will have an entirely automatic system to produce editable MPEG files from tivo. Anyone in the family can use TIVOWEB to select files for export. Within a day or two of them doing this, an mpeg file magically appears in a directory on my PC ready for editing and burning to DVD. All files used to produce this MPEG file are cleaned up automatically.

    UPDATE 21st Jan 2003 19:10GMT:
    I have now added 44K audio transcoding to the batch file - (Thank-you to RacingClub for the info)

    UPDATE 22nd Jan 2003 00:00GMT:
    Amended to pass %d to mplex so it copes with large files

    This attachment has been updated.
    Last edited by MrBassMan; 01-21-2003 at 07:57 PM.

  3. #378
    Join Date
    Jan 2003
    Location
    Hampshire, UK, Timezone: GMT
    Posts
    158
    Originally posted by olaf_sc
    Ahh missed to tell one thing,

    Under Windows tydemux will return the A/V sync offset in milli seconds, and -1000 on error and 1000 on usage error.

    Under Unix (Linux, MacOSX) tydemux will return 0 on success, -1 on error and 1 on usage error.

    Cheers Olaf
    There's something a bit off with this, here is the output from tydemux:

    A/V Sync Offset: -016ms (i.e. audio plays 016ms late use -O 016 in mplex)
    Return value -16

    Should the offset passed to mplex in this case be -16 or 16?
    If -16, the displayed message needs to change. If it's 16, the return code from tydemux is wrong.

  4. #379
    Join Date
    Aug 2002
    Posts
    114
    Olaf,

    Thank you so much for your work on this project -- this really rocks!

    I am having an issue with a rather large tystream, however. The output is much, much smaller than the input, and I am getting a "File seek faild" error at the same point, every time. Is there a way that one can confirm that there is not an issue with the stream itself? Tydemux appears to be saying everything is (too) normal.

    Here is the output from tydemux-l-0.4.2:

    Code:
    $ ./tydemux -s 2 -i 5GBtest.ty -a 5GBtest.m2a -v 5GBtest.m2v
    Probing TyStream .....
    
    Tystream recorded on:
                    DTivo Series 1
                    Software rev 2.0 or higher
    
    Tystream recoding audio stats:
                    MPEG Layer II audio
                    Average tyrecord (audio) size: 492
                    Audio frame size: 480
                    Audio frame time: 2160 (ticks)
    
    Tystream recoding video stats:
                    Frame rate: 29.97 frames/sec
    
    Seeking TyStream start of MPEG Layer II audio
    Found start of MPEG Layer II audio
    Skipping to chunk 1 - reseting chunk numbering
    
    Starting demux process
    .........   100.........   200.........   300.........   400.........   500
    .........   600.........   700.........   800.........   900.........  1000
    .........  1100.........  1200.........  1300.........  1400.........  1500
    .........  1600.........  1700.........  1800.........  1900.........  2000
    .........  2100.........  2200.........  2300.........  2400.........  2500
    
    [...]
    
    ......... 31600......... 31700......... 31800......... 31900......... 32000
    ......... 32100......... 32200......... 32300......... 32400......... 32500
    ......... 32600......... 32700......File seek faild
    
    Demux process finished
    
    A/V Sync Offset: 0ms (The -O option is not needed in mplex)
    
    $ ls -hal 5GBtest.ty
    -rw-r--r--    1 tivo     tivo         5.2G Jan 17 01:19 5GBtest.ty
    
    
    $ ls -hal 5GBtest.m2*
    -rw-------    1 tivo     tivo         215M Jan 21 01:23 5GBtest.m2a
    -rw-------    1 tivo     tivo         3.7G Jan 21 01:23 5GBtest.m2v

  5. #380
    Join Date
    Jan 2003
    Location
    Hampshire, UK, Timezone: GMT
    Posts
    158

    Talking

    Originally posted by OvitivO

    ......... 32600......... 32700......File seek faild

    Demux process finished

    A/V Sync Offset: 0ms (The -O option is not needed in mplex)

    $ ls -hal 5GBtest.ty
    -rw-r--r-- 1 tivo tivo 5.2G Jan 17 01:19 5GBtest.ty


    $ ls -hal 5GBtest.m2*
    -rw------- 1 tivo tivo 215M Jan 21 01:23 5GBtest.m2a
    -rw------- 1 tivo tivo 3.7G Jan 21 01:23 5GBtest.m2v


    [/code]
    This is not a large file - it's enormous
    The point where it blows up is at chunk 327xx, almost certainly it's actually 32768 which is the maximum size of an 16 bit number.

    Chunk numbers are unsigned long in the code so there must be another variable that is defined as an unsigned 16 bit variable that should in fact be unsigned 32.

    I don't have time to look into it much further than that at the moment, hopefully Olaf will be on the case shortly but it will mean you must wait for another release to process this file.

    p.s.
    Alternatively, use dd to cut the file in two and process eachhalf seperately, you may get some distortion on playback at the join though.
    Last edited by MrBassMan; 01-21-2003 at 05:32 AM.

  6. #381
    Join Date
    Aug 2002
    Posts
    114
    I believe you're right about that, although I am not anything close to a programmer.

    I noticed the following int declaration in tydemux.c:

    Code:
    tydemux.c
    
    
    [...]
    /* File handlers etc.*/
    int in_file;
    [...]
    #else
                    if( lseek64(in_file, ((chunk_nr + 1 + tystream->start_chunk) * CHUNK_SIZE) + byte_offset, SEEK_SET) <= 0 )
                            printf("File seek faild\n");
                            break;  // Seek failed
                    }
    [...]

  7. #382
    Join Date
    Nov 2002
    Posts
    17
    Mr BassMan - nice script !! - I've been playing with a similar one over the weekend - here's what I've got (and bits I've copied of you!)


    c:\tivo\tydemux\tydemux.exe -s2 -i %1.ty -v C:\tivo\out\%1.m2v -a C:\tivo\out\%1.m2a > C:\tivo\out\%1.log

    set MUX_OFFSET=%errorlevel%

    del C:\tivo\out\%1.ty

    C:\tivo\audio\BeSweet.exe -core( -input "C:\tivo\out\%1.m2a" -output "C:\tivo\out\%1-32.wav" -2ch ) > C:\tivo\out\%1.log
    C:\tivo\audio\ssrc.exe --rate 44100 --twopass "C:\tivo\out\%1-32.wav" "C:\tivo\out\%1-44.wav" > C:\tivo\out\%1.log
    c:\tivo\audio\toolame.exe -m s -b 224 -e "C:\tivo\out\%1-44.wav" "C:\tivo\out\%1.mp2" > C:\tivo\out\%1.log

    del C:\tivo\out\%1.m2a
    del C:\tivo\out\%1-32.wav
    del C:\tivo\out\%1-44.wav

    c:\tivo\mplex\mplex.exe -O %MUX_OFFSET% -f 8 -o C:\tivo\out\%1%%d.mpg C:\tivo\out\%1.m2v C:\tivo\out\%1.mp2 > C:\tivo\out\%1.log

    del C:\tivo\out\%1.m2v
    del C:\tivo\out\%1.mp2

    "C:\Program Files\MediaWare Solutions\M2-edit Pro\bin\m2-edit.exe"

    After this has run I edit out the ad's with M2-Edit then generate a new mpeg. I then demux this and author a new DVD with IFOedit. I then feed this into DVD2SVCD and out pops a SVCD!!
    Last edited by racingclub; 01-21-2003 at 06:35 AM.

  8. #383
    Join Date
    Jan 2003
    Location
    Hampshire, UK, Timezone: GMT
    Posts
    158
    Originally posted by OvitivO
    I believe you're right about that, although I am not anything close to a programmer.

    I noticed the following int declaration in tydemux.c:

    Code:
    tydemux.c
    
    
    [...]
    /* File handlers etc.*/
    int in_file;
    [...]
    #else
                    if( lseek64(in_file, ((chunk_nr + 1 + tystream->start_chunk) * CHUNK_SIZE) + byte_offset, SEEK_SET) <= 0 )
                            printf("File seek faild\n");
                            break;  // Seek failed
                    }
    [...]
    in_file is the file handle which should be an int. I'm afraid the problem lies elsewhere.

    Olaf should be able to reproduce this without you uploading a stream by concatenating together smaller streams.

  9. #384
    Join Date
    Oct 2002
    Posts
    40
    This is not a large file - it's enormous
    Haha - you think that's big? My Fiesta Bowl recording is 9GB!! And it ends right as the closing credits are rolling (good thing I padded to 4.5 hours). I guess I'll break it into quarters, cut the commercials and burn to 2 DVDs.

    Great work so far Olaf!!

    In case anyone cares, I'm having great success w/ the following:

    0) record at 720x480 (obviously this is a SA)
    1) tydemux to m2v, m2a
    2) Besweet to convert m2a to 48KHz ac3 (3 steps)
    3) DVD Maestro to edit out commercials. See this thread:

    http://www.dealdatabase.com/forum/sh...hlight=maestro

    4) DVD Maestro - compile and then create DVD image
    5) DVDDecryptor to burn image to DVD

    As far as I can tell these are fully compliant DVD's and they play in just about every player I've tried. Thanks to everyone in this forum for all of the tips and tricks along the way.

  10. #385
    Join Date
    Jan 2003
    Posts
    32

    Need help with processes

    (Embarrisingly I posted this in the wrong thread originally - doh!)

    Ok, Tydemux works great for me. However, my streams are still not in-sync until I run them through MPeg-vcr GOP fixer. There are a couple of problems with this:

    1. I can't use other tools for editing (m2edit editing results in a 2gb file from a 500mb file) - (I'd love to use mplex for command line manipulation but this results in totally out-of-sync file as well).

    2. On certain files when I try and import them (the m2v) into a Maestro project I get an error "Temporal references in GOP #62 (Zero-based) are out of sequence (0xc10b000a). I have traced this particluar error back to the GOP fixer (which if I don't use - I can import the m2v into Maestro just fine).

    So I have a bit of a conundrum here. Can anyone please help with processes or some advice? Thanks to Olaf's tireless efforts I have been able to archive gigs of Tivo recordings lately but a few shows are keeping me from completing my compilation.

    Also, is there a thread or a forum where people trade TIVO shows (similar to Planet Replay)? thanks

  11. #386
    Join Date
    Aug 2002
    Posts
    319

    Re: Need help with processes

    Hello Please see my inline comment.

    Originally posted by moshmothma
    Ok, Tydemux works great for me. However, my streams are still not in-sync until I run them through MPeg-vcr GOP fixer. There are a couple of problems with this:
    What muxer do you use?? and what version of tydemux?

    1. I can't use other tools for editing (m2edit editing results in a 2gb file from a 500mb file) - (I'd love to use mplex for command line manipulation but this results in totally out-of-sync file as well).
    What version of mplex do you use - where did you get it. Was there any repairs of the stream messages of any sort??

    2. On certain files when I try and import them (the m2v) into a Maestro project I get an error "Temporal references in GOP #62 (Zero-based) are out of sequence (0xc10b000a). I have traced this particluar error back to the GOP fixer (which if I don't use - I can import the m2v into Maestro just fine).
    I would say that gop fixer is a bit of a gop breaker - tydemux will repair any gop in the tystream that has any form of temporal reference error. Hence there isn't any tmp ref errors in the mpeg video stream that tydemux is making (I'm very sure of that ).


    In all I'm very interested of your stream - if possible could you upload it to me. My ftp is 66.121.15.35

    Cheers Olaf

  12. #387
    Join Date
    Sep 2001
    Location
    Delaware
    Posts
    237
    I dont remember exactly how Replay planet was set up, but I have a brand new forum up and running. You can access it here @ Looma-NoHands.Com .

    --mp

  13. #388
    Join Date
    Aug 2002
    Posts
    319
    Hello

    I will look into this issue to night, as others posted I would not need you to send that stream in order to solve the problem .

    It would however be nice to know what OS you are runnig Win or Linux?

    I would be even more nice if you could give me your email address so I could send you a beta of the next release for you to test on your stream.

    Cheers Olaf

    PS: If you have a chance it would be nice if you could contact me directly on IRC - channel #tydemux on irc.freenode.org/net (actually don't remeber what server it's a bookmark in my IRC client ). Now this is a channel dedicated to tech talk and bughunting of tydemux and not chit chat channel.




    Originally posted by OvitivO
    Olaf,

    Thank you so much for your work on this project -- this really rocks!

    I am having an issue with a rather large tystream, however. The output is much, much smaller than the input, and I am getting a "File seek faild" error at the same point, every time. Is there a way that one can confirm that there is not an issue with the stream itself? Tydemux appears to be saying everything is (too) normal.

    Here is the output from tydemux-l-0.4.2:

    Code:
    $ ./tydemux -s 2 -i 5GBtest.ty -a 5GBtest.m2a -v 5GBtest.m2v
    Probing TyStream .....
    
    Tystream recorded on:
                    DTivo Series 1
                    Software rev 2.0 or higher
    
    Tystream recoding audio stats:
                    MPEG Layer II audio
                    Average tyrecord (audio) size: 492
                    Audio frame size: 480
                    Audio frame time: 2160 (ticks)
    
    Tystream recoding video stats:
                    Frame rate: 29.97 frames/sec
    
    Seeking TyStream start of MPEG Layer II audio
    Found start of MPEG Layer II audio
    Skipping to chunk 1 - reseting chunk numbering
    
    Starting demux process
    .........   100.........   200.........   300.........   400.........   500
    .........   600.........   700.........   800.........   900.........  1000
    .........  1100.........  1200.........  1300.........  1400.........  1500
    .........  1600.........  1700.........  1800.........  1900.........  2000
    .........  2100.........  2200.........  2300.........  2400.........  2500
    
    [...]
    
    ......... 31600......... 31700......... 31800......... 31900......... 32000
    ......... 32100......... 32200......... 32300......... 32400......... 32500
    ......... 32600......... 32700......File seek faild
    
    Demux process finished
    
    A/V Sync Offset: 0ms (The -O option is not needed in mplex)
    
    $ ls -hal 5GBtest.ty
    -rw-r--r--    1 tivo     tivo         5.2G Jan 17 01:19 5GBtest.ty
    
    
    $ ls -hal 5GBtest.m2*
    -rw-------    1 tivo     tivo         215M Jan 21 01:23 5GBtest.m2a
    -rw-------    1 tivo     tivo         3.7G Jan 21 01:23 5GBtest.m2v

  14. #389
    Join Date
    Jan 2003
    Location
    Hampshire, UK, Timezone: GMT
    Posts
    158
    Originally posted by olaf_sc
    Hello

    It would however be nice to know what OS you are runnig Win or Linux?

    Olaf - it will be linux - he is using ls to get a directory listing

  15. #390
    Join Date
    Jan 2003
    Location
    Hampshire, UK, Timezone: GMT
    Posts
    158
    I have updated my automatic batch processing script to include audio transcoding to 44K.

    Find it here

Posting Permissions

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