Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#8598 closed defect (invalid)

Mytharchive fails when creating dvd iso

Reported by: nikolai@… Owned by: paulh
Priority: minor Milestone: unknown
Component: Plugin - MythArchive Version: 0.23-fixes
Severity: medium Keywords: mytharchive iso create faile
Cc: Ticket locked: no

Description

When attempting to create a dvd iso imave with mytharchive the process fails when attempting to shrink the iso to the target size:

Creating DVD XML file for dvd author (No Menus)
Adding item 1
aspect ratio is: 1.77778
Fixed length chapters: 00:00:00,00:05:00,00:10:00,00:15:00,00:20:00,00:25:00,00:30:00,00:35:00,00:40:00,00:45:00,00:50:00,00:55:00,01:00:00,01:05:00,01:10:00,01:15:00,01:20:00,01:25:00,01:30:00,01:35:00,01:40:00,01:45:00,01:50:00,01:55:00,02:00:00,02:05:00,02:10:00,02:15:00,02:20:00,02:25:00,02:30:00,02:35:00
Total video  8853.93 Mb, audio 436.27 Mb, menus 0.00 Mb.
Video files are 4980.6 Mb too big. Need to shrink.
vrate 426.180 kb/s, testsize 3873.3410 , mv2space 3873.3410 Mb 
File 1, size 8853.93 Mb, rate 974.19, limit 426.18 kb/s 
Initial M2Vsize is 8853.93 Mb , target is 3767.38 Mb
Running: M2VRequantiser 2.35016  9284021674  <  /var/lib/mythtv/temp/work/1/stream.mv2  >  /var/lib/mythtv/temp/work/1/stream.small.mv2 
sh: M2VRequantiser: not found
M2Vsize after requant is  0.00 Mb 
------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/share/mythtv/mytharchive/scripts/mythburn.py", line 5501, in main
    processJob(job)
  File "/usr/share/mythtv/mytharchive/scripts/mythburn.py", line 5244, in processJob
    performMPEG2Shrink(files, dvdrsize[0])
  File "/usr/share/mythtv/mytharchive/scripts/mythburn.py", line 2883, in performMPEG2Shrink
    runM2VRequantiser(os.path.join(getItemTempPath(filecount),"stream.mv2"),os.path.join(getItemTempPath(filecount),"stream.small.mv2"),scalefactor)
  File "/usr/share/mythtv/mytharchive/scripts/mythburn.py", line 2732, in runM2VRequantiser
    fac1=float(M2Vsize0) / float(M2Vsize1)
ZeroDivisionError: float division
------------------------------------------------------------

I have attempted with all available menu layouts and with mythtranscode and projectx.

I have 2 versions of python installed: 2.6.5 and 2.5.5.

Change History (4)

comment:1 Changed 9 years ago by sphery

Priority: majorminor
Resolution: invalid
Severity: highmedium
Status: newclosed

MythArchive? now requires the M2VRequantiser program.

sh: M2VRequantiser: not found

You don't have it. Please install M2VRequantiser, and reopen if you still get failures.

comment:2 Changed 8 years ago by t.brackertz@…

This is a misleading error message. The problem is, that in mythburn.py -> runM2VRequantiser the run of M2VRequantiser fails by some reason. Therefore there is no new file. So the script finds the size of the new file was zero giving the divide by zero-error.

Solution:

if result<>0:

fatalError("Failed while running M2VRequantiser. Command was %s" % command)

sholud be moved directly after

result = runCommand(command)

Then the correct error message is displayed (usually M2VRequantiser can't be found)

comment:3 Changed 8 years ago by J.Pilk@…

The suggested fix looks to me as if it will do the job, but I've just looked at the script again and see that this test is made earlier:

if path_M2VRequantiser[0] == "":

fatalError("M2VRequantiser is not available to resize the files. Giving up!")

I must assume that this didn't trigger the expected exit because a non-null path was defined, probably as part of the initial package, but the target wasn't installed. I don't know immediately what a better test would be.

comment:4 Changed 8 years ago by t.brackertz@…

That's exactly the case:

if path_M2VRequantiser[0] == "": 

   fatalError("M2VRequantiser is not available to resize the files. Giving up!")

only tests if there is a path configured. It doesn't care if it's right or not. But apart from that there are a lot of other reasons for the requantization-process to fail. These aren't caught by this test, either.

So as mentioned before my suggestion is to move the following part:

if result<>0: 

 fatalError("Failed while running M2VRequantiser. Command was %s" % command)

At its current position it's completely useless because if the requantisation fails for any reason the script crashes before reaching the statement.

Then the following part is obsolete and can be removed:

if path_M2VRequantiser[0] == "": 

   fatalError("M2VRequantiser is not available to resize the files. Giving up!")
Note: See TracTickets for help on using tickets.