X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?p=living-lab-site.git;a=blobdiff_plain;f=cis%2Fapi%2Fffmpeg.py;h=197449788ad6e529956ee7354a72e072bf65ec25;hp=27c9a5d0c07849bad8d9cf3f4ebd0102ec134ead;hb=080b37a97e93691b3ba1c4aa3982a143167115a7;hpb=9d5e17576e133645963b8e41083baf235c5cceba diff --git a/cis/api/ffmpeg.py b/cis/api/ffmpeg.py index 27c9a5d..1974497 100644 --- 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 api_exceptions +import cis_exceptions import subprocess import re import os @@ -91,7 +91,7 @@ class FFmpegTranscoder(base.BaseTranscoder): 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() @@ -133,14 +133,14 @@ class FFmpegThumbExtractor(base.BaseThumbExtractor): 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) - raise api_exceptions.ThumbExtractionException( \ + raise cis_exceptions.ThumbExtractionException( \ '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: - raise api_exceptions.AVInfoException( \ + raise cis_exceptions.AVInfoException( \ 'ffprobe exited with code ' + str(exit_code) + '.')