Overriding tcUrl and other options with ffplay (BASH)

Various non-standard RTMP applications rely on the the values of attributes that are commonly passed in as part of a PLAY call, such as tcUrl, pageUrl etc. Sometimes this is for authentication (and content protection) purposes, sometimes it's to implement a DNS name based namespace so that different domains can share the same app. With ffmpeg and ffplay it's possible to override tcUrl and other variables with a command line option

Details

  • Language: BASH

Snippet

# Command line options

-rtmp_flashver = The Flashversion to send to the server. default is LNX 9,0,124,2
-rtmp_pageurl = URL of the web page in which the media was embedded. By default no value will be sent. 
-rtmp_swfurl = The URL of the SWF player being used. By default not value is sent
-rtmp_tcurl = URL of the target stream's app. The default is rtmp://host[:port]/app

Usage Example

# Play back from a specific machine but include a tcUrl which acts as though you were using the domain
ffplay -rtmp_tcurl rtmp://rtmp.example.com/myapp rtmp://192.168.1.24/myapp/mystream

# Include a pageurl for servers that do a sort of referrer check
ffplay -rtmp_pageurl http://rtmp.example.com/mywebpage rtmp://rtmp.example.com/myapp/mystream