Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"quality" option on h264 codec breaks program (error) #38

Open
dhardtke opened this issue Nov 14, 2013 · 0 comments
Open

"quality" option on h264 codec breaks program (error) #38

dhardtke opened this issue Nov 14, 2013 · 0 comments

Comments

@dhardtke
Copy link

Hey,

I am using this code:

from converter import Converter
c = Converter()

conv = c.convert('input.mp4', 'video-transcoded.mkv', {
    'format': 'mkv',
    'audio': {
        'codec': 'ac3',
    },
    'video': {
        'codec': 'h264',
        'width': 1280,
        'height': 720,
        'quality': 25,
        'preset': 'slow'
    }
})

for timecode in conv:
    print "Converting (%f) ...\r" % timecode

And I get this error:

root@nas:/scripts/tools# python encode.test.py 
Traceback (most recent call last):
  File "encode.test.py", line 18, in <module>
    for timecode in conv:
  File "/usr/local/lib/python2.7/dist-packages/converter/__init__.py", line 184, in convert
    timeout=timeout):
  File "/usr/local/lib/python2.7/dist-packages/converter/ffmpeg.py", line 416, in convert
    p = self._spawn(cmds)
  File "/usr/local/lib/python2.7/dist-packages/converter/ffmpeg.py", line 334, in _spawn
    logger.debug('Spawning ffmpeg with command: ' + ' '.join(cmds))
TypeError: sequence item 14: expected string, int found
root@nas:/scripts/tools# 

And without quality option it works..

Please help me.

EDIT:
And I also debugged the _spawn method:
Spawning ffmpeg with command: /usr/bin/ffprobe -show_format -show_streams filename.mp4

How can I get the logger to work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant