Stream TV Capture Card?
Posted: Tue May 14, 2013 12:20 pm
Is it possible to stream from a TV Capture Card? I know mencoder has some capture tv options.
A short text to describe your forum
https://www.universalmediaserver.com/forum/
https://www.universalmediaserver.com/forum/viewtopic.php?t=907
Wolfgan wrote:Does anyone know if it can be added to UMS or via a plugin?
Code: Select all
cmd = 'ffmpeg -y -f dshow -r 30 -s 1920x1080 -threads 0 -i video="UScreenCapture":audio="Stereo Mix (Realtek High Defini" -c:v mpeg2video -f mpegts -q:v 3 -threads 0 %s' % os.environ['OUTFILE']
Code: Select all
05-19 00:21:33 Started playing Screencast on your Samsung AllShare
05-19 00:21:45 Buffer read ArrayIndexOutOfBoundsException error:
05-19 00:21:45 readCount: "9223372034707042159"
05-19 00:21:45 maxMemorySize: "104857600"
I actually took the script a bit further but never released it due to the overlong transcoding lag and choppy audio. The version below will let you experiment with more directshow capture filters and maybe find a better combination. As to buffering, sorry but no particularly useful advice comes to mindLnS wrote:However, while audio does get sent I've noticed it is de-synchronized from the video.
Code: Select all
ffmpeg -y -rtbufsize 1500M -f dshow -r 30 -s 1920x1080 -threads 0 -i video="UScreenCapture":audio="Stereo Mix (Realtek High Defini" -c:v mpeg2video -f mpegts -q:v 3 -threads 0 C:\test.mpg
Code: Select all
ffmpeg -y -rtbufsize 1500M -f dshow -r 30 -s 1920x1080 -threads 0 -i audio="virtual-audio-capturer":video="screen-capture-recorder" -c:v mpeg2video -f mpegts -q:v 3 -threads 0 C:\test.mpg
Code: Select all
ffmpeg -f dshow -i video="UScreenCapture":audio="Stereo Mix (Realtek High Defini" -r 30 -threads 0 C:\Test.mp4
Code: Select all
ffmpeg -f dshow -r 30 -i video="UScreenCapture":audio="Stereo Mix (Realtek High Defini" -threads 0 C:\Test.mp4
Code: Select all
ffmpeg -f dshow -i video="UScreenCapture":audio="Stereo Mix (Realtek High Defini" -r 30 -vcodec libx264 -threads 0 -crf 0 -preset ultrafast -tune zerolatency C:\test.mp4
Code: Select all
ffmpeg -y -f dshow -r 30 -s 1920x1080 -threads 0 -i video="UScreenCapture":audio="Stereo Mix (Realtek High Defini" -c:v libx264 -preset ultrafast -qp 0 -f mp4 -threads 0 C:\Test.mp4
Code: Select all
05-20 01:36:19 There is no inputstream to return for screen-capture-recorder [1920x1080@30fps] + virtual-audio-capturer
And ergo solves the audio choppiness I experienced before. Just for the record, anyone can customize the script's ffmpeg command by editing capture.py line 22:LnS wrote:I found including "-rtbufsize 1500M" gets rid of all the buffer exceeded messages in both ffmpeg and the UMS console while preventing FPS fluctuations
return 'ffmpeg -y -rtbufsize 1500M -f {dev} -r {fps} -s {size} -i {input} -c:v mpeg2video -f mpegts -q:v 3 -threads 0 {OUTFILE}' \