forked from mikrosimage/avTranscoder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestTranscoderOffset.py
More file actions
43 lines (28 loc) · 1.07 KB
/
Copy pathtestTranscoderOffset.py
File metadata and controls
43 lines (28 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import os
from nose.tools import *
from pyAvTranscoder import avtranscoder as av
av.preloadCodecsAndFormats()
def testTranscodeAudioOffset():
"""
Transcode one audio stream (profile wave24b48kmono) with offset at the beginning of the transcode.
"""
inputFileName = os.environ['AVTRANSCODER_TEST_AUDIO_FILE']
outputFileName = "testTranscodeAudioOffset.wav"
ouputFile = av.OutputFile( outputFileName )
transcoder = av.Transcoder( ouputFile )
transcoder.add( inputFileName, 0, "wave24b48kmono", 10 )
progress = av.ConsoleProgress()
transcoder.process( progress )
# TODO: check output duration
def testTranscodeVideoOffset():
"""
Transcode one video stream (profile mpeg2) with offset at the beginning of the transcode.
"""
inputFileName = os.environ['AVTRANSCODER_TEST_VIDEO_FILE']
outputFileName = "testTranscodeVideoOffset.mov"
ouputFile = av.OutputFile( outputFileName )
transcoder = av.Transcoder( ouputFile )
transcoder.add( inputFileName, 0, "mpeg2", 10 )
progress = av.ConsoleProgress()
transcoder.process( progress )
# TODO: check output duration