[FFmpeg-user] FFMpeg/FFServer P2P streaming between ubuntu based embedded device and smartphone
Bogdan Mariesan
bogdan.mariesan at buddyguard.io
Wed Apr 13 12:51:52 CEST 2016
Hi,
I've been playing for the last couple of days with FFMpeg and FFServer as
are considering as a candidate for livestreaming between an embedded
device(with an integrated HD camera) and various clients(smartphones).
I've managed to achieve this using with the following config for FFServer:
HTTPPort 1234
> RTSPPort 1235
> MaxHTTPConnections 2000
> MaxClients 1000
> MaxBandwidth 512000 # Maximum bandwidth per client
> # set this high enough to exceed stream
> bitrate
> CustomLog -
> NoDaemon # Remove this if you want FFserver to
> daemonize after start
> <Feed feed.ffm> # This is the input feed where FFmpeg will
> send
> File /tmp/feed.ffm # video stream.
> FileMaxSize 512K
> </Feed>
> <Stream test.h264> # Output stream URL definition
> Feed feed.ffm # Feed from which to receive video
> Format rtp
> # Video settings
> VideoCodec libvpx
> VideoSize 720x576 # Video resolution
> VideoFrameRate 60 # Video FPS
> AVOptionVideo flags +global_header # Parameters passed to encoder
> # (same as ffmpeg command-line
> parameters)
> AVOptionVideo cpu-used 0
> AVOptionVideo qmin 10
> AVOptionVideo qmax 42
> AVOptionVideo quality good
> AVOptionAudio flags +global_header
> PreRoll 15
> StartSendOnKey
> VideoBitRate 400 # Video bitrate
> NoAudio
> </Stream>
And the following FFMpeg command to send the stream to FFServer:
ffmpeg -rtbufsize 2100M -f dshow -i video="Integrated Camera" -vcodec
> libx264 http://127.0.0.1:1234/feed.ffm <http://127.0.0.1:1234/feed1.ffm>
I also have a simple Android client that plays the RTSP stream using the
following URL:
rtsp://mylocalnetworkip:1235/test.h264
What I am trying to achieve is a direct P2P connection between the embedded
device and a smartphone. This has to be over the internet and capable to
achieve UDP punch holes (such as Skype does for p2p video-calling).
Is this achievable with ffmpeg? If yes can you please provide some guidance
in how to achieve a P2P stream over the internet?
Kind regards,
--
*Bogdan Emil Mariesan*
Senior Software Engineer
*BuddyGuard UG* (haftungsbeschränkt)
Dircksenstr. 40
10178 Berlin
m: +40 743 901 331
w. www.buddyguard.io
More information about the ffmpeg-user
mailing list