PDA

View Full Version : etivo-->xvid mplayer/mencoder problems with some .ty files...



bluewomble
08-08-2005, 05:29 AM
I'm trying to develop an addin for eTiVo which will use mencoder to transcode to xvid/divx files, rather than the default wmv encoder that eTiVo comes with.

I have an addin which seems to work, but I'm having problems with mencoder.

About half of the .ty streams that etivo gets will transcode fine, no problem, the other half will not transcode (and in fact will not play in mplayer)

Rather strangely, I can get these problematic .ty streams to play in mplayer if I use the '-cache 4096' flags, but this doesn't work with mencoder... it runs, but the crashes halfway through.

It seems (although I'm by no means certain) that this problem affects large .ty files ( > 1Gb ), but that could be my imagination.

I'm using Mplayer 1.0_pre6 (.ty playback was broken completely in the 1.0_pre7 release), and I'm using a UK Series 1 TiVo and I'm transcoding on WinXP Professional.

My encoding command looks something like this:
mencoder file.ty -ovc xvid -xvidencopts bitrate=400 -oac mp3lame -o file.avi

Has anyone else encountered anything similar? Is there a way round this? Am I doing something wrong?

Cheers,
Ash.

bluewomble
08-09-2005, 05:21 AM
OK, I figured out that I needed to compile my own version of mplayer/mencoder because all the pre-compiled binararies are compiled with --disable-largefiles (for some strange reason). This mean that any files bigger than 2Gb cannot be played/encoded... unfortunately many .ty files are bigger than 2Gb, so this is a problem...

Anyway, I managed to compile my own version under cygwin, using the MPlayer 1.0_pre6a source tarball and the latest xvidcore and lame tarballs. However, now when I encode using xvid and lame I get audio sync issues... sometimes out by as much as half a second to a second or so... any idea why this might be?

Ash.

HUGE
08-09-2005, 08:06 PM
OK, I figured out that I needed to compile my own version of mplayer/mencoder because all the pre-compiled binararies are compiled with --disable-largefiles (for some strange reason). This mean that any files bigger than 2Gb cannot be played/encoded... unfortunately many .ty files are bigger than 2Gb, so this is a problem...

Anyway, I managed to compile my own version under cygwin, using the MPlayer 1.0_pre6a source tarball and the latest xvidcore and lame tarballs. However, now when I encode using xvid and lame I get audio sync issues... sometimes out by as much as half a second to a second or so... any idea why this might be?

Ash.

First off, let me say I have no clue how to solve your problem (wish I did). But as I would benefit greatly from such an addin for eTivo I will offer my services as a beta tester if you need one- just send me a PM.

Good luck!

HUGE

bluewomble
08-10-2005, 05:00 AM
HUGE -- Thanks for the show of support...

I think I've got something which pretty much works now --- it's sitting on AutoTivo collecting stuff at the moment... and seems to be working... (At the moment it's doing 2 pass divx encoding... I had some A/V sync issues using xvid)

There are still a couple of issues I need to clear up with my eTiVo addin... and then I need to work out how to compile a distributable copy of mplayer/mencoder --- as I said earlier all the pre-compiled versions seem to use the default --disable-largefiles option, so as it stands at the moment, everyone who wanted to use this addin would have to install cygwin and compile their own version of mplayer... which is a bit too... UNIXy for my liking ;)

Unfortunately, I'm going to be really busy for the next couple of weeks, so I don't think I'm going to get a chance to look at it again for a little while, but hopefully I should have something in a stable releasable state in a few weeks...

Ash.

HUGE
09-09-2005, 03:47 PM
Hows the progress?



HUGE

bluewomble
09-10-2005, 06:05 AM
Progress is slow and painful, I'm afraid.... and to be honest, I've been quite busy lately, so I haven't really had a chance to look at it much... but anyway, this is where I'm at so far...

I've got a little C# addin which fits into eTiVo's structure and calls mencoder --- that bit works fine. Trouble is I can't seem to find a mplayer package / set of parameters for it which work consistently with all .ty files... The C# code which invokes mencoder is very simple and straight-forward and seems to work well, but it's the actual encoder I've had problems with...

For some reason, about 70~80% of files will work fine (I'm using the lavc divx module of mencoder to do a 2 pass encoding), but some just won't work at all.... either errors of seg faults and stack dumps

I've not really used the wmv version of etivo extensively, so I don;t know what kind of success rate that has... anyone know?

I'm mostly using this mplayer package:
http://armory.nicewarrior.org/projects/cygmp/

I'll dig out the settings I'm using later and post them here... maybe one or 2 people could experiment with mencoder and some of their own .ty files...

I might even get round to ttidying up my C# code so it's in a state to release 'as-is' -- that way lots of people could experiment and maybe we could get to the bottom of the problems I am experiencing with mencoder.

Thanks for the interest...
Cheers,
Ash.

bluewomble
09-19-2005, 12:01 PM
Just a quick progress report...

I've been looking at this again (Huge made me feel guilty for not looking at it for a while ;) ). I seem to be having more success with my mencoder addin for etivo now that I've actually worked out how to use mencoder properly...

I'll try to sort it all out soon and write up what I've done / how to set it up etc...

Once I've done that, I'll start a new thread with all the details and people can start beta testing it...
Cheers,
Ash.

HUGE
09-19-2005, 12:59 PM
Cool!!!



Huge

bluewomble
09-19-2005, 05:36 PM
HUGE -- I've sent you a PM with some details about beta testing... if you can get it up and running ok, then I'll release it to the rest of the world...

orvi-wan
09-20-2005, 03:42 AM
i'd be up for some testing too, this is great news.

bluewomble
09-22-2005, 05:27 PM
I was having some problems encoding certain files, but I think I've solved them now... the problems came in 2 types...

1) mencoder says that the ty stream is an encrypted MPEG-PS file rather than an MPEG-TY file and refuses to play it. This can be fixed by using the "-demuxer 33" flag to force it to use MPEG-TY demuxing.

2) mencoder crashes with a core dump part way through encoding... After reading this thread:
http://www.dealdatabase.com/forum/showthread.php?t=45323
I think I may be suffering from a similar problem... I can get round the problem by using the VSplit.exe tool in TyTool to mux the stream into a proper (clean) mpeg file (without any holes)... this can then be passed straight into mencoder. I end up with a 3 stage process -- use vsplit to mux into an mpeg file, then 1st pass divx, then 2nd pass divx! It's not the quickest way of doing things... but it gets there in the end!

I'll have to do a bit more coding to do this automatically... I'm quite busy at the moment, so I probably won;t get a chance to do this until next week ;-(

Huge, orvi-wan: Have you had a chance to do any beta-testing yet? Any progress? Let me know how you're getting on...

Cheers,
Ash