Opened 16 years ago

Closed 16 years ago

#4370 closed defect (fixed)

Backend preview generation fails on files with spaces in the name

Reported by: kkuphal Owned by: danielk
Priority: minor Milestone: 0.21
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

2007-12-26 11:24:18.923 Connected to database 'mythconverg' at host: mythtv
2007-12-26 11:24:19.138 AFD: Opened codec 0x9799e90, id(MPEG4) type(Video)
2007-12-26 11:24:19.161 AFD: Opened codec 0x979a310, id(MP3) type(Audio)
2007-12-26 11:24:19.166 NVP: GetScreenGrabAtFrame: Recording does not have position map so we will be unable to grab the desired frame.

2007-12-26 11:24:19.167 Run 'mythcommflag --file Kyle XY [2x07] Free To Be You And Me (XviD asd).avi --rebuild' to fix.
2007-12-26 11:24:19.167 If that does not work and this is a .mpg file, try 'mythtranscode --mpeg2 --buildindex --allkeys -c 249 -s 20070723200000'.
2007-12-26 11:24:19.245 Preview: Grabbed preview '/usr/local/media/2/tv/Kyle XY [2x07] Free To Be You And Me (XviD asd).avi' 512x384@270s
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `mythbackend --generate-preview 100x0@270s --chanid 249 --starttime 20070723200000 --outfile /usr/local/media/2/tv/Kyle XY [2x07] Free To Be You And Me (XviD asd).avi.100x0x270.png '
2007-12-26 11:24:19.375 Preview Error: Encountered problems running 'mythbackend --generate-preview 100x0@270s --chanid 249 --starttime 20070723200000 --outfile /usr/local/media/2/tv/Kyle XY [2x07] Free To Be You And Me (XviD asd).avi.100x0x270.png '

If I run the same command with the filename quoted, the preview generation reports

2007-12-26 11:26:13.903 Using runtime prefix = /usr
2007-12-26 11:26:13.904 Empty LocalHostName.
2007-12-26 11:26:13.904 Using localhost value of mythtv
2007-12-26 11:26:13.916 New DB connection, total: 1
2007-12-26 11:26:13.925 Connected to database 'mythconverg' at host: mythtv
2007-12-26 11:26:13.927 Closing DB connection named 'DBManager0'
2007-12-26 11:26:13.929 Connected to database 'mythconverg' at host: mythtv
2007-12-26 11:26:13.932 Current Schema Version: 1201
2007-12-26 11:26:13.937 New DB connection, total: 2
2007-12-26 11:26:13.939 Connected to database 'mythconverg' at host: mythtv
2007-12-26 11:26:14.129 AFD: Opened codec 0x8a129c0, id(MPEG4) type(Video)
2007-12-26 11:26:14.151 AFD: Opened codec 0x8a12e40, id(MP3) type(Audio)
2007-12-26 11:26:14.156 NVP: GetScreenGrabAtFrame: Recording does not have position map so we will be unable to grab the desired frame.

2007-12-26 11:26:14.157 Run 'mythcommflag --file Kyle XY [2x01] The Prophet (XviD asd).avi --rebuild' to fix.
2007-12-26 11:26:14.157 If that does not work and this is a .mpg file, try 'mythtranscode --mpeg2 --buildindex --allkeys -c 500 -s 20070611200000'.
2007-12-26 11:26:14.227 Preview: Grabbed preview '/usr/local/media/2/tv/Kyle XY [2x01] The Prophet (XviD asd).avi' 512x384@270s

And after generating the position map

2007-12-26 11:26:56.886 Using runtime prefix = /usr
2007-12-26 11:26:56.887 Empty LocalHostName.
2007-12-26 11:26:56.888 Using localhost value of mythtv
2007-12-26 11:26:56.932 New DB connection, total: 1
2007-12-26 11:26:56.947 Connected to database 'mythconverg' at host: mythtv
2007-12-26 11:26:56.948 Closing DB connection named 'DBManager0'
2007-12-26 11:26:56.951 Connected to database 'mythconverg' at host: mythtv
2007-12-26 11:26:56.954 Current Schema Version: 1201
2007-12-26 11:26:56.958 New DB connection, total: 2
2007-12-26 11:26:56.960 Connected to database 'mythconverg' at host: mythtv
2007-12-26 11:26:57.149 AFD: Opened codec 0x846d9c0, id(MPEG4) type(Video)
2007-12-26 11:26:57.172 AFD: Opened codec 0x846de40, id(MP3) type(Audio)
2007-12-26 11:26:57.262 Preview: Grabbed preview '/usr/local/media/2/tv/Kyle XY [2x01] The Prophet (XviD asd).avi' 512x384@270s

The PNG are generated right but MythWeb does not display them also as the copies in the data cache folder but I'm not sure how the files from the recording folder end up in the data cache folder for mythweb. Generally speaking, these functions should enclose the filename in spaces for each external command

Change History (3)

comment:1 Changed 16 years ago by danielk

Milestone: unknown0.21
Owner: changed from Isaac Richards to danielk
Status: newassigned

comment:2 Changed 16 years ago by danielk

I think putting this stuff on the command line might be the wrong way to do this. Instead I'll rewrite this to put the params in a file and reading that in, then I'll only have to deal with newlines in the filename.

comment:3 Changed 16 years ago by danielk

Resolution: fixed
Status: assignedclosed

(In [15727]) Fixes #4370. Quotes output file name for preview generator; so that files with spaces can be generated.

Note: See TracTickets for help on using tickets.