nashve / mythbox

Automatically exported from code.google.com/p/mythbox
GNU General Public License v2.0
0 stars 1 forks source link

FFMPEG error selecting recording #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Select a recording from the list
2.
3.

What is the expected output? What do you see instead?
It should display the recording details.  In full screen mode it minimizes 
XBMC to the desktop.  In windowed mode, a message scrolls along the bottom 
stating "FFMpeg could not determine framerate. Comm skip may be 
inaccurate".  In full screen mode upon re-maximizing XBMC I see the error 
as well.

What version of the product are you using? On what operating system?
Mythbox latest SVN 1558, Windows XP.

Please provide any additional information below.

Original issue reported on code.google.com by tschu...@gmail.com on 17 Dec 2009 at 3:46

Attachments:

GoogleCodeExporter commented 9 years ago
Copy & paste (exactly) into a dos window (assuming you haven't deleted the
recording). What are the results?

"C:\Program Files\XBMC\scripts\MythBox\resources\bin\win32\ffmpeg.exe" -i
"M:\1006_20091214203100.mpg" 2>"c:\program 
files\xbmc\scripts\mythbox\mythbox.out"

Original comment by semir.pa...@gmail.com on 22 Dec 2009 at 6:28

GoogleCodeExporter commented 9 years ago
I don't have the same file, but all of my recordings give the same error.  Here 
is 
the output on a different file.  I had to pipe mythbox.out to a different 
folder 
though as the user running xbmc doesn't have write access to the scripts 
folder.  I 
assume this isn't the cause of any issues.

FFmpeg version SVN-r16043-Sherpya, Copyright (c) 2000-2008 Fabrice Bellard, et 
al.
  libavutil     49.12. 0 / 49.12. 0
  libavcodec    52. 6. 1 / 52. 6. 1
  libavformat   52.23. 1 / 52.23. 1
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 1. 0 /  0. 1. 0
  libswscale     0. 6. 1 /  0. 6. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Dec 10 2008 18:25:26, gcc: 4.2.5 20080919 (prerelease) [Sherpya]
Input #0, mpeg, from 'm:\1006_20091221203100.mpg':
  Duration: 00:28:57.20, start: 0.233733, bitrate: 8727 kb/s
    Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480 [PAR 8:9 DAR 4:3], 10000 
kb/s, 29.97 tb(r)
    Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
At least one output file must be specified

Original comment by tschu...@gmail.com on 22 Dec 2009 at 11:32

GoogleCodeExporter commented 9 years ago
That is precisely the cause of the issue. If the file can't be written then it 
can't
be read by mythbox. Did you make the folder read-only or was it like that all 
along?

c:\program files\xbmc\scripts\mythbox\  is the 'tmpdir' returned from python so 
I
have no say in its choosing. 

Original comment by semir.pa...@gmail.com on 23 Dec 2009 at 4:53

GoogleCodeExporter commented 9 years ago
I think I see what is happening now.  I installed XBMC a couple times before I 
was 
up and running.  The second time I installed so that user data is stored in the 
users documents and settings folder, but this was after I already had the 
scripts 
installed to "program files/xbmc".  I will work on getting the scripts removed 
from "program files" and installed to the scripts folder in the user profile.

Note this is on Windows XP Home, and I am running XMBC as a Windows Limited 
User.  
By default XP home provides no means to adjust security settings on a per 
folder 
basis, so I can't simply set the folder to world readable.

I will update the ticket after I re-install the scripts to the correct folder.

Original comment by tschu...@gmail.com on 23 Dec 2009 at 2:43

GoogleCodeExporter commented 9 years ago
I uninstalled/reinstalled XMBC and mythbox, deleting all the XBMC folders from 
my 
system.  In the re-install I again choose to use the profile folder to store 
all 
settings, and the error persisted.  In further troubleshooting, it appears 
Python 
strips the leading and trailing '"' you are appending to the cmd string, so the 
Windows command interpreter is failing.

I modified the following line in esources\lib\pyxcoder\ffmpeg\__init__.py to be 
the 
following, and the error is now gone and the mythbox.out file is being written 
correctly.

cmd = '"' + '"' + self.ffmpeg + '"' + ' -i ' + '"' + input_filename + '"' + ' 
2>' + 
outfileQuoted + '"'

From my little bit of research, it appears the os.system() call automatically 
strips 
out the surrounding quotes, hence the error I was seeing.

Original comment by tschu...@gmail.com on 28 Dec 2009 at 8:32

GoogleCodeExporter commented 9 years ago
Unfortunately, the extra set of quotes breaks Linux and Mac. I tried myself on 
Win XP
and didn't need the extra set of quotes either. Can you send me the output of 
this
command?  

echo %COMSPEC%

I'm thinking it has something to do with your command shell (in case you're not 
using
the default which I believe is C:\WINDOWS\system32\cmd.exe)

Original comment by semir.pa...@gmail.com on 29 Dec 2009 at 6:17

GoogleCodeExporter commented 9 years ago
The results of the command is "C:\WINDOWS\system32\cmd.exe"

The reason I brought up the double delimiting is due to the comments found in 
this 
thread: 
http://stackoverflow.com/questions/204017/how-do-i-execute-a-program-from-
python-os-system-fails-due-to-spaces-in-path

I'm also running a beta build of XMBC.  Did something maybe change in the 
version of 
Python being used from the last stable build?

Original comment by tschu...@gmail.com on 30 Dec 2009 at 6:36

GoogleCodeExporter commented 9 years ago
Works fine for me on Windows XP and Vista with a single set of quotes. But 
since it
is still broken for you, I've had a double set added just for windows. Fixed 
svn 1796.

Original comment by semir.pa...@gmail.com on 17 Jan 2010 at 6:35