Permalink
Browse files

Fixed streaming IP problem using recordingPlace var detection.

  • Loading branch information...
1 parent 815b6fe commit 24c0471dbda9850d21ae80f4e8364dfa130e757b @metadirective metadirective committed Jan 16, 2014
Showing with 6 additions and 6 deletions.
  1. +6 −6 MediaCours.py
View
@@ -432,9 +432,9 @@ def record():
recordStop()
s= snd.getData()
if s and len( s ):
- for fr in ac.encode(s):
- f.write( fr )
- #print "*",
+ for fr in ac.encode(s):
+ f.write( fr )
+ #print "*",
if recording == False:
snd.stop()
print "-- stopped recording now --"
@@ -461,7 +461,7 @@ def ffmpegScreencastingRecord():
cmd=('ffmpeg -f dshow -i video="UScreenCapture" -f dshow -i audio="%s" -q 5 "%s"')%(audioinputName, videoFileOutput)
subprocess.Popen(cmd,shell=True)
if live==True:
- subprocess.Popen(["ffmpeg","-f","dshow","-i","video=UScreenCapture","-f","dshow","-i","audio="+audioinputName,"-q","5","%s"%videoFileOutput,"-f","flv","rtmp://vod-flash-avc.u-strasbg.fr/live/130_79_143_130"],shell=True)
+ subprocess.Popen(["ffmpeg","-f","dshow","-i","video=UScreenCapture","-f","dshow","-i","audio="+audioinputName,"-q","5","%s"%videoFileOutput,"-f","flv","rtmp://vod-flash-avc.u-strasbg.fr/live/"+recordingPlace],shell=True)
page = urlopen(urlLiveState,"recordingPlace="+recordingPlace+"&status="+"begin")
if 0: # DEPRECATED
cmd=('ffmpeg -f dshow -i video="UScreenCapture" -f dshow -i audio="%s" -q 5 "%s"')%(audioinputName, videoFileOutput)
@@ -487,7 +487,7 @@ def ffmpegAudioRecord():
style=wx.OK|wx.ICON_INFORMATION)
dialog.ShowModal()
print "In ffmpegAudioRecord Live"
- subprocess.Popen(["ffmpeg","-f","dshow","-i","audio="+audioinputName,"%s"%audioFileOutput,"-f","flv","rtmp://vod-flash-avc.u-strasbg.fr/live/130_79_143_130"],shell=True)
+ subprocess.Popen(["ffmpeg","-f","dshow","-i","audio="+audioinputName,"%s"%audioFileOutput,"-f","flv","rtmp://vod-flash-avc.u-strasbg.fr/live/"+recordingPlace],shell=True)
if 0: # WORKS but DEPRECATED (going for subprocess)
print "In old deprecated ffmpegAudioRecord"
#cmd="ffmpeg.exe -f alsa -ac 2 -i pulse -acodec libmp3lame -aq 0 -y -loglevel 0 "+workDirectory+"/"+nameRecord
@@ -517,7 +517,7 @@ def ffmpegVideoRecord():
subprocess.Popen(["ffmpeg","-f","dshow","-i","video="+videoinputName,"-f","dshow","-i","audio="+audioinputName,"-q","5","%s"%videoFileOutput],shell=True)
if live==True:
- subprocess.Popen(["ffmpeg","-f","dshow","-i","video="+videoinputName,"-f","dshow","-i","audio="+audioinputName,"-q","5","%s"%videoFileOutput,"-f","flv","rtmp://vod-flash-avc.u-strasbg.fr/live/130_79_143_130"],shell=True)
+ subprocess.Popen(["ffmpeg","-f","dshow","-i","video="+videoinputName,"-f","dshow","-i","audio="+audioinputName,"-q","5","%s"%videoFileOutput,"-f","flv","rtmp://vod-flash-avc.u-strasbg.fr/live/"+recordingPlace],shell=True)
page = urlopen(urlLiveState,"recordingPlace="+recordingPlace+"&status="+"begin")
if 0: #worked but switech to subprocess as there's no way to hide the console this way

0 comments on commit 24c0471

Please sign in to comment.