 |
pyTivo Discussion Forum Answers and the development of pyTivo a TiVo transcoding server
|
|
| Author |
Message |
Marconi

Joined: 11 May 2009 Posts: 49
|
Posted: Mon Feb 20, 2012 5:33 pm Post subject: To Encode or Not Encode? |
|
|
How does pyTiVo know whether or not to use ffmpeg to re-encode a file being transferred to a TiVo?
I use pyTiVo (McBrine branch) mostly to transfer back recordings extracted from my DVRs using iTiVo's "decrypt" mode. The resulting files are, as far as I know, TiVo ready and need no re-encoding in ffmpeg to be playable on TiVo.
Now, I was recently transferring back to a series 2 DVR decrypted files as described above and transfer rates were horrible. I noted that ffmpeg was re-encoding every file, though I did not believe this should be necessary as the recordings all originated from TiVo DVRs. pyTiVo was running on an iMac G5.
To speed things up, I transferred the installation to a MacBook Pro with more processing horsepower. Transfers to the DVR were flying at very respectable speeds. I noted though that there was no running ffmpeg process and that's when I realized ffmpeg was not even installed on the MBP. This did confirm for me that the decrypted recordings needed no re-encoding by ffmpeg and I wondered why the iMac G5 had been doing so. (I did confirm that the transferred recordings play on TiVo.)
I was preparing to install ffmpeg via MacPorts when I realized it might actually slow things down as the vast majority of the recordings are TiVo ready. Installing ffmpeg might cause needless re-encoding of the recordings and slow things down.
So, I'm wondering, do I have a configuration problem? How does pyTiVo decide whether or not to run out-going transfers through ffmpeg?
I could, I suppose, install ffmpeg and just set the ffmpeg= path incorrectly when transferring decrypted files, correcting it where transferring files that need re-encoding. But are there settings that let pyTiVo know when a recording NEEDS to be re-encoded and when not? |
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 2009 Location: Maryland
|
Posted: Mon Feb 20, 2012 11:39 pm Post subject: |
|
|
The decision is complex. In the case of a missing ffmpeg, pyTivo can't tell much about the file, so it relies on the extension.
You won't thwart pyTivo just by giving it the wrong path to ffmpeg. It would also have to be missing from the PATH, and not in the bin folder.
TiVo-sourced MPEGs sometimes still need reencoding because not all TiVos have the same capabilities. HD, in particular, has to be downconverted for the S2. But also, some 2DT-originated files can be out of spec for other S2s. Possibly some that originated from DVD units, too. But it's also possible that pyTivo's criteria are too narrow.
If you turn on debug, you can see the reason why the file was reencoded in the debug output.
If necessary, there are ways to override this behavior. I'd want to know more about the files before advising. _________________ My pyTivo fork . My page |
|
| Back to top |
|
 |
Marconi

Joined: 11 May 2009 Posts: 49
|
Posted: Tue Feb 21, 2012 6:43 pm Post subject: |
|
|
| wmcbrine wrote: | The decision is complex. In the case of a missing ffmpeg, pyTivo can't tell much about the file, so it relies on the extension.
...
TiVo-sourced MPEGs sometimes still need reencoding because not all TiVos have the same capabilities. ... also, some 2DT-originated files can be out of spec for other S2s. Possibly some that originated from DVD units, too. But it's also possible that pyTivo's criteria are too narrow.
If you turn on debug, you can see the reason why the file was reencoded in the debug output.
If necessary, there are ways to override this behavior. I'd want to know more about the files before advising. |
Most of the recordings were made in Basic quality from analog cable on Series 2 TiVo DVRs. A few were recorded in Basic on TiVo HD DVRs.
All were downloaded from their respective DVRs using iTiVo's decrypt mode.
According to VLC player, all have 1 audio stream, one video streams and 3-4 Closed Caption streams.
Typically,
The audio is 48000 Hertz, 192kbps mpga codec
Video codec is MPEG-1/2 Video (mpgv) 352x480 at 59.940060 fps
What's interesting is that when transcoded, the resulting files on TiVo are huge, comparatively speaking. That is, a recording that's only 310 MB on the pyTiVo Mac's disk is 0.9 GB on the Series 2 DVR to which it's transferred. It looks and plays just the same as one that was not transcoded.
Turning on Debug shows:
TRANSCODE=YES, vCodec mpeg2video (Main) not compatible...
Does the decrypt process of iTiVo somehow alter the codec? I wouldn't think these files to be "not compatible" and, indeed, transferred without transcoding, they play fine. |
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 2009 Location: Maryland
|
Posted: Tue Feb 21, 2012 6:50 pm Post subject: |
|
|
Well, that's odd. Are you using an older pyTivo with a newer FFmpeg? There was a change a while back where FFmpeg started putting things in parentheses after the codec name, which I thought I'd addressed on March 31, 2011. _________________ My pyTivo fork . My page |
|
| Back to top |
|
 |
Marconi

Joined: 11 May 2009 Posts: 49
|
Posted: Tue Feb 21, 2012 10:05 pm Post subject: |
|
|
| wmcbrine wrote: | Well, that's odd. Are you using an older pyTivo with a newer FFmpeg? There was a change a while back where FFmpeg started putting things in parentheses after the codec name, which I thought I'd addressed on March 31, 2011. | I'm using an older ffmpeg (0.78, I think) that was installed via MacPorts. I don't know how to tell what version of pyTiVo I have. |
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 2009 Location: Maryland
|
Posted: Tue Feb 21, 2012 11:19 pm Post subject: |
|
|
You tell by remembering when you downloaded it. If you can't, then assume it was before then, and upgrade. Or... just upgrade, because from that output, I'm pretty sure it was. _________________ My pyTivo fork . My page |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|