no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | mplayer_slave_protocol [2013/06/28 21:59] (current) – created beandog | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== mplayer slave protocol ====== | ||
+ | This is an old copy of the slave.txt file (I'm guessing). | ||
+ | |||
+ | < | ||
+ | SLAVE MODE PROTOCOL | ||
+ | ------------------- | ||
+ | |||
+ | The -slave option switches on slave mode, in which MPlayer works as a backend | ||
+ | for other programs. Instead of intercepting keyboard events, MPlayer will read | ||
+ | commands separated by a newline (\n) from stdin. | ||
+ | |||
+ | To try slave mode out by hand, run | ||
+ | |||
+ | mplayer -slave -quiet < | ||
+ | |||
+ | and type slave commands into the console window. | ||
+ | |||
+ | You can also use a fifo file (named pipe): | ||
+ | |||
+ | mkfifo </ | ||
+ | mplayer -slave -input file=</ | ||
+ | |||
+ | Most slave mode commands are equivalent to command line options, though not | ||
+ | necessarily under the same name. Detailed descriptions can be found in the | ||
+ | man page. | ||
+ | |||
+ | All commands can be prefixed with one of " | ||
+ | " | ||
+ | after processing the command. " | ||
+ | it was already in paused mode. " | ||
+ | only if it was not already in paused mode. Please note that "as soon as | ||
+ | possible" | ||
+ | As a temporary hack, there is also the _experimental_ " | ||
+ | prefix, with which MPlayer will not exit the pause loop at all. | ||
+ | Like this you can avoid the "frame stepping" | ||
+ | but most commands will either not work at all or behave in unexpected ways. | ||
+ | For " | ||
+ | since other values do not make much sense for them. | ||
+ | |||
+ | |||
+ | Available commands (' | ||
+ | |||
+ | |||
+ | alt_src_step < | ||
+ | When more than one source is available it selects the next/ | ||
+ | |||
+ | audio_delay < | ||
+ | Set/adjust the audio delay. | ||
+ | If [abs] is not given or is zero, adjust the delay by < | ||
+ | If [abs] is nonzero, set the delay to < | ||
+ | |||
+ | [brightness|contrast|gamma|hue|saturation] < | ||
+ | Set/adjust video parameters. | ||
+ | If [abs] is not given or is zero, modifies parameter by < | ||
+ | If [abs] is non-zero, parameter is set to < | ||
+ | < | ||
+ | |||
+ | change_rectangle < | ||
+ | Change the position of the rectangle filter rectangle. | ||
+ | < | ||
+ | Must be one of the following: | ||
+ | 0 = width | ||
+ | 1 = height | ||
+ | 2 = x position | ||
+ | 3 = y position | ||
+ | < | ||
+ | If < | ||
+ | Integer amount to add/ | ||
+ | Positive values add to width/ | ||
+ | subtract from it. | ||
+ | If < | ||
+ | Relative integer amount by which to move the upper left | ||
+ | rectangle corner. Positive values move the rectangle | ||
+ | right/down and negative values move the rectangle left/up. | ||
+ | |||
+ | dvb_set_channel < | ||
+ | Set DVB channel. | ||
+ | |||
+ | dvdnav < | ||
+ | Press the given dvdnav button. | ||
+ | up | ||
+ | down | ||
+ | left | ||
+ | right | ||
+ | menu | ||
+ | select | ||
+ | prev | ||
+ | mouse | ||
+ | |||
+ | edl_mark | ||
+ | Write the current position into the EDL file. | ||
+ | |||
+ | frame_drop [value] | ||
+ | Toggle/set frame dropping mode. | ||
+ | |||
+ | get_audio_bitrate | ||
+ | Print out the audio bitrate of the current file. | ||
+ | |||
+ | get_audio_codec | ||
+ | Print out the audio codec name of the current file. | ||
+ | |||
+ | get_audio_samples | ||
+ | Print out the audio frequency and number of channels of the current file. | ||
+ | |||
+ | get_file_name | ||
+ | Print out the name of the current file. | ||
+ | |||
+ | get_meta_album | ||
+ | Print out the ' | ||
+ | |||
+ | get_meta_artist | ||
+ | Print out the ' | ||
+ | |||
+ | get_meta_comment | ||
+ | Print out the ' | ||
+ | |||
+ | get_meta_genre | ||
+ | Print out the ' | ||
+ | |||
+ | get_meta_title | ||
+ | Print out the ' | ||
+ | |||
+ | get_meta_track | ||
+ | Print out the 'Track Number' | ||
+ | |||
+ | get_meta_year | ||
+ | Print out the ' | ||
+ | |||
+ | get_percent_pos | ||
+ | Print out the current position in the file, as integer percentage [0-100). | ||
+ | |||
+ | get_property < | ||
+ | Print out the current value of a property. | ||
+ | |||
+ | get_sub_visibility | ||
+ | Print out subtitle visibility (1 == on, 0 == off). | ||
+ | |||
+ | get_time_length | ||
+ | Print out the length of the current file in seconds. | ||
+ | |||
+ | get_time_pos | ||
+ | Print out the current position in the file in seconds, as float. | ||
+ | |||
+ | get_vo_fullscreen | ||
+ | Print out fullscreen status (1 == fullscreened, | ||
+ | |||
+ | get_video_bitrate | ||
+ | Print out the video bitrate of the current file. | ||
+ | |||
+ | get_video_codec | ||
+ | Print out the video codec name of the current file. | ||
+ | |||
+ | get_video_resolution | ||
+ | Print out the video resolution of the current file. | ||
+ | |||
+ | screenshot < | ||
+ | Take a screenshot. Requires the screenshot filter to be loaded. | ||
+ | 0 Take a single screenshot. | ||
+ | 1 Start/stop taking screenshot of each frame. | ||
+ | |||
+ | gui_[about|loadfile|loadsubtitle|play|playlist|preferences|skinbrowser|stop] | ||
+ | GUI actions | ||
+ | |||
+ | key_down_event < | ||
+ | Inject < | ||
+ | |||
+ | loadfile < | ||
+ | Load the given file/URL, stopping playback of the current file/URL. | ||
+ | If < | ||
+ | appended to the current playlist instead. | ||
+ | |||
+ | loadlist < | ||
+ | Load the given playlist file, stopping playback of the current file. | ||
+ | If < | ||
+ | appended to the current playlist instead. | ||
+ | |||
+ | loop < | ||
+ | Adjust/set how many times the movie should be looped. -1 means no loop, | ||
+ | and 0 forever. | ||
+ | |||
+ | menu < | ||
+ | Execute an OSD menu command. | ||
+ | up Move cursor up. | ||
+ | down Move cursor down. | ||
+ | ok | ||
+ | cancel Cancel selection. | ||
+ | hide Hide the OSD menu. | ||
+ | |||
+ | set_menu < | ||
+ | Display the menu named < | ||
+ | |||
+ | mute [value] | ||
+ | Toggle sound output muting or set it to [value] when [value] >= 0 | ||
+ | (1 == on, 0 == off). | ||
+ | |||
+ | osd [level] | ||
+ | Toggle OSD mode or set it to [level] when [level] >= 0. | ||
+ | |||
+ | osd_show_property_text < | ||
+ | Show an expanded property string on the OSD, see -playing-msg for a | ||
+ | description of the available expansions. If [duration] is >= 0 the text | ||
+ | is shown for [duration] ms. [level] sets the minimum OSD level needed | ||
+ | for the message to be visible (default: 0 - always show). | ||
+ | |||
+ | osd_show_text < | ||
+ | Show < | ||
+ | |||
+ | panscan <-1.0 - 1.0> | <0.0 - 1.0> <abs> | ||
+ | Increase or decrease the pan-and-scan range by < | ||
+ | Negative values decrease the pan-and-scan range. | ||
+ | If <abs> is != 0, then the pan-and scan range is interpreted as an | ||
+ | absolute range. | ||
+ | |||
+ | pause | ||
+ | Pause/ | ||
+ | |||
+ | frame_step | ||
+ | Play one frame, then pause again. | ||
+ | |||
+ | pt_step < | ||
+ | Go to the next/ | ||
+ | the direction. | ||
+ | nothing unless [force] is non-zero. | ||
+ | |||
+ | pt_up_step < | ||
+ | Similar to pt_step but jumps to the next/ | ||
+ | Useful to break out of the inner loop in the playtree. | ||
+ | |||
+ | quit [value] | ||
+ | Quit MPlayer. The optional integer [value] is used as the return code | ||
+ | for the mplayer process (default: 0). | ||
+ | |||
+ | radio_set_channel < | ||
+ | Switch to < | ||
+ | |||
+ | radio_set_freq < | ||
+ | Set the radio tuner frequency. | ||
+ | |||
+ | radio_step_channel < | ||
+ | Step forwards (1) or backwards (-1) in channel list. Works only when the | ||
+ | ' | ||
+ | |||
+ | radio_step_freq < | ||
+ | Tune frequency by the < | ||
+ | |||
+ | seek < | ||
+ | Seek to some place in the movie. | ||
+ | 0 is a relative seek of +/- < | ||
+ | 1 is a seek to < | ||
+ | 2 is a seek to an absolute position of < | ||
+ | |||
+ | seek_chapter < | ||
+ | Seek to the start of a chapter. | ||
+ | 0 is a relative seek of +/- < | ||
+ | 1 is a seek to chapter < | ||
+ | |||
+ | switch_angle < | ||
+ | Switch to the angle with the ID [value]. Cycle through the | ||
+ | available angles if [value] is omitted or negative. | ||
+ | |||
+ | set_mouse_pos <x> <y> | ||
+ | Tells MPlayer the coordinates of the mouse in the window. | ||
+ | This command doesn' | ||
+ | |||
+ | set_property < | ||
+ | Set a property. | ||
+ | |||
+ | speed_incr < | ||
+ | Add < | ||
+ | |||
+ | speed_mult < | ||
+ | Multiply the current speed by < | ||
+ | |||
+ | speed_set < | ||
+ | Set the speed to < | ||
+ | |||
+ | step_property < | ||
+ | Change a property by value, or increase by a default if value is | ||
+ | not given or zero. The direction is reversed if direction is less | ||
+ | than zero. | ||
+ | |||
+ | stop | ||
+ | Stop playback. | ||
+ | |||
+ | sub_alignment [value] | ||
+ | Toggle/set subtitle alignment. | ||
+ | 0 top alignment | ||
+ | 1 center alignment | ||
+ | 2 bottom alignment | ||
+ | |||
+ | sub_delay < | ||
+ | Adjust the subtitle delay by +/- < | ||
+ | seconds when [abs] is nonzero. | ||
+ | |||
+ | sub_load < | ||
+ | Loads subtitles from < | ||
+ | |||
+ | sub_log | ||
+ | Logs the current or last displayed subtitle together with filename | ||
+ | and time information to ~/ | ||
+ | is to allow convenient marking of bogus subtitles which need to be | ||
+ | fixed while watching the movie. | ||
+ | |||
+ | sub_pos < | ||
+ | Adjust/set subtitle position. | ||
+ | |||
+ | sub_remove [value] | ||
+ | If the [value] argument is present and non-negative, | ||
+ | file with index [value]. If the argument is omitted or negative, removes | ||
+ | all subtitle files. | ||
+ | |||
+ | sub_select [value] | ||
+ | Display subtitle with index [value]. Turn subtitle display off if | ||
+ | [value] is -1 or greater than the highest available subtitle index. | ||
+ | Cycle through the available subtitles if [value] is omitted or less | ||
+ | than -1. Supported subtitle sources are -sub options on the command | ||
+ | line, VOBsubs, DVD subtitles, and Ogg and Matroska text streams. | ||
+ | This command is mainly for cycling all subtitles, if you want to set | ||
+ | a specific subtitle, use sub_file, sub_vob, or sub_demux. | ||
+ | |||
+ | sub_source [source] | ||
+ | Display first subtitle from [source]. Here [source] is an integer: | ||
+ | SUB_SOURCE_SUBS | ||
+ | SUB_SOURCE_VOBSUB (1) for VOBsub files | ||
+ | SUB_SOURCE_DEMUX | ||
+ | If [source] is -1, will turn off subtitle display. If [source] less than -1, | ||
+ | will cycle between the first subtitle of each currently available sources. | ||
+ | |||
+ | sub_file [value] | ||
+ | Display subtitle specifid by [value] for file subs. The [value] is | ||
+ | corresponding to ID_FILE_SUB_ID values reported by ' | ||
+ | If [value] is -1, will turn off subtitle display. If [value] less than -1, | ||
+ | will cycle all file subs. | ||
+ | |||
+ | sub_vob [value] | ||
+ | Display subtitle specifid by [value] for vobsubs. The [value] is | ||
+ | corresponding to ID_VOBSUB_ID values reported by ' | ||
+ | If [value] is -1, will turn off subtitle display. If [value] less than -1, | ||
+ | will cycle all vobsubs. | ||
+ | |||
+ | sub_demux [value] | ||
+ | Display subtitle specifid by [value] for subtitles from DVD or embedded | ||
+ | in media file. The [value] is corresponding to ID_SUBTITLE_ID values | ||
+ | reported by ' | ||
+ | If [value] less than -1, will cycle all DVD subs or embedded subs. | ||
+ | |||
+ | sub_scale < | ||
+ | Adjust the subtitle size by +/- < | ||
+ | is nonzero. | ||
+ | |||
+ | vobsub_lang | ||
+ | This is a stub linked to sub_select for backwards compatibility. | ||
+ | |||
+ | sub_step < | ||
+ | Step forward in the subtitle list by < | ||
+ | is negative. | ||
+ | |||
+ | sub_visibility [value] | ||
+ | Toggle/set subtitle visibility. | ||
+ | |||
+ | forced_subs_only [value] | ||
+ | Toggle/set forced subtitles only. | ||
+ | |||
+ | switch_audio [value] (currently MPEG*, AVI, Matroska and streams handled by libavformat) | ||
+ | Switch to the audio track with the ID [value]. Cycle through the | ||
+ | available tracks if [value] is omitted or negative. | ||
+ | |||
+ | switch_angle [value] (DVDs only) | ||
+ | Switch to the DVD angle with the ID [value]. Cycle through the | ||
+ | available angles if [value] is omitted or negative. | ||
+ | |||
+ | switch_ratio [value] | ||
+ | Change aspect ratio at runtime. [value] is the new aspect ratio expressed | ||
+ | as a float (e.g. 1.77778 for 16/9). | ||
+ | There might be problems with some video filters. | ||
+ | |||
+ | switch_title [value] (DVDNAV only) | ||
+ | Switch to the DVD title with the ID [value]. Cycle through the | ||
+ | available titles if [value] is omitted or negative. | ||
+ | |||
+ | switch_vsync [value] | ||
+ | Toggle vsync (1 == on, 0 == off). If [value] is not provided, | ||
+ | vsync status is inverted. | ||
+ | |||
+ | teletext_add_digit < | ||
+ | Enter/leave teletext page number editing mode and append given digit to | ||
+ | previously entered one. | ||
+ | 0..9 - Append apropriate digit. (Enables editing mode if called from normal | ||
+ | mode, and switches to normal mode when third digit is entered.) | ||
+ | - - Delete last digit from page number. (Backspace emulation, works only | ||
+ | in page number editing mode.) | ||
+ | |||
+ | teletext_go_link <1-6> | ||
+ | Follow given link on current teletext page. | ||
+ | |||
+ | tv_start_scan | ||
+ | Start automatic TV channel scanning. | ||
+ | |||
+ | tv_step_channel < | ||
+ | Select next/ | ||
+ | |||
+ | tv_step_norm | ||
+ | Change TV norm. | ||
+ | |||
+ | tv_step_chanlist | ||
+ | Change channel list. | ||
+ | |||
+ | tv_set_channel < | ||
+ | Set the current TV channel. | ||
+ | |||
+ | tv_last_channel | ||
+ | Set the current TV channel to the last one. | ||
+ | |||
+ | tv_set_freq < | ||
+ | Set the TV tuner frequency. | ||
+ | |||
+ | tv_step_freq < | ||
+ | Set the TV tuner frequency relative to current value. | ||
+ | |||
+ | tv_set_norm < | ||
+ | Set the TV tuner norm (PAL, SECAM, NTSC, ...). | ||
+ | |||
+ | tv_set_brightness <-100 - 100> [abs] | ||
+ | Set TV tuner brightness or adjust it if [abs] is set to 0. | ||
+ | |||
+ | tv_set_contrast <-100 -100> [abs] | ||
+ | Set TV tuner contrast or adjust it if [abs] is set to 0. | ||
+ | |||
+ | tv_set_hue <-100 - 100> [abs] | ||
+ | Set TV tuner hue or adjust it if [abs] is set to 0. | ||
+ | |||
+ | tv_set_saturation <-100 - 100> [abs] | ||
+ | Set TV tuner saturation or adjust it if [abs] is set to 0. | ||
+ | |||
+ | use_master | ||
+ | Switch volume control between master and PCM. | ||
+ | |||
+ | vo_border [value] | ||
+ | Toggle/set borderless display. | ||
+ | |||
+ | vo_fullscreen [value] | ||
+ | Toggle/set fullscreen mode. | ||
+ | |||
+ | vo_ontop [value] | ||
+ | Toggle/set stay-on-top. | ||
+ | |||
+ | vo_rootwin [value] | ||
+ | Toggle/set playback on the root window. | ||
+ | |||
+ | volume < | ||
+ | Increase/ | ||
+ | |||
+ | |||
+ | The following commands are really only useful for OSD menu console mode: | ||
+ | |||
+ | help | ||
+ | Displays help text, currently empty. | ||
+ | |||
+ | exit | ||
+ | Exits from OSD menu console. Unlike ' | ||
+ | |||
+ | hide | ||
+ | Hides the OSD menu console. Clicking a menu command unhides it. Other | ||
+ | keybindings act as usual. | ||
+ | |||
+ | run < | ||
+ | Run < | ||
+ | are through the video output driver. | ||
+ | |||
+ | |||
+ | Available properties: | ||
+ | |||
+ | name | ||
+ | ================================================================= | ||
+ | |||
+ | osdlevel | ||
+ | speed float | ||
+ | loop | ||
+ | pause flag 0 | ||
+ | filename | ||
+ | path | ||
+ | demuxer | ||
+ | stream_pos | ||
+ | stream_start | ||
+ | stream_end | ||
+ | stream_length | ||
+ | chapter | ||
+ | chapters | ||
+ | angle int | ||
+ | length | ||
+ | percent_pos | ||
+ | time_pos | ||
+ | metadata | ||
+ | metadata/ | ||
+ | volume | ||
+ | balance | ||
+ | mute | ||
+ | audio_delay | ||
+ | audio_format | ||
+ | audio_codec | ||
+ | audio_bitrate | ||
+ | samplerate | ||
+ | channels | ||
+ | switch_audio | ||
+ | switch_angle | ||
+ | switch_title | ||
+ | fullscreen | ||
+ | deinterlace | ||
+ | ontop flag 0 | ||
+ | rootwin | ||
+ | border | ||
+ | framedropping | ||
+ | gamma int | ||
+ | brightness | ||
+ | contrast | ||
+ | saturation | ||
+ | hue int | ||
+ | panscan | ||
+ | vsync flag 0 | ||
+ | video_format | ||
+ | video_codec | ||
+ | video_bitrate | ||
+ | width int | ||
+ | height | ||
+ | fps float X | ||
+ | aspect | ||
+ | switch_video | ||
+ | switch_program | ||
+ | sub int | ||
+ | sub_source | ||
+ | sub_file | ||
+ | sub_vob | ||
+ | sub_demux | ||
+ | sub_delay | ||
+ | sub_pos | ||
+ | sub_alignment | ||
+ | sub_visibility | ||
+ | sub_forced_only | ||
+ | sub_scale | ||
+ | tv_brightness | ||
+ | tv_contrast | ||
+ | tv_saturation | ||
+ | tv_hue | ||
+ | teletext_page | ||
+ | teletext_subpage | ||
+ | teletext_mode | ||
+ | teletext_format | ||
+ | 1 - transparent, | ||
+ | 2 - opaque inverted, | ||
+ | 3 - transp. inv. | ||
+ | teletext_half_page int | ||
+ | 2- bottom half</ |