diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2015-11-30 20:14:16 +0100 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2016-01-08 20:38:18 +0100 |
commit | 2a5bc9636647c1beeb58f3f0b3f2bcecb3509d16 (patch) | |
tree | cb1abc4fc90e9341b614114136e8be3d98c33e97 /test | |
download | flask-mediabrowser-2a5bc9636647c1beeb58f3f0b3f2bcecb3509d16.tar.gz flask-mediabrowser-2a5bc9636647c1beeb58f3f0b3f2bcecb3509d16.zip |
poc
Diffstat (limited to 'test')
-rw-r--r-- | test/__init__.py | 6 | ||||
-rw-r--r-- | test/data/test.mkv | bin | 0 -> 249856 bytes | |||
-rw-r--r-- | test/ffmpeg.py | 26 |
3 files changed, 32 insertions, 0 deletions
diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..9cf7151 --- /dev/null +++ b/test/__init__.py @@ -0,0 +1,6 @@ +import logging + +from test.ffmpeg import * + + +logging.basicConfig(level=logging.INFO) diff --git a/test/data/test.mkv b/test/data/test.mkv Binary files differnew file mode 100644 index 0000000..9bcacec --- /dev/null +++ b/test/data/test.mkv diff --git a/test/ffmpeg.py b/test/ffmpeg.py new file mode 100644 index 0000000..913d8d8 --- /dev/null +++ b/test/ffmpeg.py @@ -0,0 +1,26 @@ +import mediabrowser.ffmpeg as ffmpeg + +import os +from pprint import pprint +from unittest import TestCase + + +class TestFfmpeg(TestCase): + + def setUp(self): + self.test_mkv = os.path.join(os.path.dirname(__file__), + "data", "test.mkv") + + + # def test_data(self): + # data = ffmpeg.ffprobe_data(self.test_mkv) + # assert 'streams' in data + # assert len(data['streams']) == 2 + # + # assert 'format' in data + # assert 'duration' in data['format'] + # assert data['format']['duration'] == '27.472000' + + def test_calculate_splittimes(self): + for time in ffmpeg.calculate_splittimes(self.test_mkv, 120): + print(time)
\ No newline at end of file |