1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

pyTivo - Transcoding server

Discussion in 'TiVo Home Media Features & TiVoToGo' started by armooo, Nov 25, 2006.

  1. Apr 6, 2008 #1921 of 5755
    KRKeegan

    KRKeegan Im lost and confused

    215
    0
    Jul 20, 2004
    Los Angeles, CA
    It seems that this is a pretty common error. Others have reported the same errors with some files working properly - pyTivo Discussion Forum
     
  2. Apr 7, 2008 #1922 of 5755
    cherry ghost

    cherry ghost Active Member

    5,373
    15
    Sep 13, 2005
    Chicago
    All I can tell you is that I've never had a problem transferring an MKV file with .net
     
  3. Apr 7, 2008 #1923 of 5755
    PaulS

    PaulS Member

    684
    2
    Sep 16, 2002
    Southern NH
    And all I can tell you is that I've had a hell of a time getting them to transfer reliably, despite the fact that both solutions are founded on ffmpeg. The errors pyTivo users see are not simply transfer errors, which can be blamed on pyTivo itself, but encode/decode errors (audio sync out of whack, audio channels remapped to right front, etc).

    I'll need to dig into tivo.net to see if/how the parms list being passed into ffmpeg from tivo.net differs from that of pyTivo.

    edit : List of parms isn't very different from looking at the .NET code. Does tivo.net handle higher than 480i resolution transfers, or more than 2 channels of audio ?
     
  4. Apr 8, 2008 #1924 of 5755
    jcthorne

    jcthorne Active Member

    2,769
    14
    Jan 28, 2002
    Houston
    If you convert the audio in your mkv file to AC3 at 384kbps before giving the mkv to pytivo/ffmpeg things go much smoother. FFmpeg does not handle conversion of audio inside and mkv container well at all but if its already the right format and bitrate, it comes along on the conversion to mpeg2 just fine.

    Until ffmpeg updates.

    Speaking of which, there are new window builds of ffmpeg posted recently, has anything that effects the use in pytivo been improved or upgraded?
     
  5. Apr 8, 2008 #1925 of 5755
    Iluvatar

    Iluvatar New Member

    377
    0
    Jul 22, 2006
    Here is the changelog.http://svn.mplayerhq.hu/ffmpeg/trunk/?view=log

    It seems there were numerous performance enhancements (i dont know if it adds up to much), and various audio and decoder fixes.

    However the new build posted seems to break pyTivo (so far for me). So until pyTivo is updated with possible changes to FFMPEG command parameters unfortunately it is not usable (again this could have simply been my machine, however the problems fixed themselves by reverting to the old revision).

    Edit: The FFMPEG changelog server is very shaky and doesnt respond often, and when it does it takes about 5 minutes to load.
     
  6. Apr 8, 2008 #1926 of 5755
    PaulS

    PaulS Member

    684
    2
    Sep 16, 2002
    Southern NH
    Right. It's just that there isn't an in-line, one-step solution to the problem. I'd rather not have to manually massage files. If there was an easy way to "pipe" the output of eac3to to pyTivo, I'd be all over that.
     
  7. Apr 9, 2008 #1927 of 5755
    fred2

    fred2 Member

    511
    0
    Jan 20, 2006
    I suspected that I was not the only one who wanted to deal with mkv files (although, now, if I can avoid them I will until a stable solution appears. Seems, though, I opened up an interesting discussion!

    Multiple massaging is just not that desireable - not that I have not done stuff like that in the past. But I'm getting lazy, my computer is overloaded with virtual dubs in all configurations, tons of codecs and new things break old things.
     
  8. Apr 9, 2008 #1928 of 5755
    wgw

    wgw New Member

    217
    0
    May 16, 2007
    xvid avi's have the same audio problems as mkv's, and probably any other file type encoded with ac3 audio. People just notice it more with mkv's because they are commonly encoded with ac3 while other file types are more commonly encoded with low bitrate mp3 or aac audio. As long as the ac3 audio is encoded at 448k or less, pytivo will handle it properly if you do not override pytivos default audio codec settings.
     
  9. grahamg

    grahamg New Member

    67
    0
    Aug 18, 2006
    Pasadena CA
    Hi, I repost this in the Pytivo chain. I think the original post was in the wrong forum - sorry and thanks.

    On my PC I am using a Hauppauge WinTV-HVR950 OTA HD tuner to record onto the PC. These files are dropped directly into my PyTivo video folder as *.mpg files. WMF and Nero showtime play them perfectly on the PC.

    PyTivo is working in as much as the video/audio is transfered to the Tivo2 at a very nice quality. During the file transfer ffmpeg_mp2 is running at 30-35% CPU load. The PC is an AMD 64 X2, 3gb ram. I can play the video/audio transfered to the Tivo on the TV during the file transfer and it keeps up quite happily.

    The video and sound quality on the TV from the Tivo2 is really excellent but the audio is way out of sync, I haven't timed it but the video must be playing 30 - 60 seconds after of the audio.

    Can I make some changes to make this setup viable - or do I just forget it?

    I have just moved house and I cannot receive OTA analog stations at all well, but the HD channels come in fine. This is the reason for my interest in using the HD source.
     
  10. dlfl

    dlfl Cranky old novice

    7,052
    26
    Jul 6, 2006
    Dayton OH
    1. Try -async 1 in the args to ffmpeg.

    2. Try running the file through VideoReDo, Quick Stream Fix. Is the sync that bad when loaded into VideoReDo? (If so it's probably beyond repair by VRD.) VRD also lets you manually correct sync within about a one second range.
     
  11. steve614

    steve614 what ru lookin at?

    10,722
    0
    May 1, 2006
    Dallas, TX
    I was reluctant to try pyTivo but because of the problems with TD 2.6, I thought I'd give it a try.

    I must say, installation was EASY. Had to do NO configurations.
    Ten minutes from first installing python, then installing pyTivo, then at my Tivo choosing a movie to transfer.
    AWESOME! :up:


    Thanks for a great app.:cool:
     
  12. grahamg

    grahamg New Member

    67
    0
    Aug 18, 2006
    Pasadena CA
    Thanks for the input. On item1. I added the argument to the Pytivo.conf file and it changed to as follows :-

    [Server]
    port=9032
    ffmpeg=C:\Program Files\pyTivo\plugins\video\ffmpeg_mp2.exe -async 1

    hack83=true

    [My Videos]
    type=video
    path=E:\Videos

    [Admin]
    type=admin

    But this didn't work. When I used the Tivo, I can see the PC's videos, I selected one and then Tivo says "please wait" (and locks up). Looking at the PC processes I see that ffmpeg_mp2 doesn't pop into the process list. I have since removed the -async 1 argument and things are working again. Is this argument correctly formatted? I will try to find out, perhaps I need a more recent ffmpeg? BTW I did stop and remove the Tivo service and restored it after changing the config file.

    On item2. I downloaded a trial version, but when I play a video on VideoRedo the video and audio are in perfect sync so their is nothing to fix. You are correct saying that the maximum correction available is +/- 1second. It seems that the problem is being caused by ffmpeg_mp2 but I don't see that output file as it is being sent straight to the Tivo.

    I guess this problem will show up more next year when everyone goes to digital OTA tv?

    Thanks!
     
  13. wgw

    wgw New Member

    217
    0
    May 16, 2007
    grahamg,

    Sorry, I have not replied to your question because you have not indicated what version you are using or what your settings are. With all the developers, there are lots of versions now. I have made every attempt to eliminate audio sync problems in my pytivo branch. Try installing this version with all default settings and see how it works.
    http://pytivo.krkeegan.com/post518.html#518
    The new pytivo forum may also answer some of your questions.
     
  14. grahamg

    grahamg New Member

    67
    0
    Aug 18, 2006
    Pasadena CA
    I tried to find the version# but didn't know how to get it from my PC. I vaguely remember there is a way to find the ffmpeg version, but I have forgotten that too.

    1. I downloaded the 7-Zip file
    2. I downloaded wgw-f668ec6fa340c7f341eabd89e8096284c4142bfc.tar.gz
    But 7-Zip didn't seem to understand the .gz file. So I used Winrar instead. Extracted your folder wgw to the desktop renamed it to PyTivo and then copied it to my Program files\Pytivo folder. This seems to have worked because I see plenty of 4/8/2008 files.
    3. started Pytivo.
    4. Transfered one .mpg file from the PC using PyTivo

    The result. Excellent quality video, and the audio now seems in sync. But the audio is "stuttering" (like 1/2 second of sound then 1/2 second of silence) and the video seems to be playing a little too slowly (although it doesn't stutter like the audio - I mean it seems to play continuously, but just a tad slow) Sorry, but I can't describe it any better. I also tried to transfer a lower quality file (an .avi file) and that plays without problem. In both cases the transfer to the Tivo is quicker than realtime.

    I am now thinking of converting the .mpg format to .avi and see how that goes - is it worth trying ?

    I downloaded the trial version of AVS video converter. It indicates that the original .mpg video file is MPEG2 video, 1280x720 59.94fps 13894kbps, audio Dolby AC3 48000hz 5.1ch 448 kbps. I understand that the TV tuner makes no changes to the format, it just stores the OTA video/sound?
     
  15. grahamg

    grahamg New Member

    67
    0
    Aug 18, 2006
    Pasadena CA
    Hi further info.

    I converted the original

    MPEG2 video, 1280x720 59.94fps 13894kbps, audio Dolby AC3 48000hz 5.1ch 448 kbps filesize 3.1gb

    to a new file using AVS video convertor trial version

    MPEG2 video 720x576 29.97fps 10065kbps, audio MPEG-1 layer2 2ch 320 kbps filesize 2.23gb - This file plays fine on the Tivo.

    I also tried your original suggestion and added the argument -async to the new ffmpeg_mp2.exe installed with 1wgw-f668ec6fa340c7f341eabd89e8096284c4142bfc.tar.gz

    But I get the same problem, I can see the file, I select it and Tivo says "please wait" - forever. Pytivo does not start ffmpeg_mp2.

    Question. I added the parameter in Pytivo.conf ie. ffmpeg=C:\Program Files\pyTivo\plugins\video\ffmpeg_mp2.exe -async 1
    is this correct or should it be in the following uncommented line somewhere?

    #ffmpeg_tmpl=%(video_codec)s %(video_fps)s %(video_br)s %(max_video_br)s %(buff_size)s %(aspect_ratio)s -comment pyTivo.py %(audio_br)s %(audio_fr)s %(audio_ch)s %(audio_codec)s %(fmpeg_prams)s %(format)s



    Recording OTA HD and then recoding it to another format doesn't really appeal because I would rather be able to set the PC's DVR and then just use Pytivo to view whatever is recorded. If this works I end up with a poor mans Tivo3! At least this would be a decent fill in until the Governments $40 hdtv vouchers kick in.
     
  16. wgw

    wgw New Member

    217
    0
    May 16, 2007
    Sounds like their might be something wrong with your source recordings. Perhaps spikes in the audio/video bitrates. You might try VideoRedo's QuickStream Fix option. Before running QuickStream fix, go into the VideoRedo options. Under Stream Parameters, check the box "Set header to video bitrate". This makes it easy to verify the video bitrate on the output file using VideoReDo's "Show Video program info" option.

    If that does not work, you can force pytivo to transcode the files for you which will smooth out the glitches. Set max_video_br=12000k and max_audio_br=384k.

    S3 Tivo's also have a problem converting HD recordings which could be part of the problem. Forcing pytivo to transcode HD will also fix that.
     
  17. grahamg

    grahamg New Member

    67
    0
    Aug 18, 2006
    Pasadena CA
    Thanks, I took your advice in reverse order and tried (I think) the transcode option first. I have a question though. I have changed my Pytivo.conf to the following. Notice that I uncommented the line ffmpeg_tmpl, I also added in the item %(max_audio_br)s next to max_video_br. I just ask if this is done correctly?

    I will record a couple of short programs and try this later. Thanks again for your help..

    [Server]
    port=9032
    ffmpeg=C:\Program Files\pyTivo\plugins\video\ffmpeg_mp2.exe

    hack83=true

    max_video_br=12000k
    max_audio_br=384k.

    ffmpeg_tmpl=%(video_codec)s %(video_fps)s %(video_br)s %(max_video_br)s %(max_audio_br)s %(buff_size)s %(aspect_ratio)s -comment pyTivo.py %(audio_br)s %(audio_fr)s %(audio_ch)s %(audio_codec)s %(fmpeg_prams)s %(format)s

    [My Videos]
    type=video
    path=E:\Videos

    [Admin]
    type=admin
     
  18. dlfl

    dlfl Cranky old novice

    7,052
    26
    Jul 6, 2006
    Dayton OH
    The -async 1 needs to be added to the ffmpeg_tmpl, which must be uncommented (remove the '#')to be activated.
     
  19. wgw

    wgw New Member

    217
    0
    May 16, 2007
    You really should use the web admin to update your config. http://localhost:9032/

    Your config looks fine. But you should delete the ffmpeg_tmpl line. It's not necessary to specify this line and should only be modified by very advanced users.

    -async 1, if needed, would be added to ffmpeg_pram.

    Edit: oh, you have an S2. pyTivo will transcode HD files by default on an S2. But it won't hurt to specify the max settings anyway.
     
  20. lgkahn

    lgkahn Member

    102
    0
    Apr 3, 2002
    feature request:

    I have been using tivoserver to goto my dtv direcdt tivos.. just getting pytivo working to goto my new s3's I am setting up as the older tivoserver doesnt work for it..

    unfort. all my movies are on an older w2000 box so tivo.net is out of the question..

    anyway one thing I liked about tivoserver is the combining of multiple shares..

    ie if I have a subfolder or folder on different shares/hard drives called "james bond" I will only get one "james bond" folder with a combination of all the various files from all the hard drives.. This seems common as I have 4 hard drives in the older box and
    also 2 external usb hard drives... is there some way to make pytivo do this (I cannot find any settings for this or reference to this in the thread) or is it a feature that may be added in the future.. it just means keeping a global list of folders and instead of multiple shares showing the main folder and all the global list of folders and knowing which shows are in each one...

    thanks in advance..

    also since we are keeping the dtivo boxes for awhile I want to run both tivoserver and pytivo on the same w2000 box against the same files

    thanks again..
     

Share This Page