Opened 13 years ago

Closed 13 years ago

#2027 closed defect (fixed)

mytharchive: invocation of mythtranscode fails for video files with spaces

Reported by: Spitzbub Owned by: paulh
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I.e. * Processing file /media/videos/The Fifth Element.mpg of type video * File type is 'mpeg' Video codec is 'mpeg2video' Attempting to run mythtranscode --mpeg2 to fix any errors 2006-07-05 23:15:45.592 Using runtime prefix = /usr/local 2006-07-05 23:15:45.606 New DB connection, total: 1 2006-07-05 23:15:45.612 Enabled verbose msgs: important 2006-07-05 23:15:45.612 Couldn't deduce channel and start time from The 2006-07-05 23:15:45.619 Couldn't open input file, error #-2 Failed while running mythtranscode to cut commercials and/or clean up an mpeg2 file. Result: 63232, Command was mythtranscode --mpeg2 -i /media/videos/The Fifth Element.mpg -o /media/mytharchive/work/1/newfile.mpg

The fix is quite simple:

Index: mythburn/scripts/mythburn.py =================================================================== --- mythburn/scripts/mythburn.py (revision 10406) +++ mythburn/scripts/mythburn.py (working copy) @@ -1073,9 +1073,9 @@

if localfile != "":

if usecutlist == True:

  • command = "mythtranscode --mpeg2 --honorcutlist -i %s -o %s" % (localfile, destination)

+ command = "mythtranscode --mpeg2 --honorcutlist -i \"%s\" -o %s" % (localfile, destination)

else:

  • command = "mythtranscode --mpeg2 -i %s -o %s" % (localfile, destination)

+ command = "mythtranscode --mpeg2 -i \"%s\" -o %s" % (localfile, destination)

else:

if usecutlist == True:

command = "mythtranscode --mpeg2 --honorcutlist -c %s -s %s -o %s" % (chanid, starttime, destination)

@@ -3125,4 +3125,4 @@

traceback.print_exc(file=sys.stdout) if progresslog != "":

traceback.print_exc(file=progressfile)

  • write('-'*60)

\ No newline at end of file + write('-'*60)

HTH :-)

Change History (2)

comment:1 Changed 13 years ago by paulh

Owner: changed from Isaac Richards to paulh

comment:2 Changed 13 years ago by paulh

Resolution: fixed
Status: newclosed

(In [10489]) Fix #2027 - Quote the filename passed to mythtranscode

Note: See TracTickets for help on using tickets.