Skip to content

Commit

Permalink
+ Added the possibility to set the mp4 output resolution in the conf.…
Browse files Browse the repository at this point in the history
… file.
  • Loading branch information
FrancoisSchnell committed Feb 16, 2015
1 parent 9e39850 commit e3bd84d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
18 changes: 10 additions & 8 deletions avclite.py
Expand Up @@ -42,22 +42,27 @@
"recording status True or False"
maxDuration=14400 #14400 = 4h, 3600 = 1h
"max duration 3600=1h"
resolution="1280:720"
"Output recording screen resolution"
#HD720p="1280:720" HD1080p="1920:1080" SD480p="640:480"

url="https://audiovideocast.unistra.fr/avc/myspace_home"
#url="https://audiovideocast-test.u-strasbg.fr/avc/publication_screencast"
"url of the pubish button"

def readConfFile(confFile="configuration-Lite.txt"):
""" Reading conf. file """
global url
global url,resolution
fconf=open(confFile,"r")
config= ConfigParser.ConfigParser()
config.readfp(fconf)
if config.has_option("AVCLite","url") == True:
url=config.get("AVCLite","url")
print "found url:",url
if config.has_option("AVCLite","resolution") == True:
resolution=config.get("AVCLite","resolution")
print "found resolution:",resolution


def getAudioVideoInputFfmpeg(pathData=pathData):
"""A function to get Audio input from ffmpeg.exe (http://ffmpeg.zeranoe.com/builds/)
Returns a list of two lists : [audioDevices,videoDevices]"""
Expand Down Expand Up @@ -109,13 +114,10 @@ def fixCaracters(name):
infoBox=MessageBoxUscreenMedia(frame, "Infos")
return [audioDevices,videoDevices]

def engageRecording(pathData,audioinputName):
def engageRecording(pathData,audioinputName,resolution):
""" Engage recording """
global ffmpegHandle
HD720p="1280:720"
HD1080p="1920:1080"
SD480p="640:480"
resolution=HD720p
resolution=resolution
time = datetime.datetime.now()
timeStr=str(time)
if mp4ToDesktop==False:
Expand Down Expand Up @@ -362,7 +364,7 @@ def laterOn():
wx.Frame.SetIcon(self, self.faviconRecording)
self.recordingStart=datetime.datetime.now()
self.timer.Start(1000)
engageRecording(pathData,audioinputName)
engageRecording(pathData,audioinputName,resolution)
if recording==True:
self.statusBar.SetStatusText("Enregistrement en cours...")
wx.CallLater(500,laterOn)
Expand Down
6 changes: 5 additions & 1 deletion configuration-Lite.txt
Expand Up @@ -5,4 +5,8 @@
[AVCLite]

# URL server (page called when clicking on "Publish")
#url=http://
#url=http://

# Output recording screen resolution,
# for example HD720p=1280:720 (default), HD1080p=1920:1080 SD480p=640:480
#resolution=

0 comments on commit e3bd84d

Please sign in to comment.