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

makeqctoolsreport - fix transcode function and add shebang #2

Merged
merged 1 commit into from
Sep 30, 2016
Merged

makeqctoolsreport - fix transcode function and add shebang #2

merged 1 commit into from
Sep 30, 2016

Conversation

kieranjol
Copy link
Contributor

Initially ffmpegstring was a string, but subprocess.call requires a list of arguments. Here was the error that I kept getting:

Traceback (most recent call last):
  File "makeqctoolsreport.py", line 81, in <module>
    transcode()
  File "makeqctoolsreport.py", line 60, in transcode
    subprocess.call(ffmpegstring)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

This pull request turns the command into a list. Because inputCodec and filterString can be empty, it causes the ffmpeg command to fail, which is why the if statement is there.

Why is the transcode necessary at all? Can't you just run ffprobe on the source file directly?

Also I added a shebang for good measure.

@kieranjol
Copy link
Contributor Author

Oh, I also removed the return from the function. As the only action of the function is to create a file, I don't think that the function needs to return anything.

@FutureDays FutureDays merged commit c09d1c0 into amiaopensource:master Sep 30, 2016
@FutureDays
Copy link
Collaborator

Kieran, I'll fix that transcode to only go if the return from ffprobe is j2k

@kieranjol
Copy link
Contributor Author

Ah cool!

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

Successfully merging this pull request may close these issues.

2 participants