Question / Help Media Source - Input vs Input Format - RTMP ffplay/ffmpeg

Justin Schuhmann

New Member
I am using a RTMP server and can get the latency down to below 1 second by doing two things.

1. In OBS Studio I change the output X.264 to have the options of tune=zerolatency
2. I can open a ffplay window using the following command line to get the video with sub 1 second latency:
ffplay.exe -fflags nobuffer rtmp://{ip-address}/live -loglevel verbose

So i want to be able to replicate the above ffplay into my media source on OBS Studio.
I have set the input to
rtmp://{ip-address}/live
and can leave the input format blank or use
rtmp or even ffplay -fflags nobuffer -loglevel verbose

The input format option doesn't seem to matter...I can also get it to read the stream with an input of
ffplay -fflags nobuffer rtmp://{ip-address}/live -loglevel verbose

but all of the above result in ~4 second latency in the input...Can someone please document what input and input format are and what should actually go in them? Next, what should I be putting in them to get my <1 second latency without using a window capture and ffplay?
 
Last edited:

Suslik V

Active Member
  • Input: "file" to be parsed by ffmmeg demuxer (general "input" string for libavformat library). Tip: "file" in meaning of the ffmpeg can be regular file, pipe, network stream, grabbing device, etc.
  • Input Format: ffmmeg's demuxer type for input. Enabled demuxers depend on build.
v0.14.2 No additional options, keys. Only checkboxes and dropdown lists of options specified at 'Media Source' properties window.

You can do nothing (in current build of the Studio) at 'Media Source' properties to resolve your issue. Use other methods to synchronize your inputs.
/////////////////////////////////////////////////////////////////////

Examples obtained from this log: https://gist.github.com/dd8ab15027f10d89308d8e396391fa80 , format:
Input
Input Format

# my comment

Code:
https://raw.githubusercontent.com/inAudible-NG/audible-samples/master/NYT07-10-2015AudioDigest_mp332.aa
aa
# audio only, audible format (audio books etc.)

http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
applehttp
# streams

https://upload.wikimedia.org/wikipedia/commons/1/14/Animated_PNG_example_bouncing_beach_ball.png
apng
# animated png!

H:\fps_mov\2016-05-19 09-06-58.asf,wmv,wma
asf
# anything encoded with Window Media (.asf made by OBS Studio).

H:\fps_mov\1.txt
concat
# 1.txt has two strings:
# ffconcat version 1.0
# file my_folder_inside_bin-32bit_directory/2016-05-1907-59-26.flv

rtmp://dev.wowza.longtailvideo.com/vod/_definst_/sintel/640.mp4
flv
# one Input Format for both: FLV and RTMP network streams

http://www.sample-videos.com/video/flv/240/big_buck_bunny_240p_1mb.flv
flv
# one Input Format for both: FLV and RTMP network streams

https://upload.wikimedia.org/wikipedia/commons/a/aa/SmallFullColourGIF.gif
gif
# animated gif!

https://upload.wikimedia.org/wikipedia/commons/thumb/c/c7/JPS-sample.jpg/220px-JPS-sample.jpg
image2
# developed for sequences (frame by frame), but single image is used in example above.

http://www.sample-videos.com/video/mp4/240/big_buck_bunny_240p_1mb.mp4
mp4
# mov mp4 3gp QuickTime - you can apply any.

http://www.dododge.net/roku/hd-test-streams/mpt-200309161700-clip.ts
mpegts
# large clip (~10MB), take to much time to download, don't think that is streamed.

http://204.248.124.202/mjpg/video.mjpg
mpjpeg
# I didn't find any useful sample encapsulated in multi-part MIME

http://www.sample-videos.com/audio/mp3/crowd-cheering.mp3

# empty string, lets dexuxer decide

for rtmp use flv as Input Format
by default path "\\" symbols replaced with "/"
'libgme' missing in current build
'rawvideo' completely useless (no way to specify video size)
'sbg' - fiction, because output not specified - don't know where to apply it (SBaGen site is shitty guys, I don't want to take deep in it).
'tedcaptions' - see no use as we input video or audio with 'Media Source' in OBS Studio.


More info at https://www.ffmpeg.org/ffmpeg-formats.html#Demuxers
 
Top