 |
pyTivo Discussion Forum Answers and the development of pyTivo a TiVo transcoding server
|
|
| Author |
Message |
wgw
Joined: 06 Jan 2008 Posts: 284
|
Posted: Wed Jan 09, 2008 3:47 am Post subject: Ticket 94 - Transfers terminating early |
|
|
Kevin, it appears armooo.net just went down again so I'll post my reply to your questions here so as not to lose it. Luckily I was able to do a copy before losing my post.
This applies to both transcoded and untranscoded recordings. See this post.
http://pytivo.krkeegan.com/viewtopic.php?p=70#70
The tsn is not known when the est_size function is called resulting in failed calls to subordinate functions tivo_compatable and getVideoBr which require tsn. The tsn needs to be available to est_size in order for it work properly.
Since tsn is missing, est_size is using the video_br from the server section only to estimate file size, and defaulting to 4096k if it is not specified in the server section. When the transcoding occurs, it uses video_br from the per tivo section because tsn becomes known at that point. Since video_br is commonly set to 8Mi in the per tivo section, the default 4096k used for space allocation is insufficient for an 8Mi transcode. And for compatible mpegs, subordinate function tivo_compatable is failing to return true when called by est_size because of the tsn check "if tsn[:3]...".
You can verify this by converting an HD .tivo file to .mpg and try to transfer it to the tivo without specifying a video_br in the server section of the .conf. But you must have an HD tivo and also specify the tsn in a per tivo section of the .conf. |
|
| Back to top |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 458 Location: Los Angeles, CA
|
Posted: Wed Jan 09, 2008 4:38 am Post subject: |
|
|
| ahhhh, yeah that makes perfect sense. Without the TSN we can't possibly be accurately estimating the size when there are different video bit rates in the server section and _tivo_ sections. |
|
| Back to top |
|
 |
wgw
Joined: 06 Jan 2008 Posts: 284
|
Posted: Wed Jan 09, 2008 11:59 am Post subject: Re: Ticket 94 - Transfers terminating early |
|
|
| wgw wrote: |
You can verify this by converting an HD .tivo file to .mpg and try to transfer it to the tivo without specifying a video_br in the server section of the .conf. But you must have an HD tivo and also specify the tsn in a per tivo section of the .conf. |
Also, the test mpg cannot have a frame rate of 29.97. |
|
| Back to top |
|
 |
msteinkoenig
Joined: 08 Jan 2008 Posts: 10 Location: Austin, TX
|
Posted: Sun Jan 13, 2008 3:11 am Post subject: Video statistics/encoding information utilities??? |
|
|
| wgw wrote: |
Also, the test mpg cannot have a frame rate of 29.97. |
Is there a program anyone can recommend to see statistics/encoding information about a video file? I have .mpeg files that I have had issues with but don't know what the frame rate, etc. settings are.
I had a similar issue where Tivo was stopping the transfer early because the .mpeg file was encoded with the wrong run time. I fixed the issues with Video ReDo but it took me a few days to figure it out.
Thanks,
Mike. |
|
| Back to top |
|
 |
wgw
Joined: 06 Jan 2008 Posts: 284
|
Posted: Sun Jan 13, 2008 1:49 pm Post subject: |
|
|
VideoReDo has a show program info option under Tools.
HD Tivos will play frame rate 29.97. My comment was just explaining how to reproduce a bug in the current version of pyTivo. |
|
| Back to top |
|
 |
dlfl
Joined: 05 Jan 2008 Posts: 337 Location: Near Dayton, Ohio
|
Posted: Sun Jan 13, 2008 5:13 pm Post subject: Re: Video statistics/encoding information utilities??? |
|
|
[quote="msteinkoenig"] | wgw wrote: |
..........Is there a program anyone can recommend to see statistics/encoding information about a video file? I have .mpeg files that I have had issues with but don't know what the frame rate, etc. settings are. ......... |
I'm assuming Windows OS. Open a command window in the folder containing ffmpeg_mp2. Then enter:
ffmpeg_mp2 -i <mpeg filename w/ path and extension>
The info displayed is exactly what pyTivo gets.
Also free program MediaInfo., although I know this program isn't perfect. It makes big errors on multi-GB xvid/avi files created by ffmpeg. _________________ TiVo HD, Win 7 64bit, Wired Ethernet
Try metagenerator 3 and pyTivoMetaGen
VideoReDo users: try VAP |
|
| Back to top |
|
 |
msteinkoenig
Joined: 08 Jan 2008 Posts: 10 Location: Austin, TX
|
Posted: Mon Jan 14, 2008 5:38 pm Post subject: |
|
|
Thanks for the utilities. That was exactly what I was looking for.
Thanks,
Mike. |
|
| Back to top |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 458 Location: Los Angeles, CA
|
Posted: Tue Jan 15, 2008 7:16 am Post subject: Solved! |
|
|
Ok transfers terminated early on HD machines should be solved. It is the latest patch on:
http://repo.or.cz/w/pyTivo/krkeegan.git
And it has been folded into ver1.10 of the Windows installer.
Kevin |
|
| Back to top |
|
 |
wgw
Joined: 06 Jan 2008 Posts: 284
|
Posted: Wed Jan 16, 2008 2:26 am Post subject: |
|
|
I'm getting the following error.
----------------------------------------
Exception happened during processing of request from ('192.168.0.12', 4392)
Traceback (most recent call last):
File "c:\python25\lib\SocketServer.py", line 464, in process_request_thread
self.finish_request(request, client_address)
File "c:\python25\lib\SocketServer.py", line 254, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "c:\python25\lib\SocketServer.py", line 522, in __init__
self.handle()
File "c:\python25\lib\BaseHTTPServer.py", line 316, in handle
self.handle_one_request()
File "c:\python25\lib\BaseHTTPServer.py", line 310, in handle_one_request
method()
File "F:\pyTivo_Current\httpserver.py", line 78, in do_GET
method(self, query)
File "F:\pyTivo_Current\plugins\video\video.py", line 357, in TVBusQuery
file_info.update(self.__metadata(file_path, tsn))
NameError: global name 'tsn' is not defined
---------------------------------------- |
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 2010 Location: Maryland
|
Posted: Wed Jan 16, 2008 4:16 am Post subject: |
|
|
| wgw wrote: | I'm getting the following error.
----------------------------------------
NameError: global name 'tsn' is not defined
---------------------------------------- |
Ouch.
You can add this line at the top of TVBusQuery:
tsn = handler.headers.getheader('tsn', '')
I'll put that in my repository. _________________ My pyTivo fork . My page |
|
| Back to top |
|
 |
wgw
Joined: 06 Jan 2008 Posts: 284
|
Posted: Wed Jan 16, 2008 5:15 am Post subject: |
|
|
Thanks a million guys.
I've added one more small patch to my respository to complete the fix. |
|
| Back to top |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 458 Location: Los Angeles, CA
|
Posted: Wed Jan 16, 2008 6:15 am Post subject: |
|
|
well that is embarassing.
Sorry about that, I updated everything in my repository and updated the windows installer.
Sorry about that.
Kevin |
|
| Back to top |
|
 |
wgw
Joined: 06 Jan 2008 Posts: 284
|
Posted: Thu Jan 17, 2008 3:36 am Post subject: |
|
|
Kevin,
Could you include the following update to est_size in your fix. This is what I was referring to when I mentioned that I added one more small patch to my repository. Otherwise, some comaptible mpegs will still be terminated early. Thanks.
| Code: | - if transcode.tivo_compatable(full_path):
+ if transcode.tivo_compatable(full_path, tsn): |
|
|
| Back to top |
|
 |
PaulS
Joined: 05 Jan 2008 Posts: 184
|
Posted: Sat Jan 19, 2008 3:49 am Post subject: |
|
|
Hey guys,
I'm encountering an issue in wgw's latest snapshot which appears to be related to the stuff you're discussing here. When I select a video file which uses metadata generated by MasterCephus's program, I get an unhandled exception when the info screen is popped up. It appears to be related to the metadata, since any selection that I make that does not have metadata succeeds, and some files that DO have metadata succeed.
| Code: | Exception happened during processing of request from ('192.168.1.90', 2260)
Traceback (most recent call last):
File "C:\Program Files\Python2.5.1\lib\SocketServer.py", line 464, in process_
request_thread
self.finish_request(request, client_address)
File "C:\Program Files\Python2.5.1\lib\SocketServer.py", line 254, in finish_r
equest
self.RequestHandlerClass(request, client_address, self)
File "C:\Program Files\Python2.5.1\lib\SocketServer.py", line 522, in __init__
self.handle()
File "C:\Program Files\Python2.5.1\lib\BaseHTTPServer.py", line 316, in handle
self.handle_one_request()
File "C:\Program Files\Python2.5.1\lib\BaseHTTPServer.py", line 310, in handle
_one_request
method()
File "C:\Program Files\pyTivo-wgw-01-16-2008\httpserver.py", line 66, in do_GE
T
method(self, query)
File "C:\Program Files\pyTivo-wgw-01-16-2008\plugins\video\video.py", line 181
, in TVBusQuery
handler.wfile.write(t)
File "C:\Program Files\Python2.5.1\lib\socket.py", line 255, in write
data = str(data) # XXX Should really reject non-string non-buffers
File "C:\Program Files\pyTivo-wgw-01-16-2008\Cheetah\Template.py", line 990, i
n __str__
def __str__(self): return getattr(self, mainMethName)()
File "_Program_Files_pyTivo_wgw_01_16_2008_plugins_video_templates_TvBus_tmpl.
py", line 214, in respond
IndexError: string index out of range |
Which was triggered by the following metadata :
| Code: | title : 300
episodeTitle : 300
movieYear : 2006
description : Sin City author Frank Miller's sweeping take on the historic Battle of Thermopylae comes to the screen courtesy of Dawn of the Dead director Zack Snyder. Gerard Butler stars as Spartan King Leonidas and Lena Headey plays Queen Gorgo. The massive army of the Persian Empire is sweeping across the globe, crushing every force that dares stand in its path. When a Persian envoy arrives in Sparta offering King Leonidas power over all of Greece if he will only bow to the will of the all powerful Xerxes (Rodrigo Santoro), the strong-willed leader assembles a small army comprised of his empire's best fighters and marches off to battle. Though they have virtually no hope of defeating Xerxes' intimidating battalion, Leonidas' men soldier on, intent on letting it be known they will bow to no man but their king. Meanwhile, back in Sparta, the loyal Queen Gorgo attempts to convince both the skeptical council and the devious Theron (Dominic West) to send more troops despite the fact that many view Leonidas' unsanctioned war march as a serious transgression. As Xerxes' fearsome "immortals" draw near, a few noble Greeks vow to assist the Spartans on the battlefield. When King Leonidas and his 300 Spartan warriors fell to the overwhelming Persian army at the Battle of Thermopylae, the fearless actions of the noble fighters inspired all of Greece to stand up against their Persian enemy and wage the battle that would ultimately give birth to the modern concept of democracy. by Jason Buchanan
isEpisode : false
seriesTitle : 300
starRating : 6
mpaaRating : R4
vProgramGenre : Action
vProgramGenre : Drama
vProgramGenre : History
vProgramGenre : War
vSeriesGenre : Action
vSeriesGenre : Drama
vSeriesGenre : History
vSeriesGenre : War
vDirector : Zack Snyder
vWriter : Zack Snyder
vWriter : Kurt Johnstad
vActor : Gerard Butler
vActor : Lena Headey
vActor : Dominic West
vActor : David Wenham
vActor : Vincent Regan
vActor : Michael Fassbender
vActor : Tom Wisdom
vActor : Andrew Pleavin
vActor : Andrew Tiernan
vActor : Rodrigo Santoro
|
Sorta looks like there's just too much metadata there... |
|
| Back to top |
|
 |
wgw
Joined: 06 Jan 2008 Posts: 284
|
|
| 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
|
|