PDA

View Full Version : TY enabled mplex for mpeg to TY stream conversion



Pages : [1] 2

bcc
02-28-2005, 02:15 PM
This is the support thread for MPEG to TY conversion using the TY enabled version of mplex. The development thread is over here: Http://www.dealdatabase.com/forum/showthread.php?t=41962

Perhaps the easiest way to test this process would be to convert a TY to mpeg with tytool, and then convert it back with mplex. With tytool, select: File->"vsplit mode". tytool should then produce .m2v and .m2a files directly (no need to split the mpeg yourself). Then:
mplex -f 10 file.ty.m2v file.ty.m2a -o result.tyTest the result with tyshow/mplayer. If it works, try reinserting to the tivo with mfs_ftp.

hxmiller
02-28-2005, 02:27 PM
Here are the steps I performed

- tserver to extract TY streams
- edit TY streams to MPEG (including cuts)
- split files
- re-encode as TY using mplex (windows) Didn't get it to compile last night on linux.
- inserted to DTIVO using patched mfs_ftp.

Results:
TY with mplayer is working perfectly. However the TY on the tivo has no audio and video is choppy.

mrwalker66
02-28-2005, 03:22 PM
dtivo series 2 4.01b
mpeg2 file that was cut with tytool. demux with tmpgenc. run through mplex.
transfer the resulting .ty to dtivo. video choppy, audio choppy, but a few times through playing it does sink up. you are on the edge of greatness if you can get this to work.

edit. mplayer is choppy also but not as bad as the tivo playback...

ds2ktj
02-28-2005, 03:30 PM
Ok,

Ive ripped a DVD, and demuxed it into m2v and ac3 stream Whne I try to multiplex it back into ty I get the following:

C:\Documents and Settings\maudette\Desktop\SCARFACE>mplex -f 10 VTS_01_1.m2v VTS_01_1.80.ac3 -o scarface.ty
INFO: [mplex] mplex version 1.6.2 (2.2.3 $Date: 2004/01/13 20:45:26 $)
INFO: [mplex] File VTS_01_1.m2v looks like an MPEG Video stream.
INFO: [mplex] File VTS_01_1.80.ac3 looks like an AC3 Audio stream.
INFO: [mplex] Video stream 0: profile 10 selected - ignoring non-standard portions!
INFO: [mplex] Found 1 audio streams and 1 video streams
INFO: [mplex] Selecting TY and generic MPEG2 output profile
INFO: [mplex] Multiplexing video program stream!
INFO: [mplex] Scanning for header info: Video stream e0 (VTS_01_1.m2v)
INFO: [mplex] VIDEO STREAM: e0
INFO: [mplex] Frame width : 720
INFO: [mplex] Frame height : 480
INFO: [mplex] Aspect ratio : 16:9 display
INFO: [mplex] Picture rate : 29.970 frames/sec
INFO: [mplex] Bit rate : 9800000 bits/sec
INFO: [mplex] Vbv buffer size : 229376 bytes
INFO: [mplex] CSPF : 0
INFO: [mplex] Scanning for header info: AC3 Audio stream 00 (VTS_01_1.80.ac3)
INFO: [mplex] AC3 frame size = 1792
INFO: [mplex] AC3 AUDIO STREAM:
INFO: [mplex] Bit rate : 57344 bytes/sec (448 kbit/sec)
INFO: [mplex] Bit rate : 57344 bytes/sec (448 kbit/sec)
INFO: [mplex] Frequency : 48000 Hz
INFO: [mplex] SYSTEMS/PROGRAM stream:
INFO: [mplex] rough-guess multiplexed stream data rate : 10470296
INFO: [mplex] Setting best-guess data rate.
INFO: [mplex] Run-in Sectors = 998 Video delay = 140551 Audio delay = 143554
INFO: [mplex] New sequence commences...
INFO: [mplex] Video e0: buf=2719744 frame=000000 sector=00000000
INFO: [mplex] Audio bd: buf= 16384 frame=000000 sector=00000000
6 [main] mplex 3656 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
16758 [main] mplex 3656 open_stackdumpfile: Dumping stack trace to mplex.exe.stackdump


I've attached the stackdump. I will provide any additional detils you might need.

I used the -f 9 option and it produced a TY file. But the playback is very chunky and the video looses sync (if the screen goes black it stays black for a while). This was playback in windows using the directshow filter.


I'll see if I can develop a small testcase.

hxmiller
02-28-2005, 06:38 PM
All conversions from mpeg to ty are working perfectly in TyShow. Even extracting an inserted TY converted from an mpeg plays normally. I'm guessing that something is out of sync. The a/v offset is showing 0ms when the split is performed.


Seems to have the same issues with both the linux and windows versions.

bcc
02-28-2005, 09:57 PM
dtivo series 2 4.01b
mpeg2 file that was cut with tytool. demux with tmpgenc. run through mplex.
transfer the resulting .ty to dtivo. video choppy, audio choppy, but a few times through playing it does sink up. you are on the edge of greatness if you can get this to work.

edit. mplayer is choppy also but not as bad as the tivo playback...I assume you didn't re-transcode with tmpgenc, and just used the 'Simple Multiplex' button? I just tried this (tytool->tmpgenc->mplex) and it worked OK - without any choppiness. I didn't create any cut points with tytool however. Also my source was low-def satellite (hr10-250 tivo)

bcc
02-28-2005, 10:03 PM
Here are the steps I performed

- tserver to extract TY streams
- edit TY streams to MPEG (including cuts)
- split files
- re-encode as TY using mplex (windows) Didn't get it to compile last night on linux.
- inserted to DTIVO using patched mfs_ftp.

Results:
TY with mplayer is working perfectly. However the TY on the tivo has no audio and video is choppy.What kind of dtivo? Source & dest tivo are same kind of tivo? If you're trying to move a recording from an s1 to s2 tivo you'll still need ty1to2 to rewrite the audio PES headers. It would be possible to build that into mplex, but it isn't right now... During the failed playback, do you get errors in /var/log/tverr?

hxmiller
02-28-2005, 10:15 PM
Again great work on this!! :)

I've got a DTIVO S2 (Samsung 4040r) running 4x RID. Recordings are from the same recorder.


Attached are some errors from /var/log/tverr during playback.

bcc
02-28-2005, 10:28 PM
INFO: [mplex] Bit rate : 9800000 bits/sec
Is that really your video bit rate? That plus the audio rate:
INFO: [mplex] Bit rate : 57344 bytes/sec (448 kbit/sec)is 10Mbit/sec., the max for DVD, and may be blowing the buffering.
6 [main] mplex 3656 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
16758 [main] mplex 3656 open_stackdumpfile: Dumping stack trace to mplex.exe.stackdumpUnfortunately I'm not familiar with how cygwin reports tracebacks...Please debug with gdb:)
I used the -f 9 option and it produced a TY file. But the playback is very chunky and the video looses sync (if the screen goes black it stays black for a while). This was playback in windows using the directshow filter.With -f9 you're producing mpeg output not ty (even if you name the file with a .ty extension :)

bcc
02-28-2005, 10:42 PM
Again great work on this!! :) Thanks to nova1 - I didn't really want to put this together myself :)
Attached are some errors from /var/log/tverr during playback.Ok you're getting PES packet length alignment errors on everything... But nova1 has code that tries to provide alignment. I wonder what you're using to split the mpg? That may be the key to reproducing.

hxmiller
02-28-2005, 10:48 PM
Ok you're getting PES packet length alignment errors on everything... But nova1 has code that tries to provide alignment. I wonder what you're using to split the mpg? That may be the key to reproducing.


I used the "split" in TyTool9r17. I multiplexed first to incorporate the cut file.

I'm going to attempt to use hdemux on some original streams without editing to see if that improves things.

ds2ktj
02-28-2005, 11:31 PM
Is that really your video bit rate?

As reported by the tool sir...looks like a little bug?

I'm trying again with some other DVD sources..some small files. to get started..just a couple chapters.

Here is what I have done as a new test tonight:

* I riped 1 chapter from a DVD (Using DVD Decrypter) This chapter plays back fine on XP WinDVD. I selected only the AC-3 2 CH audio and the main video stream.

* I used vobedit to demux the audio into an ac3 stream and m2v stream. I can open the m2v stream in WinDVD and it plays back fine (no audio of course). I can open the ac3 stream in WinDVD and it plays back fine (no video of course)

* I ran mplex.exe -f 10 VTS_01_1.m2v VTS_01_1.80.ac3 -o TEST.TY



INFO: [mplex] mplex version 1.6.2 (2.2.3 $Date: 2004/01/13 20:45:26 $)
INFO: [mplex] File VTS_01_1.m2v looks like an MPEG Video stream.
INFO: [mplex] File VTS_01_1.80.ac3 looks like an AC3 Audio stream.
INFO: [mplex] Video stream 0: profile 10 selected - ignoring non-standard options!
INFO: [mplex] Found 1 audio streams and 1 video streams
INFO: [mplex] Selecting TY and generic MPEG2 output profile
INFO: [mplex] Multiplexing video program stream!
INFO: [mplex] Scanning for header info: Video stream e0 (VTS_01_1.m2v)
INFO: [mplex] VIDEO STREAM: e0
INFO: [mplex] Frame width : 720
INFO: [mplex] Frame height : 480
INFO: [mplex] Aspect ratio : 16:9 display
INFO: [mplex] Picture rate : 29.970 frames/sec
INFO: [mplex] Bit rate : 9801600 bits/sec
INFO: [mplex] Vbv buffer size : 229376 bytes
INFO: [mplex] CSPF : 0
INFO: [mplex] Scanning for header info: AC3 Audio stream 00 (VTS_01_1.80.ac3)

INFO: [mplex] AC3 frame size = 1792

INFO: [mplex] AC3 AUDIO STREAM:
INFO: [mplex] Bit rate : 57344 bytes/sec (448 kbit/sec)
INFO: [mplex] Frequency : 48000 Hz
INFO: [mplex] SYSTEMS/PROGRAM stream:
INFO: [mplex] rough-guess multiplexed stream data rate : 10471896
INFO: [mplex] Setting best-guess data rate.
INFO: [mplex] Run-in Sectors = 998 Video delay = 140529 Audio delay = 143532
INFO: [mplex] New sequence commences...
INFO: [mplex] Video e0: buf=2719744 frame=000000 sector=00000000
INFO: [mplex] Audio bd: buf= 16384 frame=000000 sector=00000000
4 [main] mplex 1052 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
599 [main] mplex 1052 open_stackdumpfile: Dumping stack trace to mplex.exe.stackdump


I dont have gdb or cygwin development tools installed anywhere. I can provide you with the streams (around 150MB zipped) via a torrent if you like. I'm almost thinking this is a windows version bug (very tempted to throw it on a cd and test it under linux). Let me know I believe the streams are good unless again you see something wierd above with the bitrates.

bcc
03-01-2005, 12:25 AM
As reported by the tool sir...looks like a little bug?

I'm trying again with some other DVD sources..some small files. to get started..just a couple chapters.Well, it's the upper bound bit rate so it doesn't necessarily tell us much of anything. Basically I don't know what went wrong in your case. But yes, clearly a bug. Unfortunately it doesn't seem very hard to make mplex fail.

nova1
03-01-2005, 12:41 AM
I used the "split" in TyTool9r17. I multiplexed first to incorporate the cut file.

I'm going to attempt to use hdemux on some original streams without editing to see if that improves things.

The mplex ty code searches for an MPEG Sequence Header and then the GOP header and then the PICTURE start code. I believe Sequence headers are optional but not certain. In my patch3.txt, I replicate the first sequence header seen whenever a GOP is NOT preceded by a sequence header. mpeg2enc has the -s option to insert sequence headers before GOP start codes.

darrin75
03-01-2005, 03:01 AM
I would pay to see this happen!

bcc
03-01-2005, 04:01 AM
STATUS_ACCESS_VIOLATION
599 [main] mplex 1052 open_stackdumpfile: Dumping stack trace to mplex.exe.stackdump
Ok, I've reproduced this one. The problem was I shipped mplex right before I got diffs from nova1 to improve the GOP searching in the video stream. (In english, you just need a new build that includes patch3 from nova1.) Lemme see about making one...

bcc
03-01-2005, 05:27 AM
New versions of the binaries are up. These should work better for svcd/dvd sources.

hxmiller
03-01-2005, 07:42 AM
New versions of the binaries are up.

Stackdump in Windows on the new binary. Same splits that I was previously using.

mrwalker66
03-01-2005, 08:55 AM
I assume you didn't re-transcode with tmpgenc, and just used the 'Simple Multiplex' button? I just tried this (tytool->tmpgenc->mplex) and it worked OK - without any choppiness. I didn't create any cut points with tytool however. Also my source was low-def satellite (hr10-250 tivo)

the clip i used was a s2 dtivo tytool cut clip. no encoding. demuxed it with tmpgenc. then ran it throught mplex to get the resulting ty file. used the newer 0.2 windows binary, but still get choppy video and audio on tivo playback and on mplayer playback...thanks

ds2ktj
03-01-2005, 09:10 AM
Same problem here still too with the new binaries. I have a testcase down to 38MB now.

I've put a torrent up with a littel snippet of dvd video (1 Chapter) as a testcase.

You can find it below. Rename the file to TT_TESTCASE.zip.torrent (do not unzip - it's not zippped)

As mentioned before I was able to get one TY file so far form a low quality - really low bit-rate dvd...but there was no audio track (at least none that mplex would understand (MPEG2 audio),. I transfered it to the Tivo and it did playback smoth. I'm guessing there is something where mplex doens't allocate a big enough buffer when dealing with higher bitrate - I havne't had a chance to look at the code yet.

(I guess I need a tracker to seed the torrent - removed - I can put it on an FTP somewhere if it would help)

nova1
03-01-2005, 11:51 AM
Same problem here still too with the new binaries. I have a testcase down to 38MB now.

I've put a torrent up with a littel snippet of dvd video (1 Chapter) as a testcase.

You can find it below. Rename the file to TT_TESTCASE.zip.torrent (do not unzip - it's not zippped)

As mentioned before I was able to get one TY file so far form a low quality - really low bit-rate dvd...but there was no audio track (at least none that mplex would understand (MPEG2 audio),. I transfered it to the Tivo and it did playback smoth. I'm guessing there is something where mplex doens't allocate a big enough buffer when dealing with higher bitrate - I havne't had a chance to look at the code yet.

(I guess I need a tracker to seed the torrent - removed - I can put it on an FTP somewhere if it would help)

You might want to try specifying the bitrate using mplex's -r option.

It might be best to run test cases under linux to reduce the variables. Most of the issues I've seen have to do with how the input elemental streams are formed. DVD AC3 streams may have bad or malformed AC3 frames which causes mplex to fail.

ds2ktj
03-01-2005, 12:06 PM
Switching back to the .1 version I am able to mplex only the video (Still doesnt recognize the ac3 stream for whatever reason).

The .2 version crashes on that same stream.

Specifying a bitrate doesn't appear to help. Still crashes the same way. You guys are close...really close. Is there any way to get a statically linked linux binary so I can try it on linux without having to build up a system (I will soon but I haven't pulled the data I need off the drive yet).

As another test I pulled a TY off my tivo and split it with TyTools. Ran MPLEX (0.2) and it crashed the same way. Ran MPLEX 0.1 and it ran fine. So 0.2 (at least the windows binary) it a little broken. The re-mplexed TY looks good and plays back fine.

Diferences between DVD and TY:
* Resolution: 720x480 for DVD and 480x480 for the TY Stream
* Bitrate:
For DVD:
NFO: [mplex] rough-guess multiplexed stream data rate : 10471896

For Ty Stream:
INFO: [mplex] Average bit-rate : 2159600 bits/sec
INFO: [mplex] Peak bit-rate : 13162000 bits/sec

I'm wondering if the Bitrate is just plain ot high for a direct DVD to TY conversion. Perhaps re-encoding will be necessary...although I did get some high-bitrate native DVD video to playback flawlessly as long as it wasnt multiplexed with any audio.

nova1
03-01-2005, 03:28 PM
I was able to rip a DVD to ty last night. Issues I've seen are bad/malformed AC3 frames. Does your AC3 file begin with 0x0b77(AC3 syncword)? Mplex expects this. If you demux in the middle of a series of vobs, the first AC3 frame will have partial data that belongs to the previous AC3 frame. I also modified the ac3fix.c program to fixup some headers that were malformed. The headers specified a large frame which confused mplex. mplex uses this info to locate the next AC3 frame.

Also my video demux didn't look at the IFO file or didn't understand the program chain(PGC and PGCI) info in the vob. I thus got scenes being repeated when playing back the TY file on a Tivo. I believe these are different angles.

I'll have to look at patch3.txt again to see where the issue sequence header issue is.

hxmiller
03-01-2005, 04:28 PM
The mplex ty code searches for an MPEG Sequence Header and then the GOP header and then the PICTURE start code. I believe Sequence headers are optional but not certain. In my patch3.txt, I replicate the first sequence header seen whenever a GOP is NOT preceded by a sequence header. mpeg2enc has the -s option to insert sequence headers before GOP start codes.

I'm using TyTool to mux to mpeg the ty stream with the cuts. I'm not sure how to check if the -s is used. Is there a command line syntax that is known from TyTool.

If -s is not used does patch3 fix this problem. I'll have to try the patch3 tonight.

nova1
03-01-2005, 05:40 PM
mpeg2enc is not really relevant for your case. What we need to know is where the tytool cuts ended up and how it affects the resultant mpeg2 file. Basically, mplex does not like the file.

hxmiller
03-01-2005, 06:40 PM
mpeg2enc is not really relevant for your case. What we need to know is where the tytool cuts ended up and how it affects the resultant mpeg2 file. Basically, mplex does not like the file.


What can I provide to help?

bcc
03-01-2005, 08:04 PM
I was able to rip a DVD to ty last night.It's worked for me in the two cases I've tried as well (tho I needed patch3 for my test last night).
Issues I've seen are bad/malformed AC3 frames. Does your AC3 file begin with 0x0b77(AC3 syncword)?If the extracted AC3 stream is mal-aligned, or contains the DVD AC3 subheader, then I believe mplex spews an error message not a crash. No? I extracted an ac3 stream with vobedit and mplex had no trouble with it. The clip played back on the tivo with dolby digital no problem...

nova1
03-01-2005, 08:43 PM
Right. I agree that mplex will say can't find next AC3 frame. The dvd I tested had bad ac3 frames where the length in the frame didn't match the length from one syncword to the next. The last vob of this dvd tested fine with no errors.


Switching back to the .1 version I am able to mplex only the video (Still doesnt recognize the ac3 stream for whatever reason).

ds2ktj, can your provide more info on what msg mplex spits out on why it can't recognize your ac3 stream.

hxmiller, I'm not sure what to say. You need to analyze the m2v file. Maybe you can try http://www.codeproject.com/csharp/Program_Stream_Analyzer.asp or try the unix version.

bcc
03-01-2005, 08:45 PM
What can I provide to help?You could use tychopper (http://www.dealdatabase.com/forum/showthread.php?t=21339&highlight=tychopper) to narrow your failure case to a minimum and upload it. It should be easy to figure out the alignment problem that is showing up in your tverr if you have a clip. Those alignment problems would explain choppy tivo playback when mplayer playback is fine.

hxmiller
03-02-2005, 12:12 AM
hxmiller, I'm not sure what to say. You need to analyze the m2v file. Maybe you can try http://www.codeproject.com/csharp/Program_Stream_Analyzer.asp or try the unix version.


I'm not much of an mpeg guy. The PS_Analyzer can review the mpg. What should I be looking for. There are 3 "padding PES packets"


Here are the output of the source mpg.

nova1
03-02-2005, 12:32 AM
hxmiller, i looked at the PS_analyzer output and it looks ok. I re-read your issue and I think it is just an alignment issue with the TY records metadata and not the MPEG payload itself. I forgot to delete some code in my patch3.txt that I posted. I've fixed it and re-uploaded the patch to the development thread.

hxmiller
03-02-2005, 11:43 AM
hxmiller, i looked at the PS_analyzer output and it looks ok. I re-read your issue and I think it is just an alignment issue with the TY records metadata and not the MPEG payload itself. I forgot to delete some code in my patch3.txt that I posted. I've fixed it and re-uploaded the patch to the development thread.

I recompiled this morning and had the same issue. It may be an environment issue as bcc is able to demux and remux then load to tivo with my clip.

I'm using a SD Dtivo running 4x RID.

nova1
03-02-2005, 12:12 PM
I'm not sure what is causing the alignment errors on your Tivo. I haven't tested on a DTivo running 4.x. I've only tested on 3.1.1e. Maybe 4.x expects a certain layout of the ty file? You've verified that the mplex TY file is fine by using TyShow and other conversion utilities correct?

hxmiller
03-02-2005, 12:24 PM
I'm not sure what is causing the alignment errors on your Tivo. I haven't tested on a DTivo running 4.x. I've only tested on 3.1.1e. Maybe 4.x expects a certain layout of the ty file? You've verified that the mplex TY file is fine by using TyShow and other conversion utilities correct?

TyShow is working fine. All of my units are 4.x. I have a spare 40gb image of a virgin 3.1.1c.

I'll just need to killhdinitrd the drive and install it. Maybe tonight if I'm not too tired.

AlphaWolf
03-02-2005, 01:31 PM
Tytool does not produce standard mpeg streams; rather it only produces streams that work "enough" for a dvd player. For best results, I would suggest converting it from ty to mpeg using typrocess. I would recommend editing the clip with videoredo as it can correct any remaining errors in these streams.

bcc
03-02-2005, 04:20 PM
Well I'm not sure what the deal is, but I finally did A/B comparisons of the 0.2 build, and the windows version crashes while the linux version works fine. Then I simply recompiled the windows version and it no longer crashed... Anyways, I've put up a fresh 0.3 build which also includes the revised patch3 change, and it works for me....
I know, I should have tried to capture the crash with gdb under cygwin, but I don't have time to set that up at the moment. I'm skipping town for a couple weeks tomorrow so you guys can take over windows builds now :)

hxmiller
03-02-2005, 06:28 PM
Tytool does not produce standard mpeg streams; rather it only produces streams that work "enough" for a dvd player. For best results, I would suggest converting it from ty to mpeg using typrocess. I would recommend editing the clip with videoredo as it can correct any remaining errors in these streams.


If the final destination will be a Tivo is it safe to assume that the standard mpeg { -f 3 } is ok.

Videoredo is really cool and fast. Thanks for the tip.

Now I wonder if the mpeg source will be good enough to mplex to ty and run on a 4.0.1b tivo.

hxmiller
03-02-2005, 08:24 PM
Followed Alphawolf's suggestion and used TyProcess and VideoRedo. I used the 0.3 Windows mplex.

It is nearly perfect on the 4.0.1b Dtivo. I few skips and chops here and there. I'll need to play with the TyProcess options to maybe improve the quality.

AlphaWolf
03-02-2005, 09:59 PM
If the final destination will be a Tivo is it safe to assume that the standard mpeg { -f 3 } is ok.

I would think so, but it wouldn't hurt to try other things and see which works best.

hxmiller
03-03-2005, 09:55 PM
What do these errors indicate? A bad de-mux?

++ WARN: [mplex] Stream c0: data will arrive too late sent(SCR)=65913985 required(DTS)=65913208
++ WARN: [mplex] Audio c0: buf= 3520 frame=030367 sector=00030367
++ WARN: [mplex] Video e0: buf= 907928 frame=021974 sector=00024904

ds2ktj
03-03-2005, 11:54 PM
SOme progress was made with the 0.3 release. It no longer crashes on the MPEG stream that 0.2 crashed on.

* DVD Decrypter on a chapter to disk
* Vobsub to demultiplex AC3 and MPEG2 Video
* AC3FIX.EXE to repair the AC3 headers
* MPLEX to mltiplex into a TY

The process worked flawlessly.
Playback on the PC was OK with Media Player and the ty filter.
Playback on the tivo was very chunky like a couple seconds between frames.



C:\MS\VIDEO_TS>mplex.exe -f 10 MS.m2v MS.80.ac3.fixed -o MS.TY

INFO: [mplex] mplex version 1.6.2 (2.2.3 $Date: 2004/01/13 20:45:26 $)
INFO: [mplex] File MS.m2v looks like an MPEG Video stream.
INFO: [mplex] File MS.80.ac3.fixed looks like an AC3 Audio stream.
INFO: [mplex] Video stream 0: profile 10 selected - ignoring non-standard options!
INFO: [mplex] Found 1 audio streams and 1 video streams
INFO: [mplex] Selecting TY and generic MPEG2 output profile
INFO: [mplex] Multiplexing video program stream!
INFO: [mplex] Scanning for header info: Video stream e0 (MS.m2v)
INFO: [mplex] VIDEO STREAM: e0
INFO: [mplex] Frame width : 720
INFO: [mplex] Frame height : 480
INFO: [mplex] Aspect ratio : 4:3 display
INFO: [mplex] Picture rate : 29.970 frames/sec
INFO: [mplex] Bit rate : 8000000 bits/sec
INFO: [mplex] Vbv buffer size : 229376 bytes
INFO: [mplex] CSPF : 0
INFO: [mplex] Scanning for header info: AC3 Audio stream 00 (MS.80.ac3.fixed)

INFO: [mplex] AC3 frame size = 768

INFO: [mplex] AC3 AUDIO STREAM:
INFO: [mplex] Bit rate : 24576 bytes/sec (192 kbit/sec)
INFO: [mplex] Frequency : 48000 Hz
INFO: [mplex] SYSTEMS/PROGRAM stream:
INFO: [mplex] rough-guess multiplexed stream data rate : 8365848
INFO: [mplex] Setting best-guess data rate.
INFO: [mplex] Run-in Sectors = 998 Video delay = 175906 Audio delay = 184915
INFO: [mplex] New sequence commences...
INFO: [mplex] Video e0: buf=2719744 frame=000000 sector=00000000
INFO: [mplex] Audio bd: buf= 16384 frame=000000 sector=00000000
INFO: [mplex] STREAM e0 completed @ frame 52924.
INFO: [mplex] STREAM bd completed @ frame 55186.
INFO: [mplex] Multiplex completion at SCR=159066004.
INFO: [mplex] Video e0: buf=2480160 frame=052924 sector=00059997
INFO: [mplex] Audio bd: buf= 1792 frame=055186 sector=00055187
INFO: [mplex] VIDEO_STATISTICS: e0
INFO: [mplex] Video Stream length: 847354504 bytes
INFO: [mplex] Sequence headers: 3537
INFO: [mplex] Sequence ends : 0
INFO: [mplex] No. Pictures : 52925
INFO: [mplex] No. Groups : 3537
INFO: [mplex] No. I Frames : 3537 avg. size 78857 bytes
INFO: [mplex] No. P Frames : 14105 avg. size 20721 bytes
INFO: [mplex] No. B Frames : 35284 avg. size 7826 bytes
INFO: [mplex] Average bit-rate : 3838400 bits/sec
INFO: [mplex] Peak bit-rate : 8179200 bits/sec
INFO: [mplex] BUFFERING min 1420160 Buf max 1960456
INFO: [mplex] AUDIO_STATISTICS: bd
INFO: [mplex] Audio stream length 42383616 bytes.
INFO: [mplex] Frames : 3047310573
INFO: [mplex] BUFFERING min 1792 Buf max 4096
INFO: [mplex] MUX STATUS: no under-runs detected.
INFO: [mplex] Generating master chunk for chunks 0:4095
INFO: [mplex] Generating master chunk for chunks 4096:6819


Does anyone know what the max bitrate a S2 Dtivo can handle. THe video quality on the TIVO for what gets played back is true to the source (no loss). Just wish it would play back smoothly.

Going to try the VideoRedo suggested above to see if that helps.

nova1
03-04-2005, 03:09 AM
ds2ktj,
I believe you have to resize/rescale your video input 720x480 to 480x480 since you are using an S2 DTivo. No resizing/rescaling needed if on a HR10-250.

ds2ktj
03-04-2005, 10:06 AM
THat would figure. The amount of time required to re-encode the video would likely not be worth it. Interestingly the video does play back smoothly not re-encoded without an audio track. Perhaps the audio is just enough to put the tivo over the edge. I'll attempt a re-encode and see how that goes. Now I'm a little bummed :( Looks like I need an HD Tivo now :)

nova1
03-04-2005, 01:21 PM
I'm not familiar enough with the broadcom chip on the HDVR2 to know if it can support 720x480. I have some product briefs on the bcm7020 and bcm7030 and both seem to indicate they can do MP@HL MPEG2. I don't know what broadcom chip is in the HDVR2 though. It might be possible. In my limited test, it certainly displayed the video but it was scrolling along the screen very slowly.

cat /proc/brcm/playback0 shows a size of 720x480:


Playback Channel 0
Running: 0 Busy: 0 Finished: 0
Bytes Written: 0 Read Offset: 0(0x00000000) Write Offset: 0(0x00000000)
Desc Done: 0 HW State: 0 Playback State: 1
Video Fifo: 322784 Audio Fifo: 10238
Has Audio: 1 Sync Mode: 1
Audio PTS Req: 505 Error: 506 ADP: 3448
x: 0,y: 0,width: 720,height: 480, ontop = 0
Main Video STC: 0x2E18528, Audio STC: 0x2E1852C
Main Video PTS: 0x2E18C7B, Audio PTS: 0x2E17816
Main Video Delta: -1875, Audio Delta: 3350
BA/BP 0/0 ERR:DUND/TIM/BUFBL 0/0/0
DC 0, FR/HW 0/0 Buffered 0

darrin75
03-20-2005, 08:12 PM
I just try vspilt a show with tytools, then try mplexing them back with this tool. No love, Am i suppost to mutilplex to mpeg first then vsplit, then mplex. I know everytime i have tried it says unable to read file mpv. etc

nova1
03-20-2005, 11:45 PM
I've never used vsplit. I played around with tytool9r18 to test issues hxmiller was seeing. You can use tytool9r18 and then go to Files->Process: Multiplex File(s) and it creates an MPEG2 Program Stream from the TY file. I then used bbdmux to demux/split out the m2a and m2v files. I then feed these m2a and m2v files into mplex -f 10 to produce a TY file.

nova1
03-20-2005, 11:49 PM
If mplex is complaining about the m2v file then you have a problem with running vsplit.

darrin75
03-26-2005, 04:17 PM
I have everything mplexing fine, but no go on reinserting to tivo?

bcc
03-26-2005, 04:55 PM
"No go" meaning what? Does the resulting .ty file play with tyshow or mplayer? On your tivo, are you getting errors in /var/log/tverr when you try to play back the recording?

T u r b o
03-26-2005, 05:40 PM
This is really great work guys...

I've gotten inserted streams to work, but it's very choppy on playback.

I've got a Pioneer 810HS tivo unit, which can record and playback 720x480 @ DVD rates (it's a DVD recorder unit).

I took a DVD with a small promo VOB file, I demux'd it using m2psd -t, fixed the AC3 track and ran it through mplex -f 10 with no errors or warnings:



INFO: [mplex] SYSTEMS/PROGRAM stream:
INFO: [mplex] rough-guess multiplexed stream data rate : 7855600
INFO: [mplex] Setting best-guess data rate.
INFO: [mplex] Run-in Sectors = 998 Video delay = 187332 Audio delay = 196341
INFO: [mplex] New sequence commences...
INFO: [mplex] Video e0: buf=2719744 frame=000000 sector=00000000
INFO: [mplex] Audio bd: buf= 16384 frame=000000 sector=00000000
INFO: [mplex] STREAM e0 completed @ frame 1308.
INFO: [mplex] STREAM bd completed @ frame 1364.
INFO: [mplex] Multiplex completion at SCR=4070059.
INFO: [mplex] Video e0: buf=2670332 frame=001308 sector=00001483
INFO: [mplex] Audio bd: buf= 1792 frame=001364 sector=00001365
INFO: [mplex] VIDEO_STATISTICS: e0
INFO: [mplex] Video Stream length: 29965564 bytes
INFO: [mplex] Sequence headers: 88
INFO: [mplex] Sequence ends : 0
INFO: [mplex] No. Pictures : 1309
INFO: [mplex] No. Groups : 88
INFO: [mplex] No. I Frames : 88 avg. size 38728 bytes
INFO: [mplex] No. P Frames : 349 avg. size 27681 bytes
INFO: [mplex] No. B Frames : 873 avg. size 19350 bytes
INFO: [mplex] Average bit-rate : 5484400 bits/sec
INFO: [mplex] Peak bit-rate : 9528400 bits/sec
INFO: [mplex] BUFFERING min 172772 Buf max 2284004
INFO: [mplex] AUDIO_STATISTICS: bd
INFO: [mplex] Audio stream length 1048320 bytes.
INFO: [mplex] Frames : 1365
INFO: [mplex] BUFFERING min 1792 Buf max 2560
INFO: [mplex] MUX STATUS: no under-runs detected.
INFO: [mplex] Generating master chunk for chunks 0:238


/var/log/tverr recorded lots of errors:



Mar 26 20:55:59 (none) TmkReadAheadCache[267]: Invalid PES triple: fsid 102922, Irec 38, inx = 0
Mar 26 20:55:59 (none) TmkReadAheadCache[267]: Invalid PES triple: fsid 102922, Irec 39, inx = 0
Mar 26 20:55:59 (none) TmkReadAheadCache[267]: Invalid PES triple: fsid 102922, Irec 40, inx = 0
Mar 26 20:55:59 (none) TmkReadAheadCache[267]: Invalid PES triple: fsid 102922, Irec 41, inx = 0
Mar 26 20:56:00 (none) TmkTransform::Trace[267]: Get Validate (buffer 0) 191 segments failed: PES buffer segment 6 length is not word aligned (264810) (fsid 102922, Irec = 42, count 1)Trying to recover
Mar 26 20:56:00 (none) TmkTransform::Trace[267]: Get Validate (buffer 0) 111 segments failed: PES buffer segment 1 length is not word aligned (183731) (fsid 102922, Irec = 43, count 1)Trying to recover
Mar 26 20:56:01 (none) TmkTransform::Trace[267]: Get Validate (buffer 0) 4751 segments failed: PES buffer segment 10 length is not word aligned (270775) (fsid 102922, Irec = 44, count 1)Trying to recover
Mar 26 20:56:01 (none) TmkTransform::Trace[267]: Get Validate (buffer 0) 170 segments failed: PES buffer segment 2 length is not word aligned (349406) (fsid 102922, Irec = 45, count 1)Trying to recover
Mar 26 20:56:01 (none) TmkTransform::Trace[267]: Get Validate (buffer 0) 221 segments failed: PES buffer segment 1 length is not word aligned (515394) (fsid 102922, Irec = 46, count 1)Trying to recover


Hope this helps...

In addition, I see that m2psd can demux into PES streams. mplex cannot deal with these yet from what I can tell, but it seems like it would be far more valuable to have a tool that can incorporate the A/V sync information rather than discard it...

I've started to look at what it would take to get this support into mplex. lvemux seems to accept PES streams but it's output seems unreadable by everything I've tried...

- Mike

darrin75
03-26-2005, 07:19 PM
No go means, ty show & mplayer play perfect, but i am unable to insert into the tivo. It blocks it, am i missing something, did a need a modififed mfs_ftp.tcl

bcc
03-26-2005, 09:33 PM
No go means, ty show & mplayer play perfect, but i am unable to insert into the tivo. It blocks it, am i missing something, did a need a modififed mfs_ftp.tclThe synthesized .ty file should insert just like ordinary .ty files. Except that you probably don't have any XML data to go along with the synthesized recording unless you used manually supplied it. The result being that the now playing info for the inserted recording will have minimal info (just recording name). You probably need to set info(dbl) to at least 5 and check your mfs_ftp log.

bcc
03-26-2005, 09:58 PM
In addition, I see that m2psd can demux into PES streams. mplex cannot deal with these yet from what I can tell, but it seems like it would be far more valuable to have a tool that can incorporate the A/V sync information rather than discard it...mplex has -O to allow you to specify the sync offset. But yes, would be nice to track PTS from the source streams if the source streams happen to have it and there are drift/discontinuity issues with the source streams.
From your tverr, it looks like another case of bad packet lengths, even though the code tries to make sure this doesn't happen. The bug isn't obvious to me just from inspection. So the easiest way to solve this would be to get a small sample of the souce streams that can be used to reproduce the problem. Haven't seen anything uploaded yet.

darrin75
03-26-2005, 11:01 PM
Ok heres what i have ripped dvd, demux to ac3 and m2v. Encoded audio to mp2, and then ran thru mplex, no errors, but when i try to insert it it gives me errors, disconnects..i tried setting the dbl to 5 , still stuck at this point..

bcc
03-27-2005, 05:09 PM
Ok heres what i have ripped dvd, demux to ac3 and m2v. Encoded audio to mp2You shouldn't need to transcode the ac3 if your destination is a directv tivo. You just need to make sure that your AC3 stream doesn't have the AC3 DVD subheader.
when i try to insert it it gives me errors, disconnects??

darrin75
03-27-2005, 06:32 PM
Ok i feel like an a$$. I didn't apply the patches, so i am able to transfer now, get back to on the video playback.

darrin75
03-28-2005, 10:29 PM
Well Video is pretty good, but its almost like its playing in slow motion, however if i recode to to svcd and then a a dvd patch with 15.0 mbits which is DVB it plays back better but still not all the way thru though. Were do we go from here guys?

bcc
03-29-2005, 12:39 AM
Well Video is pretty good, but its almost like its playing in slow motion, however if i recode to to svcd and then a a dvd patch with 15.0 mbits which is DVB it plays back better but still not all the way thru though. Shouldn't need to downconvert to SVCD resolution to get smooth playback. I don't, but then my test box is an hr10-250 not a SD series 2 dtivo, like I think you have.
Were do we go from here guys?Some troubleshooting? Such as: errors in /var/log/tverr? Audio playback is real-time when video appears slow? "Slow motion" as in playback freezes on some frames (and dropping others), or slow as in recording plays back with all frames at a lower frame rate (total elapsed recording time is too long)? Does the .m2v play back at the correct rate when you play it using mplayer/elecard/whatever?
If you can't get anywhere from troubleshooting, you maybe could upload your mpeg streams with info on what method you used to extract the streams from the .vob.

darrin75
03-29-2005, 01:10 AM
Slow motion" as in playback freezes on some frames


Method tmpgenc 3.0xp mpeg tools
ALSO TRIED VOB EDIT SAME RESULTS..
What methods do you use..

And yes i have dtivo software version 3.1.1c

Any suggestions.

I have looked at the tverr log and can find nothing, but i am going to try one thing then i will post my logs..

bcc
03-29-2005, 02:31 PM
Slow motion" as in playback freezes on some frames


Method tmpgenc 3.0xp mpeg tools
ALSO TRIED VOB EDIT SAME RESULTS..
What methods do you use..vobedit, or even mplayer with -dumpvideo/-dumpaudio worked for me.
Any suggestions.

I have looked at the tverr log and can find nothing, but i am going to try one thing then i will post my logs..The playback freezing symptom sounds like playback with alignment errors. I'd expect telltale errors in tverr, in which case we just need a clip with which to reproduce the alignment problem. Otherwise, we probably need a clip anyways, unless you're gonna try more things to narrow down the conditions in which it works fine vs not.

darrin75
03-29-2005, 05:32 PM
Heres my logs

darrin75
03-29-2005, 05:36 PM
debug mode attached

What else do you need?

darrin75
03-29-2005, 08:04 PM
Ok here's how far i have came..

Using dvd patcher on m2v file, if on dtivo you patch the first header only to 480 and match the bit rate say 9000000 if thats what the source bit rate is. It works pretty darn good..If you have a dvd vob or m2v with the bit rate over 9000000 then i think you run into problems. Is there any way to handle bitrate's over this threshold?? I am going to do some more testing. This sure is an awesome program you and nova1 have come up with...Any suggestions are good. I think part of the problem when using a tivo that requires 480 X 480 if you do not patch the first header of 720 to 480 you have problems. By patching the first header you trick the tivo as you would a dvd player..

darrin75
03-29-2005, 09:07 PM
It seems doing a large join vob does not work, will not transfer to the tivo.

bcc
03-30-2005, 01:33 AM
I still haven't seen any sample streams of a problem so I'm still just guessing. I would guess that the hdvr2s are using an older broadcom chip that can't quite handle full DVD data rates (10Mbps). This is what nova1 seemed to suggest here: http://www.dealdatabase.com/forum/showpost.php?p=213667&postcount=44 But it may be that mplex is not packing the streams right (letting the video stream underrun).
Your tverr shows no alignment problems, but it does look like you're in need of running fix_expdate.tcl to correct the recording timestamps that mfs_ftp flubbed upon insertion.
Patching the video frame size from 480x480 to 720x480 is not necessary on the hr10-250.

darrin75
04-01-2005, 05:10 PM
Are there any more patches to look forword to. Is this the final version etc. By the way what kind of stream file can i provide to help you. Maybe a small file say 5.0mb. I am trying to help all i know how to make this mplex universal between all tivo. Thats probably impossible though to be universal. In my opinion the audio is whats setting it back for me, if i mplex just the m2v file it plays perfect!!! The audio puts it over the edge, freezing etc...

tivo4mevo
04-03-2005, 12:04 AM
Great work on this, bcc and nova1; I was very excited to see this.

One housekeeping item, should this sticky FAQ (Putting Video from non-tivo sources onto a tivo (http://www.dealdatabase.com/forum/showthread.php?t=31476)) be updated to link to this thread now? Seems to me that this is the best way to put non-TiVo sourced video onto a TiVo, no?

I've been experimenting with trying to get parts of DVDs into my tivo, but have been having mixed results. Some information

-DirecTivo SD-DVR40 running 4.0.1b with MFS_FTP used to load tys
-WinXP laptop w/ tymplex-0.3-win, TMPEnc v2.5, TyTool r19, DVDDecrypter.

My process:
1) Use DVDDecryptor to put small VOBs from DVDs onto my laptop's HD
2) Split video and audio from the VOB using TMPGEnc or TyTool
3) mplex video only, mplex audio only, mplex both
4) Use WMP w/ TyShow to inspect resulting tys
5) MFS_FTP the ty to DTiVo and test it

I've observed the following:
- Problems when using TyTool to split vobs (I've starting using TyTool to split today)
- Problems when mplex reports that is does not recognizing my split files (.m2v .m2a .ac3)
- Problems when mplex chokes on audio or video
- Problems when I view the ty on my DTiVo.

In my best success, I was able to get a short "Digitally Mastered-THX" VOB to play on the DTiVo fine when I don't mplex in the audio, but with the audio mplexed in, the resulting Ty won't run on WMP w/TyShow and will play at 1/10th speed on my DTiVo, with no sound until the very end (and then I heard the end of that THX "vroooommmmm" noise just before the "TiVo boop").

I've tried to make some useful notes (attached spreadsheet and text file) to see if they help. And I can try to make the VOBs available, as they're each small (7-15MB), but seeing that I'm fairly new to this, I thought I should post to make sure there's nothing obvious that I am missing.

Thanks

darrin75
04-03-2005, 12:28 AM
I get about the same results. Yeah if you include the audio the bitrate is probably blowing out the buffer. I am also do some testing to see what works best. tivo4mevo keep up the testing the more people we get involved the more data we will have to work with..

tivo4mevo
04-03-2005, 12:39 AM
Sounds good. I'm going to try to figure out if I can resample the audio, to see if that helps.

bcc
04-03-2005, 03:02 PM
tivo4mevo,
In the case where mplex is failing with the "i >= 0" assertion failure, this is because your mplex binary doesn't include the latest patch4. Actually there's a bug in nova1's patch4 as well, where it writes a garbage timestamp if i = -1. My version of the fix is:
***************
*** 152,160 ****
break;
}
}
! assert(i >= 0);
! put64((u_char *)&gop_stamps[i], gop_stamps[i]);
! write_internal(ofd, (u_char *)&gop_stamps[i], sizeof(tivo_tstamp_t));
}

static void
--- 152,164 ----
break;
}
}
! stamp = 0;
! if (i >= 0) {
! stamp = gop_stamps[i];
! }
! /* Write out final timestamp */
! put64(&stamp, stamp);
! write_internal(ofd, (u_char *)&stamp, sizeof(tivo_tstamp_t));
}

static void

darrin75
04-03-2005, 03:23 PM
Ok if Anybody is using dtivo..

I have had some pretty good results. Although not perfect yet.


If you mplex with bitrate of dvb 1500000 and use a bigger buffer. Play back on my dtivo is pretty good even though it cuts out still every once in awhile.
Resolution on my box does matter it plays the 720 x 480 just fine. Even though dtivo records at 480 x 480. So now what i plan on trying is using tytools to patch some audio holes maybe this will help..I do know that on my spiderman 2 trailer which is what i am working with. (ripped vob). The slight freezing in certain frames and audio cut out always happen in the same place..

bcc
04-03-2005, 03:38 PM
In the case where mplex is failing with the "i >= 0" assertion failureBTW, if you're seeing this assertion failure, you probably have bigger problems to worry about as mplex has failed to generate any video sequence data. In this case, your video stream is probably missing or unreadable by mplex.

tivo4mevo
04-04-2005, 12:59 AM
Thanks, bcc.

My missing patch 4 exposes my limited utility as a debugger, as I'm reliant upon the pre-canned Win32 binaries for right now (despite you generously providing the build env.). Any chance there's a Win32 binary with patch 4 available?

I'll post my vob, m2v, ac3, and resulting ty file, as I'm curious if it will play without issue on a HD.

t4m

darrin75
04-04-2005, 05:04 AM
Youn can patch win32 binary from the cmd line.

gottahavit
04-17-2005, 07:36 PM
So I've tried several ways of editing files from the Tivo and reuploading with limited success. I have tried with tytools and and typrocess, both with .3 and with the patch 5 version(for windows). Niether seems to retain acceptable audio sync. The best results seem to be with the patched windows version using Tytools. It plays flawlessly, but with minor audio sync issue.

I've tried simply pulling a TY from the tivo and just running it through typrocess and then splitting and running mplex, but even without edits there are issues. All of these issues present themselves on the PC as well as the TIVO.

Anyone had any real success editing and uploading back to a DirectTivo?

Hopefully this tool will progress as it seems very close.

hxmiller
04-17-2005, 10:43 PM
I've had success using TyProcess to demux the file, VideoRedo to edit and split the file and the Windows mplex (patch5). I did have a 1 1/2 long movie that I demux'd and edited using TyTools there is an occasional second of missing audio but this was a movie for my daughter. I was getting sick of her complaining about the commericals.

bcc
04-18-2005, 02:04 AM
So I've tried several ways of editing files from the Tivo and reuploading with limited success. I have tried with tytools and and typrocess, both with .3 and with the patch 5 version(for windows). Niether seems to retain acceptable audio sync. The best results seem to be with the patched windows version using Tytools. It plays flawlessly, but with minor audio sync issue.You used the -O option to mplex to specify the av sync delay?

bcc
04-18-2005, 02:06 AM
I've had success using TyProcess to demux the file, VideoRedo to edit and split the file and the Windows mplex (patch5). I did have a 1 1/2 long movie that I demux'd and edited using TyTools there is an occasional second of missing audio but this was a movie for my daughter. I was getting sick of her complaining about the commericals.If this is the end goal, how come folks aren't using chunkedit to just do chunk-level editing out of the commercials?

gottahavit
04-18-2005, 05:48 PM
If this is the end goal, how come folks aren't using chunkedit to just do chunk-level editing out of the commercials?

Last time I looked(granted a while ago), chunkedit didn't work for DTivo series 2, Control station definitely didn't work for editing, and tystudio never works for series 2. Does this process work now for series 2 DTivos?

Also editing on the PC is much easier especially since in most cases I want to burn most to DVD and only a few do I want to load back up to the tivo. Also my understadning is that GOP editing is more accurate than chunk editing.

Roger Dylan
04-18-2005, 06:21 PM
chunkedit didn't work for DTivo series ... tystudio never works for series 2.

Updates:

Chunkedit works on s2 DTivos. I use it only sporadically and I'm currently having problems with it on an s2 1 out of 3 files, but I think the cause may be elsewhere because my recollection is last time I used it there were no problems at all; I'm trouble shooting now but I'm 90% certain it's something else I've let get out of whack.

Tystudio works fine s2 with updated s2 binaries, tyindex and tyserver, but the video files have to be Tivo-resident while being edited, can't download to the pc first like on s1's.

bcc
04-19-2005, 03:49 AM
Also editing on the PC is much easier especially since in most cases I want to burn most to DVD and only a few do I want to load back up to the tivo. Also my understadning is that GOP editing is more accurate than chunk editing.If the goal is just to be able to do ty->mpg->GOP editing->ty, then it'd be good if the ty->mpg step didn't throw out the original tivo timestamps. This would make rebuilding the ty after editing easier. Easier because the original tivo timestamps can be re-used instead of synthesized in the mplex step.
Just a thought.

gottahavit
04-19-2005, 08:10 AM
If the goal is just to be able to do ty->mpg->GOP editing->ty, then it'd be good if the ty->mpg step didn't throw out the original tivo timestamps. This would make rebuilding the ty after editing easier. Easier because the original tivo timestamps can be re-used instead of synthesized in the mplex step.
Just a thought.


I assume you are referring to the need to demux and then remux the A/V. If so then I agree completely, it would also be a lot nicer from a useability standpoint to perform the conversion to TY directly on the mpeg stream. I'm not sure how difficult of a change this would be to mplex(or some derived tool). I am in the process of porting mplex to win32(not cygwin) and will look at this when done if no one else attempts it first. I would also think this would make more sense with uploading DVDs as well.

anyway an update. Thanks for the hint with the -O, this has definitely improved things, the only issues now seem to be a slight drift in the audio as it plays on that can be resolved witha quick fast forward and some strange behavoir with the rewind jumping back to where it started when you hit play again.

bcc
04-19-2005, 08:35 PM
I assume you are referring to the need to demux and then remux the A/V.No, I'm referring to the ty->mpg step where the original tivo timestamps are thrown out. Now that we know that the values for these timestamps are generated in a tivo platform dependent way, expecting TY enabled mplex to re-generate these in a 100% perfect manner for all platforms is problematic. It would probably be easier for the tool that is performing the ty->mpg step to save the tivo timestamps in such a way that they can be re-used in the mpg->ty step. In other words, have tystudio, hdemux or tytool stop throwing out the tivo timestamps.
I am in the process of porting mplex to win32Has been done before; see http://sourceforge.net/projects/mjpgtools/
it would also be a lot nicer from a useability standpoint to perform the conversion to TY directly on the mpeg stream.Agree. TY mplex inherited mplex's usability problems. Personally I prefer correctness first...

and some strange behavoir with the rewind jumping back to where it started when you hit play again.Maybe you reinserted the recording with the original XML without an updated <StreamFileSize> tag?

gottahavit
04-20-2005, 08:16 PM
Maybe you reinserted the recording with the original XML without an updated <StreamFileSize> tag?

How does this work with mpg files you are creating for the tivo? I downloaded the TY, edited it and then recreated the TY. Is there something else other than mplex that needs to be done to let the tivo know about the file information?

bcc
04-21-2005, 02:41 AM
Is there something else other than mplex that needs to be done to let the tivo know about the file information?Nova1 merged some XML support from ty1to2 into mplex. This allows you to pass the original recording's XML into mplex using a "-x <xml-file>" argument. The code will update the StreamFileSize object to match the size of the data that mplex creates. I don't know how you're doing re-insertion, but if you're sticking the original XML into a .tmf manually (like someone else did with ty1to2) then you'll probably have problems. I don't think mfs_ftp does the right thing automatically when you leave out the XML either. Not that I've done exhaustive testing, I was just guessing that you're having problems because of this.

gottahavit
04-21-2005, 07:28 AM
I am doing nothing with XML, the final step was to run a m2v and m2a through mplex and then upload the TY using mfs_ftp.

AlphaWolf
04-21-2005, 12:17 PM
No, I'm referring to the ty->mpg step where the original tivo timestamps are thrown out. Now that we know that the values for these timestamps are generated in a tivo platform dependent way, expecting TY enabled mplex to re-generate these in a 100% perfect manner for all platforms is problematic. It would probably be easier for the tool that is performing the ty->mpg step to save the tivo timestamps in such a way that they can be re-used in the mpg->ty step. In other words, have tystudio, hdemux or tytool stop throwing out the tivo timestamps

Hmm...I don't know much about the specifics of mpeg, but afaict (thus am probably wrong) tystudio doesn't adjust the original timestamp info unless it detects an error somewhere in the stream where it repairs it and thus some info needs to be adjusted, whereas tytool re-adjusts the whole thing.

bcc
04-21-2005, 12:34 PM
I'm referring to the tivo timestamps that are found in the tivo chunk record headers, not the PES packet timestamps found in the mpeg2 headers. The tivo timestamps don't use the mpeg2 standard units of measurement (tivo uses 1*10^9/sec rate), so you would necessarily do some adjusting if you were to use them. My read of tystudio's tydemux is that it just throws out the tivo timestamps.

AlphaWolf
04-21-2005, 04:55 PM
I'm referring to the tivo timestamps that are found in the tivo chunk record headers, not the PES packet timestamps found in the mpeg2 headers. The tivo timestamps don't use the mpeg2 standard units of measurement (tivo uses 1*10^9/sec rate), so you would necessarily do some adjusting if you were to use them. My read of tystudio's tydemux is that it just throws out the tivo timestamps.

Ah ok, I was thinking they were identical (must have been looking at the wrong fields.)

rung
04-21-2005, 08:23 PM
Also my understadning is that GOP editing is more accurate than chunk editing. Chunkedit does true GOP editing. It accomplishes this by changing the extra records left over in the end chunks to type zero and Tivo just ignores them. It even zeros out the initial b fields since Tivo ignores the broken GOP flag.

Regards,
Rung

rung
04-21-2005, 08:29 PM
Now that we know that the values for these timestamps are generated in a tivo platform dependent way, expecting TY enabled mplex to re-generate these in a 100% perfect manner for all platforms is problematic. Other than the S1 DTivos, I though that all Tivos can share ty's. Specifically, I was under the impression that a 3.0 S1 SA stream was a universal donor (kind of like the blood type O of ty's). Am I wrong about that?

Thanks,
Rung

rung
04-21-2005, 08:37 PM
Nova1 merged some XML support from ty1to2 into mplex. This allows you to pass the original recording's XML into mplex using a "-x <xml-file>" argument. The code will update the StreamFileSize object to match the size of the data that mplex creates. I don't know how you're doing re-insertion, but if you're sticking the original XML into a .tmf manually (like someone else did with ty1to2) then you'll probably have problems. I don't think mfs_ftp does the right thing automatically when you leave out the XML either. Not that I've done exhaustive testing, I was just guessing that you're having problems because of this.

Mfs_ftp inserts a ty looking only at the segment size in the master chunk of each segment, then creating a dummy recording of that number of chunks, and then filling that area with the real data. If there is no XML, the ty should still play fine, it will just look weird in show description screen.

Regards,
Rung

bcc
04-23-2005, 12:20 AM
Other than the S1 DTivos, I though that all Tivos can share ty's. Specifically, I was under the impression that a 3.0 S1 SA stream was a universal donor (kind of like the blood type O of ty's).good point. we just know that there are platform specific problems with the synthetically generated ty files. Preserving the original tivo timestamps instead of synthesizing them would be a relatively "easy" way to narrow down what's going on.

Am I wrong about that?I'm not sure. The timestamps are generated differently on the 810hs than the hr10-250 for example. But I don't know for sure if the 810hs has trouble playing extracted recordings from the hr10-250.

bcc
04-23-2005, 01:19 AM
Mfs_ftp inserts a ty looking only at the segment size in the master chunk of each segment, then creating a dummy recording of that number of chunks, and then filling that area with the real data. If there is no XML, the ty should still play fine, it will just look weird in show description screen.

Regards,
RungIf you leave out the XML, mfs_ftp doesn't seem to quite do the right thing with a bunch of attributes. Besides the weird show description, the trick play green bar is sized/scaled differently. This in turn makes trick plays behave differently, which is what gottahavit was complaining about.

Also without the XML, mfs_ftp mis-sets the recording expiration time.

gottahavit
04-23-2005, 10:09 AM
If you leave out the XML, mfs_ftp doesn't seem to quite do the right thing with a bunch of attributes. Besides the weird show description, the trick play green bar is sized/scaled differently. This in turn makes trick plays behave differently, which is what gottahavit was complaining about.

Also without the XML, mfs_ftp mis-sets the recording expiration time.


AHHH, so is there a way to get mplex to make at the very least a dummy xml into the TY to at least allow the seeking functions to work correctly?

rung
04-23-2005, 01:27 PM
AHHH, so is there a way to get mplex to make at the very least a dummy xml into the TY to at least allow the seeking functions to work correctly?

There are lots of things that can screw up the trick play: The bad master header timestamps or bitmap, incompatible chunk headers timestamps with the mpeg PES timestamps, and possibly the chunk header stream offsets (I hope not - they are complicated). Apparantly, lacking XML can mess it up as well, although I have never experienced it.

Regards,
Rung

bcc
04-26-2005, 03:55 AM
AHHH, so is there a way to get mplex to make at the very least a dummy xml into the TYBasically yes, using the -x command line argument to mplex that I told you about before. Since you say you're starting with a .ty, then you could also extract the .xml into a separate file using mfs_ftp. Then supply that file to TY mplex with "-x filename".

gottahavit
04-26-2005, 05:57 PM
Basically yes, using the -x command line argument to mplex that I told you about before. Since you say you're starting with a .ty, then you could also extract the .xml into a separate file using mfs_ftp. Then supply that file to TY mplex with "-x filename".

Yeah I understand that, but what about creating one from scratch in mplex for files that were not TYs or for which the xml is long gone.

compwiz312
04-28-2005, 04:29 AM
I'm trying to convert a few AVI DiVx files (bittorrent DLs of shows I missed) into TYs to insert into my Tivo (this is unrelated to my other pending mfs-ftp issue). I can create them fine using CCE and DVD2SVCD (with a modified avisynth), but I wanted to automate the process.

To do so, I used ffmpeg and mplex to have this batch file
@echo off
ffmpeg -y -i %1 -f mpeg2video -s 720x360 -padtop 60 -padbottom 60 -r 29.97 -b 2000 -aspect 4:3 -an out.m2v
ffmpeg -y -i %1 -f mp2 -ab 192 -ar 32000 -ac 2 out.m2a
mplex -f 10 out.m2v out.m2a -r 2000 -o out.ty
del out.m2v
del out.m2a

However, whenever it reaches the muxing phase, I get these errors:
INFO: [mplex] File out.m2v looks like an MPEG Video stream.
INFO: [mplex] File out.m2a looks like an MPEG Audio stream.
INFO: [mplex] Video stream 0: profile 10 selected - ignoring non-standard opt
ions!
INFO: [mplex] Found 1 audio streams and 1 video streams
INFO: [mplex] Selecting TY and generic MPEG2 output profile
INFO: [mplex] Multiplexing video program stream!
INFO: [mplex] Scanning for header info: Video stream e0 (out.m2v)
INFO: [mplex] VIDEO STREAM: e0
INFO: [mplex] Frame width : 720
INFO: [mplex] Frame height : 480
INFO: [mplex] Aspect ratio : 4:3 display
INFO: [mplex] Picture rate : 29.970 frames/sec
INFO: [mplex] Bit rate : variable
INFO: [mplex] Vbv buffer size : 71680 bytes
INFO: [mplex] CSPF : 0
INFO: [mplex] Scanning for header info: Audio stream c0 (out.m2a)
INFO: [mplex] MPEG AUDIO STREAM: c0
INFO: [mplex] Audio version : 1.0
INFO: [mplex] Layer : 2
INFO: [mplex] CRC checksums : no
INFO: [mplex] Bit rate : 24576 bytes/sec (192 kbit/sec)
INFO: [mplex] Frequency : 32000 Hz
INFO: [mplex] Mode : 0 stereo
INFO: [mplex] Mode extension : 0
INFO: [mplex] Copyright bit : 0 no copyright
INFO: [mplex] Original/Copy : 1 original
INFO: [mplex] Emphasis : 0 none
INFO: [mplex] SYSTEMS/PROGRAM stream:
INFO: [mplex] rough-guess multiplexed stream data rate : 0201848
INFO: [mplex] target data-rate specified : 202000
INFO: [mplex] Setting specified specified data rate: 202000
INFO: [mplex] Run-in Sectors = 998 Video delay = 7285202 Audio delay = 728820
5
INFO: [mplex] New sequence commences...
INFO: [mplex] Video e0: buf=2719744 frame=000000 sector=00000000
INFO: [mplex] Audio c0: buf= 4096 frame=000000 sector=00000000
++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=8388235 required
(DTS)=8354270
++ WARN: [mplex] Video e0: buf=2709919 frame=000357 sector=00000415
++ WARN: [mplex] Audio c0: buf= 4096 frame=000330 sector=00000330
++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=13661504 require
d(DTS)=8822738
++ WARN: [mplex] Video e0: buf=2719152 frame=000513 sector=00000599
++ WARN: [mplex] Audio c0: buf= 4096 frame=000474 sector=00000474
++ WARN: [mplex] Stream c0: data will arrive too late sent(SCR)=18222875 require
d(DTS)=9290525
++ WARN: [mplex] Video e0: buf=2719744 frame=000668 sector=00000780
++ WARN: [mplex] Audio c0: buf= 3232 frame=000619 sector=00000619
++ WARN: [mplex] Stream c0: data will arrive too late sent(SCR)=26807054 require
d(DTS)=9757085
++ WARN: [mplex] Video e0: buf=2719744 frame=000824 sector=00000966
++ WARN: [mplex] Audio c0: buf= 3232 frame=000763 sector=00000763
++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=32540296 require
d(DTS)=10225139
++ WARN: [mplex] Video e0: buf=2696766 frame=000980 sector=00001150
++ WARN: [mplex] Audio c0: buf= 4096 frame=000907 sector=00000907
++ WARN: [mplex] Stream c0: data will arrive too late sent(SCR)=35861742 require
d(DTS)=10693445
++ WARN: [mplex] Video e0: buf=2719744 frame=001135 sector=00001331
++ WARN: [mplex] Audio c0: buf= 3232 frame=001052 sector=00001052
++ WARN: [mplex] Stream c0: data will arrive too late sent(SCR)=38909142 require
d(DTS)=11160005
++ WARN: [mplex] Video e0: buf=2719744 frame=001291 sector=00001513
++ WARN: [mplex] Audio c0: buf= 3232 frame=001196 sector=00001196
++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=41845152 require
d(DTS)=11627540
++ WARN: [mplex] Video e0: buf=2715124 frame=001447 sector=00001697
++ WARN: [mplex] Audio c0: buf= 4096 frame=001340 sector=00001340
++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=44608501 require
d(DTS)=12096008
++ WARN: [mplex] Video e0: buf=2718629 frame=001603 sector=00001879
++ WARN: [mplex] Audio c0: buf= 4096 frame=001484 sector=00001484
++ WARN: [mplex] Stream c0: data will arrive too late sent(SCR)=56784878 require
d(DTS)=12562925
++ WARN: [mplex] Video e0: buf=2719744 frame=001758 sector=00002062
++ WARN: [mplex] Audio c0: buf= 3232 frame=001629 sector=00001629
++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=63375893 require
d(DTS)=13029941
++ WARN: [mplex] Video e0: buf=2709870 frame=001914 sector=00002248
++ WARN: [mplex] Audio c0: buf= 4096 frame=001773 sector=00001773
**ERROR: [mplex] Too many frame drops -exiting

What could I be doing wrong, should I just stick to the manual process. I would like to automate this, I just don't know where these errors are coming from.

Thanks,
Justin

bcc
04-28-2005, 02:31 PM
Yeah I understand that, but what about creating one from scratch in mplex for files that were not TYs or for which the xml is long gone.Hasn't been done, but it wouldn't be hard to generate the xml now that mplex has an interface to libxml. Biggest problem is figuring out the list of necessary&sufficient xml objects to set. Anybody got the list?

compwiz312
04-29-2005, 05:00 PM
OK, I realized my previous problem was caused by bugginess in ffmpeg (it was producing streams with incorrect timecodes among other errors).

I switched to Quenc (another free MPEG2 encoder) but now I am receiving the following errors everytime I try and mux the file:


INFO: [mplex] Generating master chunk for chunks 0:4095

assertion "major == VID_SEQ" failed: file "tymaster.c", line 91


I can try and provide clips if needed, but if I could get a little more information about what this error means, I may be able to fix it.

NOTE: When I use CCE, I seem to have the exact same error. I think it is the reason for my MFS-FTP troubles as I remultiplexed that stream and received the same error (I must have missed it before).

Thanks,
Justin

bcc
05-03-2005, 12:39 AM
Synthetic TY files are written in two passes. In the first pass, the regular data chunks containing the video&audio data are written to disk. The first video sequence, or GOP, (if any) in each data chunk is flagged in the data chunk's header. In the second pass, the master chunks (containing the GOP bit arrays and timestamps) are computed. If the first pass didn't flag the GOP locations correctly, you get this assertion failure. The most common case is that the first pass wasn't actually written to disk correctly. Now, in your log,
Generating master chunk for chunks 0:4095suggests that a full segment of data chunks were written. I would first check to see if that's true or not.

bcc
05-04-2005, 01:42 AM
If the first pass didn't flag the GOP locations correctly, you get this assertion failure.Looks like the problem was with this step. Nova1 posted a patch6 to address this over in the development thread.

gr0k
06-03-2005, 05:58 PM
++ WARN: [mplex] Video e0: buf=2709870 frame=001914 sector=00002248
++ WARN: [mplex] Audio c0: buf= 4096 frame=001773 sector=00001773
**ERROR: [mplex] Too many frame drops -exiting

I'm having the exact same error. I have mplex patched up to patch6, so that isn't the problem. My goal is to automate downloading various internet "tv show" videos and uploading them to my tivo as if they were regular tv show recordings. Such as the one from systm.org (http://systm.org). So I download the Xvid avi from that website then run it through the following:


ffmpeg -y -i systm--0001--warspyingbox--large.xvid.avi -f mpeg2video -s 720x480 -r 29.97 -b 2000 -aspect 4:3 -an out.m2v
ffmpeg -y -i systm--0001--warspyingbox--large.xvid.avi -f mp2 -ab 192 -ar 32000 -ac 2 out.m2a
mplex -f 10 out.m2v out.m2a -r 2000 -o out.ty

And I get the following errors:


INFO: [mplex] mplex version 1.6.2 (2.2.3 $Date: 2004/01/13 20:45:26 $)
INFO: [mplex] File out.m2v looks like an MPEG Video stream.
INFO: [mplex] File out.m2a looks like an MPEG Audio stream.
INFO: [mplex] Video stream 0: profile 10 selected - ignoring non-standard options!
INFO: [mplex] Found 1 audio streams and 1 video streams
INFO: [mplex] Selecting TY and generic MPEG2 output profile
INFO: [mplex] Multiplexing video program stream!
INFO: [mplex] Scanning for header info: Video stream e0 (out.m2v)
INFO: [mplex] VIDEO STREAM: e0
INFO: [mplex] Frame width : 720
INFO: [mplex] Frame height : 480
INFO: [mplex] Aspect ratio : 4:3 display
INFO: [mplex] Picture rate : 29.970 frames/sec
INFO: [mplex] Bit rate : variable
INFO: [mplex] Vbv buffer size : 71680 bytes
INFO: [mplex] CSPF : 0
INFO: [mplex] Scanning for header info: Audio stream c0 (out.m2a)
INFO: [mplex] MPEG AUDIO STREAM: c0
INFO: [mplex] Audio version : 1.0
INFO: [mplex] Layer : 2
INFO: [mplex] CRC checksums : no
INFO: [mplex] Bit rate : 24576 bytes/sec (192 kbit/sec)
INFO: [mplex] Frequency : 32000 Hz
INFO: [mplex] Mode : 0 stereo
INFO: [mplex] Mode extension : 0
INFO: [mplex] Copyright bit : 0 no copyright
INFO: [mplex] Original/Copy : 1 original
INFO: [mplex] Emphasis : 0 none
INFO: [mplex] SYSTEMS/PROGRAM stream:
INFO: [mplex] rough-guess multiplexed stream data rate : 0201848
INFO: [mplex] target data-rate specified : 2000000
INFO: [mplex] Setting specified specified data rate: 2000000
INFO: [mplex] Run-in Sectors = 998 Video delay = 735805 Audio delay = 738808
INFO: [mplex] New sequence commences...
INFO: [mplex] Video e0: buf=2719744 frame=000000 sector=00000000
INFO: [mplex] Audio c0: buf= 4096 frame=000000 sector=00000000
++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=8291840 required(DTS)=8285347
++ WARN: [mplex] Video e0: buf=2685633 frame=002515 sector=00003165
++ WARN: [mplex] Audio c0: buf= 4096 frame=002330 sector=00002330
++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=8786401 required(DTS)=8753815
++ WARN: [mplex] Video e0: buf=2714492 frame=002671 sector=00003347
++ WARN: [mplex] Audio c0: buf= 4096 frame=002474 sector=00002474
++ WARN: [mplex] Stream c0: data will arrive too late sent(SCR)=9329014 required(DTS)=9221128
++ WARN: [mplex] Video e0: buf=2719744 frame=002826 sector=00003528
++ WARN: [mplex] Audio c0: buf= 3232 frame=002619 sector=00002619
++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=9848444 required(DTS)=9687748
++ WARN: [mplex] Video e0: buf=2712830 frame=002982 sector=00003710
++ WARN: [mplex] Audio c0: buf= 4096 frame=002763 sector=00002763
++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=10363896 required(DTS)=10156216
++ WARN: [mplex] Video e0: buf=2710395 frame=003138 sector=00003892
++ WARN: [mplex] Audio c0: buf= 4096 frame=002907 sector=00002907
++ WARN: [mplex] Stream c0: data will arrive too late sent(SCR)=10866807 required(DTS)=10624048
++ WARN: [mplex] Video e0: buf=2719744 frame=003293 sector=00004073
++ WARN: [mplex] Audio c0: buf= 3232 frame=003052 sector=00003052
++ WARN: [mplex] Stream c0: data will arrive too late sent(SCR)=11381750 required(DTS)=11090608
++ WARN: [mplex] Video e0: buf=2719744 frame=003449 sector=00004255
++ WARN: [mplex] Audio c0: buf= 3232 frame=003196 sector=00003196
++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=11915650 required(DTS)=11558617
++ WARN: [mplex] Video e0: buf=2714954 frame=003605 sector=00004437
++ WARN: [mplex] Audio c0: buf= 4096 frame=003340 sector=00003340
++ WARN: [mplex] Stream c0: data will arrive too late sent(SCR)=12414999 required(DTS)=12026968
++ WARN: [mplex] Video e0: buf=2719744 frame=003760 sector=00004618
++ WARN: [mplex] Audio c0: buf= 3232 frame=003485 sector=00003485
++ WARN: [mplex] Stream c0: data will arrive too late sent(SCR)=12921473 required(DTS)=12493528
++ WARN: [mplex] Video e0: buf=2719744 frame=003916 sector=00004800
++ WARN: [mplex] Audio c0: buf= 3232 frame=003629 sector=00003629
++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=13434504 required(DTS)=12961018
++ WARN: [mplex] Video e0: buf=2714792 frame=004072 sector=00004982
++ WARN: [mplex] Audio c0: buf= 4096 frame=003773 sector=00003773
**ERROR: [mplex] Too many frame drops -exiting

Help! It's driving me crazy trying different encoding options. Is this a bug or am I using the wrong ffmpeg options?

If I set -r 3000, mplex gives no errors. However, after I uploaded it to mfs_ftp, it shows up on the menu but has Duration: 0 and I am unable to play it.

gr0k
06-03-2005, 06:42 PM
If I set -r 3000, mplex gives no errors. However, after I uploaded it to mfs_ftp, it shows up on the menu but has Duration: 0 and I am unable to play it.

It figures, I've been trying for days to get this working and right after I post this message I figure it out. Passing -r 3000 to mplex actually did work, but I made a newbie mistake with mfs_ftp (I wasn't setting binary mode and turning off passive - woops). The strange thing is the .ty it created won't play using tivo mplayer or vlc with the ty module on osx, which made me think the ty was no good. Now I need to figure out the tmf xml so that it shows up with more information in now showing...

btw, using those ffmpeg options on the large format version of the systm episode I referenced above plays perfectly on the tivo. If I didn't know better, I'd think it was broadcast by directtv. :)

lgkahn
06-03-2005, 11:19 PM
thanks a million everyone I found a windows version of ffmpeg and got that to demux
and I have been able to convert both home movies in mpg format and also some of the new dr. who episodes from avi format (from bbc in england) to .ty and get them on both my 4.01b box and 6.2 boxes and they all play fine...

here is my current batch file

ffmpeg -y -i j:\tivo-store\%1.avi -f mpeg2video -s 720x480 -r 29.97 -b 2000 -aspect 4:3 -an j:\tivo-store\%1.m2v
ffmpeg -y -i j:\tivo-store\%1.avi -f mp2 -ab 192 -ar 32000 -ac 2 j:\tivo-store\%1.m2a
c:\mplex\mplex_pl6 -f 10 -r 3000 j:\tivo-store\%1.m2v j:\tivo-store\%1.m2a -o j:\tivo-store\%1.ty

darrin75
06-07-2005, 02:36 AM
Is it possible to add better support for mrv, playing from paused position. I can stream any mplex ty to any tivo from the beginning, but it will not allow me to stream from paused location. Just curious, although this may not be possible yet until we understand exactly how mrv works.. :) Great program by the way... :D :D :D

darrin75
06-16-2005, 05:47 PM
The best I can tell from the dumbobj of a regular file, and a mplex mpeg ty file. In a chunk it has a start and end. Regular ty files have these correct. However a mplex ty file has a value of 0 for both. Would this be the place to look for getting a mplex ty to play from a paused position in MRV? Thanks

bcc
06-19-2005, 05:38 PM
Alright darrin75, I've addressed the issue with tymplex not generating important XML objects on its own. In the development thread http://www.dealdatabase.com/forum/showpost.php?p=226704&postcount=63
This is the fix I was suggesting repeatedly in this thread and also over in the thread: http://www.dealdatabase.com/forum/showthread.php?t=43637
I believe this is what you're really asking for in your questions about MRV and XML objects. (I don't have any MRV enabled tivo so I may have misunderstood that part.)

darrin75
06-19-2005, 05:43 PM
HOw about a windows build verison. I am unable to get this to compile under cygwin. Thanks alot..For listening to my request..

bcc
06-19-2005, 06:52 PM
Ok, I've added a cygwin windows binary.

darrin75
06-20-2005, 05:44 PM
Changing duration great, but now showing still @ 0.00..Check this thread to see what I am talking about..

http://www.dealdatabase.com/forum/showthread.php?t=44033

darrin75
06-21-2005, 11:13 PM
Hey I think I have figure out the 0.01 thing that shows up in the guide. Your duration is correct however, if you want the guide I pretty sure with some trail and error here. If you make the start time equal the The Time it was inserted with mfs_ftp, that (+) duration will give the stoptime. This should fix that guide thing i was talking about.. I will post this in the mplex support forum..see ya.. If you really want to see what I mean then I am attaching a sample file..


darrin

bcc
06-22-2005, 01:49 PM
So if the starttime object is anything non-zero (with stoptime=starttime+duration of course) do things work OK on your system? On my 3.x tivo, a starttime of 0 works fine, and results in a StartTime object set to 0 in my MFS record. With your tivo, a 0 object value seems to leave the object unset. tymplex can't set the starttime to exactly when you insert the recording, because tymplex can't predict when you'll get around to inserting. I note that in mfs_ftp it sets the starttime with
set time [expr [expr [clock seconds] % 86400] ]so it is not considering a startime of 0 to indicate unset.

darrin75
07-02-2005, 12:54 PM
So how do you multiplex avi into ty. Do not know much about avi. Does it need to be converted first. Can avi be demulitplex into elementary streams.

bcc
07-04-2005, 02:44 PM
You'll want to extract the audio&video streams from the AVI into an mpeg2 video stream and an mpeg2 or ac3 audio stream. The best tool(s) for job depends upon the a/v formats you're starting with. Conversion may or may not be necessary. For windows, virtualdub may do the trick, for linux, I've used mplayer.

Beth-O
07-18-2005, 12:18 PM
I have successfully inserted edited ty files back to my S2 DTV DSR7000 (6.2), and plays fine.

I have then attemped ripping a DVD to VOB -> m2v/ac3 using ffmpeg, and then mplex->ty usjing
mplex -f 10 out.m2v out.ac3 -r 3000 -o out.ty. I don't get any errors or warnings and can play in vlc.

I can get it to the tivo, but when I try and play the file, the green DTV screen freezes (no picture).

Any ideas or can even my DTivo box handle this type of content?

Thanks!

bcc
07-18-2005, 02:58 PM
I'm guessing you didn't transcode the video to a rate/resolution that your tivo can handle. I'd check your /var/log/tverr for hints as to the problem. Probably you have a low-def tivo and so you need to transcode the video to 480x480 (or should it be 720x480?). Perhaps something like
ffmpeg -i infile.m2v -f mpeg2video -s 480x480 -r 29.97 -b 2000 outfile.m2v You could also try mplex'ing just 1 of the 2 streams to narrow down the problem.

jkinghome
07-19-2005, 11:31 AM
message removed

Beth-O
07-19-2005, 11:36 AM
Thanks BCC,

Strange thing happening - I changed the resolution and ftp'ed it and it worked! Looks great.

Then I deleted it from the tivo and inserted the SAME file again, and it fails - tivo freezes and sometimes the tivo reboots.

I tried a few more times with the same file and was successful a few times, but mostly it wouldn't play.

I am inserting with binary with passive off - so not sure what the problem is. Looked at the tverr.log and saw this:



Jul 19 02:33:13 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 110 segments failed: PES buffer segment 89 length is not word aligned (123662) (fsid 361043, Irec = 2, count 1)Trying to recover
Jul 19 02:33:13 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 4775 segments failed: PES buffer segment 33 length is not word aligned (148643) (fsid 361043, Irec = 3, count 1)Trying to recover
Jul 19 02:33:13 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 204 segments failed: PES buffer segment 23 length is not word aligned (378126) (fsid 361043, Irec = 4, count 1)Trying to recover
Jul 19 02:33:13 (none) TmkReadAheadCache[239]: Invalid PES triple: fsid 361043, Irec 5, inx = 0
Jul 19 02:33:13 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 251 segments failed: PES buffer segment 12 length is not word aligned (82126) (fsid 361043, Irec = 6, count 1)Trying to recover
Jul 19 02:33:13 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 12 segments failed: PES buffer segment 6 length is not word aligned (160751) (fsid 361043, Irec = 7, count 1)Trying to recover
Jul 19 02:33:13 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 28 segments failed: PES buffer segment 8 length is not word aligned (399305) (fsid 361043, Irec = 8, count 1)Trying to recover
Jul 19 02:33:13 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 39 segments failed: PES buffer segment 10 length is not word aligned (393557) (fsid 361043, Irec = 9, count 1)Trying to recover
Jul 19 02:33:13 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 54 segments failed: PES buffer segment 9 length is not word aligned (48702) (fsid 361043, Irec = 10, count 1)Trying to recover
Jul 19 02:33:13 (none) TmkReadAheadCache[239]: Invalid PES triple: fsid 361043, Irec 11, inx = 0
Jul 19 02:33:13 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 91 segments failed: PES buffer segment 31 length is not word aligned (133654) (fsid 361043, Irec = 12, count 1)Trying to recover
Jul 19 02:33:13 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 114 segments failed: PES buffer segment 23 length is not word aligned (90129) (fsid 361043, Irec = 13, count 1)Trying to recover
Jul 19 02:33:14 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 140 segments failed: PES buffer segment 33 length is not word aligned (189478) (fsid 361043, Irec = 14, count 1)Trying to recover
Jul 19 02:33:14 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 176 segments failed: PES buffer segment 26 length is not word aligned (4529) (fsid 361043, Irec = 15, count 1)Trying to recover
Jul 19 02:33:15 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 211 segments failed: PES buffer segment 27 length is not word aligned (387274) (fsid 361043, Irec = 16, count 1)Trying to recover
Jul 19 02:33:15 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 241 segments failed: PES buffer segment 20 length is not word aligned (241675) (fsid 361043, Irec = 17, count 1)Trying to recover
Jul 19 02:33:16 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 43 segments failed: PES buffer segment 25 length is not word aligned (304574) (fsid 361043, Irec = 19, count 1)Trying to recover
Jul 19 02:33:16 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 73 segments failed: PES buffer segment 18 length is not word aligned (32831) (fsid 361043, Irec = 20, count 1)Trying to recover
Jul 19 02:33:16 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 98 segments failed: PES buffer segment 17 length is not word aligned (239145) (fsid 361043, Irec = 21, count 1)Trying to recover
Jul 19 02:33:16 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 117 segments failed: PES buffer segment 16 length is not word aligned (322565) (fsid 361043, Irec = 22, count 1)Trying to recover
Jul 19 02:33:16 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 138 segments failed: PES buffer segment 11 length is not word aligned (147509) (fsid 361043, Irec = 23, count 1)Trying to recover
Jul 19 02:33:16 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 155 segments failed: PES buffer segment 17 length is not word aligned (412258) (fsid 361043, Irec = 24, count 1)Trying to recover
Jul 19 02:33:16 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 180 segments failed: PES buffer segment 23 length is not word aligned (104485) (fsid 361043, Irec = 25, count 1)Trying to recover
Jul 19 02:33:16 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 205 segments failed: PES buffer segment 24 length is not word aligned (4385) (fsid 361043, Irec = 26, count 1)Trying to recover
Jul 19 02:33:16 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 235 segments failed: PES buffer segment 25 length is not word aligned (401930) (fsid 361043, Irec = 27, count 1)Trying to recover
Jul 19 02:33:16 (none) TmkReadAheadCache[239]: Invalid PES triple: fsid 361043, Irec 28, inx = 0
Jul 19 02:33:16 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 31 segments failed: PES buffer segment 17 length is not word aligned (310957) (fsid 361043, Irec = 29, count 1)Trying to recover
Jul 19 02:33:16 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 54 segments failed: PES buffer segment 21 length is not word aligned (120323) (fsid 361043, Irec = 30, count 1)Trying to recover
Jul 19 02:33:17 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 78 segments failed: PES buffer segment 45 length is not word aligned (56618) (fsid 361043, Irec = 31, count 1)Trying to recover
Jul 19 02:33:17 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 121 segments failed: PES buffer segment 56 length is not word aligned (484537) (fsid 361043, Irec = 32, count 1)Trying to recover
Jul 19 02:33:18 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 176 segments failed: PES buffer segment 43 length is not word aligned (84554) (fsid 361043, Irec = 33, count 1)Trying to recover
Jul 19 02:33:18 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 222 segments failed: PES buffer segment 41 length is not word aligned (194299) (fsid 361043, Irec = 34, count 1)Trying to recover
Jul 19 02:33:19 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 59 segments failed: PES buffer segment 58 length is not word aligned (483386) (fsid 361043, Irec = 36, count 1)Trying to recover
Jul 19 02:33:19 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 114 segments failed: PES buffer segment 48 length is not word aligned (500678) (fsid 361043, Irec = 37, count 1)Trying to recover
Jul 19 02:33:19 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 162 segments failed: PES buffer segment 46 length is not word aligned (189737) (fsid 361043, Irec = 38, count 1)Trying to recover
Jul 19 02:33:19 (none) TmkTransform::Trace[239]: Get Validate (buffer 0) 211 segments failed: PES buffer segment 43 length is not word aligned (218627) (fsid 361043, Irec = 39, count 1)Trying to recover
Jul 19 02:33:19 (none) TmkReadAheadCache[239]: Invalid PES triple: fsid 361043, Irec 40, inx = 0
Jul 19 02:33:19 (none) TvMomHpkSink.C[239]: Type: 10, stream ID: 155
Jul 19 02:33:19 (none) TmkAssertionFailure[239]: (SegmentToDecoder, line 2597 ())
Jul 19 02:33:19 (none) TvMomHpkSink[239]: Tmk Fatal Error: Thread TvMomHpkSink <239> strayed!
Jul 19 02:33:19 (none) TvMomHpkSink[239]: bt -t /tvbin/tivoapp
Jul 19 02:33:19 (none) TvMomHpkSink[239]: read 0x2aaa8000 /lib/ld.so.1
Jul 19 02:33:19 (none) TvMomHpkSink[239]: read 0x2ab04000 /lib/libutil.so.1
Jul 19 02:33:19 (none) TvMomHpkSink[239]: read 0x2ab48000 /lib/libdl.so.2
Jul 19 02:33:19 (none) TvMomHpkSink[239]: read 0x2ab8c000 /lib/libpthread.so.0
Jul 19 02:33:19 (none) TvMomHpkSink[239]: read 0x2abe8000 /lib/libm.so.6
Jul 19 02:33:19 (none) TvMomHpkSink[239]: read 0x2acb0000 /lib/libc.so.6
Jul 19 02:33:19 (none) TvMomHpkSink[239]: 0x00e0d034 0x00e0ea84 0x00e0a3c4 0x00e09c4c 0x013a706c 0x013ce190
Jul 19 02:33:19 (none) TvMomHpkSink[239]: Tmk Fatal Error: Thread TvMomHpkSink <239>: assertion failure
Jul 19 02:33:19 (none) TvMomHpkSink[239]: Tmk Fatal Error: Thread died due to signal -2
Jul 19 02:33:19 (none) TvMomHpkSink[239]: Invoking rule 834: rebooting system
Jul 19 02:36:09 (none) ShmemdLoader[131]: Loading Resource pvr/lib/resources/PvrConstantsDocument.brf from FsId 206259

Any ideas?

whitepelican
07-21-2005, 08:47 AM
I'm guessing you didn't transcode the video to a rate/resolution that your tivo can handle. I'd check your /var/log/tverr for hints as to the problem. Probably you have a low-def tivo and so you need to transcode the video to 480x480 (or should it be 720x480?).

Well, I've now ripped several DVD's and created TY files using mplex. Thank you very much for this fantastic tool! I haven't done any transcoding/encoding and have 720x480 resolution TY files that work perfectly in all 3 of my low-def DTivos. I plan to put several of my kid's DVD's on the Tivo to have them instantly accessible.

My one (very small) problem - I can't retain closed captioning info on the new TY files when I start with DVD's that have CC info (not subtitles). I have searched this site, and can't seem to find an answer to this problem. I am not sure that the CC info is even retained when I rip the DVD to M2V using DVD Decrypter. Does anyone know if there is a way to keep the CC info in the M2V stream?

Beth-O
07-21-2005, 11:30 AM
whitepelican,

I don't know the answer to you CC question, but can I ask what command line you are using in mplex? I am now getting a bunch of errors.

I didn't know that DVD Decrypter demuxes to m2v. Interesting.

Thanks!

whitepelican
07-21-2005, 12:47 PM
I am simply using the "stream processing" in DVD Decrypter's IFO mode to demux the m2v and ac3 files. I then use the command line:


mplex -f 10 input.m2v input.ac3 -o output.ty

I upload that TY file with MFS_FTP (which has caused numerous crashes on one of my DTivos, but not on the others), and it makes for a perfect video on the Tivo. I would still like to figure out that closed captioning issue, though.

GirlTivo
07-21-2005, 02:40 PM
Maybe a newbie question (and I apologize if it is so):

How can I convert m2v and m2a to .TY on Mac OSX?

Can someone post the compiled binary or is this not allowed?

Anyone can share their workflow to convert DVD to TY on Mac OSX, as I don't have access to a PC machine.

bcc
07-22-2005, 01:18 AM
Can someone post the compiled binary or is this not allowed?you just need to find a mac user with the knowledge&inclination to compile it

jkinghome
07-23-2005, 11:47 AM
Things have been working out well until...

Most of my inserts were about 30min shows (from DVDs). I wanted to put a full movie from DVD to Tivo.

Anyway, the MFS_FTP transfers the full Ty and it shows up, but Tivo will only play 40mins of it. The timeline only goes up to 40 mins, but the full movie is 1:35.

Any ideas? I can extract the ty and it plays the full movie on my pc.

Thanks for any help!

EDIT: Figures... once I post this, it works!

GirlTivo
07-25-2005, 11:53 AM
Deleted...

Beth-O
07-25-2005, 11:55 AM
As a fairly newbie, I always find it valuable to read process workflows from others who have success.

Anyway, after much trial and error, I have refined my workflow to convert DVD movies to TY, reducing file size but not sacrificing too much quality.

I have a DSR7000 and DSR740.

I really had trouble transcoding the m2v using ffmpeg, tymplex kept throwing out errors - or the output would make my Tivo reboot or freeze.

So, what worked?

Rip DVD main movie with DVD Shrink (use Reauthoring feature) - set compression pretty high (50%). Get it to export out to VIDEO_TS folders. (Uncompressed I was getting files about 3.5GB (for a 1.5 hour movie), but was able to get those down to 1.6GB.)

Use VOBMerge to merge the VOB files.

Use ISOEdit to demux to M2v and AC3.

Use Mplex to convert to TY.

Set custom named folders on the Now Showing List ("My Movies"), using TivoWeb Plus

I have used this process on many movies over the weekend and can't see much degradation of quality. (I do not have a HD TV, I am sure the results would be different).

There may be other (better) ways to do this. But it worked flawlessly with DVDs. Now I need a bigger HD!

BTW - GirlTivo, I also have a Mac, but I always had trouble compiling under OSX (Panther and Tiger) after the mplex was patched. I gave up and used my PC (I don't think the process above, would be as easy under OSX). If anyone else has any tips on compiling on OSX, let me know.

darrin75
07-25-2005, 12:07 PM
Use VOBMerge to merge the VOB files.



I will save you a step here. DVD-Shrink will back up to One large vob file, so You don't have to merge. Also Cut off credits will save you some room. But to back up to one large vob go to EDIT...click on perferences...Click OUTPUT FILES, and uncheck split vobs...


have a nice day

darrin

Beth-O
07-25-2005, 01:59 PM
Nice! Thanks Darrin for sharing.

Gotta love DVD-Shrink!

Beth

nova1
07-25-2005, 02:22 PM
I've used DVD Decryptor and Selected Movie only files. I then used IFOEdit to select whatever angle you want and set the VOB size to 'no split'. After that, I ran bbdmux to demux/strip out the AC3 audio and the M2V video streams. I then fed those into mplex with an xml file. No transcoding is needed at all so there is no loss in quality.

darrin75
07-25-2005, 02:36 PM
Is there a batch file that we could use to demux-mplex the files in a directory?

Beth-O
07-25-2005, 03:23 PM
Nova1,

What .ty file size do you end up with for a DVD movie? That is the real reason I choose DVD-shrink is because the file sizes were 3-4GB per 1.5 hr movie. A number of those on my tivo will eat up a lot of space quick. (I really need a 300GB HD for what I want to do!)

I haven't used mplex with an XML file - not sure how to do it - guess I better find some posts and read up on that one!

nova1
07-25-2005, 03:35 PM
For a standard DVD at 720x480, I see roughly 2.5GB per hour so you are
talking quite a bit of space. I usually only insert into a 250GB drive tivo.
I only use the xml to get the description, date, title of the movie. You can
do that with TivoWebPlus as well.

whitepelican
07-25-2005, 03:54 PM
Nova1 -

I see you were discussing Closed Captioning over on the development thread, but I figured it was more appropriate for me to post over here.

I have been banging my head against a wall trying to figure out how to add the CC info into a TY stream, but alas, I'm just not too bright. I have looked through the SCC Tools page over here (http://www.geocities.com/mcpoodle43/SCC_TOOLS/DOCS/SCC_TOOLS.HTML) , and have successfully extracted CC info from my DVD's using the General Parser method described there. But what I want to do is put that info back into the MPEG stream in such a way that my DTivo will be able to use it. I was looking through the code for CC_MUX, which says it will mux CC's into an mpeg stream, but it doesn't support the TY format. I just don't understand the differences in the different caption methods (broadcast, DVD's, and TY). Can you give me a shove in the right direction?

tivomaster
07-25-2005, 04:39 PM
Hummmmmm. If i read this right I could use mplex to convert dvd's to .ty files, convert these file to .tmf files which I could then use tivoserver (http://www.dealdatabase.com/forum/showthread.php?t=44485) to insert using MRV onto my DTivo...

Now that has possiblities..

nova1
07-25-2005, 04:48 PM
Nova1 -

I see you were discussing Closed Captioning over on the development thread, but I figured it was more appropriate for me to post over here.

I have been banging my head against a wall trying to figure out how to add the CC info into a TY stream, but alas, I'm just not too bright. I have looked through the SCC Tools page over here (http://www.geocities.com/mcpoodle43/SCC_TOOLS/DOCS/SCC_TOOLS.HTML) , and have successfully extracted CC info from my DVD's using the General Parser method described there. But what I want to do is put that info back into the MPEG stream in such a way that my DTivo will be able to use it. I was looking through the code for CC_MUX, which says it will mux CC's into an mpeg stream, but it doesn't support the TY format. I just don't understand the differences in the different caption methods (broadcast, DVD's, and TY). Can you give me a shove in the right direction?

The MPEG video stream from a DVD contains the CC info embedded in it. mplex -f 10 doesn't modify the MPEG output, all it does is add TY records that tell the Tivo that this record is a Audio/Video/CC type packet. The Tivo doesn't seem to know about these DVD CC packets so the only way to inform it about CC info is to create TY CC records. Currently, mplex is doing this:

TY Video record timestamp + MPEG video data + DVD CC data
TY Video record timestmap + MPEG video data + DVD CC data

What you want to do is extract the 2 byte CC data and create this:

TY Video record timestamp + MPEG video data + DVD CC data
TY CC record timestamp
TY Video record timestamp + MPEG video data + DVD CC data
TY CC record timestamp

This is just an overview of the process as I don't know what timestamp to use for the TY CC record and I don't know how to correlate the DVD CC data to these timestamps and what output order they should be in for the TY file.

So with whatever CC standard(ATSC,DVD,satellite,DVB,etc) you have, you have to create TY CC record timestamps with that data. You don't have to modify(insert CC data) into the MPEG video stream.

Good luck.

whitepelican
07-25-2005, 04:54 PM
Hummmmmm. If i read this right I could use mplex to convert dvd's to .ty files, convert these file to .tmf files which I could then use tivoserver (http://www.dealdatabase.com/forum/showthread.php?t=44485) to insert using MRV onto my DTivo...

Now that has possiblities..

What benefit does that gain over just taking that .ty file and uploading it using MFS_FTP? I'm just curious, because that's what I've been doing.

tivomaster
07-25-2005, 05:15 PM
What benefit does that gain over just taking that .ty file and uploading it using MFS_FTP? I'm just curious, because that's what I've been doing.

MultiRoomViewing is native on the Tivo. You can browse to the Tivoserver from the Tivo nowplaying list , select the movie you want watch, and it automatically downloads.

digdug
07-25-2005, 05:29 PM
At first I didn't understand what Tivomaster was hinting but I think he means you can keep all of your recording on your PC that is acting as the TivoServer and tranfer to any MRV Tivo unit for viewing as needed?

Since the shows are stored on the TivoServer, your PC, you really don't need a large Tivo HDD.

-Doug

tivomaster
07-25-2005, 06:20 PM
At first I didn't understand what Tivomaster was hinting but I think he means you can keep all of your recording on your PC that is acting as the TivoServer and tranfer to any MRV Tivo unit for viewing as needed?

Since the shows are stored on the TivoServer, your PC, you really don't need a large Tivo HDD.

-Doug

Yea...
What he/she said....

whitepelican
07-25-2005, 07:13 PM
Yea...
What he/she said....

Ah, now I understand. Wouldn't make much sense for me, since I have 480 GBs of Tivo drives and only a 80 GB hard drive in my PC.

Beth-O
07-26-2005, 02:11 PM
Hummmmmm. If i read this right I could use mplex to convert dvd's to .ty files, convert these file to .tmf files which I could then use tivoserver (http://www.dealdatabase.com/forum/showthread.php?t=44485) to insert using MRV onto my DTivo...


Interesting... how can you convert .ty to .tmf? I know that tmf is really a tarball with xml data, but would tivo recognize this? Has anyone tried this before?

darrin75
07-26-2005, 02:17 PM
What I do is insert a ty into tivo, let mfs_ftp make tmf for me? Go to tivoweb put in info...save extract in tmf back to pc. Tivoserver works fine that way. Other than that I don't know of another way besides cat the pieces back together. Not to be rude but, I think We should go back to tymplex support questions here or start a ty>tmf conversion thread in the newbie forum.

tivomaster
07-26-2005, 02:20 PM
Interesting... how can you convert .ty to .tmf? I know that tmf is really a tarball with xml data, but would tivo recognize this? Has anyone tried this before?

Well there in lies the first hurdle...
A .tmf file is acutally has a
nowshowing.xml
part1.ty
part2.ty
etc...
all tarred up....

Whereas a .ty file is all the part1,2,etc concatinated together with the xml attached at the end. I looked and could not locate a conversion program.

Beth-O
07-26-2005, 02:23 PM
Of course! Doh!

Sorry for my lack of creativity - thanks for the reply. Getting another coffee...

Beth

darrin75
07-26-2005, 02:25 PM
Lets move this discussion out of the tymlex thread..
http://www.dealdatabase.com/forum/showthread.php?goto=newpost&t=44588

darrin75
08-14-2005, 01:49 AM
Does TyMplex set timestamps within the the generated parts. part00.ty -start and end timestamps...part01.ty start & end timestamps. Or does it just produce a start & end time stamp for the whole joined ty file.. If not would it be hard to implement this into the binary?

bcc
08-14-2005, 01:58 AM
Does TyMplex set timestamps within the the generated parts. part00.ty -start and end timestamps...part01.ty start & end timestamps. Or does it just produce a start & end time stamp for the whole joined ty file.. If not would it be hard to implement this into the binary?I guess you're really asking if it could create XML Begin/End subobjects for the RecordingPart subobjects? It wouldn't be hard. But is it needed for something? I thought those were only used for scrambling. It shouldn't even be hard to have tymplex generate .tmf directly if that's necessary for tivoserver.

darrin75
08-14-2005, 03:01 AM
I guess you're really asking if it could create XML Begin/End subobjects for the RecordingPart subobjects? It wouldn't be hard. But is it needed for something? I thought those were only used for scrambling. It shouldn't even be hard to have tymplex generate .tmf directly if that's necessary for tivoserver.


I am pretty sure that the recording parts are used as a bookmark also when transfering with mrv. Its really not that big of a deal, but would be nice to implement these to see if it make a difference, As far as generating tmf with tymplex aka tmfmplex would be awesome... ;)

BTUxNine
08-14-2005, 07:58 PM
I think what would be more important is to implement a streaming output that doesn't jump back to fill in the bitmap in the master header. TMF isn't that important, IMHO in that tivoserver will support ty very soon.

Someone mentioned the possibility of creating ty as a transport within ffmpeg... with this implementation, we could directly stream avi files to the tivo through tivoserver, with no intermediate files.

davidlallen
08-15-2005, 11:55 PM
As far as generating tmf with tymplex aka tmfmplex would be awesome... ;)

I am confused. Isn't that what (ty)mplex does now if you have a template xml and you supply the -x option? I thought the only difference between ty and tmf was tmf is a tar format that includes the xml at the end.

That is what I learned from the ty->tmf thread over here (http://www.dealdatabase.com/forum/showthread.php?t=44588&page=5)

But, since I haven't quite gotten it to work myself, I may still be missing something.

darrin75
08-15-2005, 11:58 PM
Nope..Tymplex Generates a ty+ file with the xml at the end with the x option..Tmf holds more info..


Also a ty & ty+ file are one stream file. TMF file is broken down into parts...

davidlallen
08-16-2005, 12:18 AM
Nope..Tymplex Generates a ty+ file with the xml at the end with the x option..Tmf holds more info..

I don't quite understand. An mpeg file normally has two streams, audio and video. When we do "(ty)mplex -x" we get both streams plus the xml, in one file. You have said that is called ty+. Why would you need more streams than two? Or, what is the actual difference between ty+ and tmf?

darrin75
08-16-2005, 12:55 AM
I don't quite understand. An mpeg file normally has two streams, audio and video. When we do "(ty)mplex -x" we get both streams plus the xml, in one file. You have said that is called ty+. Why would you need more streams than two? Or, what is the actual difference between ty+ and tmf?


I am not talking about two different streams here.

A TMF file contains:
showing.xml
part00.ty
part01.ty
part02.ty
so on...


ty file contains:
contains all the above except is into 1 stream without the showing.xml, also without the xml at the bottom of the ty file.

all the parts combined here into 1 ty file
part00+part01+part02 combined = 1 ty file.


ty+ contains:
1 stream file like the regular ty file above, but with some xml stuff appended at the bottom of the file.
part00+part01+part02 combined = 1 ty+ file with some info embedded into the stream its self.


also i think you are misunderstanding the concept of a ty file structure. a Ty file does just have one audio and one video like a regular mpeg. Thats not what we are talking about here..

makinrain
08-16-2005, 10:18 AM
Ty files converted from mpg and avi files are resulting in a loss of 3-10 seconds off of the end of the video.

I use the following (makety.bat) batch file to convert mpg or avi files to ty.

============================
ffmpeg -y -i %1.%2 -f mpeg2video -s 720x480 -r 29.97 -b 2000 -aspect 4:3 -an %1.m2v

ffmpeg -y -i %1.%2 -f mp2 -ab 192 -ar 32000 -ac 2 %1.m2a

mplex -f 10 %1.m2v %1.m2a -r 3000 -o %1.ty
===========================

the variables are:
- %1 = movie name
- %2 = mpg, mpeg, avi, etc.. (file type)

For example:

movie.mpg. type makety movie mpg

-------------

Both the m2v and m2a files are complete without any loss.

However once the mplex is complete, the ty file loses several seconds.

Help, Should I be using different parameters ? (BTW, using latest mplex-win build)

makinrain
08-16-2005, 10:29 AM
Is there a batch file that we could use to demux-mplex the files in a directory?

See my post above.

Also, I created a ffmpeg directory, which I loaded ffmpeg and mplex files. Then I copy my mpg, mpeg or avi file to that directory and from command window, change to the ffmpeg directory and run the batch file.

You can also add a line to bottom of batch file to delete the m2v and m2a intermediate files.

del *.m2*

darrin75
08-16-2005, 12:09 PM
having a hard time finding a windows binary of ffmpeg?

makinrain
08-16-2005, 01:49 PM
having a hard time finding a windows binary of ffmpeg?

Here it is

http://www.videohelp.com/tools?tool=263

davidlallen
08-16-2005, 04:56 PM
A TMF file contains:
showing.xml
part00.ty
part01.ty
part02.ty
so on...

Why would you have multiple ty files?

davidlallen
08-16-2005, 04:59 PM
Ty files converted from mpg and avi files are resulting in a loss of 3-10 seconds off of the end of the video. [...]
ffmpeg -y -i %1.%2 -f mpeg2video -s 720x480 [...]
ffmpeg -y -i %1.%2 -f mp2 -ab 192 -ar 32000 -ac 2 %1.m2a
mplex -f 10 %1.m2v %1.m2a -r 3000 -o %1.ty


This is exactly why I want to put ty-output support into ffmpeg. When you split and remux, all the timecode information is lost. Plus, you do three times as much fileio as if ffmpeg just directly supported ty-output.

Note, I do plan to do this, so I am not just complaining. But I haven't had time to do it yet.

bcc
08-16-2005, 08:50 PM
I think what would be more important is to implement a streaming output that doesn't jump back to fill in the bitmap in the master header.One only learns what to put into the master chunk bitarrays as the tivo records are generated. So creating a tivo compatible recording necessarily involves random write access (unless you're going to cache everything or do multiple passes or some such). The bit arrays could be filled in as we go, but that would still involve random I/O. Feel free to contribute such code if you want. The master chunk processing code is used for ty1to2 as well, so keeping the solution general purpose would be best.

BTUxNine
08-16-2005, 08:54 PM
One only learns what to put into the master chunk bitarrays as the tivo records are generated. So creating a tivo compatible recording necessarily involves random write access (unless you're going to cache everything or do multiple passes or some such). The bit arrays could be filled in as we go, but that would still involve random I/O. Feel free to contribute such code if you want. The master chunk processing code is used for ty1to2 as well, so keeping the solution general purpose would be best.
I'm aware of that, but the bitarrays are not transferred in MRV xfers (I assume the tivo recreates them as it streams the show). This should make a pure streaming solution possible. (I realize this would have to be a special case, but given that currently a second pass is run to fill in those values, AFAICT, it would just be a matter of skipping that pass if the output doesn't support random access)

bcc
08-16-2005, 08:58 PM
Ty files converted from mpg and avi files are resulting in a loss of 3-10 seconds off of the end of the video.Did you make sure the streams you created with ffmpeg are the same length? mplex probably told you what happened in its output. I suspect it encountered an underrun in 1 of the 2 streams. You could also enable more debug output with mplex if it's not revealing a reason with the default output.

bcc
08-16-2005, 09:00 PM
I'm aware of that, but the bitarrays are not transferred in MRV xfers (I assume the tivo recreates them as it streams the show). This should make a pure streaming solution possible. (I realize this would have to be a special case, but given that currently a second pass is run to fill in those values, AFAICT, it would just be a matter of skipping that pass if the output doesn't support random access)In fact, the master chunk record is left in skeleton form until the entire segment of chunks are written. So if MRV truly doesn't care about the master chunk, you should be all set. I don't have MRV so I can't fill in the blanks here.

nams
08-17-2005, 01:01 AM
Ty files converted from mpg and avi files are resulting in a loss of 3-10 seconds off of the end of the video.

I use the following (makety.bat) batch file to convert mpg or avi files to ty.

============================
ffmpeg -y -i %1.%2 -f mpeg2video -s 720x480 -r 29.97 -b 2000 -aspect 4:3 -an %1.m2v

ffmpeg -y -i %1.%2 -f mp2 -ab 192 -ar 32000 -ac 2 %1.m2a

mplex -f 10 %1.m2v %1.m2a -r 3000 -o %1.ty
===========================

the variables are:
- %1 = movie name
- %2 = mpg, mpeg, avi, etc.. (file type)

For example:

movie.mpg. type makety movie mpg



I use a single command with ffmpeg to generate both files.


ffmpeg -i $1 -b 2000 -f mpeg2video -s 640x480 -r 29.97 $2.m2v -f mp2 -ab 192 -ar 32000 $2.m2a

I also use xmlstarlet to update my template xml file with the correct title and description from the command line via the same script


xmlstarlet ed -u "/Object/SubObject/Object/Title" -v $2 /video/xml.xml > /video/$2.tmp
xmlstarlet ed -u "/Object/SubObject/Object/Description" -v $3 /video/$2.tmp > /video/$2.xml
rm -rf /video/$2.tmp
mplex -x /video/$2.xml -f 10 $2.m2* -r 3000 -o /video/TY/$2.ty

I had to use 2 lines for editing the template since I needed to update 2 xml values.

My current problem is I canít figure out how to use space in my description or title since space is used as the variable separator (double or single quotes donít work)Ö my current work around is to use underscore instead.

I only posted snippets from the script but I can post the whole script if needed (this is a very basic script)


mktmf video.avi Home_Video This_is_my_home_video
Will convert and split the avi (or mpeg), update the xml template, convert the ty to tmf and upload the tmf to my tivo via mfs_ftp.

darrin75
08-17-2005, 01:11 AM
does the name of the film have to be in the batch file? Ex: spiderman.mpg
or will it scan for any mpg keeping the name etc. If you have two or more films in the same directory will do those as well. Really a beginner when it comes to bat files.

nams
08-17-2005, 01:31 AM
does the name of the film have to be in the batch file? Ex: spiderman.mpg
or will it scan for any mpg keeping the name etc. If you have two or more films in the same directory will do those as well. Really a beginner when it comes to bat files.

by using the variable $1 (first variable) $2 (2nd variable) etc in the script I can specify the source file name / destination file name / title and description at run time without changing the script

Also I believe you will have to use %1 %2 etc for your variable in Windows if you want to run a cmd or bat script instead of bash script in cygwin

for example


mktmf video.avi Home_Video This_is_my_home_video

mktmf = bash script
video.avi = source file
Home_Video = Dest File base name (in my script this is used for the Title xml tag also)
This_is_my_home_video = description xml tag

makinrain
08-18-2005, 09:36 PM
Did you make sure the streams you created with ffmpeg are the same length? mplex probably told you what happened in its output. I suspect it encountered an underrun in 1 of the 2 streams. You could also enable more debug output with mplex if it's not revealing a reason with the default output.

In the following test, Drive.mpg is 5 seconds longer than the resulting Drive.ty.

Here is the output of both ffmpeg and mplex. How can I tell what is going wrong ? (How do I enable more debug?)


C:\makety>ffmpeg -y -i drive.mpg -f mpeg2video -s 720x480 -r 29.97 -b 2000 -aspe
ct 4:3 -an drive.m2v
ffmpeg version 0.4.9-pre1, build 4743, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-mp3lame --enable-vorbis --enable-faad --enable-faac -
-enable-xvid --enable-mingw32 --enable-a52 --enable-dts --enable-pp --enable-gpl
--enable-memalign-hack
built on Feb 22 2005 04:58:29, gcc: 3.4.2 (mingw-special)
Input #0, mpeg, from 'drive.mpg':
Duration: 00:27:08.0, start: 0.266933, bitrate: 2019 kb/s
Stream #0.0: Video: mpeg2video, 480x480, 29.97 fps
Stream #0.1: Audio: mp2, 48000 Hz, mono, 112 kb/s
Output #0, mpeg2video, to 'drive.m2v':
Stream #0.0: Video: mpeg2video, 720x480, 29.97 fps, q=2-31, 2000 kb/s
Stream mapping:
Stream #0.0 -> #0.0
frame=48807 q=0.0 Lsize= 397776kB time=1628.5 bitrate=2001.0kbits/s
video:381744kB audio:0kB global headers:0kB muxing overhead 4.199657%

C:\makety>ffmpeg -y -i drive.mpg -f mp2 -ab 192 -ar 32000 -ac 2 drive.m2a
ffmpeg version 0.4.9-pre1, build 4743, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-mp3lame --enable-vorbis --enable-faad --enable-faac -
-enable-xvid --enable-mingw32 --enable-a52 --enable-dts --enable-pp --enable-gpl
--enable-memalign-hack
built on Feb 22 2005 04:58:29, gcc: 3.4.2 (mingw-special)
Input #0, mpeg, from 'drive.mpg':
Duration: 00:27:08.0, start: 0.266933, bitrate: 2019 kb/s
Stream #0.0: Video: mpeg2video, 480x480, 29.97 fps
Stream #0.1: Audio: mp2, 48000 Hz, mono, 112 kb/s
Output #0, mp2, to 'drive.m2a':
Stream #0.0: Audio: mp2, 32000 Hz, stereo, 192 kb/s
Stream mapping:
Stream #0.1 -> #0.0
size= 38168kB time=1628.5 bitrate= 192.0kbits/s
video:0kB audio:38168kB global headers:0kB muxing overhead 0.000000%

C:\makety>mplex -f 10 drive.m2v drive.m2a -r 3000 -o drive.ty
INFO: [mplex] mplex version 1.6.2 (2.2.3 $Date: 2004/01/13 20:45:26 $)
INFO: [mplex] File drive.m2v looks like an MPEG Video stream.
INFO: [mplex] File drive.m2a looks like an MPEG Audio stream.
INFO: [mplex] Video stream 0: profile 10 selected - ignoring non-standard opt
ions!
INFO: [mplex] Found 1 audio streams and 1 video streams
INFO: [mplex] Selecting TY and generic MPEG2 output profile
INFO: [mplex] Multiplexing video program stream!
INFO: [mplex] Scanning for header info: Video stream e0 (drive.m2v)
INFO: [mplex] VIDEO STREAM: e0
INFO: [mplex] Frame width : 720
INFO: [mplex] Frame height : 480
INFO: [mplex] Aspect ratio : 4:3 display
INFO: [mplex] Picture rate : 29.970 frames/sec
INFO: [mplex] Bit rate : variable
INFO: [mplex] Vbv buffer size : 71680 bytes
INFO: [mplex] CSPF : 0
INFO: [mplex] Scanning for header info: Audio stream c0 (drive.m2a)
INFO: [mplex] MPEG AUDIO STREAM: c0
INFO: [mplex] Audio version : 1.0
INFO: [mplex] Layer : 2
INFO: [mplex] CRC checksums : no
INFO: [mplex] Bit rate : 24576 bytes/sec (192 kbit/sec)
INFO: [mplex] Frequency : 32000 Hz
INFO: [mplex] Mode : 0 stereo
INFO: [mplex] Mode extension : 0
INFO: [mplex] Copyright bit : 0 no copyright
INFO: [mplex] Original/Copy : 1 original
INFO: [mplex] Emphasis : 0 none
INFO: [mplex] SYSTEMS/PROGRAM stream:
INFO: [mplex] rough-guess multiplexed stream data rate : 0201848
INFO: [mplex] target data-rate specified : 3000000
INFO: [mplex] Setting specified specified data rate: 3000000
INFO: [mplex] Run-in Sectors = 998 Video delay = 490536 Audio delay = 493539
INFO: [mplex] New sequence commences...
INFO: [mplex] Video e0: buf=2719744 frame=000000 sector=00000000
INFO: [mplex] Audio c0: buf= 4096 frame=000000 sector=00000000
INFO: [mplex] STREAM e0 completed @ frame 48805.
INFO: [mplex] STREAM c0 completed @ frame 45235.
INFO: [mplex] Multiplex completion at SCR=147054939.
INFO: [mplex] Video e0: buf=2719744 frame=048805 sector=00058562
INFO: [mplex] Audio c0: buf= 3232 frame=045235 sector=00045236
INFO: [mplex] VIDEO_STATISTICS: e0
INFO: [mplex] Video Stream length: 407322562 bytes
INFO: [mplex] Sequence headers: 4879
INFO: [mplex] Sequence ends : 0
INFO: [mplex] No. Pictures : 48806
INFO: [mplex] No. Groups : 4879
INFO: [mplex] No. I Frames : 4879 avg. size 29682 bytes
INFO: [mplex] No. P Frames : 43928 avg. size 5975 bytes
INFO: [mplex] No. B Frames : 0 avg. size 0 bytes
INFO: [mplex] Average bit-rate : 2000400 bits/sec
INFO: [mplex] Peak bit-rate : 32296000 bits/sec
INFO: [mplex] BUFFERING min 2573026 Buf max 2719456
INFO: [mplex] AUDIO_STATISTICS: c0
INFO: [mplex] Audio stream length 39083904 bytes.
INFO: [mplex] Syncwords : 45236
INFO: [mplex] Frames : 45236 padded
INFO: [mplex] Frames : 0 unpadded
INFO: [mplex] BUFFERING min 3232 Buf max 3232
INFO: [mplex] MUX STATUS: no under-runs detected.
INFO: [mplex] Generating master chunk for chunks 0:3433


C:\makety>

bcc
08-22-2005, 05:49 PM
In the above output, mplex reports 48806 pictures, with a video rate of 29.97fps, which would be 48806/29.97=1628 seconds=27:08=the time reported by ffmpeg. mplex has a -v switch for debugging.

Beth-O
09-02-2005, 06:54 PM
Anyone seen this error?

I have had no problems converting my DVDs (50+) to TY, using a process of DVD Shrink,BBdmux and tymplex - except one and I can't seem to get around this error:



C:\Documents and Settings\Beth>mplexnew -f 10 G:\van2\VTS_01_1.m2v G:
\van\van.81.ac3 -o G:\van\van.ty
INFO: [mplexnew] mplex version 1.6.2 (2.2.3 $Date: 2004/01/13 20:45:26 $)
INFO: [mplexnew] File G:\van2\VTS_01_1.m2v looks like an MPEG Video stream.
INFO: [mplexnew] File G:\van\van.81.ac3 looks like an AC3 Audio stream.
INFO: [mplexnew] Video stream 0: profile 10 selected - ignoring non-standard
options!
INFO: [mplexnew] Found 1 audio streams and 1 video streams
INFO: [mplexnew] Selecting TY and generic MPEG2 output profile
INFO: [mplexnew] Multiplexing video program stream!
INFO: [mplexnew] Scanning for header info: Video stream e0 (G:\van2\VTS_01_1.
m2v)
INFO: [mplexnew] VIDEO STREAM: e0
INFO: [mplexnew] Frame width : 720
INFO: [mplexnew] Frame height : 480
INFO: [mplexnew] Aspect ratio : 4:3 display
INFO: [mplexnew] Picture rate : 29.970 frames/sec
INFO: [mplexnew] Bit rate : 3000000 bits/sec
INFO: [mplexnew] Vbv buffer size : 229376 bytes
INFO: [mplexnew] CSPF : 0
INFO: [mplexnew] Scanning for header info: AC3 Audio stream 00 (G:\van\van.81
.ac3)
INFO: [mplexnew] AC3 frame size = 768

INFO: [mplexnew] AC3 AUDIO STREAM:
INFO: [mplexnew] Bit rate : 24576 bytes/sec (192 kbit/sec)
INFO: [mplexnew] Frequency : 48000 Hz
INFO: [mplexnew] SYSTEMS/PROGRAM stream:
INFO: [mplexnew] rough-guess multiplexed stream data rate : 3263344
INFO: [mplexnew] Setting best-guess data rate.
INFO: [mplexnew] Run-in Sectors = 998 Video delay = 450951 Audio delay = 4599
60
INFO: [mplexnew] New sequence commences...
INFO: [mplexnew] Video e0: buf=2719744 frame=000000 sector=00000000
INFO: [mplexnew] Audio bd: buf= 16384 frame=000000 sector=00000000
++ WARN: [mplexnew] Stream e0: data will arrive too late sent(SCR)=4833902 requi
red(DTS)=4805301
++ WARN: [mplexnew] Video e0: buf=2572636 frame=001328 sector=00001550
++ WARN: [mplexnew] Audio bd: buf= 16384 frame=001509 sector=00001509
++ WARN: [mplexnew] Stream e0: data will arrive too late sent(SCR)=5714700 requi
red(DTS)=5293289
++ WARN: [mplexnew] Video e0: buf=2704382 frame=001458 sector=00001700
++ WARN: [mplexnew] Audio bd: buf= 16384 frame=001679 sector=00001679
++ WARN: [mplexnew] Stream bd: data will arrive too late sent(SCR)=6700694 requi
red(DTS)=5782200
++ WARN: [mplexnew] Video e0: buf=2719744 frame=001588 sector=00001852
++ WARN: [mplexnew] Audio bd: buf= 15616 frame=001849 sector=00001849
++ WARN: [mplexnew] Stream bd: data will arrive too late sent(SCR)=7639757 requi
red(DTS)=6271800
++ WARN: [mplexnew] Video e0: buf=2719744 frame=001718 sector=00002004
++ WARN: [mplexnew] Audio bd: buf= 15616 frame=002019 sector=00002019
++ WARN: [mplexnew] Stream bd: data will arrive too late sent(SCR)=8582679 requi
red(DTS)=6761400
++ WARN: [mplexnew] Video e0: buf=2719744 frame=001848 sector=00002156
++ WARN: [mplexnew] Audio bd: buf= 15616 frame=002189 sector=00002189
++ WARN: [mplexnew] Stream e0: data will arrive too late sent(SCR)=9276141 requi
red(DTS)=7248242
++ WARN: [mplexnew] Video e0: buf=2667418 frame=001979 sector=00002309
++ WARN: [mplexnew] Audio bd: buf= 16384 frame=002358 sector=00002358
++ WARN: [mplexnew] Stream bd: data will arrive too late sent(SCR)=10060605 requ
ired(DTS)=7737720
++ WARN: [mplexnew] Video e0: buf=2719744 frame=002109 sector=00002461
++ WARN: [mplexnew] Audio bd: buf= 15616 frame=002528 sector=00002528
++ WARN: [mplexnew] Stream bd: data will arrive too late sent(SCR)=10794849 requ
ired(DTS)=8224440
++ WARN: [mplexnew] Video e0: buf=2719744 frame=002240 sector=00002614
++ WARN: [mplexnew] Audio bd: buf= 15616 frame=002697 sector=00002697
++ WARN: [mplexnew] Stream bd: data will arrive too late sent(SCR)=11406263 requ
ired(DTS)=8714040
++ WARN: [mplexnew] Video e0: buf=2719744 frame=002370 sector=00002764
++ WARN: [mplexnew] Audio bd: buf= 15616 frame=002867 sector=00002867
++ WARN: [mplexnew] Stream bd: data will arrive too late sent(SCR)=12050598 requ
ired(DTS)=9180600
++ WARN: [mplexnew] Video e0: buf=2719744 frame=002508 sector=00002926
++ WARN: [mplexnew] Audio bd: buf= 15616 frame=003029 sector=00003029
++ WARN: [mplexnew] Stream e0: data will arrive too late sent(SCR)=12669739 requ
ired(DTS)=9650642
++ WARN: [mplexnew] Video e0: buf=2695192 frame=002645 sector=00003085
++ WARN: [mplexnew] Audio bd: buf= 16384 frame=003192 sector=00003192
**ERROR: [mplexnew] Too many frame drops -exiting


I have tried many different variations of my workflow but still get the same.

Any help would be great!

Beth

Thinkdiff
09-06-2005, 07:15 PM
I'm trying to get this compiled on OS X using mjpegtools 1.6.2 and tymplex1.1 patch. Here's a clip from my compile of where it goes south.



if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../utils -I/usr/include/libxml2 -g -O2 -Wall -Wunused -MT mpegtimecode.o -MD -MP -MF ".deps/mpegtimecode.Tpo" \
-c -o mpegtimecode.o `test -f 'mpegtimecode.c' || echo './'`mpegtimecode.c; \
then mv -f ".deps/mpegtimecode.Tpo" ".deps/mpegtimecode.Po"; \
else rm -f ".deps/mpegtimecode.Tpo"; exit 1; \
fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../utils -I/usr/include/libxml2 -g -O2 -Wall -Wunused -MT yuv4mpeg.o -MD -MP -MF ".deps/yuv4mpeg.Tpo" \
-c -o yuv4mpeg.o `test -f 'yuv4mpeg.c' || echo './'`yuv4mpeg.c; \
then mv -f ".deps/yuv4mpeg.Tpo" ".deps/yuv4mpeg.Po"; \
else rm -f ".deps/yuv4mpeg.Tpo"; exit 1; \
fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../utils -I/usr/include/libxml2 -g -O2 -Wall -Wunused -MT yuv4mpeg_ratio.o -MD -MP -MF ".deps/yuv4mpeg_ratio.Tpo" \
-c -o yuv4mpeg_ratio.o `test -f 'yuv4mpeg_ratio.c' || echo './'`yuv4mpeg_ratio.c; \
then mv -f ".deps/yuv4mpeg_ratio.Tpo" ".deps/yuv4mpeg_ratio.Po"; \
else rm -f ".deps/yuv4mpeg_ratio.Tpo"; exit 1; \
fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../utils -I/usr/include/libxml2 -g -O2 -Wall -Wunused -MT ty.o -MD -MP -MF ".deps/ty.Tpo" \
-c -o ty.o `test -f 'ty.c' || echo './'`ty.c; \
then mv -f ".deps/ty.Tpo" ".deps/ty.Po"; \
else rm -f ".deps/ty.Tpo"; exit 1; \
fi
ty.c: In function 'write_internal':
ty.c:59: warning: implicit declaration of function 'mjpeg_error_exit1'
ty.c: In function 'flush_chunk':
ty.c:102: warning: pointer targets in passing argument 2 of 'write_chunk' differ in signedness
ty.c:106: warning: implicit declaration of function 'mjpeg_info'
ty.c:119: warning: pointer targets in passing argument 2 of 'write_internal' differ in signedness
ty.c:122: warning: pointer targets in passing argument 2 of 'write_internal' differ in signedness
ty.c:130: warning: pointer targets in passing argument 2 of 'write_chunk' differ in signedness
ty.c: In function 'rewrite_xml':
ty.c:251: warning: pointer targets in passing argument 1 of 'strstr' differ in signedness
ty.c:251: warning: pointer targets in passing argument 2 of 'strstr' differ in signedness
ty.c:251: warning: pointer targets in assignment differ in signedness
ty.c:260: warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness
ty.c:260: warning: format '%u' expects type 'unsigned int', but argument 3 has type 'long unsigned int'
ty.c:265: warning: pointer targets in passing argument 1 of 'parse_xml' differ in signedness
ty.c:274: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../utils -I/usr/include/libxml2 -g -O2 -Wall -Wunused -MT tymaster.o -MD -MP -MF ".deps/tymaster.Tpo" \
-c -o tymaster.o `test -f 'tymaster.c' || echo './'`tymaster.c; \
then mv -f ".deps/tymaster.Tpo" ".deps/tymaster.Po"; \
else rm -f ".deps/tymaster.Tpo"; exit 1; \
fi
tymaster.c: In function 'write_internal':
tymaster.c:54: warning: implicit declaration of function 'mjpeg_error_exit1'
tymaster.c: In function 'parse_chunk':
tymaster.c:73: warning: implicit declaration of function 'mjpeg_info'
tymaster.c:101: warning: pointer targets in passing argument 1 of 'tivo_show_time' differ in signedness
tymaster.c:101: warning: pointer targets in passing argument 3 of 'tivo_show_time' differ in signedness
tymaster.c: In function 'generate_gop':
tymaster.c:140: warning: pointer targets in passing argument 1 of 'tivo_show_time' differ in signedness
tymaster.c:140: warning: pointer targets in passing argument 3 of 'tivo_show_time' differ in signedness
tymaster.c:164: warning: pointer targets in passing argument 2 of 'write_internal' differ in signedness
tymaster.c: In function 'generate_master':
tymaster.c:194: warning: pointer targets in passing argument 2 of 'write_internal' differ in signedness
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../utils -I/usr/include/libxml2 -g -O2 -Wall -Wunused -MT tyutils.o -MD -MP -MF ".deps/tyutils.Tpo" \
-c -o tyutils.o `test -f 'tyutils.c' || echo './'`tyutils.c; \
then mv -f ".deps/tyutils.Tpo" ".deps/tyutils.Po"; \
else rm -f ".deps/tyutils.Tpo"; exit 1; \
fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../utils -I/usr/include/libxml2 -g -O2 -Wall -Wunused -MT tyxmladd.o -MD -MP -MF ".deps/tyxmladd.Tpo" \
-c -o tyxmladd.o `test -f 'tyxmladd.c' || echo './'`tyxmladd.c; \
then mv -f ".deps/tyxmladd.Tpo" ".deps/tyxmladd.Po"; \
else rm -f ".deps/tyxmladd.Tpo"; exit 1; \
fi
tyxmladd.c: In function 'xml_attr':
tyxmladd.c:53: warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness
tyxmladd.c: In function 'originate_xml':
tyxmladd.c:71: warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness
tyxmladd.c:75: warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness
tyxmladd.c:75: warning: format '%u' expects type 'unsigned int', but argument 3 has type 'long unsigned int'
tyxmladd.c:76: warning: pointer targets in passing argument 3 of 'xml_attr' differ in signedness
tyxmladd.c:77: warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness
tyxmladd.c:78: warning: pointer targets in passing argument 3 of 'xml_attr' differ in signedness
tyxmladd.c:80: warning: pointer targets in passing argument 3 of 'xml_attr' differ in signedness
tyxmladd.c:86: warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness
tyxmladd.c:87: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../utils -I/usr/include/libxml2 -g -O2 -Wall -Wunused -MT xml.o -MD -MP -MF ".deps/xml.Tpo" \
-c -o xml.o `test -f 'xml.c' || echo './'`xml.c; \
then mv -f ".deps/xml.Tpo" ".deps/xml.Po"; \
else rm -f ".deps/xml.Tpo"; exit 1; \
fi
In file included from xml.c:31:
tydefs.h:22: error: parse error before "boolean"
tydefs.h:22: warning: type defaults to 'int' in declaration of 'boolean'
tydefs.h:22: warning: data definition has no type or storage class
tydefs.h:49: error: parse error before "u_int"
tydefs.h:49: warning: no semicolon at end of struct or union
tydefs.h:50: warning: type defaults to 'int' in declaration of 'objtype'
tydefs.h:50: warning: data definition has no type or storage class
tydefs.h:51: error: parse error before "chunksize"
tydefs.h:51: warning: type defaults to 'int' in declaration of 'chunksize'
tydefs.h:51: warning: data definition has no type or storage class
tydefs.h:52: error: parse error before "chunkcnt"
tydefs.h:52: warning: type defaults to 'int' in declaration of 'chunkcnt'
tydefs.h:52: warning: data definition has no type or storage class
tydefs.h:53: error: parse error before "unknown"
tydefs.h:53: warning: type defaults to 'int' in declaration of 'unknown'
tydefs.h:53: warning: data definition has no type or storage class
tydefs.h:54: error: parse error before "bitmapsize"
tydefs.h:54: warning: type defaults to 'int' in declaration of 'bitmapsize'
tydefs.h:54: warning: data definition has no type or storage class
tydefs.h:55: error: parse error before "timescale"
tydefs.h:55: warning: type defaults to 'int' in declaration of 'timescale'
tydefs.h:55: warning: data definition has no type or storage class
tydefs.h:56: error: parse error before "goptableend"
tydefs.h:56: warning: type defaults to 'int' in declaration of 'goptableend'
tydefs.h:56: warning: data definition has no type or storage class
tydefs.h:57: warning: type defaults to 'int' in declaration of 'ty_master_hdr_t'
tydefs.h:57: warning: data definition has no type or storage class
tydefs.h:61: error: parse error before "u_char"
tydefs.h:61: warning: no semicolon at end of struct or union
tydefs.h:62: warning: type defaults to 'int' in declaration of 'ty_gop_rec_t'
tydefs.h:62: warning: data definition has no type or storage class
tydefs.h:68: error: parse error before "u_char"
tydefs.h:68: warning: no semicolon at end of struct or union
tydefs.h:69: warning: type defaults to 'int' in declaration of 'headbuf'
tydefs.h:69: warning: data definition has no type or storage class
tydefs.h:70: error: parse error before "headidx"
tydefs.h:70: warning: type defaults to 'int' in declaration of 'headidx'
tydefs.h:70: warning: data definition has no type or storage class
tydefs.h:71: error: parse error before "payidx"
tydefs.h:71: warning: type defaults to 'int' in declaration of 'payidx'
tydefs.h:71: warning: data definition has no type or storage class
tydefs.h:72: error: parse error before "have_seq"
tydefs.h:72: warning: type defaults to 'int' in declaration of 'have_seq'
tydefs.h:72: warning: data definition has no type or storage class
tydefs.h:73: error: parse error before "seqidx"
tydefs.h:73: warning: type defaults to 'int' in declaration of 'seqidx'
tydefs.h:73: warning: data definition has no type or storage class
tydefs.h:74: error: parse error before "chnk"
tydefs.h:74: warning: type defaults to 'int' in declaration of 'chnk'
tydefs.h:74: warning: data definition has no type or storage class
tydefs.h:75: error: parse error before "segchunks"
tydefs.h:75: warning: type defaults to 'int' in declaration of 'segchunks'
tydefs.h:75: warning: data definition has no type or storage class
tydefs.h:76: warning: type defaults to 'int' in declaration of 'out_stream_t'
tydefs.h:76: warning: data definition has no type or storage class
tydefs.h:112: error: parse error before "dbg"
tydefs.h:113: warning: return type defaults to 'int'
tydefs.h:137: error: parse error before "tivo_max_secs_per_chunk"
tydefs.h:137: error: parse error before "bits_per_sec"
tydefs.h:138: warning: return type defaults to 'int'
tydefs.h: In function 'tivo_max_secs_per_chunk':
tydefs.h:139: error: 'bits_per_sec' undeclared (first use in this function)
tydefs.h:139: error: (Each undeclared identifier is reported only once
tydefs.h:139: error: for each function it appears in.)
tydefs.h: At top level:
tydefs.h:143: error: parse error before "bits_per_sec"
tydefs.h: In function 'tivo_max_ticks_per_chunk':
tydefs.h:147: error: 'bits_per_sec' undeclared (first use in this function)
xml.c: At top level:
xml.c:83: error: parse error before "u_char"
xml.c: In function 'update_xml':
xml.c:89: error: 'sizestr' undeclared (first use in this function)
xml.c:91: error: 'doc' undeclared (first use in this function)
xml.c:99: error: 'xpathExpr' undeclared (first use in this function)
xml.c: At top level:
xml.c:116: error: parse error before '*' token
xml.c:117: error: parse error before "u_char"
xml.c:118: warning: return type defaults to 'int'
xml.c: In function 'parse_xml':
xml.c:133: error: 'content' undeclared (first use in this function)
xml.c:133: error: 'length' undeclared (first use in this function)
xml.c:138: error: 'sizestr' undeclared (first use in this function)
xml.c:143: warning: return from incompatible pointer type
make[3]: *** [xml.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

darrin75
09-06-2005, 07:55 PM
Anyone seen this error?

I have had no problems converting my DVDs (50+) to TY, using a process of DVD Shrink,BBdmux and tymplex - except one and I can't seem to get around this error:



C:\Documents and Settings\Beth>mplexnew -f 10 G:\van2\VTS_01_1.m2v G:
\van\van.81.ac3 -o G:\van\van.ty
INFO: [mplexnew] mplex version 1.6.2 (2.2.3 $Date: 2004/01/13 20:45:26 $)
INFO: [mplexnew] File G:\van2\VTS_01_1.m2v looks like an MPEG Video stream.
INFO: [mplexnew] File G:\van\van.81.ac3 looks like an AC3 Audio stream.
INFO: [mplexnew] Video stream 0: profile 10 selected - ignoring non-standard
options!
INFO: [mplexnew] Found 1 audio streams and 1 video streams
INFO: [mplexnew] Selecting TY and generic MPEG2 output profile
INFO: [mplexnew] Multiplexing video program stream!
INFO: [mplexnew] Scanning for header info: Video stream e0 (G:\van2\VTS_01_1.
m2v)
INFO: [mplexnew] VIDEO STREAM: e0
INFO: [mplexnew] Frame width : 720
INFO: [mplexnew] Frame height : 480
INFO: [mplexnew] Aspect ratio : 4:3 display
INFO: [mplexnew] Picture rate : 29.970 frames/sec
INFO: [mplexnew] Bit rate : 3000000 bits/sec
INFO: [mplexnew] Vbv buffer size : 229376 bytes
INFO: [mplexnew] CSPF : 0
INFO: [mplexnew] Scanning for header info: AC3 Audio stream 00 (G:\van\van.81
.ac3)
INFO: [mplexnew] AC3 frame size = 768

INFO: [mplexnew] AC3 AUDIO STREAM:
INFO: [mplexnew] Bit rate : 24576 bytes/sec (192 kbit/sec)
INFO: [mplexnew] Frequency : 48000 Hz
INFO: [mplexnew] SYSTEMS/PROGRAM stream:
INFO: [mplexnew] rough-guess multiplexed stream data rate : 3263344
INFO: [mplexnew] Setting best-guess data rate.
INFO: [mplexnew] Run-in Sectors = 998 Video delay = 450951 Audio delay = 4599
60
INFO: [mplexnew] New sequence commences...
INFO: [mplexnew] Video e0: buf=2719744 frame=000000 sector=00000000
INFO: [mplexnew] Audio bd: buf= 16384 frame=000000 sector=00000000
++ WARN: [mplexnew] Stream e0: data will arrive too late sent(SCR)=4833902 requi
red(DTS)=4805301
++ WARN: [mplexnew] Video e0: buf=2572636 frame=001328 sector=00001550
++ WARN: [mplexnew] Audio bd: buf= 16384 frame=001509 sector=00001509
++ WARN: [mplexnew] Stream e0: data will arrive too late sent(SCR)=5714700 requi
red(DTS)=5293289
++ WARN: [mplexnew] Video e0: buf=2704382 frame=001458 sector=00001700
++ WARN: [mplexnew] Audio bd: buf= 16384 frame=001679 sector=00001679
++ WARN: [mplexnew] Stream bd: data will arrive too late sent(SCR)=6700694 requi
red(DTS)=5782200
++ WARN: [mplexnew] Video e0: buf=2719744 frame=001588 sector=00001852
++ WARN: [mplexnew] Audio bd: buf= 15616 frame=001849 sector=00001849
++ WARN: [mplexnew] Stream bd: data will arrive too late sent(SCR)=7639757 requi
red(DTS)=6271800
++ WARN: [mplexnew] Video e0: buf=2719744 frame=001718 sector=00002004
++ WARN: [mplexnew] Audio bd: buf= 15616 frame=002019 sector=00002019
++ WARN: [mplexnew] Stream bd: data will arrive too late sent(SCR)=8582679 requi
red(DTS)=6761400
++ WARN: [mplexnew] Video e0: buf=2719744 frame=001848 sector=00002156
++ WARN: [mplexnew] Audio bd: buf= 15616 frame=002189 sector=00002189
++ WARN: [mplexnew] Stream e0: data will arrive too late sent(SCR)=9276141 requi
red(DTS)=7248242
++ WARN: [mplexnew] Video e0: buf=2667418 frame=001979 sector=00002309
++ WARN: [mplexnew] Audio bd: buf= 16384 frame=002358 sector=00002358
++ WARN: [mplexnew] Stream bd: data will arrive too late sent(SCR)=10060605 requ
ired(DTS)=7737720
++ WARN: [mplexnew] Video e0: buf=2719744 frame=002109 sector=00002461
++ WARN: [mplexnew] Audio bd: buf= 15616 frame=002528 sector=00002528
++ WARN: [mplexnew] Stream bd: data will arrive too late sent(SCR)=10794849 requ
ired(DTS)=8224440
++ WARN: [mplexnew] Video e0: buf=2719744 frame=002240 sector=00002614
++ WARN: [mplexnew] Audio bd: buf= 15616 frame=002697 sector=00002697
++ WARN: [mplexnew] Stream bd: data will arrive too late sent(SCR)=11406263 requ
ired(DTS)=8714040
++ WARN: [mplexnew] Video e0: buf=2719744 frame=002370 sector=00002764
++ WARN: [mplexnew] Audio bd: buf= 15616 frame=002867 sector=00002867
++ WARN: [mplexnew] Stream bd: data will arrive too late sent(SCR)=12050598 requ
ired(DTS)=9180600
++ WARN: [mplexnew] Video e0: buf=2719744 frame=002508 sector=00002926
++ WARN: [mplexnew] Audio bd: buf= 15616 frame=003029 sector=00003029
++ WARN: [mplexnew] Stream e0: data will arrive too late sent(SCR)=12669739 requ
ired(DTS)=9650642
++ WARN: [mplexnew] Video e0: buf=2695192 frame=002645 sector=00003085
++ WARN: [mplexnew] Audio bd: buf= 16384 frame=003192 sector=00003192
**ERROR: [mplexnew] Too many frame drops -exiting


I have tried many different variations of my workflow but still get the same.

Any help would be great!

Beth



Beth,

I am pretty sure this is do to bad headers in the ac3 stream file or your bitrate is too low. Either or, try to rencode your ac3 to mp2 or increase your bitrate.

Thinkdiff
09-06-2005, 09:02 PM
I started fresh. compiled libxml2 first and then applied the 1.1 patch followed by stealthdave's 1.2 patch for OS X. It got me further, but now i'm having trouble with libjpeg which compiled fine..


/usr/bin/gcc-3.3 -g -O2 -Wall -Wunused -o yuvcorrect_tune yuvcorrect_tune.o yuvcorrect_functions.o ../utils/libmjpegutils.a -lm
if /usr/bin/gcc-3.3 -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I/usr/include -DG_LOG_DOMAIN=\"lavtools\" -DLAVPLAY_VERSION=\"1.6.2\" -I /usr/X11R6/include -I../utils -g -O2 -Wall -Wunused -MT jpeg2yuv.o -MD -MP -MF ".deps/jpeg2yuv.Tpo" \
-c -o jpeg2yuv.o `test -f 'jpeg2yuv.c' || echo './'`jpeg2yuv.c; \
then mv -f ".deps/jpeg2yuv.Tpo" ".deps/jpeg2yuv.Po"; \
else rm -f ".deps/jpeg2yuv.Tpo"; exit 1; \
fi
jpeg2yuv.c: In function `generate_YUV4MPEG':
jpeg2yuv.c:413: warning: unsigned int format, size_t arg (arg 3)
jpeg2yuv.c:426: warning: unsigned int format, size_t arg (arg 3)
jpeg2yuv.c:440: warning: unsigned int format, size_t arg (arg 3)
/bin/sh ../libtool --mode=link /usr/bin/gcc-3.3 -g -O2 -Wall -Wunused -o jpeg2yuv jpeg2yuv.o ../utils/libmjpegutils.a liblavjpeg.la
/usr/bin/gcc-3.3 -g -O2 -Wall -Wunused -o .libs/jpeg2yuv jpeg2yuv.o ../utils/libmjpegutils.a ./.libs/liblavjpeg.dylib
ld: Undefined symbols:
_jpeg_CreateDecompress
_jpeg_destroy_decompress
_jpeg_read_header
_jpeg_start_decompress
_jpeg_std_error
_jpeg_stdio_src
make[2]: *** [jpeg2yuv] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

jkinghome
09-16-2005, 05:11 PM
What is the easiest way to replace/edit a XML on an already tymplexed TY file?

BTUxNine
09-16-2005, 05:17 PM
What is the easiest way to replace/edit a XML on an already tymplexed TY file?
<deleted>
Sorry... thought this was a different thread :rolleyes:

bcc
09-16-2005, 07:01 PM
What is the easiest way to replace/edit a XML on an already tymplexed TY file?Convert the file to .tmf, untar it, edit the xml, tar it back up. Under linux you could simply extract&overwrite the xml using dd, but I assume you're using windoze.

mmoore99
09-18-2005, 02:44 AM
I downloaded TY-mplex today and have been running some tests on my system, but am encountering a number of problems that I am hoping that someone might be able to help me resolve. Here is the process I have used and an explanation of the problems:

1. Extract the TY file. I used mfs_ftp to extract a TY file from my Hughes SD-DVR80, runniing 6.2. I know the extract is good as I am able to successfully play the extracted file on my PC with WMP/tyshow. Also, I am able to successfully re-insert and play the file on the Tivo.

2. Demux the file. I performed this step using several different methods (vsplit, hdemux and typrocess), however all methods yielded the same result (see below).

3. Create the new TY file with mplex. See command line and log as follows:


G:\My Videos - G\TV Shows\Workarea>mplex -f 10 video.m2v audio.m2a -o football4.ty
INFO: [mplex] mplex version 1.6.2 (2.2.3 $Date: 2004/01/13 20:45:26 $)
INFO: [mplex] File video.m2v looks like an MPEG Video stream.
INFO: [mplex] File audio.m2a looks like an MPEG Audio stream.
INFO: [mplex] Video stream 0: profile 10 selected - ignoring non-standard options!
INFO: [mplex] Found 1 audio streams and 1 video streams
INFO: [mplex] Selecting TY and generic MPEG2 output profile
INFO: [mplex] Multiplexing video program stream!
INFO: [mplex] Scanning for header info: Video stream e0 (video.m2v)
INFO: [mplex] VIDEO STREAM: e0
INFO: [mplex] Frame width : 480
INFO: [mplex] Frame height : 480
INFO: [mplex] Aspect ratio : 4:3 display
INFO: [mplex] Picture rate : 29.970 frames/sec
INFO: [mplex] Bit rate : 15000000 bits/sec
INFO: [mplex] Vbv buffer size : 229376 bytes
INFO: [mplex] CSPF : 0
INFO: [mplex] Scanning for header info: Audio stream c0 (audio.m2a)
INFO: [mplex] MPEG AUDIO STREAM: c0
INFO: [mplex] Audio version : 1.0
INFO: [mplex] Layer : 2
INFO: [mplex] CRC checksums : no
INFO: [mplex] Bit rate : 20480 bytes/sec (160 kbit/sec)
INFO: [mplex] Frequency : 48000 Hz
INFO: [mplex] Mode : 1 joint stereo
INFO: [mplex] Mode extension : 0
INFO: [mplex] Copyright bit : 1 copyright protected
INFO: [mplex] Original/Copy : 1 original
INFO: [mplex] Emphasis : 0 none
INFO: [mplex] SYSTEMS/PROGRAM stream:
INFO: [mplex] rough-guess multiplexed stream data rate : 15475896
INFO: [mplex] Setting best-guess data rate.
INFO: [mplex] Run-in Sectors = 998 Video delay = 95090 Audio delay = 98093
INFO: [mplex] New sequence commences...
INFO: [mplex] Video e0: buf=2719744 frame=000000 sector=00000000
INFO: [mplex] Audio c0: buf= 4096 frame=000000 sector=00000000
INFO: [mplex] STREAM c0 completed @ frame 48894.
INFO: [mplex] STREAM e0 completed @ frame 35248.
INFO: [mplex] Multiplex completion at SCR=106016906.
INFO: [mplex] Video e0: buf=2699345 frame=035248 sector=00036635
INFO: [mplex] Audio c0: buf= 4096 frame=048894 sector=00048895
INFO: [mplex] VIDEO_STATISTICS: e0
INFO: [mplex] Video Stream length: 469864622 bytes
INFO: [mplex] Sequence headers: 694
INFO: [mplex] Sequence ends : 0
INFO: [mplex] No. Pictures : 35249
INFO: [mplex] No. Groups : 694
INFO: [mplex] No. I Frames : 694 avg. size 34876 bytes
INFO: [mplex] No. P Frames : 11057 avg. size 18735 bytes
INFO: [mplex] No. B Frames : 23499 avg. size 10148 bytes
INFO: [mplex] Average bit-rate : 3193600 bits/sec
INFO: [mplex] Peak bit-rate : 7557200 bits/sec
INFO: [mplex] BUFFERING min 2619873 Buf max 2718913
INFO: [mplex] AUDIO_STATISTICS: c0
INFO: [mplex] Audio stream length 23469600 bytes.
INFO: [mplex] Syncwords : 48895
INFO: [mplex] Frames : 48895 padded
INFO: [mplex] Frames : 0 unpadded
INFO: [mplex] BUFFERING min 3616 Buf max 3616
INFO: [mplex] MUX STATUS: no under-runs detected.
INFO: [mplex] Generating master chunk for chunks 0:3786
4. Problem 1: Play the newly created TY file with WMP/tyshow. This results in very choppy video and out of sync audio.

5. Problem 2: Upload the new TY file to the Tivo via mfs_ftp. When I attempt to play the file on the Tivo I just get a blank green screen with the play bar and a lot of messages in the tverr log file as follows:


Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 216 segments failed: PES buffer segment 0 length is not word aligned (243103) (fsid 1200557, Irec = 1, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 56 segments failed: PES buffer segment 7 length is not word aligned (276718) (fsid 1200557, Irec = 2, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 15 segments failed: PES buffer segment 0 length is not word aligned (338930) (fsid 1200557, Irec = 4, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 125 segments failed: PES buffer segment 1 length is not word aligned (337427) (fsid 1200557, Irec = 5, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 5046 segments failed: PES buffer segment 6 length is not word aligned (119863) (fsid 1200557, Irec = 6, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 183 segments failed: PES buffer segment 0 length is not word aligned (429847) (fsid 1200557, Irec = 7, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 38 segments failed: PES buffer segment 1 length is not word aligned (479405) (fsid 1200557, Irec = 8, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 222 segments failed: PES buffer segment 4 length is not word aligned (56998) (fsid 1200557, Irec = 9, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 10 segments failed: PES buffer segment 0 length is not word aligned (155399) (fsid 1200557, Irec = 10, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkReadAheadCache[243]: Invalid PES triple: fsid 1200557, Irec 12, inx = 0
Sep 17 23:26:34 (none) TmkReadAheadCache[243]: Invalid PES triple: fsid 1200557, Irec 13, inx = 0
Sep 17 23:26:34 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 159 segments failed: PES buffer segment 1 length is not word aligned (245151) (fsid 1200557, Irec = 14, count 1)Trying to recover
Any assistance in shedding some light on these issues would be greatly appreciated.

bcc
09-19-2005, 03:06 PM
mmoore99,
Looks like you didn't: Use -O to specify the a/v sync offset
Use -r to specify the data rate Also I don't understand why you're converting ty->mpg->ty instead of just using something like tychopper. You're risking imperfect a/v sync by demuxing&remuxing like this.

mmoore99
09-19-2005, 05:50 PM
mmoore99,
Looks like you didn't: Use -O to specify the a/v sync offset
Use -r to specify the data rate Also I don't understand why you're converting ty->mpg->ty instead of just using something like tychopper. You're risking imperfect a/v sync by demuxing&remuxing like this.
bcc,

I was initially doing the "ty->mpg->ty" to test out tymplex. Since my earlier post I have also tried vob->m2v, m2a->ty, but am still getting very choppy video with a lot of pixelation (sp?). How do I determine what values to use with -r?

bcc
09-19-2005, 06:45 PM
How do I determine what values to use with -r?Was afraid you'd ask that. How about <file size>*8/(1000*<recording-in-minutes>*60)
Which is probably 2000 to 3000 for low-def.

mmoore99
09-20-2005, 02:44 PM
mmoore99,
Looks like you didn't: Use -O to specify the a/v sync offset
Use -r to specify the data rate
Ok, I have spent hours trying multiple variations of "-r" options, different types of video sources (.ty, .mpg, .vob) and different demuxers (vsplit, bbdmux, hdemux). I have tried several different mplex binaries and even downloaded the source and made a new binary. I also have ran tests on two different computers. However, regardless of all of the variables that I have tried every .ty file that tymplex produces results in choppy, pixelated video when played on the pc with either mplayer or tyshow and a blank green screen and many errors in the tverr log file when played on the tivo. I am at my wits end because other people on this forum indicate that they have been successful in doing these exact same things.

Does anyone have a short clip of a .ty file created by mplex that plays succesfully on the pc and tivo that I could download and try on my system?

I would greatly appreciate any suggestions on how to proceed. I would very much like to get this process working as I have a library of programs in .mpg format that I would like to convert to .ty and have available on the Tivo.

whitepelican
09-20-2005, 09:33 PM
Ok, I have spent hours trying multiple variations of "-r" options, different types of video sources (.ty, .mpg, .vob) and different demuxers (vsplit, bbdmux, hdemux). I have tried several different mplex binaries and even downloaded the source and made a new binary. I also have ran tests on two different computers. However, regardless of all of the variables that I have tried every .ty file that tymplex produces results in choppy, pixelated video when played on the pc with either mplayer or tyshow and a blank green screen and many errors in the tverr log file when played on the tivo. I am at my wits end because other people on this forum indicate that they have been successful in doing these exact same things.

Does anyone have a short clip of a .ty file created by mplex that plays succesfully on the pc and tivo that I could download and try on my system?

I would greatly appreciate any suggestions on how to proceed. I would very much like to get this process working as I have a library of programs in .mpg format that I would like to convert to .ty and have available on the Tivo.

I have transferred dozens of DVD's to .TY and played them all on my DTivos perfectly. They do usually have very choppy or pixelated video on the PC. I'm not sure why that is, but it may be that the bitrate is just too high.

That said, I'm not sure why you're messing with the -r option. I always just use the command line:


mplex -f 10 infile.m2v infile.ac3 -o outfile.ty

I upload that .TY file with MFS_FTP and it works perfectly every time (at least with an m2v and ac3 file ripped from a DVD source).

mmoore99
09-21-2005, 12:54 AM
That said, I'm not sure why you're messing with the -r option. I always just use the command line:

mplex -f 10 infile.m2v infile.ac3 -o outfile.ty
I was trying the -r option because I was given that suggestion by BCC in an earlier post. I have tried numerous files using exactly the command line options that you posted. However, when I upload those files to the Tivo via mfs_ftp and try to play them I just get a blank green screen on the Tivo and the tverr log file fills up with messages like the following:


Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 216 segments failed: PES buffer segment 0 length is not word aligned (243103) (fsid 1200557, Irec = 1, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 56 segments failed: PES buffer segment 7 length is not word aligned (276718) (fsid 1200557, Irec = 2, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 15 segments failed: PES buffer segment 0 length is not word aligned (338930) (fsid 1200557, Irec = 4, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 125 segments failed: PES buffer segment 1 length is not word aligned (337427) (fsid 1200557, Irec = 5, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 5046 segments failed: PES buffer segment 6 length is not word aligned (119863) (fsid 1200557, Irec = 6, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 183 segments failed: PES buffer segment 0 length is not word aligned (429847) (fsid 1200557, Irec = 7, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 38 segments failed: PES buffer segment 1 length is not word aligned (479405) (fsid 1200557, Irec = 8, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 222 segments failed: PES buffer segment 4 length is not word aligned (56998) (fsid 1200557, Irec = 9, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 10 segments failed: PES buffer segment 0 length is not word aligned (155399) (fsid 1200557, Irec = 10, count 1)Trying to recover
Sep 17 23:26:33 (none) TmkReadAheadCache[243]: Invalid PES triple: fsid 1200557, Irec 12, inx = 0
Sep 17 23:26:34 (none) TmkReadAheadCache[243]: Invalid PES triple: fsid 1200557, Irec 13, inx = 0
Sep 17 23:26:34 (none) TmkTransform::Trace[243]: Get Validate (buffer 0) 159 segments failed: PES buffer segment 1 length is not word aligned (245151) (fsid 1200557, Irec = 14, count 1)Trying to recover
What type of tivo and version of the tivo software are you running? Is anyone making this work with a dtivo running 6.2?

whitepelican
09-21-2005, 07:59 AM
What type of tivo and version of the tivo software are you running? Is anyone making this work with a dtivo running 6.2?

Yup, running 3 DTivos with 6.2 and the Superpatch-67. I have uploaded and played the mplex created TY files on all 3 with no problems. All of the MPGs that I've used are ripped from DVDs or SVCDs. I wish I could tell you what is going wrong for you, but I'm just not that bright.

bcc
09-21-2005, 10:34 PM
Test playback of the .m2v and .m2a/.ac3 streams separately.
Verify that the .m2v and .m2a/.ac3 streams are the same playback length.
Try multiplexing just the .m2v or the .m2a/.ac3 stream. You should be able to play back the multiplexed file .ty or .mpg on a computer.
If mplex is giving you errors about underruns or SCR values, you may need to adjust your audio delay or data rate.
For the audio stream, it may be either mpeg2 or ac3, but ac3 playback may not work on your computer if you don't have the right codecs installed.
Try transcoding the .m2a/.ac3 stream to standard rate mpeg2 audio.
For playback on a low-def tivo, make sure your .m2v is the expected rate.
ffmpeg can be handy to transcode the video to a low-enough rate and resolution for your low-def tivo. For example see here http://www.dealdatabase.com/forum/showpost.php?p=225101&postcount=106
If the above checks out but you still have tivo playback problems, check your /var/log/tverr
You may even want to simplify your failure situation to a minimal size and post sample streams
For windoze playback of .mpg/.m2v/.m2a, try a standards based player such as powerdvd, windvd, mplayer, but probably not windows media player. You may need elecard to play back .m2v/.m2a streams separately... Check your directshow filters to make sure the a/v streams are playing back with the codec you expected. You can check this with graphedit or gspot. mplayer should be able to play back your .ty files (but don't expect good audio sync). With tyshow installed, you can probably play back a .ty with the above players, assuming the content is low-def.
For linux playback, try mplayer, or xine. xine can play back the .m2a and .m2v tracks separately and is good about a/v sync. mplayer can play back .ty files directly (but does not do a/v sync correctly).

vnino
09-26-2005, 12:42 PM
I am trying to use the latest Windows build (dated 6/20) to multiplex mpeg SVCD streams created in TMPEG into a .ty file. Can anyone shed some light on troubleshooting the mplex following error:

assertion "pic_pos != -1" failed: file "multiplexor.cpp", line 1767


INFO: [mplex] mplex version 1.6.2 (2.2.3 $Date: 2004/01/13 20:45:26 $)
INFO: [mplex] File video.m2v looks like an MPEG Video stream.
INFO: [mplex] File video.m2a looks like an MPEG Audio stream.
INFO: [mplex] Video stream 0: profile 10 selected - ignoring non-standard opt
ions!
INFO: [mplex] Found 1 audio streams and 1 video streams
INFO: [mplex] Selecting TY and generic MPEG2 output profile
INFO: [mplex] Multiplexing video program stream!
INFO: [mplex] Scanning for header info: Video stream e0 (video.m
2v)
INFO: [mplex] VIDEO STREAM: e0
INFO: [mplex] Frame width : 480
INFO: [mplex] Frame height : 480
INFO: [mplex] Aspect ratio : 4:3 display
INFO: [mplex] Picture rate : 29.970 frames/sec
INFO: [mplex] Bit rate : 2031200 bits/sec
INFO: [mplex] Vbv buffer size : 114688 bytes
INFO: [mplex] CSPF : 0
INFO: [mplex] Scanning for header info: Audio stream c0 (video.m
2a)
INFO: [mplex] MPEG AUDIO STREAM: c0
INFO: [mplex] Audio version : 1.0
INFO: [mplex] Layer : 2
INFO: [mplex] CRC checksums : yes
INFO: [mplex] Bit rate : 28672 bytes/sec (224 kbit/sec)
INFO: [mplex] Frequency : 44100 Hz
INFO: [mplex] Mode : 0 stereo
INFO: [mplex] Mode extension : 0
INFO: [mplex] Copyright bit : 0 no copyright
INFO: [mplex] Original/Copy : 0 copy
INFO: [mplex] Emphasis : 0 none
INFO: [mplex] SYSTEMS/PROGRAM stream:
INFO: [mplex] rough-guess multiplexed stream data rate : 2308144
INFO: [mplex] Setting best-guess data rate.
INFO: [mplex] Run-in Sectors = 998 Video delay = 637573 Audio delay = 640576
INFO: [mplex] New sequence commences...
INFO: [mplex] Video e0: buf=2719744 frame=000000 sector=00000000
INFO: [mplex] Audio c0: buf= 4096 frame=000000 sector=00000000
INFO: [mplex] seq_pos=0 gop_pos=98 pic_pos=-1
assertion "pic_pos != -1" failed: file "multiplexor.cpp", line 1767
3 [sig] mplex 3956 open_stackdumpfile: Dumping stack trace to mplex.exe.st
ackdump

Thanks for your help.

Callindril
11-16-2005, 12:20 PM
Hey,

I have some home movies that I want to put on my folks Tivo for them, and am curious as to the best settings I should make the MPGs with before demultiplexing them and runing them thru TyMplex?

The videos are comming out of my DV camera, I edit them in Studio-9, thenm dump them as MPGs.

Seems that a show I pull off the Tivo can have a 1 hour show as a little over a gig...but when I take a 1 hour show and make an MPG out of it, its WAY larger than that...

I dont want to suck up more HD space on the tivo than I need to, so Im looking for the best encoding settings for TyMplex to use to create a ty file with good quality....

Thoughts?

BTUxNine
11-16-2005, 12:40 PM
As with most things, it's a tradeoff... how much space are you willing to use vs. how much quality loss you're willing to accept.

Try different settings and see.

(as far as resolution, there's no reason to go larger than 704x480, as that is the highest NTSC displays)

nova1
11-17-2005, 12:35 AM
assertion "pic_pos != -1" failed: file "multiplexor.cpp", line 1767

This means it didn't find the MPEG PICTURE START code in the MPEG file within the first 2048 bytes from the Group of Pictures(GOP) START code.

nams
11-27-2005, 04:34 PM
Problem with -O to specify AV sync

When I use -O option to specify the audio sync offset in milliseconds for some reason mplex fails to generate the master chunk and insert the insert the xml data in the end of the file.

If I use the same exact options and source files without -O then master chunk info is generated and xml info are added to the file.

I donít see anyone else having a problem with the -O option and I used my own compiled Linux binaries and posted Windows & Linux binaries from this forum with the same results.

I can live without the xml data but the master chunk info is required for successful upload to the tivo.

Does anyone else has this problem or know how to get around it?

nova1
11-28-2005, 02:38 PM
I actually did see the -O issue recently on the mplex_cc version. I don't have much time to investigate this fully at the moment. I did notice that using 0s,1s,2s was ok in that rewrite_master() would return the correct # of chunks for the TY file. However, using 3s, rewrite_master() would return a short # and then the XML routine would insert the XML data in the wrong place(i.e. seek to chunk offset and start writing the xml there in the middle of the TY file).

monkeyboy1010
11-29-2005, 10:05 PM
Just an FYI post:

I was able to sucessfully insert several HDV streams on to my HD10-250 using mplex. They were recorded with a Sony HVR-Z1U at 1080i. I used Vegas 6 to split out the files to m2v and mva (then renamed the ext to m2a) ran mplex on them, and inserted via mfs_ftp. I did reduce the default video bitrate from 25,000,000 bps to 15,000,000 bps to save space on the TiVo otherwise I was was getting some pretty huge files.

My wife is very pleased :D

mb1010

movado
12-06-2005, 01:01 PM
Ran an mpg made from Grapghedit. The Original file was from an SA Tivo I then ran the mpg through TMPGEnc to de-multiplex then ran it with TY Mplex.
Then I uploaded the .ty file with mfs_ftp and it crashed the Tivo twice. The destination tivo is a dtivo and I am assuming it has to do with the audio rate or something?

bcc
12-06-2005, 03:22 PM
Ran an mpg made from Grapghedit. The Original file was from an SA Tivo I then ran the mpg through TMPGEnc to de-multiplex then ran it with TY Mplex.
Then I uploaded the .ty file with mfs_ftp and it crashed the Tivo twice. The destination tivo is a dtivo and I am assuming it has to do with the audio rate or something?Hard to say. You could check your tivo log files to see if the tivo hinted as to the problem before crashing. I'd recommend using hdemux to demux the .ty file (or even tytool) instead of a 2 step process. If the audio rate is unusual, you can transcode that stream to standard rate before multiplexing.

Fire Hose
12-14-2005, 11:20 PM
Iíve tried going through this several times and still havenít been able to compile mplex in cygwin. I started by following the process that BCC specified:

1. Installed cygwin with: gcc-core, gcc-g++, make, libpcre0, patch, jpeg, libxml2, libxml2-devel, libiconv, and nasm packages
2. Unpack mjpegtools-1.6.2.tar.gz
3. cd mjpegtools-1.6.2
4. patch -p1 < tymplex1.2.patch.txt
5. unzip tymplex-build-win.zip
6. cd mplex
7. make
8. copy mplex.exe and cygwin.dll to /mjpegtools-1.6.2 (Iím using the ones downloaded from the first post in the development thread)

Then I tried creating a ty file with something I extracted with tytools and split into m2v and m2a with "mplex -f 10 file.ty.m2v file.ty.m2a -o result.ty"

all I get is ďmplex command not foundĒ

Iím a noob, but this is the first time Iíve really been stumpedÖ So, my first question is, am I just doing something really stupid? Beyond that, Iím a little confused with the different patches. It seems like there are at least 5 patches that need to be applied, but I donít see them all attached Ė does tymplex1.2.patch.txt contain them all now?

Any help would be much appreciated!

cgf
12-14-2005, 11:27 PM
Iíve tried going through this several times and still havenít been able to compile mplex in cygwin. I started by following the process that BCC specified:

1. Installed cygwin with: gcc-core, gcc-g++, make, libpcre0, patch, jpeg, libxml2, libxml2-devel, libiconv, and nasm packages
2. Unpack mjpegtools-1.6.2.tar.gz
3. cd mjpegtools-1.6.2
4. patch -p1 < tymplex1.2.patch.txt
5. unzip tymplex-build-win.zip
6. cd mplex
7. make
8. copy mplex.exe and cygwin.dll to /mjpegtools-1.6.2 (Iím using the ones downloaded from the first post in the development thread)

Then I tried creating a ty file with something I extracted with tytools and split into m2v and m2a with "mplex -f 10 file.ty.m2v file.ty.m2a -o result.ty"

all I get is ďmplex command not foundĒ

Iím a noob, but this is the first time Iíve really been stumpedÖ So, my first question is, am I just doing something really stupid? Beyond that, Iím a little confused with the different patches. It seems like there are at least 5 patches that need to be applied, but I donít see them all attached Ė does tymplex1.2.patch.txt contain them all now?

Any help would be much appreciated!

It sounds like all that you need to do is specify the complete path to the command, i.e., either "./mplex ..." or "/mplex-1.6.2/mplex.exe". Either that or "chmod a+x mplex.exe" might fix things.

Fire Hose
12-14-2005, 11:44 PM
thanks for the quick reply!

I shouldn't have to specify the path if I'm in the directory that has mplex.exe right? I tried chmod a+x on both the mplex.exe in mjpegtools-1.6.2 and mjpegtools-1.6.2/mplex but I still get the same error. But that actually leaves me wondering which mplex.exe to use? I've actually been trying them both up until now.

cgf
12-14-2005, 11:52 PM
thanks for the quick reply!

I shouldn't have to specify the path if I'm in the directory that has mplex.exe right?

From your description it sounds like you don't have the current directory in your path, so, yes, you do have to specify the path when starting the command: "./mplex ..."

Either that or add "." to your PATH environment variable.

Fire Hose
12-15-2005, 11:00 AM
Ok... It looks like I was doing something really stupid - Thanks for the help!

Fire Hose
12-16-2005, 11:46 PM
Ok, I didnít change a thing, but this worked when I tested it yesterday morning and now all of a sudden Iím getting the following error:

You have multiple copies of cygwin.dll on your system.
Search for cygwin1.dll using the Windows Start ->Find/Search facility and delete all but the most recent version. The most recent version *should* reside in x:\cygwin\bin, where Ďxí is the drive on which you have installed the cygwin distribution.

Beth-O
12-17-2005, 12:53 AM
cygwin1.dll is being used by another process - most likely tivoserver(?). Shut that down and try again.

Fire Hose
12-17-2005, 01:54 AM
Thanks Beth-O, but cygwin1.dll is definitely not being used by another process. I’m not running tivoserver but I shut tserver off for good measure… and there is nothing else running on my computer that could possibly be connected to it. I even tried reinstalling cygwin and mplex again but I get the same error. Although this time, I have an added line at the top.

C:\cygwin\mjpegtools-1.6.2\mplex.exe (1496): *** shared version mismatch detected - 0x75BE0084/0x75BE0074.
You have multiple copies of cygwin1.dll on your system.
Search for cygwin1.dll using the Windows Start->Find/Search facility and delete all but the most recent version. The most recent version *should* reside in x:\cygwin\bin, where 'x' is the drive on which you have installed the cygwin distribution.

pikespeakhiker
12-28-2005, 12:15 PM
Great advice here. Appreciate the help from everyone. I sure like going straight from DVD Decrypter streams into mplex, but those files are just waaay too big. I am now experimenting with the DVD Decrypter (vob) to ffmpeg to mplex. These look much nicer in size.

I do have one question. Most people here are using mp2 instead of ac3 output from ffmpeg. Is there a reason for that? Some of my simple googling shows that people either think that they are equivalent at reasonable bitrates....to ac3 being better. Here is one reference:

http://www.digitalfaq.com/dvdguides/authorburn/intro.htm

Any thoughts appreciated. I am going to try both today and see what I think. My other informal investigation seems to show that ffmpeg ac3 encoder is more robust than its mp2 encoder.

pikespeakhiker
12-28-2005, 04:32 PM
I tried a test from Empire Strikes back. One using the "common" settings I see with m2a and 32000. A second conversion encoding to ac3. I could tell a slight audible improvement with ac3 on the one disk. I also tried 48000 vs 32000 and the resulting ty file was no larger. So I think I will change my defaults to ac3/48000.

Two items to consider:
1. If you run windows, you will need to load an ac3 codec if you want to play the ty through wmp.
2. The volume is lower, especially on my computer. Not too bad on the tv.

Fire Hose
12-30-2005, 11:47 PM
not sure about ffmpeg and ac3 but ac3 is definitely better if you have a choice since it can be mixed in 5.1 channels... mp2 is just stereo. that being said this only matters if you have decoding and multiple speakers where you're watching. so, if your planning on watching it on a tv that only has two channels of sound i would think that the quality would be more determined by bit rate than anything else.

jbstix
03-17-2006, 03:32 AM
I'm am trying to use this to convert an .mpg file to .ty
I really don't have any need to pull files off the Tivo, convert them twice then put them back...
My main goal is to convert already existing .mpg files into .ty files and watch on the Tivo.
These are downloaded mpg files, and I'm using TMPGenc to split them into 2 files. It gives me the option of ".m1v and mp2" when splitting.
When trying to covert w/ mplex heres what i get:
C:\>mplex -f 10 movie.m1v movie.mp2 -o movie.ty
INFO: [mplex] mplex version 1.6.2 (2.2.3 $Date: 2004/01/13 20:45:26 $)
INFO: [mplex] File movie.m1v looks like an MPEG Video stream.
INFO: [mplex] File movie.mp2 looks like an MPEG Audio stream.
INFO: [mplex] Video stream 0: profile 10 selected - ignoring non-standard opt
ions!
INFO: [mplex] Found 1 audio streams and 1 video streams
INFO: [mplex] Selecting TY and generic MPEG2 output profile
INFO: [mplex] Multiplexing video program stream!
INFO: [mplex] Scanning for header info: Video stream e0 (jenna.m1v)
INFO: [mplex] VIDEO STREAM: e0
INFO: [mplex] Frame width : 320
INFO: [mplex] Frame height : 240
INFO: [mplex] Aspect ratio : 1:1 pixels
INFO: [mplex] Picture rate : 30.000 frames/sec
INFO: [mplex] Bit rate : 1150000 bits/sec
INFO: [mplex] Vbv buffer size : 49152 bytes
INFO: [mplex] CSPF : 0
INFO: [mplex] Scanning for header info: Audio stream c0 (jenna.mp2)
INFO: [mplex] MPEG AUDIO STREAM: c0
INFO: [mplex] Audio version : 1.0
INFO: [mplex] Layer : 2
INFO: [mplex] CRC checksums : no
INFO: [mplex] Bit rate : 24576 bytes/sec (192 kbit/sec)
INFO: [mplex] Frequency : 44100 Hz
INFO: [mplex] Mode : 3 single channel
INFO: [mplex] Mode extension : 0
INFO: [mplex] Copyright bit : 0 no copyright
INFO: [mplex] Original/Copy : 0 copy
INFO: [mplex] Emphasis : 0 none
INFO: [mplex] SYSTEMS/PROGRAM stream:
INFO: [mplex] rough-guess multiplexed stream data rate : 1375448
INFO: [mplex] Setting best-guess data rate.
INFO: [mplex] Run-in Sectors = 998 Video delay = 1069913 Audio delay = 107291
3
INFO: [mplex] New sequence commences...
INFO: [mplex] Video e0: buf=2719744 frame=000000 sector=00000000
INFO: [mplex] Audio c0: buf= 4096 frame=000000 sector=00000000
INFO: [mplex] seq_pos=-1 gop_pos=0 pic_pos=8
INFO: [mplex] seq_pos=-1 gop_pos=0 pic_pos=-1
assertion "pic_pos != -1" failed: file "multiplexor.cpp", line 1767
3 [sig] mplex 2796 open_stackdumpfile: Dumping stack trace to mplex.exe.st
ackdump

Same error every time... I've tried using different programs as well.
Please help... how can I get usable .m2v and .m2a files from and existing .mpg file???
Thanks for the help

bcc
03-17-2006, 03:36 AM
I think you have to make sure that your video stream starts with a video sequence, per this:
http://www.dealdatabase.com/forum/showpost.php?p=250587&postcount=131

Maybe you can get tmpgenc to drop video data at the front of the stream up until the first video sequence.

jbstix
03-17-2006, 03:43 AM
I think you have to make sure that your video stream starts with a video sequence, per this:
http://www.dealdatabase.com/forum/showpost.php?p=250587&postcount=131

Maybe you can get tmpgenc to drop video data at the front of the stream up until the first video sequence.

Thanks for the response bcc... unfortunatley I have no idea how to do what you are describing. I've been searching for a while here.
Is there another program that you would recommend other than TMPGenc, that may handle this process better?
Or, can you point me to a post that describes how to make sure my video source starts with a video sequence?
Will .m1v and .mp2 files work with mplex? Just wondering b/c those are what TMPGenc usually defaults to for file extensions.
thanks for the help...

bcc
03-17-2006, 03:02 PM
Thanks for the response bcc... unfortunatley I have no idea how to do what you are describing. I've been searching for a while here.
Is there another program that you would recommend other than TMPGenc, that may handle this process better?
Or, can you point me to a post that describes how to make sure my video source starts with a video sequence?
Will .m1v and .mp2 files work with mplex? Just wondering b/c those are what TMPGenc usually defaults to for file extensions.
thanks for the help...I don't see a way to make tmpgenc ensure that the video stream is clipped that way. For tymplex, you need mpeg2 video, not mpeg1. So .m1v, if it's really an mpeg1 video, shouldn't work.
I don't have a general cookbook. Since you mention downloaded .m2v, it sounds like we can make no assumptions on how the content was authored. videoredo might be able to clean up the video sequences.

jbstix
03-17-2006, 11:33 PM
I don't see a way to make tmpgenc ensure that the video stream is clipped that way. For tymplex, you need mpeg2 video, not mpeg1. So .m1v, if it's really an mpeg1 video, shouldn't work.
I don't have a general cookbook. Since you mention downloaded .m2v, it sounds like we can make no assumptions on how the content was authored. videoredo might be able to clean up the video sequences.

Ok, using yet another program, I converted the Mpeg1 file(s) to Mpeg2.
Then used TMPGenc to split them into .m2v and .mp2.
Transferred back to Tivo using Mfs_ftp, I get Video playback fine, but alas, no audio.
So, I'm very close to getting this to work properly.
When splitting the Mpeg2 file, it defaults to (.m2v) and (.mp2) - TMPGenc that is.
Do I need the audio format to be in the (.m2a) format for it to work properly?
Thanks for all the help, the mpeg2 format was all I needed to know to get over the hump...now I'm very close.

bcc
03-18-2006, 02:12 PM
Do I need the audio format to be in the (.m2a) format for it to work properly?.m2a .mp2 - same difference as far as I know.
Thanks for all the help, the mpeg2 format was all I needed to know to get over the hump...now I'm very close.Typical mpeg2 audio for a tivo is formated at 192kbps, with a freq. of 32kHz. I note that your output shows that your audio stream was at 44kHz. Recommend you try changing the rate. See also the general recommendations
http://www.dealdatabase.com/forum/showpost.php?p=235443&postcount=186
http://www.dealdatabase.com/forum/showpost.php?p=225101&postcount=106
Note also that most folks are avoiding these issues by using shrink-wrapped GUIs that were built on top of tymplex (tivoserver, tivotool).

jbstix
03-18-2006, 04:33 PM
.m2a .mp2 - same difference as far as I know. Typical mpeg2 audio for a tivo is formated at 192kbps, with a freq. of 32kHz. I note that your output shows that your audio stream was at 44kHz. Recommend you try changing the rate. See also the general recommendations
http://www.dealdatabase.com/forum/showpost.php?p=235443&postcount=186
http://www.dealdatabase.com/forum/showpost.php?p=225101&postcount=106
Note also that most folks are avoiding these issues by using shrink-wrapped GUIs that were built on top of tymplex (tivoserver, tivotool).

Thanks again bcc! That was the tip I needed.
Converted the audio stream to the correct format, and all was well (sortof).
I want to view some of these shows on both my S1 Dtivo and my HDTivo.
No problems on the HDTivo, but the audio is choppy at best on the S1.
I'm searching to find the audio format for the S1 Dtivo, I would assume it's the same 192/32, but that may not be since it is not working on the S1. Video is pretty good on the S1.
And from what I've read, Tivotool or Tivoserver doesn't really do me any good since I don't have a Mac, nor do I have HMO capability.
So, is the audio format essentially the same on S1 and S2 machines?
thanks for all the help and info,

bcc
03-18-2006, 05:44 PM
So, is the audio format essentially the same on S1 and S2 machines?
thanks for all the help and info,S1 dtivos use a different format for audio packets. Basically the PES headers in the S1 dtivo audio streams are in mpeg1 format instead of mpeg2 as with all other tivo models. See my ty1to2 program for the details (tho it does the opposite of what you're looking for here). You may be the first person to try inserting synthetic streams (tymplex generated ones) onto a s1 dtivo.

jbstix
03-18-2006, 07:14 PM
S1 dtivos use a different format for audio packets. Basically the PES headers in the S1 dtivo audio streams are in mpeg1 format instead of mpeg2 as with all other tivo models. See my ty1to2 program for the details (tho it does the opposite of what you're looking for here). You may be the first person to try inserting synthetic streams (tymplex generated ones) onto a s1 dtivo.

I've actually used your ty1to2 before, and it worked well.
So, the question is, can I just edit the audio format into an Mpeg1 file and then use mplex to create the .ty file to use on an S1.
I've been searching for the mpeg 1 audio format, and all I have found is
224kbps / 48khz - and that doesn't seem correct to me.
Will mplex work correctly using an mpeg1 audio file?
Like I said earlier, the video if working Ok on the S1...
Thanks for the help...getting closer to the end!

jbstix
03-18-2006, 09:25 PM
Ok, I have successfully uploaded a working .ty to my S1 DTivo.
All I had to do was convert the audio file into the correct S1 format (192kbps/48000Hz)
Then used mplex to convert into a ty, and then uploaded.
Works great!
For the most part I only have HD content on my HDTivo, so that's why I want to use mplex for putting converted mpegs on my S1.
Thanks for all the help, and mplex and ty1to2 are very useful programs!

bcc
03-18-2006, 09:42 PM
Ok, I have successfully uploaded a working .ty to my S1 DTivo.
All I had to do was convert the audio file into the correct S1 format (192kbps/48000Hz)Ah yes, I hadn't noticed that s1 dtivo's seem to use a different kHz.
For the most part I only have HD content on my HDTivo, so that's why I want to use mplex for putting converted mpegs on my S1.
Thanks for all the help, and mplex and ty1to2 are very useful programs!Thanks, looks like another happy customer :)

shstevens
03-24-2006, 01:58 AM
I have a (hopefully simple) bitrate question - hopefully this isn't too basic...

short version of the question:
can someone help me figure out how to specify a muxed bitrate with ty enabled mplex (3000 in this example) using higher bitrate demuxed dvd files? or is this something i have to transcode with something like ffmpeg to be able to do (or do correctly)...

more background:
my goal is to get dvd into ty and i have had good success with two methods:

1) alphawolf's listed in post 132 of the dev thread for ty enabled mplex (didn't realize i could demix in decrypter until recently):
http://www.dealdatabase.com/forum/showpost.php?p=251396&postcount=132

2) using dvd decrypter to pull the vob as ine big file in ifo mode, using ffmpeg to extract video with -r 29.97 -b 2000 (fixing on a smaller bitrate) and then mplex to remux with -r 3000.

1 is OBVIOUSLY easier/faster/etc/higher quality (higher bitrate) - the con is the filesize.

i can't seem to figure out how to mux on a lower bitrate (of say 3000) without transcoding to a lower rate via ffmpeg first. it barks at me with the error:
++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=4164784 required (DTS)=3442485

-- at least that is what I THINK is happening --

I like the quality of option 2 just fine (I know it is less than option 1)

thanks,
shawn

sundog
04-23-2006, 01:05 PM
jbstix - I'm getting the same error from mplex as you, and I can't seem to get around it. I downloaded an avi of a tv show, tried Videora for tivo on it to get an mpeg, then used tmpegenc to split it into m2v and mp2. I can't tell what I'm doing wrong! Does anyone have a method that (usually) works?

phat_bastard
04-25-2006, 01:55 PM
First off, thanks to everyone who's contributed to this utility! I'm relatively new to the tivo scene and I'm really enjoying the tools I've found here.

I've been wrestling with this problem for several weeks, and I thought I'd ask for some perspective from those who are more knowledgeable on the subject than I. A complete rundown of my processing procedure is here (http://www.dealdatabase.com/forum/showpost.php?p=255026&postcount=411). More recent information about my progress is here (http://www.dealdatabase.com/forum/showpost.php?p=255142&postcount=445). I'm using bcc's last cygwin binary of mplex timestamped 6/20/2005 for this.

What I found was the linear mpeg editor I was using evidently wasn't preserving field dominance. I've since cut some streams using TyTool's FAE editor and the resultant mpeg (as well as the demuxed PES) plays smoothly in VLC with the correct deinterlace filter applied. Unfortunately, mplex's output gives me very "un-smooth" playback on the tivo. I can provide example clips if necessary - PM me. The source is a S2 SD DTivo.

Here's my question. Is it possible that mplex is throwing away field dominance changes? The problems I'm having seem to indicate that it is, but it would take me months to learn what I'd need to know about mpeg2 PES to dissect the source and find my answer, so I'm hoping someone more knowledgeable already knows or can find out without learning the a-z of mpeg2 first. For film source I'm having no playback problems at all but with anything interlaced the problem is horrendously apparent, which leads me to believe that field dominance changes are getting lost. If I re-encode the cut mpeg and apply a bob filter the resultant PES muxes and plays well (I'd dare say perfectly) on the tivo. Unfortunately this step is somewhat lossy, and extremely time consuming.

boboli
04-25-2006, 02:34 PM
Ok, I have successfully uploaded a working .ty to my S1 DTivo.
All I had to do was convert the audio file into the correct S1 format (192kbps/48000Hz)
Then used mplex to convert into a ty, and then uploaded.
Works great!
For the most part I only have HD content on my HDTivo, so that's why I want to use mplex for putting converted mpegs on my S1.
Thanks for all the help, and mplex and ty1to2 are very useful programs!


I have tried to start this thread from the beginning ( Feb 2005 ) and keep up with the changes, starts, stops and restarts, Mplex, NetMplex, ele2stripe, etc etc but my brain is swimming...

Could you please layout the current best method for converting an MPG/AVI to a .ty suitable for uploading and viewing on an S1 Tivo?

Thanx.

B


EDIT:
I have gotten to the point to where I can use MPLEX to convert the files to TY format. But I got stopped where JBStix got caught, namely converting the audio to S1 (192/48K).
Does anyone know what software will do this?
Thanx

EDIT #2:
Well, I checked my TyTool, which is what I used to convert the MPEG to m2v/m2a files. And the AUDIO setting *WAS* set at 48 @ 192, so I am not sure why I can't Mplex the m2v/m2a files...

EDIT #3:
SUCCESS!!! I think... :D What I tried was to set the bitrate (-r192) but that gave me a bunch of errors. I then tried -r192000 and so far it is working without any errors!! :D Now, once I get the .ty file, I assume I just FTP it over to my S1 TIVO, using MFS-FTP into the .ty dir???

bcc
04-26-2006, 02:41 PM
Here's my question. Is it possible that mplex is throwing away field dominance changes? mplex is "just" the re-multiplexor and is not reauthoring your video stream, and so it's not changing any of the field bits within the mpeg2 headers (top_field_first, picture_structure, etc.).

Backing up for a moment, I don't understand what you're doing. In your referenced procedure you're starting with a presumably valid/playable .ty stream. So I don't udnerstand why you see a need to mess with pulldown. If all you're trying to do is splice a .ty stream, chunkedit is supposed to be able to achieve GOP level editing without even requiring demultipling/remultiplexing. Isn't GOP level editing sufficient for content that has commercials? It would save you a lot of steps. If you really want to do your editing after converting to .mpg, I usually see folks recommending videoredo, without any complaints about field dominance. I don't personally have experience with this editor as I don't have any commercial laden content I wish to archive.

boboli
04-26-2006, 02:48 PM
mplex is "just" the re-multiplexor and is not reauthoring your video stream, and so it's not changing any of the field bits within the mpeg2 headers (top_field_first, picture_structure, etc.).

Backing up for a moment, I don't understand what you're doing.


Basically, what I am doing is wanting to take downloaded media files (AVIs) and put them onto my TIVO for viewing.

What I have done in the past was to simply put the downloaded files onto my XBOX and watch them with XBMC... But my XBOX is temporarily unavailable so I wanted to put the files on the TIVO to watch.

That's basically it, in a nutshell..


B

bcc
04-26-2006, 03:03 PM
Basically, what I am doing is wanting to take downloaded media files (AVIs) and put them onto my TIVO for viewing.

What I have done in the past was to simply put the downloaded files onto my XBOX and watch them with XBMC... But my XBOX is temporarily unavailable so I wanted to put the files on the TIVO to watch.

That's basically it, in a nutshell..


BOh that's quite different from the procedure referenced inhttp://www.dealdatabase.com/forum/showpost.php?p=255026&postcount=411.
The steps to take depend a lot on the actual format of the streams within the .avi. Are you two the same person - I was replying to phat_bastard??

boboli
04-26-2006, 03:10 PM
Oh that's quite different from the procedure referenced inhttp://www.dealdatabase.com/forum/showpost.php?p=255026&postcount=411.
The steps to take depend a lot on the actual format of the streams within the .avi. Are you two the same person - I was replying to phat_bastard??


Nope... Diff people.

I thought you were replying to my post..

Ooops... Looking back, I see that you quoted Phat in your response.. Sorry about that....



B

phat_bastard
04-26-2006, 04:03 PM
mplex is "just" the re-multiplexor and is not reauthoring your video stream, and so it's not changing any of the field bits within the mpeg2 headers (top_field_first, picture_structure, etc.).

Ok, thanks. I've been looking through videostrm_in.cpp and videostrm_out.cpp in the base mplex this afternoon and I wasn't 100% clear on what was getting written out. I did find where it was reading the rff bit, not sure what it needs that for.


Backing up for a moment, I don't understand what you're doing. In your referenced procedure you're starting with a presumably valid/playable .ty stream. So I don't udnerstand why you see a need to mess with pulldown.

Because playback quality on the tivo is unbearably bad. Motion scenes such as when the camera pans over a set are extremely jerky. I have the same symptoms with my Dish Net sourced mpeg, but if I rip and mux a DVD (presumably all TFF) the playback is fine. If I frameserve (with deinterlacing and pulldown) and re-encode to a "clean" mpeg2 stream playback is much less problematic. Unfortunately I've yet to find a deinterlace filter for avisynth that honors the tff bit, so when the field dominance changes (and it changes quite frequently with SD Dtivo source) the motion scenes are not very fluid. Cutting the .ty using TyTools seems to preserve the field dominance changes correctly, which only leaves my demuxing tool (DGIndex) and mplex as possible culprits. Unless someone's aware of a tool that already does this, I guess I'll have to write a stream analyzer to compare the picture start headers before and after demuxing to see if DGIndex is mangling or rubber stamping them.


If all you're trying to do is splice a .ty stream, chunkedit is supposed to be able to achieve GOP level editing without even requiring demultipling/remultiplexing. Isn't GOP level editing sufficient for content that has commercials? It would save you a lot of steps. If you really want to do your editing after converting to .mpg, I usually see folks recommending videoredo, without any complaints about field dominance. I don't personally have experience with this editor as I don't have any commercial laden content I wish to archive.

I could try that, but in the long term I'd rather not waste precious cpu cycles on the STBs.

Thanks for the response.

phat_bastard
04-26-2006, 05:02 PM
Cutting the .ty using TyTools seems to preserve the field dominance changes correctly, which only leaves my demuxing tool (DGIndex) and mplex as possible culprits. Unless someone's aware of a tool that already does this, I guess I'll have to write a stream analyzer to compare the picture start headers before and after demuxing to see if DGIndex is mangling or rubber stamping them.

Thinking about it, I suppose it's equally possible that one of the two is throwing away frames that it thinks are imcomplete or undecodable, no?

Falcon4
04-26-2006, 08:23 PM
Hey, thanks for this tool, it's a godsent. I've wanted to place video files on the TiVo for a long time (to give better use to that hard drive space) - so I can have quick access to videos and movies to show friends and whatnot. I got a freaking headache from reading that topic that the "frequently asked questions" topic pointed to - all those morons arguing about "OMG THIS IS A STUPID IDEA!" and whatnot almost made me decide to give up - until I saw the last post in that thread that pointed to tymplex. Solved almost all my problems.

Except for one - I don't want to convert DVDs to TY (that's why I have a DVD player, duh!) - I want to convert DivX/Xvid, MPEG-1 videos to Ty! I used three programs - TMPGEnc 2.5 (that's really its name!), TyMplex (mplex.exe), and mfs_ftp (using FileZilla with passive-mode disabled; passive crashes mfs_ftp it seems).

It took an extremely long time (relatively) to figure out what the proper encoding settings are, in order to get the TiVo to play the file properly. I never had audio problems - what I did have is a video stream that chopped off after about 2 seconds and started flashing colored squares all over the screen. I changed a few settings to get it to work - DC component precision to 9 bits, Field Order to "Top field first (field A)", Output Interval of Sequence Header to "1 GOP", MAX number of frames in a GOP to "16", "Output bitstream for edit (Closed GOP)", and "No motion search for still picture part by half pixel" enabled. Copied many of these settings from the DVD preset (since most people were reporting luck with DVD-to-TY conversion) - but had to integrate them into a custom profile in order to get the 480x480 resolution.

Uploading is painfully slow - I get 160KB/s average. It's not a network limitation... I usually pull 1-1.2MB/s off this thing when I'm downloading from it. I'm surprised it's able to "inject" the video into the Now Playing list, but hey, that's the sheer beauty of mfs_ftp. :-)

My TiVo is an ancient Series 1 Sony SVR-2000 (IIRC) outfitted with a TurboNet card. And yes, I am frequently irritated by the fact that I have to pay the same subscription fee as everyone else with Series 2 TiVos. I swear, users of Series 1s should get some kind of discount. I'm even using it on plain old air TV, not cable, not satellite. :-(

Narf54321
04-26-2006, 10:25 PM
Good job with the description of events, so other S1 owners might be able to make use of ty-enabled mplex.


Except for one - I don't want to convert DVDs to TY (that's why I have a DVD player, duh!)

You obviously don't have small children, because you'd quickly find a use for loading all the DVDs into a Tivo with a couple really big hard drives. The kids like to watch the same movie/show over and over and over again, or worse the same portion of a movie over and over.



I want to convert DivX/Xvid, MPEG-1 videos to Ty! I used three programs - TMPGEnc 2.5 (that's really its name!), TyMplex (mplex.exe), and mfs_ftp

The Tsunami encoder (TMPGEnc) at one time was the king of the hill, but lately they seem to want to sell it in mostly useless bundles. It also doesn't work well with DVD Decrypter (ripper), I just mention that for folks who might come across this thread.



My TiVo is an ancient Series 1 Sony SVR-2000 (IIRC) outfitted with a TurboNet card. And yes, I am frequently irritated by the fact that I have to pay the same subscription fee as everyone else with Series 2 TiVos. I swear, users of Series 1s should get some kind of discount. I'm even using it on plain old air TV, not cable, not satellite. :-(

You don't see a lot of effort put into tymplex lately. Most folks these days are using Series-2 units and tivoserver via the Multi-Room Viewing option which will play all sorts of xvid, DivX and AVI type files without monkeying with each file. I suppose you could go on eBay and get a nice TCD240 S2 unit and do all the recent hacks -- the monthly Tivo service fee is the same.

Falcon4
04-27-2006, 12:34 AM
Man. And to think I've put so much time and money into this thing I rescued from the side of the road (I found this TiVo on the side of the road with a bashed-in cover, no cables, no remote, zip), when I could have had so much more for the same amount. It's hard to consider giving up my Trash-TiVo after these several months of hacking and monkeying, though...

So, you're pretty much saying, that the S2 TiVos can actually play DivX and Xvid (MPEG-4) videos natively? Or, with just a hack or something? What's really put me off buying a new S2 TiVo is that their feature lists have been pretty much identical to what I've got now, and that my air-TV is barely using all my current TiVo's capabilities, let alone everything an S2 can do!

But with all the digital media work I do, the capability of being able to play generic MPEG-4 video (with MP3 audio, I presume?) would be something I'd only been able to dream about! :D

Now, if only I could buy an S2 TiVo when I'm too cheap to even have cable! ;-)

BTUxNine
04-27-2006, 12:43 AM
no, the s2 tivos don't handle the streams natively... the pc has to transcode them... tivoserver does this on the fly (for those files that work... there are still some issues) or you can transcode manually using mplex, which has a better success rate because it doesn't need to know the duration ahead of time and you can use different tools to convert the files to the mpeg2 that mplex needs.

bcc
04-27-2006, 09:06 PM
Ok, thanks. I've been looking through videostrm_in.cpp and videostrm_out.cpp in the base mplex this afternoon and I wasn't 100% clear on what was getting written out. I did find where it was reading the rff bit, not sure what it needs that for.mplex is *reading* the repeat_first_field to try and be exact about how many fields have been presented, in order to get the timestamps right. It is not modifying/rewriting this field.

Because playback quality on the tivo is unbearably bad.Oh so you're starting out with a recording that doesn't even playback on the tivo correctly before you edit it. Not sure why you're suspecting subsequent demux/remux operations to have caused problems then.

guess I'll have to write a stream analyzer to compare the picture start headersbbvinfo from bbtools dumps this sort of info for you
I could try that, but in the long term I'd rather not waste precious cpu cycles on the STBs.Then I'd think .ty->hdemux->mpg->videoredo->tymplex->.ty, and if you stick with GOP level editing, frames/fields should remain unmolested.

phat_bastard
04-28-2006, 11:33 AM
Oh so you're starting out with a recording that doesn't even playback on the tivo correctly before you edit it.

No, they play perfectly (well, as perfectly as could be expected for crappy SD D* broadcast). Let me recap what I've done and what I've discovered.

* If I take the uncut ty streams directly off the tivo and move them to my tivoserver, they play perfectly.

* If I pull them off the tivo in multiplex mode and edit with MPEG2VCR and then play them in PowerDVD or VLC it's evident that something's getting lost or mangled. I'm not sure if there's a marked difference between the Womble product and VideoReDo, but I hate the VRD interface. Either way I seem to get better results editing with TyTools.

* If I edit the streams with TyTools cutting on frames (Josh says the GOP editor will lose field dominance (http://www.dealdatabase.com/forum/showpost.php?p=255069&postcount=419)) the playback looks good on the PC (PowerDVD, VLC) if I turn on a bob deinterlace filter. If I take these (edited) interleaved streams apart using dgindex or bbdmux and remux (mplex -f 10 input.mpa input.mpv -o output.ty) the playback on the tivo is choppy. Playing them with VLC or WMP+TyShow gives erratic results, but I don't place much confidence in any of these methods since I get the same erratic results with the original ty streams.

* If I take these resultant mpegs and frameserve / re-encode them with a bob deinterlace filter and then mux with tymplex they look great again, but the filesize increases quite a bit and again it obviously takes a lot of time.


bbvinfo from bbtools dumps this sort of info for you

Thanks, I guess I need to read up on it's output - I tried it but the info it spits out meant very little to me (a layman). =D


Then I'd think .ty->hdemux->mpg->videoredo->tymplex->.ty, and if you stick with GOP level editing, frames/fields should remain unmolested.

Maybe the video isn't being molested at all. Keep in mind I know only enough about mpeg (and C) to be dangerous. I don't really know for sure what exactly the problem is, which is why I'm asking here. =D I like to think that I've worked this through a process of elimination, but it's becoming evident that I've probably jumped back and forth more than I thought I did. I guess I need to start from scratch with a few sample streams and work this through methodically.

Before I drop back 10 and punt, one last thing I'm going to test that I don't think I've tried yet is to pull the streams in vsplit mode with TyTool and remux the resultant PES without editing them. Since you're saying mplex isn't molesting the video PES whatsoever, this should play smoothly, right?

Ok, I lied, there are two more things I'm going to try... Another would be fixing the GOPs with VideoReDo after editing with TyTools. Could the erratically sized GOPs be the cause? From what I remember of bbvinfo's output, some are as large as 62 frames while others are more normal (12, 15, 18). This wouldn't affect how mplex interleaves the stream would it? Would I see errors in the tivo logs if it were experiencing buffer underruns playing these?

Thanks for taking time to discuss this, I'm sure you've got better things to do!

BTUxNine
04-28-2006, 02:20 PM
couple things:
1) if you don't perform any cuts, demux with tytool, then remux with mplex, do you still have playback issues on the tivo?

2) have you tried to increase the bitrate setting for mplex (-r)? that can introduce playback issues

phat_bastard
04-28-2006, 09:50 PM
1) if you don't perform any cuts, demux with tytool, then remux with mplex, do you still have playback issues on the tivo?

Correct. This afternoon I took the two most problematic streams and split them (both with TyTools and hdemux) and remuxed directly with no other modifications and still experience the freezing / jerky pans / dropped frames / ??? These same streams play perfectly if I put the original ty files on my tivoserver.


2) have you tried to increase the bitrate setting for mplex (-r)? that can introduce playback issues

Nope. Should I be? The dvd rips I've tested all mux and play just fine without specifying the bitate. What effect does this option have on variable bitrate stuff?

BTUxNine
04-28-2006, 09:56 PM
try with -r 3000, shouldn't hurt, and it may help... there have been reports of that fixing certain playback issues

phat_bastard
04-28-2006, 10:06 PM
What I'm still scratching my head on is this - the jerkiness I'm seeing on the tivo is in the same places when playing the mpegs in VLC without the deinterlacing filter.

phat_bastard
04-28-2006, 11:09 PM
try with -r 3000

Same. The only noticeable difference using this option is that the audio is about a second ahead of the video. :o

In the absence of any other brilliant ideas, I'm thinking I need to try reducing the buffer size. Unfortunately if I recall from another endeavor with the inner workings of mplex, there's no way to do this with a command line option because selecting a pre-defined profile (-f [n]) overrides or executes after the -b option.

pikespeakhiker
05-14-2006, 06:23 PM
phat_b,

I thought I was the only one that noticed this problem. Actually, my wife's eyes/brains picked it up before I did. And it is exactly the way that you describe it: when there is a lot of movement (either camera panning...or just movement in the scene) you notice that it is not smooth.

The streams I am worried about are ripped off of DVDs, and then either mplexed directly to ty (files very large, about 6gb for 2+ hour movie) or ffmpeg'd to reduce the size and then mplexed. I don't notice it as much (if at all?) on the items that are not reduced in size. So not sure if that means it could be ffmpeg 's involvement, or that it just has to do with mplex->ty conversion not dealing as well with fewer frames and resolution.

lgkahn
05-16-2006, 10:34 PM
if you don't use ffmpeg to reduce bitrate it is too high for tivo h/w to handle/keep up thus the pixelation... when you do I have yet to find a movie I tried to convert from dvd/vob where the audio stays in sync.

phat_bastard
06-05-2006, 12:44 PM
I'll agree with lgkahn on this - it's likely the issues pikespeakhiker is seeing are caused because the bitrate is too much for the tivo to handle.

Just as an update on my issue, after lots of help from bcc and a few days of picking the code apart, the problem I'm having is only with streams that alternate between progressive and interlaced sequences. Almost all my source is from DirectTV and Dish, both use hybrid streams like this. The bugs in mplex are where the timestamps are calculated when switching back to a progressive sequence, and it's the kind of thing that can't be fixed without rewriting significant chunks of the proggy. I'm currently working on an automated method of hijacking AutoGK's avs script and using it to re-encode with hopefully better results. I'll post an update here if it works out.

bcc
06-07-2006, 03:11 PM
The bugs in mplex are where the timestamps are calculated when switching back to a progressive sequence, and it's the kind of thing that can't be fixed without rewriting significant chunks of the proggy.With streams like yours where the interlaced sequences do not have standard 3:2 pulldown patterns, computing correct PTS values is more difficult than what mplex is prepared to handle.

Last weekend I wrote a TY encoding codec for ffmpeg. Ie I made ffmpeg capable of creating .ty output just like we did with mplex. ffmpeg is still not doing the right thing with timestamps in the above case. But it should be much more tractable to get it working, as ffmpeg code at least has the notion of frame duration. I think I may just need to fix the ffmpeg routine compute_frame_duration(), but I haven't had a chance to try that yet.

phat_bastard
06-07-2006, 03:54 PM
With streams like yours where the interlaced sequences do not have standard 3:2 pulldown patterns, computing correct PTS values is more difficult than what mplex is prepared to handle.

I forgot to point out that the issues caused by mplex are in code from the original mjpegtools source tree, not something that was added on by folks here. Sorry - didn't mean to give the wrong impression about your contributions. :)

bcc
06-07-2006, 07:20 PM
I forgot to point out that the issues caused by mplex are in code from the original mjpegtools source tree, not something that was added on by folks here. Sorry - didn't mean to give the wrong impression about your contributions. :)Ok, I didn't take it that way. Was just trying to clarify that it is the interlaced frame processing that seems to be the issue with mplex.
You get what you pay for with these open source multiplexors, don't you? :)

phat_bastard
06-08-2006, 10:49 AM
I suppose that depends on one's perspective.

shstevens
06-23-2006, 04:13 PM
I am looking for a little help in diagnosing and hopefully fixing some audio sync issues i have with certain VOBs. It only happens occasionally (5% or less), but it is significant sync - maybe 5-10 seconds off. In case it helps, some specific movies I have had problems with are "There's Something About Mary", "Serpico", "Apollo 13" (there are some more as well).

I am using ffmpeg to extract, and ty enabled mplex to re-encode. I am not sure which piece could be causing the problem, but I would really appreciate some help if possible.

This is how I am extracting:

ffmpeg -y -i "%sourcedir%\%vobname%" -f mpeg2video -s 720x480 -r 29.97 -b 2500 -aspect 16:9 -an "%tempdir%\%filename%.m2v" -acodec ac3 -ab 448 "%tempdir%\%filename%.ac3"

This is how I am re-encoding:

mplex -x "%tempdir%\%filename%.xml" -f 10 -r 3000 "%tempdir%\%filename%.m2v" "%tempdir%\%filename%.ac3" -o "%targetdir%\%filename%.ty"

I am doing some stuff with variables, but it should be pretty clear. If not I can strip it down.

Thanks,
Shawn

bcc
06-23-2006, 07:39 PM
If your a/v streams are not perfectly synced at the beginning, then you'd want to use the -O option to mplex to specify the a/v sync offset. It's not clear to me whether or not you should be able to assume perfect sync for dvd streams, ignoring the timestamps and start delays from the dvd. Looks like it isn't a safe assumption.

You should be able to avoid the issue by using the new ffmpeg with TY support http://www.dealdatabase.com/forum/showthread.php?t=49935 . In which case you can leave it up to ffmpeg to keep track of the a/v sync, and do the conversion in just 1 step.

See also step 2 of my troubleshooting info:
http://www.dealdatabase.com/forum/showpost.php?p=235443&postcount=186

shstevens
06-27-2006, 07:36 PM
thanks BCC, i will check that out - i hadn't been following that thread. seems like it would make more sense to keep it inside one tool. is that going to be used in the tivoserver line as well? seems like that would make sense...

i am not sure exactly what my original problem is, but i found another symptom that lead me to try something that fixed it.

when i run ffmpeg and it lists the input streams, on ALL the VOBs that have sync issues the bitrate is a large negative number and the duration is WAY off. I just ran them through videoredo's quickstream fix and that cleaned up the VOB so that no sync resulted from the resulting conversion. i am using dvddecryptor for extraction and usually do not have any trouble....

i will be checking out those new tools and thanks for the reply BCC.

shawn

shstevens
06-29-2006, 03:32 AM
ok next question :^)

is there any way (easy or not) to take a TY file created with tymplex and pull out the XML that is appended (i believe it is at the end, but i am not sure). then re-embed it after some edits?

i have some TYs that i will have a hard time getting the source back, but would like to change the XML behavior. I know i can manipulate files with tivoserver, but i am looking to change the actual TY if that is possible.

thanks,
shawn

bcc
06-29-2006, 12:48 PM
ok next question :^)

is there any way (easy or not) to take a TY file created with tymplex and pull out the XML that is appended (i believe it is at the end, but i am not sure). then re-embed it after some edits?

i have some TYs that i will have a hard time getting the source back, but would like to change the XML behavior. I know i can manipulate files with tivoserver, but i am looking to change the actual TY if that is possible.

thanks,
shawn
I use dd to extract the XML from a .ty.
dd if=source.ty of=source.xml bs=128k skip=chunk count
Where chunk count = file size/128k, rounded down.
Windows users probably find it easier to use ty2tmf, unpack the tar, edit, repack.