projects
/
living-lab-site.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update positioning in contact page
[living-lab-site.git]
/
cis
/
api
/
ffmpeg.py
diff --git
a/cis/api/ffmpeg.py
b/cis/api/ffmpeg.py
index
27c9a5d
..
8e49f1a
100644
(file)
--- a/
cis/api/ffmpeg.py
+++ b/
cis/api/ffmpeg.py
@@
-7,7
+7,7
@@
videos and thumbnail extraction from videos using FFmpeg CLI program.
"""
import base
"""
import base
-import
api
_exceptions
+import
cis
_exceptions
import subprocess
import re
import os
import subprocess
import re
import os
@@
-40,7
+40,7
@@
class FFmpegTranscoder(base.BaseTranscoder):
"vp8": "libvpx"
}
"vp8": "libvpx"
}
- def _transcode(self, container, a_codec=None, v_codec=None,
+ def _transcode(self, container,
extension=None,
a_codec=None, v_codec=None,
a_bitrate=None, a_samplingrate=None, a_channels=None,
v_bitrate=None, v_framerate=None, v_resolution=None, v_dar=None):
a_bitrate=None, a_samplingrate=None, a_channels=None,
v_bitrate=None, v_framerate=None, v_resolution=None, v_dar=None):
@@
-91,7
+91,7
@@
class FFmpegTranscoder(base.BaseTranscoder):
exit_code = p.wait()
if exit_code > 0:
exit_code = p.wait()
if exit_code > 0:
- raise
api
_exceptions.TranscodingException( \
+ raise
cis
_exceptions.TranscodingException( \
'FFmpeg exited with code ' + str(exit_code) + '.')
log.close()
'FFmpeg exited with code ' + str(exit_code) + '.')
log.close()
@@
-133,14
+133,14
@@
class FFmpegThumbExtractor(base.BaseThumbExtractor):
exit_code = p.wait()
if exit_code > 0:
exit_code = p.wait()
if exit_code > 0:
- raise
api
_exceptions.ThumbExtractionException( \
+ raise
cis
_exceptions.ThumbExtractionException( \
'FFmpeg exited with code ' + str(exit_code) + '.')
# FFmpeg bug: when no key frame is found from seek_pos to the
# end of file an empty image file is created.
if os.path.getsize(output_file) == 0L:
os.unlink(output_file)
'FFmpeg exited with code ' + str(exit_code) + '.')
# FFmpeg bug: when no key frame is found from seek_pos to the
# end of file an empty image file is created.
if os.path.getsize(output_file) == 0L:
os.unlink(output_file)
- raise
api
_exceptions.ThumbExtractionException( \
+ raise
cis
_exceptions.ThumbExtractionException( \
'FFmpeg created an empty file.')
def get_video_duration(self):
'FFmpeg created an empty file.')
def get_video_duration(self):
@@
-194,5
+194,5
@@
class FFprobeAVInfo(base.BaseAVInfo):
exit_code = p.wait()
if exit_code > 0:
exit_code = p.wait()
if exit_code > 0:
- raise
api
_exceptions.AVInfoException( \
+ raise
cis
_exceptions.AVInfoException( \
'ffprobe exited with code ' + str(exit_code) + '.')
'ffprobe exited with code ' + str(exit_code) + '.')