PDA

View Full Version : DiVx encoding addin for eTiVo.



bluewomble
09-28-2005, 08:17 AM
For a little while, I've been working on a simple eTiVo addin which transcodes into DiVx video, rather than WMV. This is now in a reasonably stable state and at least one other person has managed to get it to work, so I am happy to make the first beta release...

I use it mostly for transcoding video for viewing on my Palm LifeDrive, using the core pocket media player. I have also managed to get the resulting divx files to stream accross my network into my Kiss DP-500 DVD player...

The addin makes use of VSplit (from the TyTool package) to first 'clean' the .ty stream into a proper mpeg video. Then mencoder (part of the mplayer package) transcodes it into DiVx. You will need a working installation of eTiVo, TyTool and mplayer in order to use this addin.

All the documentation and files are here:
http://www.bluewomble.co.uk/mencoder

Please report any issues or questions in this thread... this addin works for me (I have so far transcoded 130 files into DiVx), but your mileage may vary...

BTW: Huge and ovri-wan -- thanks for beta-testing -- you'll need to download TyTool (if you haven't got it already) and replace all the files from the previous version with the new ones...

Cheers,
Ash.

HUGE
09-28-2005, 01:13 PM
Looks cool - I will try the new version today. :)


HUGE

BTW- Is this DIVX 5 or 6?

broconne
09-28-2005, 09:08 PM
This is really cool. I would much rather have my archives in divx.

A few things. Not sure if this is worth putting in your FAQ or not.. But if you already have cygwin installed and installed the mencoder that is linked on your site you have to afterwords go in and delete the cygwin1.dll and replace it with the version in your /cygwin/bin directory. Otherwise cygwin will complain.

I did notice one problem while using this tool. The vsplit part hangs on large files. I have a 6 GB ty file and during the vsplit part it creates 3 GB or so of the .mpeg file on seems to just hang.

If I take the command from the log file and run it manually it runs until completion. Not sure if when you are shelling out the stack size is not large enough or... well really not sure of anything. :-) I will attach my log file in case that helps.

bluewomble
09-29-2005, 04:54 AM
BTW- Is this DIVX 5 or 6?

It's MPEG-4 (DivX 4/5)... I don't think mencoder supports DIVX6 yet...
Ash.

bluewomble
09-29-2005, 05:01 AM
A few things. Not sure if this is worth putting in your FAQ or not.. But if you already have cygwin installed and installed the mencoder that is linked on your site you have to afterwords go in and delete the cygwin1.dll and replace it with the version in your /cygwin/bin directory. Otherwise cygwin will complain.
That's odd... I have both installed... I've compiled my own version of mplayer under cygwin (from cvs), but I've been using the pre-compiled version linked to on my website while testing recently... They both seem to live quite happily on my box, I didn't need to delete or rename anything... I guess it might have something to do with the path variable... (perhaps I have C:\cygwin\bin before "."?). Anyways, thanks for the heads-up, I'll make a note in the docs when I next update them.


I did notice one problem while using this tool. The vsplit part hangs on large files. I have a 6 GB ty file and during the vsplit part it creates 3 GB or so of the .mpeg file on seems to just hang.

If I take the command from the log file and run it manually it runs until completion. Not sure if when you are shelling out the stack size is not large enough or... well really not sure of anything. :-) I will attach my log file in case that helps.

Yes, I noticed this as well with one file yesterday -- it was pretty much the longest recording on my tivo... It's interesting that it runs ok from the command line... Not sure what the problem could be... I'll try to investigate this evening and get back to you...

It's great to hear that you've managed to get it up and running!

Cheers,
Ash.

mahnamahna81
10-04-2005, 02:20 AM
THANK YOU, THANK YOU, THANK YOU!

:cool:

Im not kidding thank you.

Now if I can just get my 700 mhz Duron machine upgraded, my 2.6 Ghz died recently.

vinniet
10-04-2005, 11:09 AM
bluewomble ... This is exactly what I have been looking for. I have been doing it all manual with using Galleon to download and Dr Divx to ecode them to my Palm, then using core player to show them.

I have a few questions. I just got the latest version of eTivo working after some problem with older version with W2K. Has your plug-in test with W2K?

Also I would want to encode in NTSC ... not sure if it matters. Also I am not sure what the resolution of the LifeDrive is but I have Zire 72 and I have to encode with 320 x 320 or something like that. Where do I change that or does it not matter.

Lastly is there a way to delete the .tivo after it sucessfully encodes the show?

I just can not wait to try this. I will report how it goes.

Thanks!

bluewomble
10-04-2005, 11:39 AM
I have a few questions. I just got the latest version of eTivo working after some problem with older version with W2K. Has your plug-in test with W2K?
I have no idea, beacause I don;t have access to any Win2K machines... however, I can't think of anything which is Win2K specific, so I strongly suspect that it _will_ work... but of course I can't be sure. It's worth a try ;) let me know how it goes!


Also I would want to encode in NTSC ... not sure if it matters. Also I am not sure what the resolution of the LifeDrive is but I have Zire 72 and I have to encode with 320 x 320 or something like that. Where do I change that or does it not matter.
The palm lifedrive is 480x320 (which makes it rather a nice shape for watching video!). I think that no matter what scale the video is TCPMP scales it accoringly when it's shown on the palms screen... so first off as a test I'd try the default settings. (which I think do encode for PAL). If you need to change things, then you'll need to fiddle with the settings in the DivX_Archive.xml files (etc.) and change the <Flags> and <Flags2> parameters to be something else... I guess you might want to play around with a "-vop scale" parameter, but I'm not sure... have a look in the mplayer docs...


Lastly is there a way to delete the .tivo after it sucessfully encodes the show?
Ah... by this comment, I assume you're using some kind of US tivo2go thingy? Here in the UK, we only have series 1 tivos and they generate .ty files...

I think that Shahar has added some kind of TiVo 2 Go support to eTiVo (you'll need the latest version), but I've no idea how .tivo files differ from .ty files... I suspect that the latest version of eTiVo will delete the .tivo files after it finishes with them, but I've absolutely no idea whether the divx addin will work with .tivo files... I'd be very interested to hear your results. It basically all depends on whether mplayer/mencoder can read them or not...

It might be worth trying a little test for this... get a .tivo file, then run
mplayer show.tivo
if that works, then try
mencoder show.tivo -o show.avi -ovc lavc -oac lavc
(or something similar) -- see if you get anything out of it...

Good luck, please let me know how you get on...
Ash.

vinniet
10-04-2005, 07:21 PM
Ok it did not work. I think its that the .tivo files are encrypted. The person from eTivo made a utility (Directshow Dump) that ripped out the encryption and turned the file into a regular mpeg2. Problem is I have to figure out how to call his program and is there a way to insert a extra step. If I can do that then I can call Directshow Dump, then your steps.

Let me know.

Thanks!

bluewomble
10-05-2005, 04:33 AM
Ok it did not work. I think its that the .tivo files are encrypted. The person from eTivo made a utility (Directshow Dump) that ripped out the encryption and turned the file into a regular mpeg2. Problem is I have to figure out how to call his program and is there a way to insert a extra step. If I can do that then I can call Directshow Dump, then your steps.

Let me know.

Thanks!

Cool.. OK... at the moment, there is no way to add custom steps, but that's probably a good idea anyway... so for .ty files, you'd do:

vsplit
mencoder pass 1
mencoder pass 2

and for .tivo files you'd do

directshow dump,
mencoder pass 1
mencoder pass 2

Should be easy enough to sort out, but unfortunately I'm really busy at the moment... I probably won;t get a chance to look at it until next week.

In the meantime, it would be very helpful if you could let me know the syntax of directshow dump... (is it a command line thing?). Obviously, you'd need to do some testing for me as well as I don;t have any way of generating .tivo files.

I'm tempted to try to make the mencoder addin a generic encoder addin which would simply perform a series of 'custom steps', in this way, we could support .ty and .tivo files, but I could also incorporate conversion of these into mp3 files with lame (useful for radio shows).

If anyone else fancies looking at modifying the code to do this, then please feel free -- the code should be pretty straightforward for anyone with C# skills.

As I said, if you could get back to me with any pointers on how to use directshow dump, then I'll take a look at it next week.

Cheers,
Ash.

vinniet
10-05-2005, 09:06 AM
Thanks ... I have a question out to see if anyone knows the command line if any. It has a GUI and it auto looks for files to be converted so I am not sure if it can be called from the command line.

As soon as I get it and test it I will send it along. I am really looking forward to getting this working.

Vinnie

Masnark
10-05-2005, 04:20 PM
Thanks ... I have a question out to see if anyone knows the command line if any. It has a GUI and it auto looks for files to be converted so I am not sure if it can be called from the command line.

As soon as I get it and test it I will send it along. I am really looking forward to getting this working.

Vinnie

This should work with no extra steps if both EtiVo and the encoder addin are written properly.

Does the mencoder make any assumption about the file being of the TY type? Or will it work regardless?

I would be interested in seeing the logs (EtiVo.Log, SlaveEncoder.Log and the Addin logs) for the time of the failure.

bluewomble
10-06-2005, 05:12 PM
This should work with no extra steps if both EtiVo and the encoder addin are written properly.

Does the mencoder make any assumption about the file being of the TY type? Or will it work regardless?

I would be interested in seeing the logs (EtiVo.Log, SlaveEncoder.Log and the Addin logs) for the time of the failure.

I assume that once eTiVo/DirectShow Dump has done it's thing with the file.tivo file, then the LocalTYFileName property will be set to file.mpeg?

This might cause problems, because the default behavior is to immediately run:

vsplit.exe -m <inputfile> <newvideofile> <newaudiofile>

to 'clean' the ty stream into a proper mpeg... I suspect that if <inputfile> is already a proper mpeg, then vsplit might fall over? I'm not sure really... I've never tried it.

vinniet: To test this, try this version of the mencoder.dll (for testing only)... I've basically just removed the vsplit stuff, so it will just go straight to the encoding phase... assuming it is vsplit causing the problems, then this might work better... let me know how you get on? If this does work, then I'll make the vsplit an optional element in version3...

The testing dll is here: http://www.bluewomble.co.uk/mencoder/beta_testing/MencoderAddin.dll

If that doesn't work, then perhaps you could send me your encoding logs...


Note that those of you that want a standard install to transcode .ty files (rather then .tivo files) should continute to use the current (beta) 'release' version at http://www.bluewomble.co.uk/mencoder

Cheers,
Ash.

Masnark
10-07-2005, 12:09 AM
I assume that once eTiVo/DirectShow Dump has done it's thing with the file.tivo file, then the LocalTYFileName property will be set to file.mpeg?


That is correct. The LocalTYFileName will be "{...}{...}{etc}.MPG"

orvi-wan
10-08-2005, 10:04 AM
hey bluewomble,

your addin has been working great for me, such a cool tool.

I would like to have a few more encoding profiles though (VCD, SVCD & DVD), but I cannot seem to make them work.

I created this VCD.xml and included it as a profile in eTiVo


<?xml version="1.0"?>

<Mencoder>
<!-- What flags should be passed to mencoder.exe? (on the first or only pass) -->
<Flags>-lavcopts vcodec=mpeg1video:vrc_buf_size=327:vrc_minrate=1152:vrc_maxrate=1152:vbitrate=1152:keyint=15:acodec= mp2</Flags>

<!-- What flags should be passed to mencoder.exe? (on the second pass... if there is none, then leave empty) -->
<Flags2></Flags2>

<!-- Where does mencoder.exe live? -->
<Path>C:\Program Files\Mplayer\mencoder.exe</Path>
</Mencoder>

For one, it seems to want to create .avi files, how can I make it output .mpg?

When it runs from eTiVo it doesn't create a file, if I run the command from a DOS prompt and change the extension to .mpg it works but I cannot play the file.

Attached is a eTiVo log file.

Any ideas?

Thanks.

twinc
10-08-2005, 09:39 PM
Nice job on the MEncoder plugin! If you adjust the flags, you can also encode into XVID... haven't finalized my settings, but initial tests are promising!

malfunct
10-09-2005, 12:48 PM
I haven't actually looked at this but given that you use vsplit to get an mpg file is there any chance you would let us specify the parameters for vsplit and have the option not to run mencoder? That would make the encoder plugin I've been working on unecessary as yours would do everything that mine was going to.

tlphipps
10-09-2005, 04:36 PM
I just wanted to say THANK YOU! to bluewomble. This is exactly what I've been wanting for quite a while. This module provides a simple way for me to grab video off my tivo and watch it on my Treo 600.

I had to tweak the settings quite a bit for my needs. The Treo 600 doesn't have a very powerful processor, so I made several adjustments to the default Palm.xml file provided. I've attached my encoding file in case anyone else is interested.

Here are the settings it uses:
XVID (NTSC)

-mc 0 -oac lavc -ovc lavc -lavcopts vcodec=mpeg4:acodec=mp3:vhq:vbitrate=192:keyint=300:abitrate=96:turbo -srate 24000 -vf scale=160:120 -ffourcc XVID

Waruwaru
10-09-2005, 06:17 PM
Just installed EtiVo 1.0.1924.2 yesterday. To add the mencoder add-in, I had to follow the instruction (http://www.cavewomble.pwp.blueyonder.co.uk/mencoder/) plus manually modify EtiVo server's Settings.xml



<encoder type="MencoderAddin.Mencoder,MencoderAddin.dll">
<add key="encoderClass" value="MencoderAddin.Mencoder,MencoderAddin.dll"/>
</encoder>


Did a quick test, the voice seems to be out of sync with videos from DTivo. Maybe fiddling with the parameters will help. Looks like EtivoWeb also need some fiddling to get the videos to show up there.

bluewomble
10-10-2005, 05:06 AM
For one, it seems to want to create .avi files, how can I make it output .mpg?
I'm afraid that the .avi extension is hardcoded into the addin... but an <OutputSuffix> flag could easily be added to the code/xml flags.

For now, any file that is passed in as "foobar.ty" will come out as "foobar.avi", but I would think that if you rename to foobar.mpg then it should work fine. I'll add an <OutputSuffix> flag to the next version.

I notice from your log that mencoder is failing to parse the comand line it's been given... so I would work on geting that to work first... once you have a set of flags which work on the command line, then you should be able to paste them into the xml settings for mencoder.

I'm afraid I've never used these options for mencoder... if you are having difficulty with them, then I can only suggest you look at the mplayer documentation...

Sorry I can't be of more help...
Ash.

bluewomble
10-10-2005, 05:13 AM
I haven't actually looked at this but given that you use vsplit to get an mpg file is there any chance you would let us specify the parameters for vsplit and have the option not to run mencoder? That would make the encoder plugin I've been working on unecessary as yours would do everything that mine was going to.
Yes, I'm sure we could do something along those lines...

I'm thinking of writing a more generic encoder, which just has a series of command line steps... the only problem with that is that each command has different output, which needs to be parsed to work out how 'complete' the step is so we can inform eTiVo. I think the way to do it is probably to have a fairly generic setup to perform any command line steps, then a small set of classes to do specific parsing for mencoder/vsplit, etc.. (at the moment I don;t even bother with parsing vspilt's output)... and then a generic parser which just does nothing (so the step will be performed, but eTiVo will not be informed of progress (except for start and end of the step).

bluewomble
10-10-2005, 05:15 AM
Nice job on the MEncoder plugin! If you adjust the flags, you can also encode into XVID... haven't finalized my settings, but initial tests are promising!
Excellent stuff! I did start experimenting with xvid, but I found that for my needs divx provided better more consistent results...

Please remember to post your settings back here once you have a set which work well for your purpose...
Cheers,
Ash.

bluewomble
10-10-2005, 05:25 AM
Just installed EtiVo 1.0.1924.2 yesterday. To add the mencoder add-in, I had to follow the instruction (http://www.cavewomble.pwp.blueyonder.co.uk/mencoder/) plus manually modify EtiVo server's Settings.xml



Did a quick test, the voice seems to be out of sync with videos from DTivo. Maybe fiddling with the parameters will help. Looks like EtivoWeb also need some fiddling to get the videos to show up there.
Perhaps the first thing to chek is that once you have got a Ty file out from your tivo, then from a command prompt, run:

vsplit.exe -m foobar.ty file.mpg dummy

to mux the file into an mpeg (this is the first step in the mencoder addin), then check that you can play this file without av-sync issues.

Assuming that works ok, then it might be worth checking whioch version of mplayer/mencer you have installed... I found that av-sync had a tendancy to depend on which version of mplayer I had... I'm currently using the pre-compiled version here: http://armory.nicewarrior.org/mirror.php?path=cygmp/20050113/mplayer-full-20050113.exe which version are you using?

If that doesn't help, then try passing a "-mc 0" option into the flags for mencoder... that specifically says to mencoder "don;t mess around with the av-sync"

If that doesn't help, then I'd try using a different encoder.. like xvid or something like that... someone had posted the xvid settings they were using above... give those a try.

Let us all know how you get on...
Cheers,
Ash.

malfunct
10-10-2005, 10:58 AM
Perhaps the first thing to chek is that once you have got a Ty file out from your tivo, then from a command prompt, run:

vsplit.exe -m foobar.ty file.mpg dummy

to mux the file into an mpeg (this is the first step in the mencoder addin), then check that you can play this file without av-sync issues.

Assuming that works ok, then it might be worth checking whioch version of mplayer/mencer you have installed... I found that av-sync had a tendancy to depend on which version of mplayer I had... I'm currently using the pre-compiled version here: http://armory.nicewarrior.org/mirror.php?path=cygmp/20050113/mplayer-full-20050113.exe which version are you using?

If that doesn't help, then try passing a "-mc 0" option into the flags for mencoder... that specifically says to mencoder "don;t mess around with the av-sync"

If that doesn't help, then I'd try using a different encoder.. like xvid or something like that... someone had posted the xvid settings they were using above... give those a try.

Let us all know how you get on...
Cheers,
Ash.

Also check the output of vsplit to see if there are any audio holes or patched rainfade. Its possible (and I think even likely) that in the presence of audio holes or rain fade errors that mencoder could get out of sync if it doesn't handle the timing info in the mpeg2 stream correctly.

twinc
10-13-2005, 03:45 AM
Please remember to post your settings back here once you have a set which work well for your purpose...


Kudos to you Bluewomble for providing the Mencoder add-in.

The DIVX files I encoded came out a little "blocky" and pixelated (sp?). So I thought I'd try the XVID, which I typically used for archival.

I aad a lot of problems with a/v sync using XVID... But the attached settings have produce good results with no a/v sync problems.... at least for the past 10 shows. What did it for me seemed to be the lame encoding options. Also dropped some of the XVID options to speed up the encoding. And adjusting the video bitrate will probably create smaller file sizes.

Good luck! And again, thanks to Masnark for providing the ETivo and Bluewomble for the Mencoder shim.

Ken

mr_c
10-14-2005, 02:24 PM
Many thanks to Bluewomble for developing this Etivo addin. Its long been an aim of mine to automatically archive my tivo's output into a format which can be read by my settop mpeg4 player, and now I can!

However, like twinc says above, the divx encoding preset is a little blocky. I've tried using twinc's xvid setting but am getting the error "Could not run encoder. Error: Calling remote encoder failed with: Encoder failed: Output file had not been writen!"

The logfile also gives the following info:

File not found: 'frameno.avi'
-->Failed to open frameno.avi
-->xvidencopts is not an MEncoder option

Any ideas anyone? I live in the UK so my TV system is PAL, and am using the pre-compiled version of Mencoder as suggested by Bluewomble above.

Thanks
Chris

twinc
10-15-2005, 02:42 AM
However, like twinc says above, the divx encoding preset is a little blocky. I've tried using twinc's xvid setting but am getting the error "Could not run encoder. Error: Calling remote encoder failed with: Encoder failed: Output file had not been writen!"

The logfile also gives the following info:

File not found: 'frameno.avi'
-->Failed to open frameno.avi
-->xvidencopts is not an MEncoder option


Sounds like you're running a version of mencoder which doesn't have XVID compiled. Check the site Bluewomble suggested for MPlayer, there should be a "full" version.

Check for linebreaks in the final xml file... the flag lines should be one single line.

Otherwise you can try to use lavc for video encoding to XVID. I think its simply changing Bluewomble's default flags from "-fourcc DIVX" to "-fourcc XVID". When I tested with lavc to XVID, the A/V was out of sync. So I switched to using xvid directly, since many of the help sites I found referenced these options. The following is a quick tutorial for mencoder settings:
http://gentoo-wiki.com/HOWTO_Mencoder_Introduction_Guide#lavc_Two-Pass_Encoding

A XVID FAQ is also listed within the article above.

Good luck!

mr_c
10-15-2005, 01:26 PM
Thanks for your help twinc. I'd already installed the full version so I guess this possibly does not have xvid compiled, but I found a version which does at http://oss.netfarm.it/mplayer-win32.php and as I write, etivo is now encoding. Thanks also for the wiki link, I'll read through the tutorial and attempt to refine my encoding settings to suit my needs. If I have any success I'll post these back here for others to try.

Cheers
Chris

yagey
10-15-2005, 03:30 PM
Hi guys! This is awesome, I was initially searching for a way to put my shows on the new ipod video, but found this forum and realized I could use my existing palm tungsten T instead of shelling out $300+!

I've been playing for a few days, but have only had success with dr divx, not with mencoder.

My current issue appears to be that mencoder is confused by the vstripped stream? I'd really appreciate any pointers, here is the end of my mencoder log, I get thousands of the '1 duplicate frame(s)' messages:


Pos:2041.3s 57990f (56%) 119fps Trem: 6min 112mb A-V:0.000 [181:95]
1 duplicate frame(s)!
Pos:2041.3s 57991f (56%) 119fps Trem: 6min 112mb A-V:0.000 [181:95]
demux_mpg: 30fps NTSC content detected, switching framerate.
Warning! FPS changed 23.976 -> 29.970 (-5.994000) [4] :0.000 [181:95]
Pos:2043.1s 58045f (56%) 119fps Trem: 6min 112mb A-V:0.000 [181:95]
Too many audio packets in the buffer: (4096 in 8273920 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.

Flushing video frames

Writing AVI index...
Fixing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp h
eader.

Video stream: 181.842 kbit/s (22730 bps) size: 46441146 bytes 2043.143 secs
58045 frames

Audio stream: 96.000 kbit/s (11999 bps) size: 19295136 bytes 1607.928 secs

here are the settings I'm using for mencoder. The video always plays fine, it's the audio I'm having issues with. Either it's completely out of sync, or it crashes the palm and I have to turn off audio decoding to get the video to play.


"c:\program files\mplayer\mencoder" -ni -mc 0 -oac lavc -ovc lavc -lavcopts vcodec=mpeg4:acodec=mp3:vhq:vbitrate=192:keyint=300:abitrate=96:turbo:vpass=1 -lameopts vol=10 -vf scale=320:240 -ffourcc XVID "Star Trek- Enterprise-Broken Bow.avi.mpg" -o "Star Trek- Enterprise-Broken Bow.tivo.avi"
"c:\program files\mplayer\mencoder" -ni -mc 0 -oac lavc -ovc lavc -lavcopts vcodec=mpeg4:acodec=mp3:vhq:vbitrate=192:keyint=300:abitrate=96:turbo:vpass=2 -lameopts vol=10 -vf scale=320:240 -ffourcc XVID "Star Trek- Enterprise-Broken Bow.avi.mpg" -o "Star Trek- Enterprise-Broken Bow.tivo.avi"

Thanks in advance!

bluewomble
10-15-2005, 03:46 PM
Thanks for your help twinc. I'd already installed the full version so I guess this possibly does not have xvid compiled, but I found a version which does at http://oss.netfarm.it/mplayer-win32.php and as I write, etivo is now encoding. Thanks also for the wiki link, I'll read through the tutorial and attempt to refine my encoding settings to suit my needs. If I have any success I'll post these back here for others to try.

Cheers
Chris
I'm not sure, but you _may_ find that you have problems with that version, as it looks like it was compiled under mingw32... I think versions of mencoder which are compiled with mingw (rather than cygwin) do not have large file support... this means that you will encounter problems with any file bigger than 2Gb. Let me know how you get on though... if you do manage to get a large file to transcode with that version I'll be very interested.
Cheers,
Ash.

twinc
10-15-2005, 04:30 PM
here are the settings I'm using for mencoder. The video always plays fine, it's the audio I'm having issues with. Either it's completely out of sync, or it crashes the palm and I have to turn off audio decoding to get the video to play.


Hmmm... your mencoder settings look okay. The only suggestions would be to use turbo on the 1st pass and not the 2nd pass and maybe remove the -mc 0. How does the video look on your PC? I've heard that the Palms are really picky when it comes to video... I tried an XVID AVI on a friends Treo, and it complained, but eventually played... didn't watch long enough to determine if A/V stayed in sync.

You may want to use lame for your audio encoding. Configuring the options seemed a little clearer to me. I played around with cbr and abr to resolve my a/v sync issues... finally settled on abr and 128kbps. Always had issues with 96kbps, though it would be nice to have the smaller audio file.

Here's a site that helps with creating lame and lavc mencoder settings:
http://f0rked.com/projects/simplerip
Drop the "nice -n3", I think this is used in linux to help with task processing. So I took the the three lines, and merged the sound processing flags onto the 2nd pass flags, typically on the first pass I skip the sound processing (-nosound) and use "turbo" to speed up the encoding time.

Lastly, it could also be the source... something mentioned in a different topic thread.

Good luck! And share your findings!
Ken

yagey
10-15-2005, 04:40 PM
I think it's likely all the '1 duplicate frame(s)!' issues are the problem and are causing the frames to become out of sync with the audio. I'll keep testing different settings and post my results. thanks for the reply :)

mr_c
10-16-2005, 02:50 AM
I'm not sure, but you _may_ find that you have problems with that version, as it looks like it was compiled under mingw32... I think versions of mencoder which are compiled with mingw (rather than cygwin) do not have large file support... this means that you will encounter problems with any file bigger than 2Gb. Let me know how you get on though... if you do manage to get a large file to transcode with that version I'll be very interested.


Looks like you are right; although I succesfully encoded a smaller file, I was unable to encode a file greater than 2gb. I left the encoding process overnight and at some point it failed with the error message "Could not run encoder. Error: Calling remote encoder failed with: Encoder failed: Mencoder did not get close to 100% completion!".

Unless somebody knows where I can get hold of a cygwin compiled version of mencoder (which supports Xvid), then I presume I will need to figure out how to compile it myself - something I'm not entirely sure how to do!

Also, anybody else having trouble accessing www.mplayerhq.hu ? I've never been able to access the site.

Thanks,
Chris

bluewomble
10-16-2005, 06:38 AM
Also, anybody else having trouble accessing www.mplayerhq.hu ? I've never been able to access the site.

I find that www.mplayerhq.hu sometimes goes down... when that happens, www2.mplayerhq.hu (their alt server) usually works fine... -- try that.

twinc
10-16-2005, 07:51 PM
I think it's likely all the '1 duplicate frame(s)!' issues are the problem and are causing the frames to become out of sync with the audio. I'll keep testing different settings and post my results. thanks for the reply :)

I get the "duplicate frames" message in my log files also, but the audio sync is okay in the final avi file.

Good luck, definitely interested to hear what you find.

vinniet
10-17-2005, 11:31 AM
I assume that once eTiVo/DirectShow Dump has done it's thing with the file.tivo file, then the LocalTYFileName property will be set to file.mpeg?

This might cause problems, because the default behavior is to immediately run:

vsplit.exe -m <inputfile> <newvideofile> <newaudiofile>

to 'clean' the ty stream into a proper mpeg... I suspect that if <inputfile> is already a proper mpeg, then vsplit might fall over? I'm not sure really... I've never tried it.

vinniet: To test this, try this version of the mencoder.dll (for testing only)... I've basically just removed the vsplit stuff, so it will just go straight to the encoding phase... assuming it is vsplit causing the problems, then this might work better... let me know how you get on? If this does work, then I'll make the vsplit an optional element in version3...

The testing dll is here: http://www.bluewomble.co.uk/mencoder/beta_testing/MencoderAddin.dll

If that doesn't work, then perhaps you could send me your encoding logs...


Note that those of you that want a standard install to transcode .ty files (rather then .tivo files) should continute to use the current (beta) 'release' version at http://www.bluewomble.co.uk/mencoder

Cheers,
Ash.

Hello ... I just got back from vacation so I am getting back into things. I will try the new dll tonight and report back. I did see one thing in the log that eTivo kept saying that it was waiting for a password box to put in the Tivo password. As you know v7.2 does not require a password anymore.

Is that your dll trying to do that or it eTivo? I had told eTivo to not use mencoder but when I went back into options I still saw it there. So with that said I am not sure who is trying to type the password in.

I had sent the logs to Shahar but thinking this over this might be your problem. When I get home I will post them here.

Thanks,

Vinnie

bluewomble
10-17-2005, 11:38 AM
Hello ... I just got back from vacation so I am getting back into things. I will try the new dll tonight and report back. I did see one thing in the log that eTivo kept saying that it was waiting for a password box to put in the Tivo password. As you know v7.2 does not require a password anymore.

Is that your dll trying to do that or it eTivo? I had told eTivo to not use mencoder but when I went back into options I still saw it there. So with that said I am not sure who is trying to type the password in.

I had sent the logs to Shahar but thinking this over this might be your problem. When I get home I will post them here.

Thanks,

Vinnie
I'm afraid I know absolutely nothing about TiVo2Go, or indeed any TiVo software version above 2.5.5 because I'm in the UK and we only have series 1 TiVos here. So the password thing almost certainly has nothing to do with the mencoder dll -- it is most likely something to do with eTivo or DirectShowDump...

Cheers,
Ash.

yagey
10-17-2005, 12:17 PM
The logfile also gives the following info:

File not found: 'frameno.avi'
-->Failed to open frameno.avi
-->xvidencopts is not an MEncoder option


Can you post your actual settings please?

mr_c
10-17-2005, 02:00 PM
Can you post your actual settings please?

At present I'm using the 'Xvid 800' settings twinc posted above but I'm still having mencoder issues. The 'full' versions (new and old) at http://armory.nicewarrior.org/projects/cygmp/ I think have xvid support but they don't seem to work for me. The old version stops encoding at 50% each time, whilst the new compile won't encode at all.

I'm now trying to compile my own mencoder with cgywin but must admit, do not have a clue as how to do this. Bluewombles site has a link to instructions on compiling with mingw but, as Bluewomble has pointed out, using mingw means problems with encoding files over 2gb.

Any help with this would be greatly appreciated

Cheers
Chris

yagey
10-17-2005, 02:12 PM
it is most likely something to do with eTivo or DirectShowDump...


As Ash says, this is nothing to do with his divx/mencoder plugin. Make sure you go through all of the options available in etivo (right click the icon and there are more options for tivotogo, such as autopassword tivo to go). Note that changing the default encoder on the main configuration page is different from changing the encoder for each entry in your autotivo list (they can have their own setting). Make sure you hit the OK button to save settings, and try a restart.

bluewomble
10-17-2005, 06:34 PM
I'm now trying to compile my own mencoder with cgywin but must admit, do not have a clue as how to do this. Bluewombles site has a link to instructions on compiling with mingw but, as Bluewomble has pointed out, using mingw means problems with encoding files over 2gb.

Any help with this would be greatly appreciated

Cheers
Chris
Ah yes... compiling mencoder is fun for all the family... you need to get used to typing:
./configure
make
make install

over and over and over again as you compile all the pre-requisite bits! ;-)

I _think_ that the instructions for compiling under mingw can pretty much be used for compiling under cygwin... I'm afraid it was a little while since I did it, I can't remember exactly what needs to be done!

The other useful place to look for how-to's is on the mplayer website... if you look in the mailing list's section and search the cygwin list for howto's then there is a fairly good howto on there... I think this is the one I followed:
http://www4.mplayerhq.hu/MPlayer/releases/win32/contrib/MPlayer-MinGW-Howto.txt

Enjoy! If you run into any problems with the compile, feel free to send me a PM and I'll try to help out...

Cheers,
Ash

vinniet
10-18-2005, 01:13 PM
As Ash says, this is nothing to do with his divx/mencoder plugin. Make sure you go through all of the options available in etivo (right click the icon and there are more options for tivotogo, such as autopassword tivo to go). Note that changing the default encoder on the main configuration page is different from changing the encoder for each entry in your autotivo list (they can have their own setting). Make sure you hit the OK button to save settings, and try a restart.

I could not find the option for autopassword for TivoToGO. I went thru all the options and could not find it. Is it done during install?

bullwinkl
10-20-2005, 10:04 PM
I've gone over the installation instructions again and again, and I'm sure I'm either just not reading something or there's something I'm supposed to know but don't. Anyhow, I can't seem to encode anything.

Here's the info etivo gives me:

Could not run encoder. Error: Calling remote encoder failed with: Encoder failed: Encoder failed: Object reference not set to an instance of an object.



I'm sure it's something so simple I've overlooked it...

twinc
10-20-2005, 10:49 PM
I've gone over the installation instructions again and again, and I'm sure I'm either just not reading something or there's something I'm supposed to know but don't. Anyhow, I can't seem to encode anything.

Here's the info etivo gives me:

Could not run encoder. Error: Calling remote encoder failed with: Encoder failed: Encoder failed: Object reference not set to an instance of an object.


In the directory where your the .ty files are located, is there a temp.mpg file?

If not, then check your vsplit program location variable in your .xml file... might want to make sure of the Mplayer program location while you're at it. If that looks okay, then make sure you've got bluewomle's mencoder.dll in the EtivoServer directory and you've configured Etivo to use Mencoder...

If you do have temp.mpg, then its probably something to do with Mencoder flags. Double check the Mencoder program directory. Try to run Mencoder with your specified flags manually. Try running the following from the DOS prompt while in the directory with temp.mpg:

{Mencoder program path}\mencoder temp.mpg -nosound -ovc frameno -o test.avi

This will not process anything, but at the very least check if mencoder is functioning. If this check is okay, then try to manually run the flags in your .xml file.

Let us know how it goes!

bluewomble
10-21-2005, 05:03 AM
I've gone over the installation instructions again and again, and I'm sure I'm either just not reading something or there's something I'm supposed to know but don't. Anyhow, I can't seem to encode anything.

Here's the info etivo gives me:

Could not run encoder. Error: Calling remote encoder failed with: Encoder failed: Encoder failed: Object reference not set to an instance of an object.



I'm sure it's something so simple I've overlooked it...
I suspect (from the error message) that the mencoder.dll is not being found... which means that either it's in the wrong place, or your etivo settings are not correct.. (I suspect it is not a problem with any of the auxillary programs (vsplit/mencoder) as it doesn't look like it's getting that far.)

As twinc says, check that you've installed it in the correct location (C:\Program Files\eTivoServer\Addins, or whereever). Make sure that your dll is in the right place.

If that's ok, then double-check your etivo settings carefully -- the encoder should be set to:
MencoderAddin.Mencoder,MencoderAddin.dll

Note that I'm not sure if this is case sensitive or not (I suspect it is) so be sure to use the exact case as above.

If that all looks ok then check that you are using a recent (ish) build of etivo -- I'm using version 1.0.1924.0 (I haven't gotten around to upgrading to the latest version yet, but I suspect that should work fine as well.)

Remember you'll need to restart your etivo server after you have saved any setting changes... (it might be worth doing a reboot, just to make sure!)

Let me know if that helps,
Ash.

bullwinkl
10-21-2005, 10:01 AM
I went through the installation instructions again this morning, and now it seems things are working...will know when I get home. I think perhaps I didn't save settings in etivo or something. ANyhow, thanks for the help (and the terrific plugin!). I honestly didn't expect help so swiftly!

mcharkowski
10-21-2005, 04:20 PM
This is working very well for me. I had trouble with synchronization issues with video and audio (I'm using TivoToGo .tivo , not .ty files... though I'm still not sure why it matters), but I switched to using the XviD encoder in mencoder and now it's working fine, with the right parameters. I'm encoding for NTSC to be viewed using TCPMP (Media Player for Palms). I'm viewing on a Tapwave Zodiac , which has a 320x480 screen, so I'm resizing to 428x320. Here's my encoder settings.

<Flags>-ovc xvid -xvidencopts bitrate=750:pass=1:turbo -oac mp3lame -vop scale=428:320:::::</Flags>

<Flags2>-ovc xvid -xvidencopts bitrate=750:pass=2 -oac mp3lame -vop scale=428:320:::::</Flags2>

I'm also using the original version of the dll that uses vpslit (I think) and everything's working fine.

The end result is nice XviD (Divx/MP4) files running at 30fps and weighing in at ~250MB for a 1/2-hour.

I hope somebody can make use of my settings and avoid the 6 hours of trial and error I spent yesterday doing.

Thanks, Ash, this is a very big part of my holy grail :-)

yagey
10-21-2005, 10:49 PM
Here is the summary of my findings for encoding using etivo and the mencoder plugin with my palm tungsten t as the target.

First of all, etivo, this plugin and TCPMP are all awesome, I can't thank any of you enough!

Using this benchmark page http://blogs.shintak.info/articles/4567.aspx I determined that my palm tungsten t "T|T" has a texas OMAP processor running at 144mhz, so not fast at all. It has a square 320x320 screen. The volume ability appears very low also and the screen is hard to see in anything but a dark environment. I'll try to address both of these in the encoding.

I had horrible results with dr divx trying to encode to a mobile profile. it would crash and require hard resets of the palm. When it did work the quality was totally unwatchable - I nearly gave up.

I then found a utility called 'pocketdivxencoder' which is a front-end to mencoder essentially. It has the choice of profiles for different handhelds to preset the configuration, such as screen size etc. It also allows you to queue up encoding, and has an option to correct audio synch using virtualdub. The log file shows you the mencoder settings it's using. I used this to tweak and test settings.

If a file is playing well in windows but skipping or losing synch in the palm, it found out this is mostly due to the palm being unable to keep up with the decoding. other players, such as mmplayer will bail and give an error message if this happens, but tcpmp struggles on.

TCMP has a benchmark option in the menu which will try to play the video as quickly as possible and give you a percentage of original. basically you never want this to go below 100%, so find a clip or show that has a lot of movement and noise and use that as your benchmark video (such as a car race). The settings that will best help achieve this are: framerate reduction, resolution reduction, video quality reduction and audio quality reduction.

I found my weak palm can handle pretty much anything I need from my regular shows, DIVX at 29.97fps, 320x240 and 11k sound and have happily watched many shows.

To test which settings are best for you:

Pick your test video and run vsplit on it to remove the tivo wrapper, such as:
"c:\Program Files\TyTool\VSplit9r16.exe" -m f:\temp\best.ty f:\temp\best f:\temp\audio

This will strip f:\temp\best.ty into f:\temp\best.mpg, this is your test file.

to test your settings on the command line, you might try
mencoder.exe best.mpg -oac copy -vf scale=320:240,eq2=1.0:1.0:0.03:1.0 -sws 2 -ofps 29.970 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=248:vpass=1 -ffourcc DX50 -o output.avi
mencoder.exe best.mpg -af volume=12 -srate 11025 -oac mp3lame -lameopts mode=3:cbr:br=24 -vf scale=320:240,eq2=1.0:1.0:0.03:1.0 -sws 2 -ofps 29.970 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=248:vpass=2 -ffourcc DX50 -o output.avi

The mencoder settings I ended up using are:
<Flags>-oac copy -vf scale=320:240,eq2=1.0:1.0:0.03:1.0 -sws 2 -ofps 29.970 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=248:vpass=1 -ffourcc DX50</Flags>
<Flags2>-af volume=12 -srate 11025 -oac mp3lame -lameopts mode=3:cbr:br=24 -vf scale=320:240,eq2=1.0:1.0:0.03:1.0 -sws 2 -ofps 29.970 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=248:vpass=2 -ffourcc DX50</Flags2>

surely these aren't perfect, but I'm happy with the results :)
The settings are to scale to 320:240, 29.97fps, and increase the volume 50%

This results in about 120MB/hr

I'd be interested in hearing how people get on with these settings.

twinc
10-22-2005, 12:01 AM
Don't know if this was mentioned before... it was definitely a new feature request for ETivo.

Ash, how difficult would it be to modify the .dll to support a third pass before deleting the temp.mpg?

So I'm thinking, the first pass would generate optimization stats, the 2nd pass could create an "Archival" file and the final pass would be another "2nd" pass with lower quality settings for something like a PVR or PDA. I probably wouldn't want to generate a PDA version of the video every time, but would be nice to have the option.

mcharkowski
10-22-2005, 10:08 AM
I believe I have found a weak link in eTivo, though. Last night I attempted to use the AutoTivo feature where it automatically downloads and reencodes based on show title, etc. . When I tried to use the eTivo command line interface to change the encoding profile, it would not work. So I dug into the AutoTivo xml file that stores the AutoTivo entries and I hand modified it so that the encoder (which, and this might be telling, is "Wme=ProfileName.wme") was now set to our Divx_Palm.xml profile. I restarted eTivo, logged back into it via the telnet interface, listed the AutoTivo entries and it appeared correct. But sure enough, after it downloaded them, it tried encoding them with the wme_low profile and it also failed out. So while it works when you manually do it from the "queue shows" gui, I don't believe AutoTivo will work. If anyone has any ideas, please let me know.

Thanks

Mike

bluewomble
10-22-2005, 12:14 PM
I believe I have found a weak link in eTivo, though. Last night I attempted to use the AutoTivo feature where it automatically downloads and reencodes based on show title, etc. . When I tried to use the eTivo command line interface to change the encoding profile, it would not work. So I dug into the AutoTivo xml file that stores the AutoTivo entries and I hand modified it so that the encoder (which, and this might be telling, is "Wme=ProfileName.wme") was now set to our Divx_Palm.xml profile. I restarted eTivo, logged back into it via the telnet interface, listed the AutoTivo entries and it appeared correct. But sure enough, after it downloaded them, it tried encoding them with the wme_low profile and it also failed out. So while it works when you manually do it from the "queue shows" gui, I don't believe AutoTivo will work. If anyone has any ideas, please let me know.

Thanks

Mike
I'm not sure I know exactly what you mean... I've had AutoTiVo running encoding stuff to DivX for ages (well, until my hard disk filled up last week! ;))

I've managed to get it working both in the "auto queue all shows" mode and the only queue certain shows automatically mode... it seems to work fine with DiVx for me... I suspect there is something wrong with your etivo settings.

I'm not sure what you mean by the "eTivo command line interface" -- I've never come accross that...

bluewomble
10-22-2005, 12:22 PM
Don't know if this was mentioned before... it was definitely a new feature request for ETivo.

Ash, how difficult would it be to modify the .dll to support a third pass before deleting the temp.mpg?

So I'm thinking, the first pass would generate optimization stats, the 2nd pass could create an "Archival" file and the final pass would be another "2nd" pass with lower quality settings for something like a PVR or PDA. I probably wouldn't want to generate a PDA version of the video every time, but would be nice to have the option.
As I have mentioned before... I intend for the next version of the addin to be a generic command line encoder addin, which simply performs a series of steps (which can be any command line program you like) set out in an xml profile... that way everyone can tailor exactly which steps they want...

I do like the idea of a profile which encodes both in archive quality and low quality -- I'll probably include that as one of the demo profiles.

As always with this stuff, It's just a case of getting round to it -- it's probably only a few hours hacking the code around, but i've been so busy recently that I haven't had a chance... Hopefully soonish...

Cheers,
Ash.

mcharkowski
10-22-2005, 01:51 PM
What I meant by the "command line interface" was telnetting to the eTivo server. I just tried using the ETivoFace package to set up the AutoTivo entry, and it appears to be working (26% encoded, currently). Maybe in hacking the xml file by hand I missed something.

What are the rest of you using to set up the AutoTivo entries? Let me guess, eTivoWeb? I've really got to upgrade this box from XP Home.

bluewomble
10-22-2005, 02:47 PM
What I meant by the "command line interface" was telnetting to the eTivo server. I just tried using the ETivoFace package to set up the AutoTivo entry, and it appears to be working (26% encoded, currently). Maybe in hacking the xml file by hand I missed something.

What are the rest of you using to set up the AutoTivo entries? Let me guess, eTivoWeb? I've really got to upgrade this box from XP Home.
Yeah, I use etivoweb... sorry, I've not used etivoface or the telnet interface...

moneyshotz
10-22-2005, 04:56 PM
I'm using a S2 Directivo

This is my log I get from the XVID_800. I changed the flags a little bit to this...
<Flags>-ovc xvid -xvidencopts bitrate=750:pass=1:turbo -oac mp3lame -vop scale=428:320:::::</Flags>

<Flags2>-ovc xvid -xvidencopts bitrate=750:pass=2 -oac mp3lame -vop scale=428:320:::::</Flags2>

I originally tried it with the divx_archive.xml but had A/V Sync issues. I even tried doing
"vsplit.exe -m foobar.ty file.mpg dummy" on the ty file straight out of the tivo and it works fine. No sync issues

Anyone know whats going on?


Starting encoding process for {Smallville}{2005-09-29}{Arrival}{SF20}
Loading the encoder file settings into an XML document, from 'D:\DTivo\XVID_800.xml'
Getting stuff from the XML file...
Two pass encoding.
Got the following encoder flags: -ovc xvid -xvidencopts bitrate=750:pass=1:turbo -oac mp3lame -vop scale=428:320:::::
Got the following second pass flags: -ovc xvid -xvidencopts bitrate=750:pass=2 -oac mp3lame -vop scale=428:320:::::
Path to mencoder: C:\Program Files\Mplayer\mencoder.exe
Encoding From: D:\DTivo\{Smallville}{2005-09-29}{Arrival}{SF20}.show\{Smallville}{2005-09-29}{Arrival}{SF20}.ty
Encoding to: D:\DTivo\{Smallville}{2005-09-29}{Arrival}{SF20}.show\{Smallville}{2005-09-29}{Arrival}{SF20}_XVID_800.avi
Cleaning the stream using VSplit.exe...
Executing: "C:\Program Files\TyTool\VSplit9r16.exe" -m "D:\DTivo\{Smallville}{2005-09-29}{Arrival}{SF20}.show\{Smallville}{2005-09-29}{Arrival}{SF20}.ty" temp dummy
Started flag set to true!
Process started!
Starting the encoding process...
Executing: C:\Program Files\Mplayer\mencoder.exe "D:\DTivo\{Smallville}{2005-09-29}{Arrival}{SF20}.show\temp.mpg" -o "D:\DTivo\{Smallville}{2005-09-29}{Arrival}{SF20}.show\{Smallville}{2005-09-29}{Arrival}{SF20}_XVID_800.avi" -ovc xvid -xvidencopts bitrate=750:pass=1:turbo -oac mp3lame -vop scale=428:320:::::
Started flag set to true!
Process started!
-->MEncoder dev-CVS-050113-21:57-3.3.3 (C) 2000-2005 MPlayer Team
-->CPU: Intel Pentium 4/Xeon/Celeron Foster (Family: 8, Stepping: 7)
-->Detected cache-line size is 64 bytes
-->CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
-->Compiled with runtime CPU detection - WARNING - this is not optimal!
-->To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
-->File not found: 'frameno.avi'
-->Failed to open frameno.avi
-->xvidencopts is not an MEncoder option
-->
-->Exiting... (error parsing cmdline)

bluewomble
10-22-2005, 07:11 PM
I'm using a S2 Directivo

This is my log I get from the XVID_800. I changed the flags a little bit to this...
<Flags>-ovc xvid -xvidencopts bitrate=750:pass=1:turbo -oac mp3lame -vop scale=428:320:::::</Flags>

<Flags2>-ovc xvid -xvidencopts bitrate=750:pass=2 -oac mp3lame -vop scale=428:320:::::</Flags2>

I originally tried it with the divx_archive.xml but had A/V Sync issues. I even tried doing
"vsplit.exe -m foobar.ty file.mpg dummy" on the ty file straight out of the tivo and it works fine. No sync issues

Anyone know whats going on?
Does the version of mencoder you are using have xvid support? You can test this by running:


mencoder -ovc:help

Other than that, I'm not sure as I don't use the xvid encoder, so I'm not sure what options it expects... but it looks as though mencoder is failing to parse your command line... Hopefully someone else round here who uses xvid can offer more help...

moneyshotz
10-22-2005, 07:57 PM
THanks. Here is what I got after typing that command.


MEncoder dev-CVS-050113-21:57-3.3.3 (C) 2000-2005 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Foster (Family: 8, Stepping: 7)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
File not found: 'frameno.avi'
Failed to open frameno.avi

Available codecs:
copy - frame copy, without re-encoding. Doesn't work with filters.
frameno - special audio-only file for 3-pass encoding, see DOCS.
raw - uncompressed video. Use fourcc option to set format explicitly.
nuv - nuppel video
lavc - libavcodec codecs - best quality!
vfw - VfW DLLs, currently only AVID is supported.
qtvideo - QuickTime DLLs, currently only SVQ1/3 are supported.
libdv - DV encoding with libdv v0.9.5


Exiting... (error parsing cmdline)


I don't care if I use divx or xvid. I just want to try to get this working w/o any AV issues.

Anyone here have any sucess doing it w/ directivos?

mr_c
10-23-2005, 05:13 AM
THanks. Here is what I got after typing that command.


I don't care if I use divx or xvid. I just want to try to get this working w/o any AV issues.

Anyone here have any sucess doing it w/ directivos?

I don't use a directivo (am using a UK S1), but sounds like you're having similar mencoder problems to me. If xvid was supported, it would show under the list of available codecs. I have contacted the guy who runs the site at http://armory.nicewarrior.org/projects/cygmp/ and he has kindly offered to send me a pre-release of his next compile of mplayer/mencoder which will support xvid. Failing that, I will compile a version myself - Bluewomble has provided me with the info on how to do this so I think I should (hopefully) get this sorted one way or another. Will post back here if I have any success.

Regards
Chris

mcharkowski
10-23-2005, 09:06 AM
This is the copy of mencoder that I've been using http://ftp5.mplayerhq.hu/mplayer/releases/win32/MPlayer-mingw32-dev-CVS-050928.zip , and it does have xvid support. I think I read somebody above saying that this might have issues with large file support. I haven't run into any of them yet, though.

moneyshotz
10-24-2005, 01:27 AM
Thanks. That version works. No syncing issues anymore. Video looks kinda grainy though. I guess I gotta play w/ the settings

Waruwaru
10-24-2005, 05:22 AM
Let us all know how you get on...

This is the mencoder options I am using to avoid the audio/video sync issue. Also added some flags to scale to NTSC resolution and de-interlace. Still trying to find a good size/quality balance for myself though.

Single Pass Config:

<?xml version="1.0"?>

<Mencoder>
<!-- What flags should be passed to mencoder.exe? (on the first or only pass) -->
<Flags>-ofps 23.976 -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:acodec=mp3:abitrate=128:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3 -vf lavcdeint,crop=:464::,expand=0:16:0:0,scale=::::::ntsc</Flags>

<!-- What flags should be passed to mencoder.exe? (on the second pass... if there is none, then leave empty) -->
<Flags2></Flags2>

<!-- Where does mencoder.exe live? -->
<MencoderPath>C:\Program Files\Mplayer\mencoder.exe</MencoderPath>

<!-- Where does VSplit.exe live? -->
<VSplitPath>C:\Program Files\TyTool9r18\VSplit9r16.exe</VSplitPath>
</Mencoder>


Double Pass Config:

<?xml version="1.0"?>

<Mencoder>
<!-- What flags should be passed to mencoder.exe? (on the first or only pass) -->
<Flags>-ofps 23.976 -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=1 -nosound -vf lavcdeint,crop=:464::,expand=0:16:0:0,scale=::::::ntsc</Flags>

<!-- What flags should be passed to mencoder.exe? (on the second pass... if there is none, then leave empty) -->
<Flags2>-ofps 23.976 -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:acodec=mp3:abitrate=128:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=2 -vf lavcdeint,crop=:464::,expand=0:16:0:0,scale=::::::ntsc</Flags2>

<!-- Where does mencoder.exe live? -->
<MencoderPath>C:\Program Files\Mplayer\mencoder.exe</MencoderPath>

<!-- Where does VSplit.exe live? -->
<VSplitPath>C:\Program Files\TyTool9r18\VSplit9r16.exe</VSplitPath>
</Mencoder>


I think I might have found a problem with the Etivo or the encoder though. My encoding seems to get stuck while it is executing Vsplit with the following command



"C:\Program Files\TyTool9r18\VSplit9r16.exe" -m "C:\EtiVo\{Joan of Arcadia}{2005-03-04}{Secret Service}{SF5}.show\{Joan of Arcadia}{2005-03-04}{Secret Service}{S.ty" temp dummy


VSplit will generate temp.mpg partially (up to 182+ megs), then the process "hangs" (checked via Task Manager). If I stop Etivo service, then VSplit will happily resume itself and finish muxing temp.mpg. I also tried to run the command manually from DOS, and it completes without any issues. I have seeing stuff like this happen when a child process (vsplit in this case) generates STDOUT, and fill up some buffer. When I get a chance, I will test out this theory.

EDIT: Added my new config file settings
EDIT: Updated settings with better de-interlace settings

bluewomble
10-24-2005, 05:28 AM
VSplit will generate temp.mpg partially (up to 182+ megs), then the process "hangs" (checked via Task Manager). If I stop Etivo service, then VSplit will happily resume itself and finish muxing temp.mpg. I also tried to run the command manually from DOS, and it completes without any issues. I have seeing stuff like this happen when a child process (vsplit in this case) generates STDOUT, and fill up some buffer. When I get a chance, I will test out this theory.
Yeah, someone else reported this to me... I haven't had a chance to look at it yet... (and I haven't experienced the problem myself yet). I suspect you're right -- it's probably some kind of overflow on cout or cerr, or maybe some kind of process stack limit... If you have a C# compiler handy, then it would be easy to test -- just comment out the bit of code which redirects stdout, then recompile and run it again... If you haven't, let me know -- I'll recompile myself when I'm at home (it will only take 5 minutes) and I'll PM you a new dll for testing.

Cheers,
Ash.

Waruwaru
10-24-2005, 12:25 PM
If you have a C# compiler handy, then it would be easy to test -- just comment out the bit of code which redirects stdout, then recompile and run it again...

Haha, I totally forgot that the source is available. :) I will give it a try when I get a chance.

Thanks!
Waruwaru

bluewomble
10-24-2005, 06:43 PM
Haha, I totally forgot that the source is available. :) I will give it a try when I get a chance.

Thanks!
Waruwaru
Waruwaru: You have a PM with details for downloading a beta test version. This is exactly the same as the Version2 release, except it does not redirect stdout when running vsplit... hopefully that might fix your hanging process problem... let me know how you get on...
Cheers,
Ash

Waruwaru
10-25-2005, 04:35 PM
Waruwaru: You have a PM with details for downloading a beta test version. This is exactly the same as the Version2 release, except it does not redirect stdout when running vsplit... hopefully that might fix your hanging process problem... let me know how you get on...
Cheers,
Ash

It's working out great! Thanks for taking the time to compile the DLL for me. Now I am happily encoding my stuff to DivX. :)

sublimnl
10-26-2005, 02:19 AM
I've got the same problem with Vsplit hanging around 182mb. mind sending the dll my way as well?

bluewomble
10-26-2005, 04:51 AM
I've got the same problem with Vsplit hanging around 182mb. mind sending the dll my way as well?
Ok, the hacked version of the dll which does not redirect output of vsplit is at
http://www.bluewomble.co.uk/mencoder/waruwaru/MencoderAddin.dll

All other files are the same as the ones in the 'proper' release, which is at
http://www.bluewomble.co.uk/mencoder

Cheers,
Ash.

sublimnl
10-26-2005, 12:35 PM
Ok, the hacked version of the dll which does not redirect output of vsplit is at
http://www.bluewomble.co.uk/mencoder/waruwaru/MencoderAddin.dll

All other files are the same as the ones in the 'proper' release, which is at
http://www.bluewomble.co.uk/mencoder

Cheers,
Ash.

Thanks for posting. Still no joy though :(

bluewomble
10-26-2005, 12:44 PM
Thanks for posting. Still no joy though :(
Hmmm... I'll have to have a play with it then... what's going wrong? Is vsplit still hanging?

Can you check that vsplit runs ok from the command line for the show you are having difficultly with.

Do you encounter this problem with all shows, or just some?

Cheers,
Ash.

Waruwaru
10-26-2005, 04:46 PM
Thanks for posting. Still no joy though :(

Did you try stop/start Etivo service?

If still not working, try stopping Etivo, and unzip this DLL into your add-in directory, and restart Etivo.

sublimnl
10-29-2005, 01:26 PM
Well, I dunno what crack I was smoking the other night. Maybe it was just late and I messed something up cause it works fine now after replacing the file and restarting the service again. *shrugs* thanks! :o

gibson3659
10-29-2005, 03:26 PM
I would like the download and encoding queues to be separated. That way, I could download, cut commercials, and then encode. Or I could encode once for the archive, and then queue it up again for a portable. Or just reencode if I did not like the quality and want to change the profile.

Waruwaru
10-29-2005, 04:26 PM
I would like the download and encoding queues to be separated. That way, I could download, cut commercials, and then encode. Or I could encode once for the archive, and then queue it up again for a portable. Or just reencode if I did not like the quality and want to change the profile.

I think you need to make the requests in the Etivo thread. This add-in only does encoding, Etivo is the one that controls whether you can re-queue something for encoding or not. I think there is a setting in Etivo to let you keep the .ty file it downloaded after encoding or not. If that works, then you can just re-encode separately as many time as you wish.

sanderton
10-29-2005, 07:47 PM
Could the fact that this plug-in converts to .mpg before encoding mean that it could be adapted to create .wmv's using 2-pass encoding? (You can't with eTiVo by default, as TyShow doesn't support it).

bluewomble
10-30-2005, 02:54 PM
Well, I dunno what crack I was smoking the other night. Maybe it was just late and I messed something up cause it works fine now after replacing the file and restarting the service again. *shrugs* thanks! :o
Excellent... I'll definitely put that tweak into the next release then.

bluewomble
10-30-2005, 05:25 PM
Could the fact that this plug-in converts to .mpg before encoding mean that it could be adapted to create .wmv's using 2-pass encoding? (You can't with eTiVo by default, as TyShow doesn't support it).
I guess so... I'm not sure if mencoder handles wmv encoding very welll (I think it claims to support it... but I haven't tried it.)

If you have some kind of other command line process which does 2 pass wmv encoding from an mpeg, then my code can definitely be adapted to run that instead...

Cheers,
Ash.

Masnark
10-30-2005, 06:00 PM
I guess so... I'm not sure if mencoder handles wmv encoding very welll (I think it claims to support it... but I haven't tried it.)

If you have some kind of other command line process which does 2 pass wmv encoding from an mpeg, then my code can definitely be adapted to run that instead...

Cheers,
Ash.

Well.. I can make WM9Encoder public, and then you can just chain it (basically, call to it in the same way EtiVo calls you) to generate WMV files. Should be very easy actually.

bluewomble
10-30-2005, 06:08 PM
Well.. I can make WM9Encoder public, and then you can just chain it (basically, call to it in the same way EtiVo calls you) to generate WMV files. Should be very easy actually.
But will that do 2 pass encoding? I think sanderton's point was that TyShow methods of encoding can't do 2 pass encoding... to be honest, I'm not really sure about it as I've never really looked into wmv encoding... I wouldn't think there would be an awful lot of point in simply calling down to the etivo WM9Encoder as you may as well just use that... or am I missing something?

Ash.

Masnark
10-30-2005, 08:41 PM
But will that do 2 pass encoding? I think sanderton's point was that TyShow methods of encoding can't do 2 pass encoding... to be honest, I'm not really sure about it as I've never really looked into wmv encoding... I wouldn't think there would be an awful lot of point in simply calling down to the etivo WM9Encoder as you may as well just use that... or am I missing something?

Ash.

If the MPG is MP2, instead of calling TYShow (which dies on 2pass), WME will use the regular MP2 codec. That in turn will should work.

bluewomble
10-31-2005, 05:56 AM
If the MPG is MP2, instead of calling TYShow (which dies on 2pass), WME will use the regular MP2 codec. That in turn will should work.
Ah, I see... in that case, yes I guess it should work... -- by the time the actual encoder gets to look at the file, it's already a 'proper' mpeg2 because it's been processed by VSplit.
Ash.

gibson3659
10-31-2005, 06:13 PM
Can ComSkip be integrated in since we go through an mpeg2 stage?

http://www.sage-community.org/index.cgi/wiki/ComSkip

Spydertech
10-31-2005, 06:41 PM
OK - here's a strange one...

I finally moved everything to a web server - installed ETivoweb and configured everything to use Waruwaru's 2 pass DivX setup (as I want PC Archival quality - not handheld)...

But I'm only getting 13-14.5 minutes of every show (10 shows so far - all the same results).

No errors in the logs (except the stnadrd ones from mencoder). Looking at the logs, it downloads the complete show (900 megs approx for an hour), then executes the vsplit line - continues to the encoding - after pass one the file is only 850 secs long (approx 14 minutes) - performs pass 2 - no errors to speak of - and the file is 200 megs and 14 minutes long.

I was using the original addin dll file - I just changed to the no stdout file and will test it later this evening (power outage broke the home network and I'm not there to find out what blew up yet :( ).

But mine doesn't hang - it just continues as if the file were only 14 or so mintues????

Has anyone else seen this?

Spydertech

Waruwaru
10-31-2005, 07:50 PM
But I'm only getting 13-14.5 minutes of every show (10 shows so far - all the same results).

After Etivo finishes downloading the .ty file from mfs_ftp, try to play the .ty file in WMP and see if it is also shortened. If it is, you have a broken mfs_ftp (something about bad mfs_stream), install the unified mfs_* tools, and try mfs_ftp again. If that doesn't solve your problems, and you have TyTools installed, try to grab the same show using TyTool/tserver and see if that ty file is any better.

EDIT: If the ty files look ok, try to execute the vsplit command (you can find the command inside the log file) on it, and check out the generated temp.mpg to see if it is also shortened.

bluewomble
11-01-2005, 05:58 AM
Can ComSkip be integrated in since we go through an mpeg2 stage?

http://www.sage-community.org/index.cgi/wiki/ComSkip
Looks cool... I've never heard of it before... so I haven't used it yet... but it looks as though it might work... I'll try to have a play with it at some point...

In the meantime, you could experiment yourself by running
vsplit.exe -m tyfile.ty newfile newfile (or something like that)

to get the mpeg2 file, then try running this comskip thing...

What does it output? It looks as though it doesn't actually cut the commercials out, it just writes a text file with the frame numbers of the commercials... is that right? If that is the case, then I'd need to think of a way to parse that file and run something to actually cut the commercials out...

Excellent idea though... well worth looking into.

Cheers,
Ash.

bluewomble
11-01-2005, 06:00 AM
After Etivo finishes downloading the .ty file from mfs_ftp, try to play the .ty file in WMP and see if it is also shortened. If it is, you have a broken mfs_ftp (something about bad mfs_stream), install the unified mfs_* tools, and try mfs_ftp again. If that doesn't solve your problems, and you have TyTools installed, try to grab the same show using TyTool/tserver and see if that ty file is any better.

EDIT: If the ty files look ok, try to execute the vsplit command (you can find the command inside the log file) on it, and check out the generated temp.mpg to see if it is also shortened.
Also, if that all works, then you should try to run etivo with the WME encoder... if that works ok, then we know that etivo / mfs_ftp is doing it's job properly and it's definitely the fault of mencoder... (which wouldn't surprise me! ;))

sanderton
11-01-2005, 10:39 AM
Ah, I see... in that case, yes I guess it should work... -- by the time the actual encoder gets to look at the file, it's already a 'proper' mpeg2 because it's been processed by VSplit.
Ash.

That would be great; the single pass encoding is not as efficient or as high quality as it could be. I'd use Divx/XVid, but the fianl output device is MCE and its Divx support is rubbish.

gibson3659
11-01-2005, 11:16 AM
What does it output? It looks as though it doesn't actually cut the commercials out, it just writes a text file with the frame numbers of the commercials... is that right? If that is the case, then I'd need to think of a way to parse that file and run something to actually cut the commercials out...

After a little more searching, it has a companion program called comclean that does the cutting for you.
http://gbpvr.com/pmwiki/pmwiki.php/Utility/Comclean

Check out the other utilities on the sidebar. CBreak and comskippad look interesting.

gibson3659
11-01-2005, 11:17 AM
... or translate the cutlist into an edl that mencoder can use directly.

bluewomble
11-01-2005, 11:42 AM
... or translate the cutlist into an edl that mencoder can use directly.
Excellent... I'll experiment with it as soon as I get a chance...
Thanks for the suggestion...
Cheers,
Ash.

Spydertech
11-01-2005, 11:59 AM
After Etivo finishes downloading the .ty file from mfs_ftp, try to play the .ty file in WMP and see if it is also shortened. If it is, you have a broken mfs_ftp (something about bad mfs_stream), install the unified mfs_* tools, and try mfs_ftp again. If that doesn't solve your problems, and you have TyTools installed, try to grab the same show using TyTool/tserver and see if that ty file is any better.

EDIT: If the ty files look ok, try to execute the vsplit command (you can find the command inside the log file) on it, and check out the generated temp.mpg to see if it is also shortened.

Well - back to the drawing board...
A power failure yesterday during a storm killed my Family room Tivo...
It won't complete a boot up anymore (hangs at Wait a few more minutes)..

In watching the serial output I'm getting the InitializeProgramOrDie Failed :0x030000 (the error number may be off a little - memory)

No bash, and I have no idea what is fried...

So I loaded a different drive and it is up and running again - but I'm still tweaking it before I go further.

Man - I lost several complete series in this - stupid power issues - you gotta loave new construction areas!!! :(

OK - I'll try some more stuff now...

Thanks,
Spydertech

Spydertech
11-01-2005, 07:46 PM
OK - it seems all is well... except the loss of several seasons of shows.. Some I haven't watched yet...

While reloading a new drive (the old is sitting here, waiting to see if I can pull some of the recordings using the PC), it seems I fixed whatever was wrong.

Hey - as long as it works, right???

Spydertech

bluewomble
11-02-2005, 05:51 AM
OK - it seems all is well... except the loss of several seasons of shows.. Some I haven't watched yet...

While reloading a new drive (the old is sitting here, waiting to see if I can pull some of the recordings using the PC), it seems I fixed whatever was wrong.

Hey - as long as it works, right???

Spydertech
So does that mean you have etivo working properly now?

Spydertech
11-02-2005, 09:42 AM
Yes - I have etivo working properly pretty much.

I still have A/V synch issues using the standard DivX xml, but Waruwaru's divx seems to work OK (still working on the right size to quality ratio)...

It's all good - now to just re-record all the missing shows.

Thanks,
Spydertech

Spydertech
11-02-2005, 05:52 PM
OK - I just tried the standard divx_archive settings - no luck...

It craps out during the first encoding pass with:


-->Too many audio packets in the buffer: (4096 in 8273920 bytes).
-->Maybe you are playing a non-interleaved stream/file or the codec failed?
-->For AVI files, try to force non-interleaved mode with the -ni option.
-->
-->Flushing video frames
-->
-->Writing AVI index...
-->Fixing AVI header...
-->ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
-->
-->Video stream: 1740.486 kbit/s (217560 bps) size: 272484498 bytes 1252.452 secs 32791 frames
-->
-->Audio stream: 224.000 kbit/s (27999 bps) size: 22452864 bytes 801.888 secs


I'm looking into using lame to counteract this, but I honestly don't know what to change yet (I'm still reading up on this).

Spydertech

ajfuchs
11-09-2005, 11:33 PM
can we circle back to the "Could not run encoder. Error: Calling remote encoder failed with: Encoder failed: Mencoder did not get close to 100% completion! Aborting encoding." problem when encoding large files.
Encoder works fine for small files but returns this error message when encoding larger (1h-medium quality) files. See earlier post.

Any solutions/workarounds/tricky settings suggestions?

-Alex

yagey
11-09-2005, 11:44 PM
i had the same problem. i don't recall the solution, but I know my later settings do not do this. look for my previous replies and try my settings.


OK - I just tried the standard divx_archive settings - no luck...

It craps out during the first encoding pass with:


-->Too many audio packets in the buffer: (4096 in 8273920 bytes).
-->Maybe you are playing a non-interleaved stream/file or the codec failed?
-->For AVI files, try to force non-interleaved mode with the -ni option.
-->
-->Flushing video frames
-->
-->Writing AVI index...
-->Fixing AVI header...
-->ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
-->
-->Video stream: 1740.486 kbit/s (217560 bps) size: 272484498 bytes 1252.452 secs 32791 frames
-->
-->Audio stream: 224.000 kbit/s (27999 bps) size: 22452864 bytes 801.888 secs


I'm looking into using lame to counteract this, but I honestly don't know what to change yet (I'm still reading up on this).

Spydertech

ajfuchs
11-10-2005, 09:07 AM
thanks very much but i believe those settings are for 320x240 PDA output.
actually having problems recoding for larger-home theater divx output
PDA works for me, but larger recoding fails as described.
Any other settings suggestions?

error = "Could not run encoder. Error: Calling remote encoder failed with: Encoder failed: Mencoder did not get close to 100% completion! Aborting encoding." problem when encoding large files.
Encoder works fine for small files but returns this error message when encoding larger (2h-medium quality) files. See earlier post.

bluewomble
11-10-2005, 09:22 AM
thanks very much but i believe those settings are for 320x240 PDA output.
actually having problems recoding for larger-home theater divx output
PDA works for me, but larger recoding fails as described.
Any other settings suggestions?

error = "Could not run encoder. Error: Calling remote encoder failed with: Encoder failed: Mencoder did not get close to 100% completion! Aborting encoding." problem when encoding large files.
Encoder works fine for small files but returns this error message when encoding larger (2h-medium quality) files. See earlier post.
Have you tried using some of the other setting that people have used, for example:
http://www.dealdatabase.com/forum/showpost.php?p=238647&postcount=61
or
http://www.dealdatabase.com/forum/showpost.php?p=237595&postcount=25

I'd suggest looking at the log file for the encoding which fails... first off, check that the vsplit command works ok by running it from the command line, i.e.:
vsplit -m file.ty temp temp

if that works, then try running the mencoder command with whatever flags you are using and see what happens... if this step fails (as I suspect it might) then this suggests a problem with your mencoder settings or the file in question

If this is the case then please post the following:
1. Mencoder log (what mencoder writes to stdout)
2. The exact command used to generate the error
3. Which version of mencoder you are using and where you got it from

I'm no expert and I suspect I'm not going to be much help, but with this information, hopefully someone around here may be able to offer some advice.

If not, then I suggest searching/posting to one of the mplayer mailing lists on the mplayer website.

Let us know how you get on...
Cheers,
Ash.

twinc
11-10-2005, 08:12 PM
thanks very much but i believe those settings are for 320x240 PDA output.
actually having problems recoding for larger-home theater divx output

[/I]

What type of home theater output are you looking for? You're never going to get better resolution than the original programming captured by your Tivo. You can input parameters to keep the original video screen size and bitrate, but its going to take a long time to encode the program and the final file size will be minimally reduced from the original ty or mpg after vsplit.

If your goal is to convert a program that was originally 480 to 720/1080, its possible through the settings, but doesn't really make sense since you'll be creating information that wasn't in the original program.

yagey
11-10-2005, 11:19 PM
Here is the content of the divx_archive.xml file I use.

This isn't as highly tweaked as my palm version, but should work. at least use it as a basis, and refer to the mencoder document to tweak - it's not that bad once you spend some time on it. For example, the guide recommends 1800 as the vbitrate to have the best quality / size tradeoff. 1800 puts a movie at about 1.5GB. If you have a nice home theatre, your best bet is to just run vsplit and retain as much quality as possible, especially keep surround sound (this setting doesn't do that, instead use -oac copy)

Please let me know your results and goals



<?xml version="1.0"?>

<Mencoder>
<!-- What flags should be passed to mencoder.exe? (on the first or only pass) -->
<Flags>-mc 0 -oac lavc -nosound -lavcopts vcodec=mpeg4:acodec=mp3:vbitrate=800:keyint=250:vpass=1:turbo -ffourcc DIVX -vop scale=::::::pal</Flags>

<!-- What flags should be passed to mencoder.exe? (on the second pass... if there is none, then leave empty) -->
<Flags2>-mc 0 -oac lavc -ovc lavc -lavcopts vcodec=mpeg4:acodec=mp3:vbitrate=800:keyint=250:vpass=2 -ffourcc DIVX -vop scale=::::::pal</Flags2>

<!-- Where does mencoder.exe live? -->
<MencoderPath>C:\Program Files\Mplayer\mencoder.exe</MencoderPath>

<!-- Where does VSplit.exe live? -->
<VSplitPath>C:\Program Files\TyTool\VSplit9r16.exe</VSplitPath>
</Mencoder>




thanks very much but i believe those settings are for 320x240 PDA output.
actually having problems recoding for larger-home theater divx output
PDA works for me, but larger recoding fails as described.
Any other settings suggestions?

error = "Could not run encoder. Error: Calling remote encoder failed with: Encoder failed: Mencoder did not get close to 100% completion! Aborting encoding." problem when encoding large files.
Encoder works fine for small files but returns this error message when encoding larger (2h-medium quality) files. See earlier post.

citivolus
11-11-2005, 12:20 AM
is anyone using ETivoWeb to set up the ETivoServer using these DivX profiles? I read through the installation notes of ETivoWeb and it seems to only allow specifying a WME profile.

Spydertech
11-11-2005, 12:41 AM
is anyone using ETivoWeb to set up the ETivoServer using these DivX profiles? I read through the installation notes of ETivoWeb and it seems to only allow specifying a WME profile.

You need to read through the DivX Encoder add-on web page in order to use these profiles with mencoder (you can find the link in several signatures - or the first post of this thread) - ETivo does NOT natively support anything other than WME...


PDA works for me, but larger recoding fails as described.
Any other settings suggestions?

Here is the DivX Archive I am currently using...
This one uses Lame for audio (as I always had a/v synch issues with lavc)..
It will shrink a 900MB file to approx 450MB. I haven't watched any of the encodings on my big screen, but it looks fine on my smaller LCD HDTV (27")...
Of course - you can tweak whatever you want....


<?xml version="1.0"?>

<Mencoder>
<!-- What flags should be passed to mencoder.exe? (on the first or only pass) -->
<Flags> -nosound -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1000:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=1 -vf lavcdeint,crop=:464::,expand=0:16:0:0,scale=480:320</Flags>

<!-- What flags should be passed to mencoder.exe? (on the second pass... if there is none, then leave empty) -->
<Flags2> -oac mp3lame -lameopts abr:br=128 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1000:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=2 -vf lavcdeint,crop=:464::,expand=0:16:0:0,scale=480:320</Flags2>

<!-- Where does mencoder.exe live? -->
<MencoderPath>C:\Program Files\Mplayer\mencoder.exe</MencoderPath>

<!-- Where does VSplit.exe live? -->
<VSplitPath>C:\Program Files\TyTool9r18\VSplit9r16.exe</VSplitPath>
</Mencoder>

Also of note - I am using the newest mencoder addin .dll file as posted earlier in this thread.

Spyder

citivolus
11-11-2005, 01:00 AM
You need to read through the DivX Encoder add-on web page in order to use these profiles with mencoder (you can find the link in several signatures - or the first post of this thread) - ETivo does NOT natively support anything other than WME...

no, I am using the DivX Encoder plug-in for ETivo. I was just wondering if there's any way to access this through the ETivoWeb module. If I'm missing something, please provide a link...

thanks.

yagey
11-11-2005, 01:16 AM
yes, you can choose the divx output from etivoweb, or etivoserver.

Are you trying to record autotivo shows, or manual shows? I think in either case there is a dropdown that lets you choose which encoding profile to use.

If the profile you want isn't in the dropdown, follow the setup details in bluewombles orignal post (or webpage) to create a new, mencoder divx profile using his plugin.

hope that helps :)


is anyone using ETivoWeb to set up the ETivoServer using these DivX profiles? I read through the installation notes of ETivoWeb and it seems to only allow specifying a WME profile.

citivolus
11-11-2005, 08:45 AM
yes, you can choose the divx output from etivoweb, or etivoserver.

Are you trying to record autotivo shows, or manual shows? I think in either case there is a dropdown that lets you choose which encoding profile to use.

If the profile you want isn't in the dropdown, follow the setup details in bluewombles orignal post (or webpage) to create a new, mencoder divx profile using his plugin.

hope that helps :)
thanks, it does help....I'll look at etivoweb as soon as I get the etivoserver successfully working with large files (see next post)...

citivolus
11-11-2005, 09:01 AM
can we circle back to the "Could not run encoder. Error: Calling remote encoder failed with: Encoder failed: Mencoder did not get close to 100% completion! Aborting encoding." problem when encoding large files.
Encoder works fine for small files but returns this error message when encoding larger (1h-medium quality) files. See earlier post.

Any solutions/workarounds/tricky settings suggestions?

-Alex
I'm having the exact same problem when trying to convert shows from my HD Tivo. The recordings are in HD from SAT channels. Encryption is off. The ty files get pulled down by ETivo in their entirety. VSplit runs successfully. However, mencoder seems to not run the second pass and ETivo reports the above error. When I run the second pass command for mencoder manually, it runs successfully. Here is the xml file I am using and the error log reported. Is ETivo giving up on mencoder since it takes a while to run and killing it? I ran a few tests by saving 1 minute recordings from the same channels and they run through ETivo with this profile correctly.


<?xml version="1.0"?>

<Mencoder>
<!-- What flags should be passed to mencoder.exe? (on the first or only pass) -->
<Flags>-ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=1 -nosound -vf lavcdeint,scale=1024:576 -ffourcc DIVX</Flags>

<!-- What flags should be passed to mencoder.exe? (on the second pass... if there is none, then leave empty) -->
<Flags2>-ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:acodec=mp3:abitrate=128:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=2 -vf lavcdeint,scale=1024:576 -ffourcc DIVX</Flags2>

<!-- Where does mencoder.exe live? -->
<MencoderPath>C:\Program Files\Mplayer\mencoder.exe</MencoderPath>

<!-- Where does VSplit.exe live? -->
<VSplitPath>C:\Program Files\TyTool\VSplit9r16.exe</VSplitPath>
</Mencoder>




--------------------------------------------------------------------------------
Starting encoding process for {Family Guy}{2005-11-06}{PTV}{FOXE}
Loading the encoder file settings into an XML document, from 'E:\Video\Tivo\DivX_TwoPass.xml'
Getting stuff from the XML file...
Two pass encoding.
Got the following encoder flags: -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=1 -nosound -vf lavcdeint,scale=1024:576 -ffourcc DIVX
Got the following second pass flags: -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:acodec=mp3:abitrate=128:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=2 -vf lavcdeint,scale=1024:576 -ffourcc DIVX
Path to mencoder: C:\Program Files\Mplayer\mencoder.exe
Encoding From: E:\Video\Tivo\{Family Guy}{2005-11-06}{PTV}{FOXE}.show\{Family Guy}{2005-11-06}{PTV}{FOXE}.ty
Encoding to: E:\Video\Tivo\{Family Guy}{2005-11-06}{PTV}{FOXE}.show\{Family Guy}{2005-11-06}{PTV}{FOXE}_DivX_TwoPass.avi
Cleaning the stream using VSplit.exe...
Executing: "C:\Program Files\TyTool\VSplit9r16.exe" -m "E:\Video\Tivo\{Family Guy}{2005-11-06}{PTV}{FOXE}.show\{Family Guy}{2005-11-06}{PTV}{FOXE}.ty" temp dummy
Started flag set to true!
Process started!
Starting the encoding process...
Executing: C:\Program Files\Mplayer\mencoder.exe "E:\Video\Tivo\{Family Guy}{2005-11-06}{PTV}{FOXE}.show\temp.mpg" -o "E:\Video\Tivo\{Family Guy}{2005-11-06}{PTV}{FOXE}.show\{Family Guy}{2005-11-06}{PTV}{FOXE}_DivX_TwoPass.avi" -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=1 -nosound -vf lavcdeint,scale=1024:576 -ffourcc DIVX
Started flag set to true!
Process started!
-->MEncoder 1.0pre7-3.4.2 (C) 2000-2005 MPlayer Team
-->CPU: Intel Pentium 4/Xeon/Celeron Foster (Family: 8, Stepping: 9)
-->Detected cache-line size is 64 bytes
-->CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
-->Compiled with runtime CPU detection - WARNING - this is not optimal!
-->To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
-->success: format: 0 data: 0x0 - 0x0
-->MPEG-PS file format detected.
-->VIDEO: MPEG2 1280x720 (aspect 3) 59.940 fps 65000.0 kbps (8125.0 kbyte/s)
-->[V] filefmt:2 fourcc:0x10000002 size:1280x720 fps:59.94 ftime:=0.0167
-->Opening video filter: [expand osd=1]
-->Expand: -1 x -1, -1 ; -1 (-1=autodetect) osd: 1
-->Opening video filter: [scale w=1024 h=576]
-->Opening video filter: [lavcdeint]
-->==========================================================================
-->Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
-->VDec: vo config request - 1280 x 720 (preferred csp: Mpeg PES)
-->Could not find matching colorspace - retrying with -vf scale...
-->Opening video filter: [scale]
-->VDecoder init failed :(
-->Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
-->Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG-1 or 2 (libmpeg2))
-->==========================================================================
-->Forcing output fourcc to 58564944 [DIVX]
-->Writing AVI header...
-->ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
-->VDec: vo config request - 1280 x 720 (preferred csp: Planar YV12)
-->VDec: using Planar YV12 as output csp (no 0)
-->Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
-->SwScaler: reducing / aligning filtersize 6 -> 8
-->SwScaler: reducing / aligning filtersize 6 -> 8
-->SwScaler: reducing / aligning filtersize 6 -> 5
-->SwScaler: reducing / aligning filtersize 6 -> 5
-->
-->SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2
-->videocodec: libavcodec (1024x576 fourcc=58564944 [DIVX])
-->High quality encoding selected (non real time)!
-->ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
-->
-->Flushing video frames
-->
-->Writing AVI index...
-->Fixing AVI header...
-->ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
-->
-->Video stream: 1000.627 kbit/s (125078 bps) size: 225673122 bytes 1804.254 secs 108148 frames

bluewomble
11-11-2005, 09:12 AM
I'm having the exact same problem when trying to convert shows from my HD Tivo. The recordings are in HD from SAT channels. Encryption is off. The ty files get pulled down by ETivo in their entirety. VSplit runs successfully. However, mencoder seems to not run the second pass and ETivo reports the above error. When I run the second pass command for mencoder manually, it runs successfully. Here is the xml file I am using and the error log reported. Is ETivo giving up on mencoder since it takes a while to run and killing it? I ran a few tests by saving 1 minute recordings from the same channels and they run through ETivo with this profile correctly.


<?xml version="1.0"?>

<Mencoder>
<!-- What flags should be passed to mencoder.exe? (on the first or only pass) -->
<Flags>-ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=1 -nosound -vf lavcdeint,scale=1024:576 -ffourcc DIVX</Flags>

<!-- What flags should be passed to mencoder.exe? (on the second pass... if there is none, then leave empty) -->
<Flags2>-ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:acodec=mp3:abitrate=128:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=2 -vf lavcdeint,scale=1024:576 -ffourcc DIVX</Flags2>

<!-- Where does mencoder.exe live? -->
<MencoderPath>C:\Program Files\Mplayer\mencoder.exe</MencoderPath>

<!-- Where does VSplit.exe live? -->
<VSplitPath>C:\Program Files\TyTool\VSplit9r16.exe</VSplitPath>
</Mencoder>




--------------------------------------------------------------------------------
Starting encoding process for {Family Guy}{2005-11-06}{PTV}{FOXE}
Loading the encoder file settings into an XML document, from 'E:\Video\Tivo\DivX_TwoPass.xml'
Getting stuff from the XML file...
Two pass encoding.
Got the following encoder flags: -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=1 -nosound -vf lavcdeint,scale=1024:576 -ffourcc DIVX
Got the following second pass flags: -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:acodec=mp3:abitrate=128:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=2 -vf lavcdeint,scale=1024:576 -ffourcc DIVX
Path to mencoder: C:\Program Files\Mplayer\mencoder.exe
Encoding From: E:\Video\Tivo\{Family Guy}{2005-11-06}{PTV}{FOXE}.show\{Family Guy}{2005-11-06}{PTV}{FOXE}.ty
Encoding to: E:\Video\Tivo\{Family Guy}{2005-11-06}{PTV}{FOXE}.show\{Family Guy}{2005-11-06}{PTV}{FOXE}_DivX_TwoPass.avi
Cleaning the stream using VSplit.exe...
Executing: "C:\Program Files\TyTool\VSplit9r16.exe" -m "E:\Video\Tivo\{Family Guy}{2005-11-06}{PTV}{FOXE}.show\{Family Guy}{2005-11-06}{PTV}{FOXE}.ty" temp dummy
Started flag set to true!
Process started!
Starting the encoding process...
Executing: C:\Program Files\Mplayer\mencoder.exe "E:\Video\Tivo\{Family Guy}{2005-11-06}{PTV}{FOXE}.show\temp.mpg" -o "E:\Video\Tivo\{Family Guy}{2005-11-06}{PTV}{FOXE}.show\{Family Guy}{2005-11-06}{PTV}{FOXE}_DivX_TwoPass.avi" -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=1 -nosound -vf lavcdeint,scale=1024:576 -ffourcc DIVX
Started flag set to true!
Process started!
-->MEncoder 1.0pre7-3.4.2 (C) 2000-2005 MPlayer Team
-->CPU: Intel Pentium 4/Xeon/Celeron Foster (Family: 8, Stepping: 9)
-->Detected cache-line size is 64 bytes
-->CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
-->Compiled with runtime CPU detection - WARNING - this is not optimal!
-->To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
-->success: format: 0 data: 0x0 - 0x0
-->MPEG-PS file format detected.
-->VIDEO: MPEG2 1280x720 (aspect 3) 59.940 fps 65000.0 kbps (8125.0 kbyte/s)
-->[V] filefmt:2 fourcc:0x10000002 size:1280x720 fps:59.94 ftime:=0.0167
-->Opening video filter: [expand osd=1]
-->Expand: -1 x -1, -1 ; -1 (-1=autodetect) osd: 1
-->Opening video filter: [scale w=1024 h=576]
-->Opening video filter: [lavcdeint]
-->==========================================================================
-->Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
-->VDec: vo config request - 1280 x 720 (preferred csp: Mpeg PES)
-->Could not find matching colorspace - retrying with -vf scale...
-->Opening video filter: [scale]
-->VDecoder init failed :(
-->Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
-->Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG-1 or 2 (libmpeg2))
-->==========================================================================
-->Forcing output fourcc to 58564944 [DIVX]
-->Writing AVI header...
-->ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
-->VDec: vo config request - 1280 x 720 (preferred csp: Planar YV12)
-->VDec: using Planar YV12 as output csp (no 0)
-->Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
-->SwScaler: reducing / aligning filtersize 6 -> 8
-->SwScaler: reducing / aligning filtersize 6 -> 8
-->SwScaler: reducing / aligning filtersize 6 -> 5
-->SwScaler: reducing / aligning filtersize 6 -> 5
-->
-->SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2
-->videocodec: libavcodec (1024x576 fourcc=58564944 [DIVX])
-->High quality encoding selected (non real time)!
-->ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
-->
-->Flushing video frames
-->
-->Writing AVI index...
-->Fixing AVI header...
-->ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
-->
-->Video stream: 1000.627 kbit/s (125078 bps) size: 225673122 bytes 1804.254 secs 108148 frames



Hmmm... odd. Perhaps the addin is being a little too paranoid -- as mencoder reports it's progress on stdout, the addin expects mencoder to report something close to 100% complete at the end... if it doesn't it is logged as a failure...

Hopefully I'll get round to writing the next version at the weekend -- this will be more generic and won't include such specific checks in it anyway.

citivolus
11-11-2005, 09:15 AM
Hmmm... odd. Perhaps the addin is being a little too paranoid -- as mencoder reports it's progress on stdout, the addin expects mencoder to report something close to 100% complete at the end... if it doesn't it is logged as a failure...

Hopefully I'll get round to writing the next version at the weekend -- this will be more generic and won't include such specific checks in it anyway.
thanks, although I wonder if it's an ETivo problem and not an addin problem as it seems that the second pass of mencoder isn't being called...?

Spydertech
11-11-2005, 09:41 AM
no, I am using the DivX Encoder plug-in for ETivo. I was just wondering if there's any way to access this through the ETivoWeb module. If I'm missing something, please provide a link...

thanks.

Oops.. I misunderstood the post - after a re-read, I understand...

As you have already heard - the answer is yes. If the addin is properly installed - and you have the .xml profiles loaded in EtivoServer - they show up as a drop down menu in ETivoWeb. You can choose whichever profile you want from the drop down for each AutoTivo setup, and each manual recording.


Spydertech

Waruwaru
11-11-2005, 01:58 PM
Hmmm... odd. Perhaps the addin is being a little too paranoid -- as mencoder reports it's progress on stdout, the addin expects mencoder to report something close to 100% complete at the end... if it doesn't it is logged as a failure...

I noticed that if you set your mencoder setting to only process part of the file, you also get the same error even though mencoder completed correctly. Maybe only return code should be checked, not the progress number.

bluewomble
11-11-2005, 08:31 PM
thanks, although I wonder if it's an ETivo problem and not an addin problem as it seems that the second pass of mencoder isn't being called...?
No, I'm pretty sure it's a problem with the addin... I'll need to tinker with it.

bluewomble
11-11-2005, 08:31 PM
I noticed that if you set your mencoder setting to only process part of the file, you also get the same error even though mencoder completed correctly. Maybe only return code should be checked, not the progress number.
Fair point... I'll just check the return code in the next version.

citivolus
11-12-2005, 01:28 PM
No, I'm pretty sure it's a problem with the addin... I'll need to tinker with it.
I did another test last night where I created a .bat file to run the mencoder steps for two-pass encoding for two full 30 minute shows pulled from my HDTivo. I ran vsplit manually, then ran the .bat file. Both ran to completion and the resulting files play just fine. I guess this confirms that there must be an issue with the addin. Please let me know if there's anything you'd like me to test. Thanks for your help!


d:\working\mplayer\mencoder.exe temp.mpg -o fam.avi -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=1 -nosound -vf lavcdeint,scale=1024:576 -ffourcc DIVX
d:\working\mplayer\mencoder.exe temp.mpg -o fam.avi -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:acodec=mp3:abitrate=128:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=2 -vf lavcdeint,scale=1024:576 -ffourcc DIVX


d:\working\mplayer\mencoder.exe will.mpg -o willandgrace.avi -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=1 -nosound -vf lavcdeint,scale=1024:576 -ffourcc DIVX
d:\working\mplayer\mencoder.exe will.mpg -o willandgrace.avi -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:acodec=mp3:abitrate=128:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=2 -vf lavcdeint,scale=1024:576 -ffourcc DIVX

bluewomble
11-12-2005, 01:58 PM
I did another test last night where I created a .bat file to run the mencoder steps for two-pass encoding for two full 30 minute shows pulled from my HDTivo. I ran vsplit manually, then ran the .bat file. Both ran to completion and the resulting files play just fine. I guess this confirms that there must be an issue with the addin. Please let me know if there's anything you'd like me to test. Thanks for your help!


d:\working\mplayer\mencoder.exe temp.mpg -o fam.avi -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=1 -nosound -vf lavcdeint,scale=1024:576 -ffourcc DIVX
d:\working\mplayer\mencoder.exe temp.mpg -o fam.avi -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:acodec=mp3:abitrate=128:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=2 -vf lavcdeint,scale=1024:576 -ffourcc DIVX


d:\working\mplayer\mencoder.exe will.mpg -o willandgrace.avi -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=1 -nosound -vf lavcdeint,scale=1024:576 -ffourcc DIVX
d:\working\mplayer\mencoder.exe will.mpg -o willandgrace.avi -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:acodec=mp3:abitrate=128:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=2 -vf lavcdeint,scale=1024:576 -ffourcc DIVX




Thanks for dong the testing... I guess the addin must be running out of stack space of something... I'll try to replicate the problem...
Cheers,
Ash.

artdent002
11-21-2005, 09:16 PM
I'm trying to capture video that is archive quality and will play in a standalone player that handles mpeg4 (incl divx)... And so far I'm not thrilled with anything I've tried. I've also tried analyzing my files a number of ways (best analyses are with DRF Analyzer: http://www.geocities.com/analyzerDRF), but still can't figure out why my results are poor... Bottom line is that the video quality is lousy considering the size of the files.

The best results I've had so far have been using the xvid codec that's included in one of the later versions of mplayer (MPlayer-mingw32-dev-CVS-050928.zip) - I think the link was in a prior post.


<?xml version="1.0"?>

<Mencoder>
<!-- What flags should be passed to mencoder.exe? (on the first or only pass) -->
<Flags>-nosound -ovc xvid -xvidencopts pass=1:vhq=0:turbo </Flags>

<!-- What flags should be passed to mencoder.exe? (on the second pass... if there is none, then leave empty) -->
<Flags2>-oac mp3lame -lameopts mode=1:abr:br=128:vol=0 -ovc xvid -xvidencopts pass=2:vhq=4:chroma_me:trellis:max_key_interval=500:bitrate=800 -vf scale=480:352</Flags2>

<!-- Where does mencoder.exe live? -->
<MencoderPath>c:\Program Files\Mplayer\mencoder.exe</MencoderPath>

<!-- Where does VSplit.exe live? -->
<VSplitPath>c:\Program Files\TyTool9r18\VSplit9r16.exe</VSplitPath>
</Mencoder>

I have a suspicion that the problem might have to do with the quality when you try to compress interlaced video, but despite hours of surfing and reading I haven't found anything that really helps me understand the best fix for this that won't leave me with out-of-sync audio or big filesizes. My goal is to squeeze a 1 hr show down to 350-400 megs and still have something watchable.

Anybody else finding anything that works? Anybody know where I can read more on interlacing? Or a better forum (or thread) for posting a question on using mencoder to compress files from Tivo?

Thanks

yagey
11-21-2005, 09:34 PM
Can you give us some idea of what the player is capable of? For example, what format's does it support? processor speed? screen resolution? frames per second?

For comparison, I compress 1hr shows down to ~120MB for use with a 320x320 resolution palm. The quality is really very good and quite watchable. This uses a bitrate of 248.

Spydertech
11-22-2005, 09:53 AM
I'm trying to capture video that is archive quality and will play in a standalone player that handles mpeg4 (incl divx)... And so far I'm not thrilled with anything I've tried. I've also tried analyzing my files a number of ways (best analyses are with DRF Analyzer: http://www.geocities.com/analyzerDRF), but still can't figure out why my results are poor... Bottom line is that the video quality is lousy considering the size of the files.

The best results I've had so far have been using the xvid codec that's included in one of the later versions of mplayer (MPlayer-mingw32-dev-CVS-050928.zip) - I think the link was in a prior post.


<?xml version="1.0"?>

<Mencoder>
<!-- What flags should be passed to mencoder.exe? (on the first or only pass) -->
<Flags>-nosound -ovc xvid -xvidencopts pass=1:vhq=0:turbo </Flags>

<!-- What flags should be passed to mencoder.exe? (on the second pass... if there is none, then leave empty) -->
<Flags2>-oac mp3lame -lameopts mode=1:abr:br=128:vol=0 -ovc xvid -xvidencopts pass=2:vhq=4:chroma_me:trellis:max_key_interval=500:bitrate=800 -vf scale=480:352</Flags2>

<!-- Where does mencoder.exe live? -->
<MencoderPath>c:\Program Files\Mplayer\mencoder.exe</MencoderPath>

<!-- Where does VSplit.exe live? -->
<VSplitPath>c:\Program Files\TyTool9r18\VSplit9r16.exe</VSplitPath>
</Mencoder>

I have a suspicion that the problem might have to do with the quality when you try to compress interlaced video, but despite hours of surfing and reading I haven't found anything that really helps me understand the best fix for this that won't leave me with out-of-sync audio or big filesizes. My goal is to squeeze a 1 hr show down to 350-400 megs and still have something watchable.

Anybody else finding anything that works? Anybody know where I can read more on interlacing? Or a better forum (or thread) for posting a question on using mencoder to compress files from Tivo?

Thanks

The settings I posted earlier work great for me (have you tried them?).. And does pretty much what you want. A 1 hour show is compressed to 350-450 megs approximately. I was having the a/v synch issue with divx - but I wasn't happy with the xvid output. I just used someone elses post (from earlier in the thread) and tweaked around with it. This one uses lame audio - and that fixed my audio synch issues...

Spydertech

quixand
11-24-2005, 11:37 AM
I too would like a better way to archive my recordings.

The Divx archive looks nothing like Tivos native encoding, and looks VERY pixelly.

And the audio synch issues. Anyone have a better one they can post?

Thanks

citivolus
11-28-2005, 01:00 AM
Thanks for dong the testing... I guess the addin must be running out of stack space of something... I'll try to replicate the problem...
Cheers,
Ash.
just checking to see if there's any update?

thanks!

bluewomble
11-28-2005, 06:09 AM
just checking to see if there's any update?

thanks!
Sorry... I've been really busy recently and I just haven't had a chance to look at it... hopfully I'll get round to it at some point... Of course the source is all available at my website, so if anyone else fancies playing with it, they are more than welcome... all I ask is that any changes get mailed to me so they can get merged in with my version...

cdma
12-13-2005, 09:43 PM
Thanks for dong the testing... I guess the addin must be running out of stack space of something... I'll try to replicate the problem...
Cheers,
Ash.
I am also having the same issue with big files. A good example is Lord of the Rings. Anything that gets close to that size just does not make it. I guess I will have to find something else to decode those huge field.

mebgoin
01-13-2006, 09:24 AM
I have tried everything I can imagine to try to get this DivX encoding to work. I have uninstalled and reinstalled etivoserver multiple times, as well as trying multiple versions of mencoder. I even went so far as to wipe the etivoserver directory completely clean (deleting old settings.xml files) and starting from scratch. Despite all this I still end up with the following error whenever I try to encode something using the DivX plugin:


09:18:00 - Info: QueueItem: Setting Encoding on:{The Simpsons}{1993-10-14}{Homer Goes to College}{WRGT}
09:18:00 - Error: WM9Encoder: Running the encoder failed with the following information: System.Xml.XmlException: The data at the root level is invalid. Line 1, position 39.
at System.Xml.XmlTextReader.ParseRoot()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlValidatingReader.ReadWithCollectTextToken()
at System.Xml.XmlValidatingReader.Read()
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at MencoderAddin.Mencoder.InternalRunEncoder()
at EtiVo.Service.Addin.Encoder.RunEncoderJob(Object obj)
09:18:20 - Info: QueueItem: Setting Failure on:{The Simpsons}{1993-10-14}{Homer Goes to College}{WRGT}
09:18:20 - Info: Queue: Dequeing from Encoding:{The Simpsons}{1993-10-14}{Homer Goes to College}{WRGT}

FWIW this is on a Win2K3 server, etivoserver version 1.0.1924.2, and it will encode WMV's all day long just fine. But I really want to get divx working so that it will get along better with tivoserver.

Any help at all would be appreciated. Thanks!

M.E.

bluewomble
01-13-2006, 10:21 AM
I have tried everything I can imagine to try to get this DivX encoding to work. I have uninstalled and reinstalled etivoserver multiple times, as well as trying multiple versions of mencoder. I even went so far as to wipe the etivoserver directory completely clean (deleting old settings.xml files) and starting from scratch. Despite all this I still end up with the following error whenever I try to encode something using the DivX plugin:


09:18:00 - Info: QueueItem: Setting Encoding on:{The Simpsons}{1993-10-14}{Homer Goes to College}{WRGT}
09:18:00 - Error: WM9Encoder: Running the encoder failed with the following information: System.Xml.XmlException: The data at the root level is invalid. Line 1, position 39.
at System.Xml.XmlTextReader.ParseRoot()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlValidatingReader.ReadWithCollectTextToken()
at System.Xml.XmlValidatingReader.Read()
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at MencoderAddin.Mencoder.InternalRunEncoder()
at EtiVo.Service.Addin.Encoder.RunEncoderJob(Object obj)
09:18:20 - Info: QueueItem: Setting Failure on:{The Simpsons}{1993-10-14}{Homer Goes to College}{WRGT}
09:18:20 - Info: Queue: Dequeing from Encoding:{The Simpsons}{1993-10-14}{Homer Goes to College}{WRGT}

FWIW this is on a Win2K3 server, etivoserver version 1.0.1924.2, and it will encode WMV's all day long just fine. But I really want to get divx working so that it will get along better with tivoserver.

Any help at all would be appreciated. Thanks!

M.E.

I'm not sure if etivo has changed or not between 1.0.924.0 and 1.0.1924.2, but I have been using the 1.0.1924.0 version myself... I know Shahar was going to change something in a new version of etivo, but I simply haven't had a chnace to do any beta testing. However... I suspect this is not causing your problem here...

It looks as though the Mencoder addin is _not_ being called -- your log file mentions the WME9 encoder, which shouldn;t be used if the DivX plugin is being loaded... Can you check your settings in the etivo configuration program to make sure you have the "MencoderAddin.Mencoder,MencoderAddin.dll"
string in your encoder to use dialog. Also check that youe MencoderAddin.dll is in the correct location.

Detailed instructions are here:
http://www.bluewomble.co.uk/mencoder

Good luck,
Ash.

mebgoin
01-13-2006, 12:22 PM
It looks as though the Mencoder addin is _not_ being called -- your log file mentions the WME9 encoder, which shouldn;t be used if the DivX plugin is being loaded... Can you check your settings in the etivo configuration program to make sure you have the "MencoderAddin.Mencoder,MencoderAddin.dll"
string in your encoder to use dialog. Also check that youe MencoderAddin.dll is in the correct location.

The following are the lines from my Settings.Xml file referring to the encoder:

<encoder type="MencoderAddin.Mencoder,MencoderAddin.dll">
<add key="encoderClass" value="MencoderAddin.Mencoder,MencoderAddin.dll" />
</encoder>

I've read through (and followed) the posted instructions on the website, as well as followed every suggestion I've read in this thread and elsewhere. I agree it appears that there is a problem with calling the correct encoder because WM9encoder appears right before the error ... I have no idea where it would be pulling that from though ... Thanks for trying to help, I'm going to keep working at it and I'll post back if I come up with anything.

Matt

bluewomble
01-16-2006, 06:44 AM
In that case I'd try to use the same version of eTiVo as I'm using -- the 1924.0 version...

If that doesn't work, then I'd really make sure you've checked and double checked all the directories, locations, etc.

Let us know how you get on.
Cheers,
Ash.

mebgoin
01-17-2006, 03:34 PM
Progress report ...

I've tried the older version of etivo (1924.0) and still had no luck. I've tried using different versions (old and new) of mplayer/mencoder. I even went so far as to install etivo on one of my other PCs running XP in case it was an incompatibility with Server2k3. I still get the same exact error line. I've checked all of my settings both in the etivo front-end and in the settings.xml file. I'm beginning to bang my head against the wall and just forget about the whole mess.

If anyone has ANY suggestions that may be of use, please, let's hear them.

rbreding
02-05-2006, 04:31 PM
This is the mencoder options I am using to avoid the audio/video sync issue. Also added some flags to scale to NTSC resolution and de-interlace. Still trying to find a good size/quality balance for myself though.

Single Pass Config:

<?xml version="1.0"?>

<Mencoder>
<!-- What flags should be passed to mencoder.exe? (on the first or only pass) -->
<Flags>-ofps 23.976 -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:acodec=mp3:abitrate=128:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3 -vf lavcdeint,crop=:464::,expand=0:16:0:0,scale=::::::ntsc</Flags>

<!-- What flags should be passed to mencoder.exe? (on the second pass... if there is none, then leave empty) -->
<Flags2></Flags2>

<!-- Where does mencoder.exe live? -->
<MencoderPath>C:\Program Files\Mplayer\mencoder.exe</MencoderPath>

<!-- Where does VSplit.exe live? -->
<VSplitPath>C:\Program Files\TyTool9r18\VSplit9r16.exe</VSplitPath>
</Mencoder>


Double Pass Config:

<?xml version="1.0"?>

<Mencoder>
<!-- What flags should be passed to mencoder.exe? (on the first or only pass) -->
<Flags>-ofps 23.976 -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=1 -nosound -vf lavcdeint,crop=:464::,expand=0:16:0:0,scale=::::::ntsc</Flags>

<!-- What flags should be passed to mencoder.exe? (on the second pass... if there is none, then leave empty) -->
<Flags2>-ofps 23.976 -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:acodec=mp3:abitrate=128:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=2 -vf lavcdeint,crop=:464::,expand=0:16:0:0,scale=::::::ntsc</Flags2>

<!-- Where does mencoder.exe live? -->
<MencoderPath>C:\Program Files\Mplayer\mencoder.exe</MencoderPath>

<!-- Where does VSplit.exe live? -->
<VSplitPath>C:\Program Files\TyTool9r18\VSplit9r16.exe</VSplitPath>
</Mencoder>


I think I might have found a problem with the Etivo or the encoder though. My encoding seems to get stuck while it is executing Vsplit with the following command



"C:\Program Files\TyTool9r18\VSplit9r16.exe" -m "C:\EtiVo\{Joan of Arcadia}{2005-03-04}{Secret Service}{SF5}.show\{Joan of Arcadia}{2005-03-04}{Secret Service}{S.ty" temp dummy


VSplit will generate temp.mpg partially (up to 182+ megs), then the process "hangs" (checked via Task Manager). If I stop Etivo service, then VSplit will happily resume itself and finish muxing temp.mpg. I also tried to run the command manually from DOS, and it completes without any issues. I have seeing stuff like this happen when a child process (vsplit in this case) generates STDOUT, and fill up some buffer. When I get a chance, I will test out this theory.

EDIT: Added my new config file settings
EDIT: Updated settings with better de-interlace settings



I had these same problems as described with the posted files, however using the NoStdOutOrErrMencoderAddin.zip DLL fixed the problem

One additional question. Is mencoder capable of using more than one processor ? The server that I am using as my remote processor has Dual Procs. When I encoded using the WMP profiles it used dual processors but mencoder only uses 1.

Thanks

arthur
02-05-2006, 10:06 PM
I had these same problems as described with the posted files, however using the NoStdOutOrErrMencoderAddin.zip DLL fixed the problem

Do you mind posting a link or here the NoStdOutOrErrMencoderAddin.zip, I couldn't find it anywhere.

Thanks

rbreding
02-06-2006, 01:05 AM
Do you mind posting a link or here the NoStdOutOrErrMencoderAddin.zip, I couldn't find it anywhere.

Thanks


Odd....its a couple pages back. Sure you looked ?

arthur
02-06-2006, 10:58 PM
I didn't look, I searched,
Turns out that the attachments don't show up in the search results.
I even googled.

Thanks I found it now that you specified where to look, and it solved my problem.

Thanks again.

moneyshotz
02-19-2006, 04:32 PM
does anyone have a PSP profile for this plugin? I'm not sure what I need to change. I already have the DIVX and XVID working. Now I just want to be able to directly convert to psp.

yagey
02-20-2006, 01:26 PM
I don't know anything about hacking the PSP, but if there is a way to get it play divx or xvid files, you can just adjust the mencoder command line to match the psp screen size etc.

moneyshotz
02-20-2006, 05:42 PM
The psp doesnt play divx or xvid. It just plays mp4 files just like the ipod video. So I guess if anyone has a profile for the ipod video it should also work.

moneyshotz
02-21-2006, 02:47 AM
Not sure if this helps any or if ffmpeg is related to mencoder...


ffmpeg -y -i cnn.mpg -title "cnn" -timestamp "2005-04-08 03:12:36" -bitexact -vcodec
xvid -s 320x240 -r 29.97 -b 1500 -acodec aac -ac 2 -ar 24000 -ab 64 -f psp -muxvb 768
M4V80113.mp4

odysseus
02-23-2006, 01:27 AM
Okay, discovered EtiVo/mencoder, found it was a much better alternative to my previous manual technique (http://www.afterdawn.com/guides/archive/dvd2divx_anamorphic.cfm). Unfortunately I seem to be running into one of those problems that is asked so much that I can pretty much describe it by number (http://slashdot.org/comments.pl?sid=143628&cid=12039554) (is this in a FAQ somewhere?)

I have installed the mingw32 version of mencoder, dated 9/28/2005. Encoding work wonderfully if I keep my source file under 2 GB, otherwise my issues are described by the numbers 33 (http://www.dealdatabase.com/forum/showpost.php?p=237873&postcount=33) and 95 (http://www.dealdatabase.com/forum/showpost.php?p=240121&postcount=95)

So, I have installed the Cygwin version of mencoder, dated 1/13/2005. (actually installed it first, but the lack of a manpage prevented me from constructing a command line). Anyhow, my problems here are described by the numbers 26 (http://www.dealdatabase.com/forum/showpost.php?p=237708&postcount=26) and 55 (http://www.dealdatabase.com/forum/showpost.php?p=238551&postcount=55)

I'm guessing that my only workaround at the moment is to compile my own version of mencoder, but someone else was trying to do this (http://www.dealdatabase.com/forum/showpost.php?p=237990&postcount=39) a couple years ago. Has there been any progress on this at all? Have I missed any obvious solutions?

odysseus
02-27-2006, 06:14 AM
Okay, more information here...

I am having problems with the mingw32 version of mencoder. However, the files appear to be written properly (as far as my testing has gone up to this point), but the progress messages are rather messed up. The following are the progress messages for the end of a "pass 1" encoding similar to what I have instructed the plugin to use:


1 duplicate frame(s)!
Pos:7084.0s 207138f ( 0%) 37fps Trem: 0min 0mb A-V:0.000 [1801:0]
1 duplicate frame(s)!
Pos:7084.2s 207143f ( 0%) 37fps Trem: 0min 0mb A-V:0.000 [1801:0]
1 duplicate frame(s)!
Pos:7085.4s 207177f ( 0%) 37fps Trem: 0min 0mb A-V:0.000 [1802:0]
1 duplicate frame(s)!
Pos:7112.9s 207999f ( 0%) 37fps Trem: 0min 0mb A-V:0.000 [1806:0]
1 duplicate frame(s)!
Pos:7113.1s 208004f ( 0%) 37fps Trem: 0min 0mb A-V:0.000 [1806:0]
1 duplicate frame(s)!
Pos:7113.2s 208006f ( 0%) 37fps Trem: 0min 0mb A-V:0.000 [1806:0]
1 duplicate frame(s)!
Pos:7118.4s 208161f ( 0%) 37fps Trem: 0min 0mb A-V:0.000 [1807:0]
1 duplicate frame(s)!
Pos:7198.7s 210568f ( 0%) 37fps Trem: 0min 0mb A-V:0.000 [1811:0]
Flushing video frames

Writing AVI index...
Fixing AVI header...
ODML: vprp aspect is 4:3.

Video stream: 1811.402 kbit/s (226425 B/s) size: 1629987980 bytes 7198.792 secs 210568 frames

The source file is 2.73 GB (2,935,868,000 bytes)
The destination file is 1.52 GB (1,635,964,008 bytes)

This appears not to be a large file issue but an unexpected integer overflow when writing progress messages. I cannot use the cygwin version of mencoder as described above as it is missing the XVID codec.


c:mencoder -vc mpeg12, -vf denoise3d,kerndeint,softskip,scale -fps 30000/1001 -mc 0 -nosound -ovc xvid -xvidencopts pass=1:vhq=0:turbo:bitrate=800 "24 - ''Day 5 700AM-800AMDay 5 800AM-900AM'' (Recorded Jan 15, 2006, KCPQ).mpg" -o pass1.avi

Is there some way that I can ignore or replace the completion detection for this file? I know that this has been mentioned earlier in the thread. I'm assuming that I could probably yank source if necessary, but would like to avoid that mess if possible. Any obvious solutions out there that I am missing? Thank you for all your work on this plugin :)

shoppedude
02-28-2006, 11:21 PM
Ash,

I have recently acquired and hacked an HR10-250. VSplit does not like to process the OTA HD programs I rip off of the unit, but TyTools will if I manually select Multiplex Files. However, TyTools does not appear to have a command line option, and JDiner has not released a stand-alone VSplit updated with the 10r4 functionality. Is there any alternative command line options for VSplit or another command-line capable program in its stead that you are aware of? I have used ETiVo for quite a while now and I recently switched over to your divx plug-in. My DVD player (LG-514) plays divx files (and up-converts to 1080i) and I am absolutely in love with this option. I dread losing the functionality I've had available in the past.

Thanks,
Lee

santa8claws
03-01-2006, 12:21 AM
I've put together a somewhat "smart" DOS .bat script to replace the vsplit call for the divx encoder plugin to eTivo. This script relies on the tools "hdemux" and "mplex" first to split a .TY file into the audio/video portions, and then rejoin (remux) them back into a complete mpeg.

Read about hdemux here:
http://www.dealdatabase.com/forum/showthread.php?t=36322
And get the latest attachment:
http://www.dealdatabase.com/forum/showpost.php?p=241815&postcount=106

Get mplex here:
http://www.dealdatabase.com/forum/showpost.php?p=192328&postcount=52

And here's my VSPLIT.BAT script to use in the .XML file to replace VSPLIT.EXE

Hope this helps those with HD Tivo's (or like my Toshiba DVDR unit) that gives you .TY files that don't work with TyTool's Vsplit.

Good Luck!
-- S8C

odysseus
03-04-2006, 01:46 AM
Well, I did yank source the other day and have been playing with it. I managed to get the plugin to work on transcoding a large file from the "Test Plugin" menu, but for one reason or another I haven't actually gotten the EtiVo server to complete a job yet. Let's hope tonight's request goes through without error...

The logic is currently to detect if there have been more than 1000s of footage transcoded with 0% completion and an estimated size of 0mb. I'm not satisfied by this logic yet as I did have mencoder do an early exit during tests (at 500s, I was lucky). I'd like to include the "encoding summary" that seems to appear at the bottom of the mencoder output on successful completion.

Regarding your plans to make this more of a flexible utility, would leveraging the NAnt project help here?

odysseus
03-07-2006, 01:05 PM
Jeez, I seem to be posting a lot here...

Anyhow, here is the updated source file with the changes that I propose. This is against whatever version of the source was on the website when I downloaded it a week ago or so.

The "100%" check is bypassed if there has been more than 1000s processed with no estimated file size and 0% completion. I have also added a check for the "completion" message, and will throw an error if it is not displayed.

This has been working for my larger files, although I am exhibiting audio sync problems. I may load the files into VirtualDub to see if I can offset the audio later.

HUGE
03-13-2006, 05:49 PM
This is the mencoder options I am using to avoid the audio/video sync issue. Also added some flags to scale to NTSC resolution and de-interlace. Still trying to find a good size/quality balance for myself though.

Single Pass Config:

<?xml version="1.0"?>

<Mencoder>
<!-- What flags should be passed to mencoder.exe? (on the first or only pass) -->
<Flags>-ofps 23.976 -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:acodec=mp3:abitrate=128:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3 -vf lavcdeint,crop=:464::,expand=0:16:0:0,scale=::::::ntsc</Flags>

<!-- What flags should be passed to mencoder.exe? (on the second pass... if there is none, then leave empty) -->
<Flags2></Flags2>

<!-- Where does mencoder.exe live? -->
<MencoderPath>C:\Program Files\Mplayer\mencoder.exe</MencoderPath>

<!-- Where does VSplit.exe live? -->
<VSplitPath>C:\Program Files\TyTool9r18\VSplit9r16.exe</VSplitPath>
</Mencoder>


Double Pass Config:

<?xml version="1.0"?>

<Mencoder>
<!-- What flags should be passed to mencoder.exe? (on the first or only pass) -->
<Flags>-ofps 23.976 -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=1 -nosound -vf lavcdeint,crop=:464::,expand=0:16:0:0,scale=::::::ntsc</Flags>

<!-- What flags should be passed to mencoder.exe? (on the second pass... if there is none, then leave empty) -->
<Flags2>-ofps 23.976 -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=1000:acodec=mp3:abitrate=128:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=2 -vf lavcdeint,crop=:464::,expand=0:16:0:0,scale=::::::ntsc</Flags2>

<!-- Where does mencoder.exe live? -->
<MencoderPath>C:\Program Files\Mplayer\mencoder.exe</MencoderPath>

<!-- Where does VSplit.exe live? -->
<VSplitPath>C:\Program Files\TyTool9r18\VSplit9r16.exe</VSplitPath>
</Mencoder>


I think I might have found a problem with the Etivo or the encoder though. My encoding seems to get stuck while it is executing Vsplit with the following command



"C:\Program Files\TyTool9r18\VSplit9r16.exe" -m "C:\EtiVo\{Joan of Arcadia}{2005-03-04}{Secret Service}{SF5}.show\{Joan of Arcadia}{2005-03-04}{Secret Service}{S.ty" temp dummy


VSplit will generate temp.mpg partially (up to 182+ megs), then the process "hangs" (checked via Task Manager). If I stop Etivo service, then VSplit will happily resume itself and finish muxing temp.mpg. I also tried to run the command manually from DOS, and it completes without any issues. I have seeing stuff like this happen when a child process (vsplit in this case) generates STDOUT, and fill up some buffer. When I get a chance, I will test out this theory.

EDIT: Added my new config file settings
EDIT: Updated settings with better de-interlace settings



These configs seem to work great for me. What settings do I need to change to change the size of the output video? I want to make it a liitle smaller.

Thanks,


HUGE

twinc
03-24-2006, 08:52 PM
I don't use the lavc to encode my shows to xvid... but it should be something to do with scale=X,Y.

Try the following site:
http://f0rked.com/projects/simplerip

Just plug in the parameters you want... it'll help generate some of the mencoder settings.

yagey
03-25-2006, 12:43 AM
Jeez, I seem to be posting a lot here...

Anyhow, here is the updated source file with the changes that I propose. This is against whatever version of the source was on the website when I downloaded it a week ago or so.

The "100%" check is bypassed if there has been more than 1000s processed with no estimated file size and 0% completion. I have also added a check for the "completion" message, and will throw an error if it is not displayed.

This has been working for my larger files, although I am exhibiting audio sync problems. I may load the files into VirtualDub to see if I can offset the audio later.

sorry for my ignorance, but what is a .cs file?

odysseus
03-25-2006, 04:16 AM
sorry for my ignorance, but what is a .cs file?

Umm, I don't have much experience contributing to open-source projects here. The .cs file I uploaded contained the changes I made to the source code. I didn't want to accidentally cause a code split, assume development responsibility, or have to reassure people that I'm not distributing viruses. Was half expecting the head developer here to load it into his SourceSafe and declare that he already came up with a better answer...

Anyhow, it's getting close to a month and these changes have really made this plugin a lot more usable for me. Attached is the private build I have been using lately.

yagey
03-25-2006, 04:16 PM
You rock!! Thanks, this works perfectly. I just encoded a 2.8GB F1 grand prix ty down to 380MB palm format .avi.

thanks again for sharing!:D


Umm, I don't have much experience contributing to open-source projects here. The .cs file I uploaded contained the changes I made to the source code. I didn't want to accidentally cause a code split, assume development responsibility, or have to reassure people that I'm not distributing viruses. Was half expecting the head developer here to load it into his SourceSafe and declare that he already came up with a better answer...

Anyhow, it's getting close to a month and these changes have really made this plugin a lot more usable for me. Attached is the private build I have been using lately.

johns22
03-28-2006, 08:49 PM
I am using the newest beta version of etivo and the newer beta multiencoder. It uses mencoder just like the addin described in this thread. The issue I have with this addin and the newer addin is the CPU utilization by mencoder. I have used Divx and Xvid and it uses almost 100% CPU during the encode. I have a 2GHz Pentium 4 PC. The files come out great, but I can't use the computer at all during the encode.

Is this normal? Is there a way to set a lower priority for mencoder?

TIA!

odysseus
03-31-2006, 01:02 PM
I am using the newest beta version of etivo and the newer beta multiencoder. It uses mencoder just like the addin described in this thread. The issue I have with this addin and the newer addin is the CPU utilization by mencoder. I have used Divx and Xvid and it uses almost 100% CPU during the encode. I have a 2GHz Pentium 4 PC. The files come out great, but I can't use the computer at all during the encode.

Is this normal? Is there a way to set a lower priority for mencoder?


Umm, all my encoding happens at "low" priority (look in the Task Manager, Process tab, look for the priority of "mencoder.exe"). There is a checkbox in EtiVo (first "old" screenshot at http://prish.com/etivo/install_utility.htm) to "Encode at Idle priority" which affects this.

johns22
04-01-2006, 03:37 PM
I have that checked, but it still encodes using 99% CPU all the time.

THardie
04-06-2006, 10:23 PM
I updated MEncoder so it will work with ETivo's new plugin system. Drop me a PM if you want the source.

odysseus
04-10-2006, 04:23 AM
I have that checked, but it still encodes using 99% CPU all the time.

Is there a problem with this? The idea behind lowering the priority of the job is not so that it doesn't use all the CPU, but that it is less-likely to interfere with other jobs on your system.

Most applications on your system do not run all the time even when they are very busy. For instance, an application may need to have you enter some information in, or need to load something from the hard drive, or otherwise be waiting for something. This is different from mencoder, which uses a lot of computing power and very little (but some) hard drive activity and will take any CPU power it can handle.

If two applications of equal priority both want to use the CPU, then the computer tries its best to give both applications fairly equal access. However, if one of the applications is set at a lower priority, then that application will only get CPU time when the higher-priority application cannot use it. The higher priority application may still run a bit more slowly (when it is ready to run again, it may take a tiny amount of time to switch back to it), but it should be a lot better than if they were both being given an equal share.

The idea with "low priority" here is that the cpu power is given to the "important" applications, and then the spare power is given to mencoder, so that the cpu is always at 100% but that the system behaves as close to what it would behave as possible if it weren't running. This is the same concept used behind distributed.net, which has a similar answer to the same question (http://faq.distributed.net/cache/191.html).

You can see what priority is given to processes by looking at the Task Manager (ctrl-alt-del on xp machines). If you change to the "processes" tab, you should see a list of all the applications (both visible and hidden) running on the machine (you may need to check "show processes from all users"). If you choose View -> Select Columns from the menu and make sure "Base Priority" is checked, you will see a column for each of the processes that will mostly say "Normal". The mencoder line should say "Below Normal" or "Low". You should also be able to see the CPU power being given to mencoder at any one time.

As mentioned previously, there is still a possibility that some interference could occur though, I have found that I cannot use mencoder (even at the lowest CPU setting) while attempting to transfer anything using the TivoToGo from the TiVo, any access attempts by the TiVo time out until the encoding is complete.

johns22
04-10-2006, 03:12 PM
Thank you for the reply. I agree with your assessment that the CPU should balance between applications and give the higher priority program the power it needs, then any excess would go to mencoder for a total of 100% CPU usage. In my case, when mencoder is running, in lower priority, I can't use anything else. It basically shuts down the computer, except for mencoder. I can't surf the web, open documents, etc. Everything is in extreme slow motion because mencoder registers 99% CPU usage and doesn't give anything else to the other programs. It isn't a huge deal because I can encode at night and when I am at work, but it would be nice to be able to use the computer at the same time.

Thanks again.

artdent002
04-15-2006, 07:53 PM
It's taken a long time and a lot of messing around, but these settings produce video that looks very good on my Palm, never have out-of-sync problems, and takes about 230-250 meg per hour of DTivo video.

Thanks to Waruwaru for creating the settings I used as a starting point, to the creators of PocketDivXEncoder, whose log files offered some additional ideas, and to the "-harddup" filter that fixes all those d@mn dropped frames.

Kangaroo
04-25-2006, 05:59 PM
It's taken a long time and a lot of messing around, but these settings produce video that looks very good on my Palm, never have out-of-sync problems, and takes about 230-250 meg per hour of DTivo video.

Thanks to Waruwaru for creating the settings I used as a starting point, to the creators of PocketDivXEncoder, whose log files offered some additional ideas, and to the "-harddup" filter that fixes all those d@mn dropped frames.

artdent002,
not really having an idea what the settings mean, if I was to use this with a 320x240 screen (Vision M) and I wanted the crop the edges of the picture a bit, what do I need to change in your file? thanks

yagey
04-25-2006, 11:18 PM
It's taken a long time and a lot of messing around, but these settings produce video that looks very good on my Palm, never have out-of-sync problems, and takes about 230-250 meg per hour of DTivo video.

Thanks to Waruwaru for creating the settings I used as a starting point, to the creators of PocketDivXEncoder, whose log files offered some additional ideas, and to the "-harddup" filter that fixes all those d@mn dropped frames.

Interesting to compare your palm settings with mine, which I previously listed here http://www.dealdatabase.com/forum/showthread.php?p=238501#poststop

I agree that pocketdivxencoder rules :)

What is the screen resolution of your palm? your settings seem to be for 480x352, and I think your screen might be 320x320 in which case tcpmp is scaling and eating cpu.

also interesting that -harddup fixed your issues, it actually forces duplicate frames to be encoded, it might be that you are compensating for dropped frames by adding frames at the cost of filesize?

It also looks like your bitrate is almost twice mine, perhaps your palm has more power than mine, but 240 works pretty well for shows without a lot of movement (I'm working my way through STTNG right now and it looks pretty good)

Are you running tcpmp? if so, have you tried running the benchmark to see if your CPU is maxxing out?

I have a new version of pocketdivxencoder which I haven't tried yet, maybe it has some better settings available. LATHE is the non-free version which might be even better.

I greatly reduce the quality of the audio too, to 11000 as my palm only supports mono and I don't want to spend the CPU on it. I like your volnorm setting tho, I might try that.

sounds like I need to buy a more pimp palm :)

btw, I'm looking at streaming directly from a palm to a treo 700 (tcpmp only supports streaming on winCE currently) across the web :)

magrinds
05-18-2006, 12:44 AM
Etivo is great and I would really like to get the DIVX plugin working... but I am getting this error: "Could not run encoder. Error: Can't find an encoder that supports the DivX_Archive.xml profile file." Etivo is able to copy the files, but when it goes to launch the encoder, I get the error above in the queue status window... any thoughts?

TheDrizzle
05-20-2006, 12:16 AM
Hey everyone,
I have a series 2.5 tivo, and I really want to get the DivX/mencoder plugin to work. I know that its support with the 'tivoToGo' software is shaky at best. I read through the first few pages of this thread, and found the special 'testing' dll that does not call the tyShow stuff, which *should* work for tivotogo. However, I am having some trouble installing the plugin all together. My version of eTivo looks different then on the mencoder plugin instruction page. Instead of "change encoder", the only button available is "addins". I'm guessing this was a change to a later version of eTivo. Anyway, when I click the addins button, and click the next button to choose the mencoder DLL, I get the following error:

"This DLL does not contain any addins in it"

I thought this might have something to with me using the 'testing' special version I found here at the forums, so I tried the 'production' version from the mencoder-etivo-plugin web page, but got the same result. What am I missing? How do I incorporate the addin into etivo? The version of etivo i'm running is: 1.02304.6.

I aslo can't get the wmv encoding to work either, but thats a different story all together...

Thanks

jjsmd
05-28-2006, 11:48 AM
cant seem to figure this out.

I have the latest etivo with Divx Addin as well as Ipod addin all of them are encoding the videos without problems.


The etivo is configured to generate 15 preview images. On the default Wmv encoder I get 15 preview images

On the Ipod encoder I get a single preview image ( only 1)

and on the Divx addin encoder I get 15 preview images that are all black.

I can get the video playing that was encoded so the encoding is working but why are all preview images plain black? ( ir no video)

I tried re installing everything several times , but nothing seems to work?

Joe


jjsmd
View Public Profile
Send a private message to jjsmd
Send email to jjsmd
Find all posts by jjsmd
Add jjsmd to Your Buddy List

#1913 05-25-2006, 07:02 PM
jjsmd
Charter Member Join Date: Dec 2002
Posts: 73

In case this sheds any light on my problem, here is a part of the etivo log

12:20:28 - Info: Queue: Enqueuing on Encoding:{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD}
12:20:28 - Info: QueueItem: Setting Encoding on:{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD}
12:20:40 - Info: FtpFetcher: Setting FTP client to passive mode.
12:28:28 - Error: Queue: Could not set attributes on C:\EtiVo\{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD}.show\{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD.mov. Error was: System.ComponentModel.Win32Exception: Unknown error (0xc00d0026)
at EtiVo.Interop.MetaDataEditor.Open(String fileName)
at EtiVo.Service.QueueItem.RegenerateMetaData(String file, Boolean inferFromName) in d:\dev2600\src\etivo\EtiVoSrvDll\QueueItem.cs:line 744
at EtiVo.Service.EncodingQueue.SetAttributesOnFile(String file, QueueItem item) in d:\dev2600\src\etivo\EtiVoSrvDll\EncodingQueue.cs:line 137
12:28:28 - Info: QueueItem: Setting Encoded on:{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD}
12:28:28 - Info: Queue: Dequeing from Encoding:{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD}
12:28:28 - Info: Queue: Enqueuing on PreviewGenerator:{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD}
12:28:28 - Info: QueueItem: Setting GeneratingPreviews on:{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD}
12:28:34 - Error: Queue: Could not generate images for show {Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD}. Error was: System.Runtime.InteropServices.COMException (0x8004022E): Exception from HRESULT: 0x8004022E.
at QuartzTypeLib.FilgraphManagerClass.GetCurrentImage(Int32& pBufferSize, Int32& pDIBImage)
at EtiVo.Service.WmvImageGenerator.GeneratePictures(String fullDirectory, String fileName) in d:\dev2600\src\etivo\EtiVoSrvDll\WmvImageGenerator.cs:line 128
at EtiVo.Service.WmvImageGenerator.GeneratePictures() in d:\dev2600\src\etivo\EtiVoSrvDll\WmvImageGenerator.cs:line 68
at EtiVo.Service.PreviewGeneratorQueue.RunQueuedItem(QueueItem item) in d:\dev2600\src\etivo\EtiVoSrvDll\PreviewGeneratorQueue.cs:line 24
12:28:34 - Error: QueueItem: Failed to get MetaData from C:\EtiVo\{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD}.show\{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD.ty. Error was: System.ComponentModel.Win32Exception: Unknown error (0xc00d0026)
at EtiVo.Interop.MetaDataEditor.Open(String fileName)
at EtiVo.Service.VideoFile..ctor(String fileName, VideoFormat format, ShowInfo showInfo, Boolean loadMetadata) in d:\dev2600\src\etivo\EtiVoSrvDll\VideoFile.cs:line 31
12:28:34 - Info: QueueItem: Adding C:\EtiVo\{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD}.show\{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD.ty to the list of files that will be ignored when reading meta-data.
12:28:34 - Error: QueueItem: Failed to get MetaData from C:\EtiVo\{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD}.show\{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD.mov. Error was: System.ComponentModel.Win32Exception: Unknown error (0xc00d0026)
at EtiVo.Interop.MetaDataEditor.Open(String fileName)
at EtiVo.Service.VideoFile..ctor(String fileName, VideoFormat format, ShowInfo showInfo, Boolean loadMetadata) in d:\dev2600\src\etivo\EtiVoSrvDll\VideoFile.cs:line 31
12:28:34 - Info: QueueItem: Adding C:\EtiVo\{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD}.show\{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD.mov to the list of files that will be ignored when reading meta-data.
12:28:34 - Info: QueueItem: Setting Success on:{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD}
12:28:34 - Info: Queue: Dequeing from PreviewGenerator:{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD}
12:28:34 - Info: Queue: Enqueuing on Ready:{Good Eats}{2001-01-10}{Flat is Beautiful}{FOOD}
13:54:29 - Info: Queue: Enqueuing on Fetched:{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}
13:54:29 - Info: Queue: Dequeing from Pending:{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}
13:54:29 - Info: QueueItem: Running Fetch on:{Good Eats}{2004-02-11}{Fudge Factor}{FOOD}
13:54:29 - Info: Queue: Dequeing from Fetched:{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}
13:54:29 - Info: Queue: Enqueuing on Encoding:{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}
13:54:29 - Info: QueueItem: Setting Encoding on:{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}
13:54:44 - Info: FtpFetcher: Setting FTP client to passive mode.
14:02:29 - Error: Queue: Could not set attributes on C:\EtiVo\{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}.show\{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}.mov. Error was: System.ComponentModel.Win32Exception: Unknown error (0xc00d0026)
at EtiVo.Interop.MetaDataEditor.Open(String fileName)
at EtiVo.Service.QueueItem.RegenerateMetaData(String file, Boolean inferFromName) in d:\dev2600\src\etivo\EtiVoSrvDll\QueueItem.cs:line 744
at EtiVo.Service.EncodingQueue.SetAttributesOnFile(String file, QueueItem item) in d:\dev2600\src\etivo\EtiVoSrvDll\EncodingQueue.cs:line 137
14:02:29 - Info: QueueItem: Setting Encoded on:{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}
14:02:29 - Info: Queue: Dequeing from Encoding:{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}
14:02:29 - Info: Queue: Enqueuing on PreviewGenerator:{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}
14:02:29 - Info: QueueItem: Setting GeneratingPreviews on:{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}
14:02:35 - Error: Queue: Could not generate images for show {Good Eats}{2005-01-19}{Myth Smashers}{FOOD}. Error was: System.Runtime.InteropServices.COMException (0x8004022E): Exception from HRESULT: 0x8004022E.
at QuartzTypeLib.FilgraphManagerClass.GetCurrentImage(Int32& pBufferSize, Int32& pDIBImage)
at EtiVo.Service.WmvImageGenerator.GeneratePictures(String fullDirectory, String fileName) in d:\dev2600\src\etivo\EtiVoSrvDll\WmvImageGenerator.cs:line 128
at EtiVo.Service.WmvImageGenerator.GeneratePictures() in d:\dev2600\src\etivo\EtiVoSrvDll\WmvImageGenerator.cs:line 68
at EtiVo.Service.PreviewGeneratorQueue.RunQueuedItem(QueueItem item) in d:\dev2600\src\etivo\EtiVoSrvDll\PreviewGeneratorQueue.cs:line 24
14:02:35 - Error: QueueItem: Failed to get MetaData from C:\EtiVo\{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}.show\{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}.ty. Error was: System.ComponentModel.Win32Exception: Unknown error (0xc00d0026)
at EtiVo.Interop.MetaDataEditor.Open(String fileName)
at EtiVo.Service.VideoFile..ctor(String fileName, VideoFormat format, ShowInfo showInfo, Boolean loadMetadata) in d:\dev2600\src\etivo\EtiVoSrvDll\VideoFile.cs:line 31
14:02:35 - Info: QueueItem: Adding C:\EtiVo\{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}.show\{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}.ty to the list of files that will be ignored when reading meta-data.
14:02:35 - Error: QueueItem: Failed to get MetaData from C:\EtiVo\{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}.show\{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}.mov. Error was: System.ComponentModel.Win32Exception: Unknown error (0xc00d0026)
at EtiVo.Interop.MetaDataEditor.Open(String fileName)
at EtiVo.Service.VideoFile..ctor(String fileName, VideoFormat format, ShowInfo showInfo, Boolean loadMetadata) in d:\dev2600\src\etivo\EtiVoSrvDll\VideoFile.cs:line 31
14:02:35 - Info: QueueItem: Adding C:\EtiVo\{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}.show\{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}.mov to the list of files that will be ignored when reading meta-data.
14:02:35 - Info: QueueItem: Setting Success on:{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}
14:02:35 - Info: Queue: Dequeing from PreviewGenerator:{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}
14:02:35 - Info: Queue: Enqueuing on Ready:{Good Eats}{2005-01-19}{Myth Smashers}{FOOD}

cheer
06-10-2006, 08:09 PM
I've put together a somewhat "smart" DOS .bat script to replace the vsplit call for the divx encoder plugin to eTivo. This script relies on the tools "hdemux" and "mplex" first to split a .TY file into the audio/video portions, and then rejoin (remux) them back into a complete mpeg.
Been trying to get all this working, and it's making me a bit crazy.

Here's what I've done:
Installed EtiVoServer v1924.2 (can't find the .0 version) and EtiVoWeb v1924.1
Verified that EtiVo is working properly using the WM9 encoder -- it successfully pulls a file and encodes it.
Installed mplayer/mencoder. I used the cygwin version since the 2gb limit would be a showstopper.
Instead of installing vsplit, I tried using santa8claws' vsplit.bat -- an awful lot of my stuff is HD, and vsplit isn't even remotely current these days.
Installed the Divx addin and configured EtiVo appropriately.

At this point, mencoder isn't even in the picture -- I'm not making it through the hdemux/mplex stage. I first discovered that vsplit.bat will bomb if the "tools" folder (with vsplit.bat, hdemux, mplex, etc.) has a space in it (or if the path has a space anywhere). Would be trivial to fix but I just moved everything into c:\vsplit as I was impatient. :) I also (later) changed the various redirects so that they'd all redirect to a single, hard-coded filename in a particular path. Finally, I (even later) added some more echos and redirects so I could trace each step of the file's progress.

Most of the time, it makes it through the hdemux phase. The file gets split, and my log file shows the output from hdemux. This happens almost every time, although once or twice vsplit never executes (or if it does, it closes out right away) -- my log has the "Now starting hdemux" echo but no output from hdemux itself.

Sometimes I will then see my "Now starting mplex" echo. Sometimes not.

I never see anything in my log after that. As near as I can tell, mplex never runs. The EtiVo web page just shows "n/a" for progress on the encoding status page. It will sit here as long as I care to allow it...have left it for several hours just in case. Also, if I watch the tasklist (processes) I do see hdemux.exe get listed, but never mplex.

After each trial (and failure), I clear out the show from EtiVo's web page, then stop the EtiVo server process. I delete my "log" and the folder containing the aborted show (which usually has both the .ty and the mpa/mpv files...I never ever see a .mpg file). I make whatever change to vsplit.bat that I want to try, then restart the server process and go again.

Now the weird part. If I run vsplit.bat manually...it works FINE. I actually cut and paste the execution command from the log (to rule out some weird kind of path length issue)...and it whizzes through.

So. Only thing I can think is that it's some kind of running-a-batch-file-memory thing. But the inconsistent results surprise me. I've tried adding "cmd /c" before the hdemux and mplex commands; no difference. Gahhhh, my batch-file-writing-days are so far back in the rearview mirror that I can't remember all the wacky caveats and such.

Any ideas? I suppose I should try it with the real vsplit just to confirm everything else is working, but that's not a long-term solution. Grrr, I may just write a vsplit.exe that chains off to hdemux/mplex...

cheer
06-11-2006, 05:34 PM
Update, and a new problem.

First...I never could get vsplit.bat to work properly, so I wrote a program to replace it. This program (which I call fakevsplit) does the job. I need to clean it up a bit and then I'll post it.

But...new problem. Whether I use my fake vsplit or the real vsplit9r16.exe, what I end up with in EtiVoWeb shows [No videos]. (See attached screenshot.) I confirmed that avi is in the extensions list in the service...any ideas?

cheer
06-11-2006, 05:46 PM
Here's my etivo.log entry:

15:15:31 - Info: Queue: Enqueuing on Encoding:{Family Guy}{2006-04-30}{You May Now Kiss the ... Uh ... Guy Who Receives}{CH32}
15:15:31 - Info: QueueItem: Setting Encoding on:{Family Guy}{2006-04-30}{You May Now Kiss the ... Uh ... Guy Who Receives}{CH32}
16:23:35 - Error: Queue: Could not set attributes on C:\EtiVo\{Family Guy}{2006-04-30}{You May Now Kiss the ___ Uh ___ Guy Who Receives}{CH32}.show\{Family Guy}{2006-04-30}{You May Now Kiss the __DivX_Archive.avi. Error was: System.ComponentModel.Win32Exception: Unknown error (0xc00d0026)
at EtiVo.Interop.MetaDataEditor.Open(String fileName)
at EtiVo.Service.QueueItem.RegenerateMetaData(String file, Boolean inferFromName)
at EtiVo.Service.EncodingQueue.SetAttributesOnFile(String file, QueueItem item)
16:23:35 - Info: QueueItem: Setting Encoded on:{Family Guy}{2006-04-30}{You May Now Kiss the ... Uh ... Guy Who Receives}{CH32}
16:23:35 - Info: Queue: Dequeing from Encoding:{Family Guy}{2006-04-30}{You May Now Kiss the ... Uh ... Guy Who Receives}{CH32}
16:23:35 - Info: Queue: Enqueuing on PreviewGenerator:{Family Guy}{2006-04-30}{You May Now Kiss the ... Uh ... Guy Who Receives}{CH32}
16:23:35 - Info: QueueItem: Setting GeneratingPreviews on:{Family Guy}{2006-04-30}{You May Now Kiss the ... Uh ... Guy Who Receives}{CH32}
16:23:46 - Error: Queue: Could not generate images for show {Family Guy}{2006-04-30}{You May Now Kiss the ... Uh ... Guy Who Receives}{CH32}. Error was: System.Runtime.InteropServices.COMException (0x8004022E): Exception from HRESULT: 0x8004022E.
at QuartzTypeLib.FilgraphManagerClass.GetCurrentImage(Int32& pBufferSize, Int32& pDIBImage)
at EtiVo.Service.WmvImageGenerator.GeneratePictures(String fullDirectory, String fileName)
at EtiVo.Service.WmvImageGenerator.GeneratePictures()
at EtiVo.Service.PreviewGeneratorQueue.RunQueuedItem(QueueItem item)
16:23:46 - Error: QueueItem: Failed to delete clean up:The process cannot access the file "C:\EtiVo\{Family Guy}{2006-04-30}{You May Now Kiss the ___ Uh ___ Guy Who Receives}{CH32}.show" because it is being used by another process.
16:23:46 - Info: QueueItem: Setting Success on:{Family Guy}{2006-04-30}{You May Now Kiss the ... Uh ... Guy Who Receives}{CH32}
16:23:46 - Info: Queue: Dequeing from PreviewGenerator:{Family Guy}{2006-04-30}{You May Now Kiss the ... Uh ... Guy Who Receives}{CH32}
16:23:46 - Info: Queue: Enqueuing on Ready:{Family Guy}{2006-04-30}{You May Now Kiss the ... Uh ... Guy Who Receives}{CH32}

Bizarre...anyone?

cheer
06-11-2006, 11:48 PM
Well...no progress on my little problem. But meanwhile, here's FakeVsplit.

This is essentially an enhanced replacement of santa8claws' vsplit.bat (see above). It does more or less the same thing, except:

It consistently runs through the whole process (which the batch file did not, at least on my machine)
It handles spaces just fine in directory and file names, both for the "execution" directory (i.e. where fakevsplit, hdemux and mplex reside) and the vids directory
When it runs hdemux, it redirects the output to a temp file; it then parses that temp file to pull out the audio offset and target muxrate values, and inserts those into the mplex execute string(I didn't think the target muxrate was a big deal, since mplex will otherwise compute that based on the source, but the audio offset is another matter.)

Read the readme for complete details/instructions/assumptions. I've done very little testing with it, and there isn't a lot of error-checking code in it yet, so keep an eye on it.

Feedback welcomed.

EDIT: Attachment removed -- now it's not working! Stupid thing...should be back soon.
EDIT 2: Re-attached -- problem fixed!
EDIT 3: Removed. See below for all-new version.

cheer
06-12-2006, 07:22 AM
File re-attached in post above -- fixed a problem where it was hanging after hdemux.

tlphipps
06-14-2006, 06:43 PM
I've tried both methods posted for transcoding HD files, but I keep running into the same problem...
During the mplex process, mplex gets a little way into the file and then dies with a message saying "Too many frame drops -exiting". This leaves me with a VERY small .mpg file that is then transcoded to XVID/DIVX. The resulting file plays just fine, but only for a few seconds.

Has anybody else had this problem? How can I get around this?

FWIW I'm trying to process OTA files recorded from different channels at different times, so I don't think it's related to the files per se unless they all have the same problem.

cheer
06-14-2006, 07:12 PM
I've tried both methods posted for transcoding HD files, but I keep running into the same problem...
During the mplex process, mplex gets a little way into the file and then dies with a message saying "Too many frame drops -exiting". This leaves me with a VERY small .mpg file that is then transcoded to XVID/DIVX. The resulting file plays just fine, but only for a few seconds.

Has anybody else had this problem? How can I get around this?

FWIW I'm trying to process OTA files recorded from different channels at different times, so I don't think it's related to the files per se unless they all have the same problem.
OTA HD files are always touchy, and vsplit barfs on 'em. I know you said "both methods" but there has been several -- have you tried the hdemux/mplex method?

asantaga
06-14-2006, 07:44 PM
Hey thanks for the fakesplit stuff. Im having problems with vsplit hanging so hopefully this combination will help ..

cheer
06-14-2006, 08:38 PM
Hey thanks for the fakesplit stuff. Im having problems with vsplit hanging so hopefully this combination will help ..
Let me know how it works for you.

tlphipps
06-14-2006, 11:14 PM
OTA HD files are always touchy, and vsplit barfs on 'em. I know you said "both methods" but there has been several -- have you tried the hdemux/mplex method?

Geez, could I BE anymore vague. My apologies to all. After re-reading my post I can't believe I left out that much detail....Let me try again:

I've specifically tried the vsplit.bat file posted a few months back as well as your latest fakevsplit.exe. They appear to run correctly, but the files that are produced are only a few seconds in length. When I run the processes manually (using the log files as my template) I always get the "Too many frame drops -exiting" error from mplex. I know my mplex works because I use it all the time to convert DVDs and other AVI files to TY files that insert and play just fine on my TiVi (or TiVos). Now that I think about it, are you using a stock mplex (since we're only using it to make a true mpg), or are you using the patched mplex that can produce TY files?

cheer
06-14-2006, 11:28 PM
I've specifically tried the vsplit.bat file posted a few months back as well as your latest fakevsplit.exe. They appear to run correctly, but the files that are produced are only a few seconds in length. When I run the processes manually (using the log files as my template) I always get the "Too many frame drops -exiting" error from mplex. I know my mplex works because I use it all the time to convert DVDs and other AVI files to TY files that insert and play just fine on my TiVi (or TiVos). Now that I think about it, are you using a stock mplex (since we're only using it to make a true mpg), or are you using the patched mplex that can produce TY files?

Actually...I've just encountered the same problem with a couple of OTA recordings.

I've got way too much work to do at the moment, but tomorrow I'll futz with the files and see what I can see. Oh, and I'm using the mplex binary that bcc posted with hdemux -- presumably a stock binary.

cheer
06-18-2006, 06:28 AM
Update.

As a test I went and grabbed 9 OTA HD files off of my Tivo and ran them through. Two went fine, and seven barfed at various stages. I listed all of the details in the hdemux thread (http://dealdatabase.com/forum/showthread.php?t=36322) and bcc has replied with gobs of information, as well as a request for some samples so he can examine the various issues.

One of the things that has become obvious is that OTA streams are, well, a mess. Resolution changes, drops/corruptions, sound format changes...you name it, it's there. So even if bcc is able to work magic into hdemux and/or offer suggestions for us, it's unlikely that we'll ever be able to hit 100% success rate with OTA recordings.

Which is a shame...because in terms of resolution/bitrate/quality, OTA is the best there is. But there you are.

More updates as I progress.

SteveT
01-29-2007, 03:39 PM
Hi Cheer,
Over in the tytompg thread, you wrote:

Yes, and I've rewritten my dumb little fakevsplit. Testing it now with a batch of HD vids. If it works I'll clean it up and post it (along with my profiles) in the Divx add-in thread. But so far it's working great -- and not only is it more reliable, but it's faster since I don't have to do the demux/remux separately.I'm trying to integrate tytompg with etivo as well and would love to see your code and profiles, as well as any hints you'd have for integrating the two.

cheer
01-29-2007, 06:50 PM
I'm trying to integrate tytompg with etivo as well and would love to see your code and profiles, as well as any hints you'd have for integrating the two.

Ah yes, I did promise that. Thanks for keeping me honest. :)

Attached is v1.1 of FakeVsplit. As before, this is a drop-in replacement for vsplit.exe that is really just a shell to call tytompg. I've added some debugging stuff in case it bombs. Note that I wrote this for myself, so undoubtedly I've made assumptions I shouldn't've. Let me know if it breaks.

As far as profiles...80% of my EtiVo use is for my eldest, who is a long-haul trucker. Bandwidth is oft limited, so I try and keep 'em small. For HD vids, I use something like this:

<?xml version="1.0"?>

<Mencoder>
<!-- What flags should be passed to mencoder.exe? (on the first or only pass) -->
<Flags> -nosound -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=550:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=1 -vf lavcdeint,expand=0:16:0:0,scale=416:240</Flags>

<!-- What flags should be passed to mencoder.exe? (on the second pass... if there is none, then leave empty) -->
<Flags2> -oac mp3lame -lameopts abr:br=128 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=550:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=2 -vf lavcdeint,expand=0:16:0:0,scale=416:240</Flags2>

<!-- Where does mencoder.exe live? -->
<MencoderPath>C:\Program Files\Mplayer\mencoder.exe</MencoderPath>

<!-- Where does VSplit.exe live? -->
<VSplitPath>C:\vsplit\fakevsplit.exe</VSplitPath>
</Mencoder>Nothing fancy, but it seems to work for them.

My latest discovery is that, with the right encoding parameters, my hacked Xbox running XBMC can play 720p vids across the LAN with almost no drops (or no drops at all). Here's the experimental profile I'm using for this -- I'm still tweaking/playing with it, so feel free to adjust to taste (and by all means please post your results):

<?xml version="1.0"?>

<Mencoder>
<!-- What flags should be passed to mencoder.exe? (on the first or only pass) -->
<Flags> -nosound -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=4000:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=1 -vf lavcdeint,expand=0:16:0:0,scale=1280:720</Flags>

<!-- What flags should be passed to mencoder.exe? (on the second pass... if there is none, then leave empty) -->
<Flags2> -oac mp3lame -lameopts abr:br=128 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=4000:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:vpass=2 -vf lavcdeint,expand=0:16:0:0,scale=1280:720</Flags2>

<!-- Where does mencoder.exe live? -->
<MencoderPath>C:\Program Files\Mplayer\mencoder.exe</MencoderPath>

<!-- Where does VSplit.exe live? -->
<VSplitPath>C:\vsplit\fakevsplit.exe</VSplitPath>
</Mencoder>

sanderton
02-04-2007, 10:38 AM
Hi,

I'm wanting to use eTivo to create .mpgs, ie just the output of TySplit.

Is there a set of mencoder parameters which would cause it to do a straight copy rather an re-encodings?

cheer
02-05-2007, 11:52 AM
Hi,

I'm wanting to use eTivo to create .mpgs, ie just the output of TySplit.

Is there a set of mencoder parameters which would cause it to do a straight copy rather an re-encodings?
Yes, with a caveat -- the Divx add-in insists on naming the file with a .avi extension, even if you tell mencoder to output to an MPEG container. On my PC, Media Player Classic doesn't seem to care -- it played the test file I just created with either the .avi extension or after renaming to .mpg. Gspot reports the file as an MPEG container w/MPEG codec, despite the file extension.

Anyway, here's what I used:


<?xml version="1.0"?>

<Mencoder>
<Flags> -oac copy -ovc copy -of mpeg</Flags>
<Flags2></Flags2>
<MencoderPath>c:\program files\mplayer\mencoder.exe</MencoderPath>
<VSplitPath>c:\vsplit\fakevsplit.exe</VSplitPath>
</Mencoder>
It even makes the preview images properly.

tlphipps
02-08-2007, 11:35 PM
Well, the newest FakeVsplit seems to be working fine, but I can't get any HD files to finish processing. The .mpg file gets created just fine by tytompg, but mencoder seems to be crapping out before it's finished everything. I've tried cheer's recommended settings for HD files as well as his settings for doing no transcoding. They both appear to end with the same result.

I've attached two log files. The "Gilmore Girls" one was using the transcoding settings, the "Scrubs" episode was using the "no transcode" setting.

I've also tried 2 different mencoder versions. The one I'm using right now is the latest available via the mplayer website.

Anybody have any ideas what's going on here?

cheer
02-20-2007, 02:50 PM
My latest discovery is that, with the right encoding parameters, my hacked Xbox running XBMC can play 720p vids across the LAN with almost no drops (or no drops at all). Here's the experimental profile I'm using for this -- I'm still tweaking/playing with it, so feel free to adjust to taste (and by all means please post your results):

Update:

Well, that particular example only works in select circumstances. Specifically, it has to be from something that was broadcast 1080i, not 720p, and you have to be OK with MP3 audio. I tried doing it with AC3 audio, but the resultant file is a bit much for the Xbox. The other thing I didn't like was that it was just deinterlacing, rather than IVTC. I figured if I could IVTC down to 24 progressive frames/sec, then maybe the Xbox could handle it even with AC3 audio. (720p sources with 60 frames/sec were wholly unplayable.)

Of course, I wasn't counting on mencoder being ass. Mencoder simply cannot be relied upon to maintain audio sync, especially when you start monkeying around with the framerates. I spent a couple of weeks trying to make this work, after poring through mplayer docs, mailing list archives, etc., and have now officially given up.

I can make these encodes work *every* *single* *time* if I use tytompg/DGMPGDec/Avisynth/VirtualDub/VDubMod. I can even "batch" the whole process up with a little bit of effort. Unfortunately, that won't help here as I'm guessing the Divx add-in expects mencoder (else how does EtiVo know the completion percentage of the encode, etc.?).

But if anyone figures out a more reliable way to do these kinds of encodes, let me know. I'll continue to use EtiVo and the Divx Add-In for my simpler encodes for my son, but meanwhile I'm going to start exploring alternatives.

cheer
02-20-2007, 03:04 PM
Unfortunately, that won't help here as I'm guessing the Divx add-in expects mencoder (else how does EtiVo know the completion percentage of the encode, etc.?).
Perhaps I should look at the source before mouthing off. Seems all the add-in is doing is monitoring stdout for completion percentage, so in theory I ought to be able to create a "fakemencoder" that periodically can spit this out but in reality call some other tools.

Hmmmmmmm. Time to go play. More status later.

cheer
02-20-2007, 03:08 PM
Well, the newest FakeVsplit seems to be working fine, but I can't get any HD files to finish processing. The .mpg file gets created just fine by tytompg, but mencoder seems to be crapping out before it's finished everything. I've tried cheer's recommended settings for HD files as well as his settings for doing no transcoding. They both appear to end with the same result.

I've attached two log files. The "Gilmore Girls" one was using the transcoding settings, the "Scrubs" episode was using the "no transcode" setting.

I've also tried 2 different mencoder versions. The one I'm using right now is the latest available via the mplayer website.

Anybody have any ideas what's going on here?

I'm at a loss, looking at these logs...the only thing I can figure is that there's some kind of errors in the file that tytompg processes ok but mencoder pukes at. Except there are no errors in the logs.

Are these both OTA? If so, can you try something from a sat channel like HDNet or HBO-HD or something? Just record 5-10 minutes so you can get quick results.

tlphipps
02-20-2007, 11:29 PM
Thanks for taking a look Cheer. Yes, they're both OTA. Unfortunately I don't subscribe to the DirecTV HD stuff.

Would you mind sharing what version of mencoder you're using with the profiles you provided? I've tried 5 or 6 different programs now all from different channels recorded on different days. I can't imagine how all of the streams would cause the same problem......but I guess stranger things have happened.

94SupraTT
06-21-2007, 11:43 AM
Just installed EtiVo 1.0.1924.2 yesterday. To add the mencoder add-in, I had to follow the instruction (http://www.cavewomble.pwp.blueyonder.co.uk/mencoder/) plus manually modify EtiVo server's Settings.xml



Did a quick test, the voice seems to be out of sync with videos from DTivo. Maybe fiddling with the parameters will help. Looks like EtivoWeb also need some fiddling to get the videos to show up there.

I was hoping that was my problem. I can not get the DIVX addin to work with etivo. WMV encoding worked fine. I keep getting.

"Could not run encoder. Error: The root element is missing"

letmusicring
08-19-2007, 01:05 PM
Hey, I'm so glad that this was finally discovered!

But for some reason, I can't get it to work all that well...
I used a TiVo Video Tour for a test video.

Every time I try to encode it using the DivX_Archive.xml, I get this error message...

Could not run encoder. Error: Calling remote encoder failed with: Encoder failed: Output file had not been writen! ('C:\EtiVo\{TiVo Video Tours}{0001-01-01}{}{}0.show\{TiVo Video Tours}{0001-01-01}{}{}_DivX_Archive.avi')

Anybody know what that means and how to fix?