Some spring cleaning before transitioning to snowmix 0.5.1
This commit is contained in:
parent
c97e242a10
commit
0454acb61d
|
@ -1,4 +1,4 @@
|
||||||
Snowmix-0.4.2
|
Snowmix-*
|
||||||
images/logo.*
|
images/logo.*
|
||||||
python/virtenv
|
python/virtenv
|
||||||
videos
|
videos
|
||||||
|
|
Binary file not shown.
13
ini/base.ini
13
ini/base.ini
|
@ -1,5 +1,4 @@
|
||||||
# Basic Feeds Settings
|
# Basic Feeds Settings for HTT 2015
|
||||||
# Copyright by Peter Maersk-Moller 2012 - All rights reserved
|
|
||||||
|
|
||||||
verbose
|
verbose
|
||||||
|
|
||||||
|
@ -66,7 +65,7 @@ vfeed place rect 3 0 0 1280 720 0 0
|
||||||
|
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# Small size vfeeds
|
# Small size vfeeds
|
||||||
####################
|
####################
|
||||||
|
|
||||||
vfeed add 4 SmallCam1
|
vfeed add 4 SmallCam1
|
||||||
|
@ -74,11 +73,11 @@ vfeed source feed 4 1
|
||||||
vfeed place rect 4 5 2 1280 720 0 0 0 0.492 0.492 1.0
|
vfeed place rect 4 5 2 1280 720 0 0 0 0.492 0.492 1.0
|
||||||
|
|
||||||
vfeed add 5 SmallCam1
|
vfeed add 5 SmallCam1
|
||||||
vfeed source feed 5 2
|
vfeed source feed 5 2
|
||||||
vfeed place rect 5 645 2 1280 720 0 0 0 0.492 0.492 1.0
|
vfeed place rect 5 645 2 1280 720 0 0 0 0.492 0.492 1.0
|
||||||
|
|
||||||
vfeed add 6 SmallCam1
|
vfeed add 6 SmallCam1
|
||||||
vfeed source feed 6 3
|
vfeed source feed 6 3
|
||||||
vfeed place rect 6 645 363 1280 720 0 0 0 0.492 0.492 1.0
|
vfeed place rect 6 645 363 1280 720 0 0 0 0.492 0.492 1.0
|
||||||
|
|
||||||
|
|
||||||
|
@ -92,12 +91,12 @@ image place 0 0 0 0
|
||||||
image load 1 images/logo.png
|
image load 1 images/logo.png
|
||||||
image place 1 1 24 24
|
image place 1 1 24 24
|
||||||
|
|
||||||
text font 1 Source Code Pro Bold 40
|
text font 1 Source Code Pro Bold 40
|
||||||
text string 1 00:00:00
|
text string 1 00:00:00
|
||||||
text place 1 1 1 200 630 1.0 1.0 1.0
|
text place 1 1 1 200 630 1.0 1.0 1.0
|
||||||
|
|
||||||
command create ShowAll
|
command create ShowAll
|
||||||
overlay image 0
|
overlay image 0
|
||||||
vfeed overlay 4..6
|
vfeed overlay 4..6
|
||||||
text overlay 1
|
text overlay 1
|
||||||
|
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
# Basic Feeds Settings
|
|
||||||
# Copyright by Peter Maersk-Moller 2012 - All rights reserved
|
|
||||||
|
|
||||||
verbose
|
|
||||||
|
|
||||||
require version 0.4.5
|
|
||||||
|
|
||||||
# Define allowed remote host IP addresses. If omitted then only 127.0.0.1 will be accepted.
|
|
||||||
system host allow 127.0.0.1
|
|
||||||
|
|
||||||
# Listen on port 9999 for command control connections
|
|
||||||
system control port 9999
|
|
||||||
|
|
||||||
# Set system Geometry to 1024x768
|
|
||||||
system geometry 1280 720 ARGB
|
|
||||||
|
|
||||||
# Set system frame rate to 24
|
|
||||||
system frame rate 25
|
|
||||||
|
|
||||||
# Set output control socket
|
|
||||||
system socket /tmp/mixer1
|
|
||||||
|
|
||||||
# Set feed idle time - feed 0 will always be idle. If no file is given,
|
|
||||||
# idle image will be all black.
|
|
||||||
feed idle 0 1 frames/test_1280x720
|
|
||||||
#feed idle 0 1
|
|
||||||
|
|
||||||
##################
|
|
||||||
# Input feeds
|
|
||||||
##################
|
|
||||||
|
|
||||||
feed add 1 Cam1
|
|
||||||
feed geometry 1 1280 720
|
|
||||||
feed live 1
|
|
||||||
feed idle 1 100 frames/test_1280x720
|
|
||||||
feed socket 1 /tmp/feed1
|
|
||||||
|
|
||||||
stack 0 1
|
|
||||||
|
|
||||||
monitor on
|
|
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/env python2
|
|
||||||
import pygst
|
|
||||||
pygst.require('0.10')
|
|
||||||
import gst
|
|
||||||
|
|
||||||
MIXER_IP = 'localhost'
|
|
||||||
MIXER_PORT = 9999
|
|
||||||
|
|
||||||
class CameraFeed(object):
|
|
||||||
|
|
||||||
def __init__(self, pipe, cam_ip):
|
|
||||||
self.pipe = pipe
|
|
||||||
self.cam_ip = cam_ip
|
|
||||||
|
|
||||||
def _run(self):
|
|
||||||
snowmix_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
||||||
snowmix_socket.connect((ip, 9999))
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/env python2
|
#!/bin/env python2
|
||||||
|
|
||||||
CAMERA_FEEDS = {
|
CAMERA_FEEDS = {
|
||||||
'/tmp/feed1' : '192.168.1.100',
|
'/tmp/feed1' : '192.168.1.100',
|
||||||
'/tmp/feed2' : '192.168.1.101',
|
'/tmp/feed2' : '192.168.1.101',
|
||||||
'/tmp/feed3' : '192.168.1.102',
|
'/tmp/feed3' : '192.168.1.102',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,3 @@ OUTPUT_SOURCE = 'shmsrc socket-path=%(mixer_pipe)s do-timestamp=true is-live=tru
|
||||||
SCREEN_OUTPUT = 'videoscale ! video/x-raw-rgb, width=%(screen_width)d, height=%(screen_height)d !'\
|
SCREEN_OUTPUT = 'videoscale ! video/x-raw-rgb, width=%(screen_width)d, height=%(screen_height)d !'\
|
||||||
+ ' timeoverlay ! ximagesink'
|
+ ' timeoverlay ! ximagesink'
|
||||||
NETWORK_OUTPUT = 'ffmpegcolorspace ! timeoverlay ! x264enc tune="zerolatency" ! mpegtsmux ! tcpserversink host=0.0.0.0 port=%(port)d'
|
NETWORK_OUTPUT = 'ffmpegcolorspace ! timeoverlay ! x264enc tune="zerolatency" ! mpegtsmux ! tcpserversink host=0.0.0.0 port=%(port)d'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
./cam2feed.sh /tmp/feed1 "http://gstreamer:GlytEnru@192.168.50.100/videostream.cgi?rate=0"
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
./cam2feed.sh /tmp/feed2 "http://gstreamer:GlytEnru@192.168.50.101/videostream.cgi?rate=0"
|
|
|
@ -1,28 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# Deliver a webcam video as input feed
|
|
||||||
|
|
||||||
if [ -z "$1" -o -z "$2" ]; then
|
|
||||||
echo "Usage $0 <control pipe> <cam url>"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
CONTROL_PIPE="$1"
|
|
||||||
MIXERFORMAT='video/x-raw-rgb, bpp=(int)32, depth=32, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)1024, height=(int)768, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false'
|
|
||||||
SRC="souphttpsrc location=$2 ! jpegdec ! videorate"
|
|
||||||
SHMSIZE='shm-size=10000000'
|
|
||||||
SHMOPTION="wait-for-connection=0"
|
|
||||||
SHMSINK1="shmsink socket-path=$CONTROL_PIPE $SHMSIZE $SHMOPTION"
|
|
||||||
SCALE='ffmpegcolorspace ! videoscale ! ffmpegcolorspace'
|
|
||||||
|
|
||||||
|
|
||||||
while true ; do
|
|
||||||
# Remove the named pipe if it exist
|
|
||||||
rm -f $CONTROL_PIPE
|
|
||||||
gst-launch-0.10 -v \
|
|
||||||
$SRC ! \
|
|
||||||
$SCALE ! \
|
|
||||||
$MIXERFORMAT ! \
|
|
||||||
$SHMSINK1
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
exit
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
./cam2feed.sh /tmp/feed3 "http://gstreamer:GlytEnru@192.168.50.102/videostream.cgi?rate=0"
|
|
|
@ -1,4 +0,0 @@
|
||||||
MIXERCAPS='video/x-raw-rgb, width=(int)1024, height=(int)768'
|
|
||||||
|
|
||||||
|
|
||||||
gst-launch-0.10 -v souphttpsrc location=http://gstreamer:GlytEnru@$1/videostream.cgi?rate=0 ! jpegdec ! ffmpegcolorspace ! videoscale ! ffmpegcolorspace ! $MIXERCAPS ! ximagesink
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
gst-launch-0.10 -v udpsrc port=9998 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)JPEG, payload=(int)96" ! rtpjpegdepay ! jpegdec ! videoscale ! xvimagesink
|
|
|
@ -1,67 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# Deliver mixer1 output to screen.
|
|
||||||
# Taken from the original snowmix sources
|
|
||||||
# USE OPEN-BSD NETCAT OTHERWISE THINGS KEEP BLOCKING
|
|
||||||
|
|
||||||
if [ -z "$1" -o -z "$2" -o -z "$3" ]; then
|
|
||||||
echo "Usage $0 <remote ip> <width> <height>"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
remote_ip="$1"
|
|
||||||
outwidth="$2"
|
|
||||||
outheight="$3"
|
|
||||||
|
|
||||||
tmpfile=/tmp/output2screen.tmp.$$
|
|
||||||
echo 'system info' | nc 127.0.0.1 9999 >$tmpfile
|
|
||||||
geometry=`grep 'STAT: System geometry' $tmpfile |cut -f3 -d: |cut -f2 -d' '|tr 'x' ' '`
|
|
||||||
framerate=`grep 'STAT: Frame rate' $tmpfile |cut -f3 -d: |cut -f2 -d' '`
|
|
||||||
ctrsocket=`grep 'STAT: Output ctr socket' $tmpfile |cut -f3 -d: |cut -f2 -d' '`
|
|
||||||
|
|
||||||
rm $tmpfile
|
|
||||||
|
|
||||||
VIDEO=video/x-raw-rgb
|
|
||||||
AUDIO=audio/x-raw-int
|
|
||||||
|
|
||||||
|
|
||||||
frameratefraction()
|
|
||||||
{
|
|
||||||
echo $1 | awk '{ rate=$1 ;
|
|
||||||
factor=1;
|
|
||||||
intrate=int(rate);
|
|
||||||
while (factor*rate > intrate) {
|
|
||||||
factor = factor * 10;
|
|
||||||
intrate = int(rate*factor);
|
|
||||||
}
|
|
||||||
printf("%d/%d\n",intrate,factor);
|
|
||||||
}'
|
|
||||||
}
|
|
||||||
ratefraction=`frameratefraction $framerate`
|
|
||||||
|
|
||||||
width=`echo $geometry |cut -f1 -d' '`
|
|
||||||
height=`echo $geometry |cut -f2 -d' '`
|
|
||||||
|
|
||||||
MIXERFORMAT=$VIDEO', bpp=(int)32, depth=(int)32, endianness=(int)4321, format=(fourcc)BGRA, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)'$width', height=(int)'$height', framerate=(fraction)'$ratefraction', pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false'
|
|
||||||
OUTPUTFORMAT=$VIDEO', width='$outwidth', height='$outheight
|
|
||||||
|
|
||||||
|
|
||||||
while true ; do
|
|
||||||
gst-launch-0.10 -v shmsrc socket-path=$ctrsocket do-timestamp=true is-live=true ! \
|
|
||||||
$MIXERFORMAT ! \
|
|
||||||
queue leaky=2 !\
|
|
||||||
tee name=atee ! \
|
|
||||||
videoscale ! \
|
|
||||||
$OUTPUTFORMAT ! \
|
|
||||||
ffmpegcolorspace ! \
|
|
||||||
queue ! \
|
|
||||||
ximagesink \
|
|
||||||
atee. !\
|
|
||||||
queue leaky=2 !\
|
|
||||||
timeoverlay !\
|
|
||||||
ffmpegcolorspace !\
|
|
||||||
'video/x-raw-yuv' !\
|
|
||||||
jpegenc !\
|
|
||||||
rtpjpegpay !\
|
|
||||||
udpsink host=$remote_ip port=9998 sync=true
|
|
||||||
sleep 2
|
|
||||||
done
|
|
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
FORMAT="video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, format=(fourcc)BGRA, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)1280, height=(int)720, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false"
|
|
||||||
|
|
||||||
SCREEN_FORMAT="video/x-raw-rgb, width=(int)640, height=(int)360"
|
|
||||||
|
|
||||||
gst-launch-0.10 -v shmsrc socket-path=/tmp/mixer1 do-timestamp=true is-live=true ! $FORMAT ! queue leaky=2 ! tee name=split ! queue ! videoscale ! $SCREEN_FORMAT ! timeoverlay ! ximagesink split. ! queue ! ffmpegcolorspace ! x264enc tune="zerolatency" ! mpegtsmux ! tcpserversink port=8042
|
|
||||||
|
|
||||||
#gst-launch-0.10 tcpclientsrc port=8042 host=localhost ! tsdemux ! h264parse ! ffdec_h264 ! xvimagesink
|
|
|
@ -1,43 +0,0 @@
|
||||||
#!/bin/env python2
|
|
||||||
import pygst
|
|
||||||
pygst.require('0.10')
|
|
||||||
import gst
|
|
||||||
|
|
||||||
pipeline = gst.Pipeline('pipeline')
|
|
||||||
|
|
||||||
file_src = gst.element_factory_make('filesrc', 'source');
|
|
||||||
file_src.set_property('location', '../videos/tears_of_steel_720p.mkv')
|
|
||||||
|
|
||||||
matroskademux = gst.element_factory_make('matroskademux')
|
|
||||||
h264parse = gst.element_factory_make('h264parse')
|
|
||||||
ffdec_h264 = gst.element_factory_make('ffdec_h264')
|
|
||||||
|
|
||||||
colorspace1 = gst.element_factory_make('ffmpegcolorspace')
|
|
||||||
videoscale = gst.element_factory_make('videoscale')
|
|
||||||
colorspace2 = gst.element_factory_make('ffmpegcolorspace')
|
|
||||||
|
|
||||||
caps = gst.Caps('video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, format=(fourcc)BGRA, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)1280, height=(int)720, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false')
|
|
||||||
caps_filter = gst.element_factory_make('capsfilter')
|
|
||||||
caps_filter.set_property('caps', caps);
|
|
||||||
|
|
||||||
ximagesink = gst.element_factory_make('ximagesink')
|
|
||||||
|
|
||||||
pipeline.add(file_src, matroskademux, h264parse, ffdec_h264, colorspace1, videoscale, colorspace2, caps_filter, ximagesink)
|
|
||||||
gst.element_link_many(file_src, matroskademux)
|
|
||||||
gst.element_link_many(h264parse, ffdec_h264, colorspace1, videoscale, colorspace2, caps_filter, ximagesink)
|
|
||||||
|
|
||||||
def on_new_demux_pad(element):
|
|
||||||
matroskademux.link(h264parse)
|
|
||||||
pipeline.set_state(gst.STATE_PLAYING)
|
|
||||||
|
|
||||||
matroskademux.connect('no-more-pads', on_new_demux_pad)
|
|
||||||
|
|
||||||
pipeline.set_state(gst.STATE_PAUSED)
|
|
||||||
|
|
||||||
|
|
||||||
bus = pipeline.get_bus()
|
|
||||||
msg = bus.timed_pop_filtered(gst.CLOCK_TIME_NONE,
|
|
||||||
gst.MESSAGE_ERROR | gst.MESSAGE_EOS)
|
|
||||||
print msg
|
|
||||||
|
|
||||||
pipeline.set_state(gst.STATE_NULL)
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
|
|
||||||
MIXERFORMAT='video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, format=(fourcc)BGRA, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)1280, height=(int)720, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false'
|
|
||||||
SRC="filesrc location=../videos/tears_of_steel_720p.mkv ! matroskademux ! h264parse ! ffdec_h264"
|
|
||||||
SCALE='ffmpegcolorspace ! videoscale ! ffmpegcolorspace'
|
|
||||||
gst-launch-0.10 -v \
|
|
||||||
$SRC !\
|
|
||||||
$SCALE !\
|
|
||||||
$MIXERFORMAT !\
|
|
||||||
ximagesink
|
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
#!/bin/env python2
|
|
||||||
import pygst
|
|
||||||
pygst.require('0.10')
|
|
||||||
import gst
|
|
||||||
|
|
||||||
width = 1280
|
|
||||||
height = 720
|
|
||||||
framerate = 25
|
|
||||||
pipe = "/tmp/feed1"
|
|
||||||
shm_size = 10000000
|
|
||||||
|
|
||||||
|
|
||||||
MIXERFORMAT = 'video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, format=(fourcc)BGRA, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)%d, height=(int)%d, framerate=(fraction)%d/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false' % (width, height, framerate)
|
|
||||||
|
|
||||||
SRC = 'rtspsrc location=rtsp://192.168.1.100 ! rtph264depay ! h264parse ! ffdec_h264'
|
|
||||||
SCALE = 'ffmpegcolorspace ! videorate ! videoscale ! ffmpegcolorspace'
|
|
||||||
SINK = 'shmsink socket-path=%s shm-size=%d wait-for-connection=0' % (pipe, shm_size)
|
|
||||||
#SINK = "ximagesink"
|
|
||||||
|
|
||||||
pipeline = gst.parse_launch('%s ! %s ! %s ! %s' % (SRC, SCALE, MIXERFORMAT, SINK))
|
|
||||||
|
|
||||||
pipeline.set_state(gst.STATE_PLAYING)
|
|
||||||
|
|
||||||
bus = pipeline.get_bus()
|
|
||||||
msg = bus.timed_pop_filtered(gst.CLOCK_TIME_NONE,
|
|
||||||
gst.MESSAGE_ERROR | gst.MESSAGE_EOS)
|
|
||||||
print msg
|
|
||||||
|
|
||||||
pipeline.set_state(gst.STATE_NULL)
|
|
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
|
|
||||||
MIXERFORMAT='video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, format=(fourcc)BGRA, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)1280, height=(int)720, framerate=(fraction)60/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false'
|
|
||||||
|
|
||||||
SRC="rtspsrc location=rtsp://192.168.1.100 ! rtph264depay ! h264parse ! ffdec_h264"
|
|
||||||
SCALE='ffmpegcolorspace ! videorate ! videoscale ! ffmpegcolorspace'
|
|
||||||
|
|
||||||
SINK='ximagesink'
|
|
||||||
SINK='shmsink socket-path=/tmp/feed1 shm-size=10000 wait-for-connection=0'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
gst-launch-0.10 -v \
|
|
||||||
$SRC !\
|
|
||||||
$SCALE !\
|
|
||||||
$MIXERFORMAT !\
|
|
||||||
$SINK
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
|
|
||||||
MIXERFORMAT='video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, format=(fourcc)BGRA, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)1280, height=(int)720, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false'
|
|
||||||
SRC="filesrc location=../videos/tears_of_steel_720p.mkv ! matroskademux ! h264parse ! ffdec_h264"
|
|
||||||
SCALE='ffmpegcolorspace ! videoscale ! ffmpegcolorspace'
|
|
||||||
gst-launch-0.10 -v \
|
|
||||||
$SRC !\
|
|
||||||
$SCALE !\
|
|
||||||
$MIXERFORMAT !\
|
|
||||||
shmsink socket-path=/tmp/feed1 shm-size=10000000 wait-for-connection=0
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
MIXERFORMAT='video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, format=(fourcc)BGRA, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)1280, height=(int)720, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false'
|
|
||||||
|
|
||||||
SRC='videotestsrc pattern=snow horizontal-speed=25'
|
|
||||||
|
|
||||||
SCALE='ffmpegcolorspace ! videoscale ! ffmpegcolorspace'
|
|
||||||
|
|
||||||
NETWORK='queue ! timeoverlay ! ffmpegcolorspace ! x264enc tune="zerolatency" ! mpegtsmux ! tcpserversink host=0.0.0.0 port=6666'
|
|
||||||
|
|
||||||
gst-launch-0.10 -v \
|
|
||||||
$SRC !\
|
|
||||||
$SCALE !\
|
|
||||||
$MIXERFORMAT !\
|
|
||||||
$NETWORK
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
./video2feed.sh /tmp/feed1 ../videos/LES_TDS_launch.mp4
|
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
MIXERFORMAT='video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, format=(fourcc)BGRA, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)1280, height=(int)720, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false'
|
|
||||||
|
|
||||||
SRC="filesrc location=../videos/tears_of_steel_720p.mkv ! matroskademux ! h264parse ! ffdec_h264"
|
|
||||||
|
|
||||||
SCALE='ffmpegcolorspace ! videoscale ! ffmpegcolorspace'
|
|
||||||
|
|
||||||
NETWORK='timeoverlay ! ffmpegcolorspace ! x264enc tune="zerolatency" ! mpegtsmux ! tcpserversink host=0.0.0.0 port=6666'
|
|
||||||
|
|
||||||
gst-launch-0.10 -v \
|
|
||||||
$SRC !\
|
|
||||||
$SCALE !\
|
|
||||||
$MIXERFORMAT !\
|
|
||||||
$NETWORK
|
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# Deliver a video file as input feed
|
|
||||||
|
|
||||||
if [ -z "$1" -o -z "$2" ]; then
|
|
||||||
echo "Usage $0 <control pipe> <video file>"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
CONTROL_PIPE="$1"
|
|
||||||
MIXERFORMAT='video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)1024, height=(int)768, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false'
|
|
||||||
SRC="filesrc location=$2 ! decodebin2 "
|
|
||||||
SHMSIZE='shm-size=10000000'
|
|
||||||
SHMOPTION="wait-for-connection=0"
|
|
||||||
SHMSINK1="shmsink socket-path=$CONTROL_PIPE $SHMSIZE $SHMOPTION"
|
|
||||||
SCALE='ffmpegcolorspace ! videoscale ! ffmpegcolorspace'
|
|
||||||
while true ; do
|
|
||||||
# Remove the named pipe if it exist
|
|
||||||
rm -f $CONTROL_PIPE
|
|
||||||
gst-launch-0.10 -v \
|
|
||||||
$SRC ! \
|
|
||||||
$SCALE ! \
|
|
||||||
$MIXERFORMAT ! \
|
|
||||||
$SHMSINK1
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
exit
|
|
Loading…
Reference in New Issue