Skip to content

Commit c6d358a

Browse files
author
Clement Champetier
committed
pyTest: add tests to check if offset crashes
1 parent 7abed3a commit c6d358a

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

test/pyTest/testTranscoderOffset.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import os
2+
3+
from nose.tools import *
4+
5+
from pyAvTranscoder import avtranscoder as av
6+
7+
av.preloadCodecsAndFormats()
8+
9+
10+
def testTranscodeAudioOffset():
11+
"""
12+
Transcode one audio stream (profile wave24b48kmono) with offset at the beginning of the transcode.
13+
"""
14+
inputFileName = os.environ['AVTRANSCODER_TEST_AUDIO_FILE']
15+
outputFileName = "testTranscodeAudioOffset.wav"
16+
17+
ouputFile = av.OutputFile( outputFileName )
18+
transcoder = av.Transcoder( ouputFile )
19+
20+
transcoder.add( inputFileName, 0, "wave24b48kmono", 10 )
21+
22+
progress = av.ConsoleProgress()
23+
transcoder.process( progress )
24+
25+
# TODO: check output duration
26+
27+
28+
def testTranscodeVideoOffset():
29+
"""
30+
Transcode one video stream (profile mpeg2) with offset at the beginning of the transcode.
31+
"""
32+
inputFileName = os.environ['AVTRANSCODER_TEST_VIDEO_FILE']
33+
outputFileName = "testTranscodeVideoOffset.mov"
34+
35+
ouputFile = av.OutputFile( outputFileName )
36+
transcoder = av.Transcoder( ouputFile )
37+
38+
transcoder.add( inputFileName, 0, "mpeg2", 10 )
39+
40+
progress = av.ConsoleProgress()
41+
transcoder.process( progress )
42+
43+
# TODO: check output duration

0 commit comments

Comments
 (0)