From 2a5bc9636647c1beeb58f3f0b3f2bcecb3509d16 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Mon, 30 Nov 2015 20:14:16 +0100 Subject: poc --- test/ffmpeg.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/ffmpeg.py (limited to 'test/ffmpeg.py') 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 -- cgit v1.2.1