For slave mode, MPlayer runs other programs in the background. No more Keyboard Events are intercepted. MPlayer reads a line break (/n) separated from the standard input.
Try slave mode and run
Mplayer-slave-quiet <movie>
Enter the slave command in the console window.
You can also use a fifo file (Named Pipe ):
Mkfifo/tmp/upload ofile
Mplayer-slave-input file =/tmp/export ofile <movie>
Most slave mode commands are equivalent to command line options, but not necessarily in the same name. Details can be found in the Manual
All commands can be prefixed with "pausing", "pausing_keep", or "pausing_toggle. "Pausing" tells MPlayer to pause the command being processed. "Pausing_keep" tells MPlayer to pause and maintain as long as it is in paused mode. "Pausing_toggle" tells MPlayer to pause and maintain as long as it has not paused. Note that "try to" before the command is fully executed.
As a temporary hacker, there is also an experimental "pausing_keep_force" prefix, and MPlayer does not exit all the pause loops.
In this way, you can avoid the impact of "frame stepping" due to "pausing_keep. However, most commands will either not be executed or in an unexpected way.
For "set_mouse_pos" and "key_down_event", "pausing_keep_force" is the default value.
Because other values do not make much sense for them.
Various tips and tips (help extension !) :
-Try to use
Pausing_keep_force pt_step 1
Get_property pause
Switch to the next file. It avoids playing the old file for a short period of time before it is converted to a new audio file.
Available commands ('mplayer-input cmdlist 'will print a list ):
Note that mplayer separates different commands by line breaks ("/N, therefore, in the compilation process, whether it is writing to the pipeline file or writing to the QT process, we must add a line break ("/N") after the command, so that mplayer can identify.
In addition, we need to send multiple commands to mplayer to obtain the current video playback information. How can we obtain this information?
When we send commands to mplayer through the standard input channel of the pipeline or process, for example, "get_video_resolution" (note that it is an underline), mplayer will respond, the resolution of the video will be output in the standard output, for example, ans_video_resolution = '352x288'. To obtain the resolution of the video, we also need to parse the obtained information to obtain 352x288. other methods for obtaining information are similar.
Alt_src_step <value> (ASX PlayList only)
If there is more than one source, you can select the next/previous one.
Audio_delay <value> [ABS]
Set/adjust the audio latency.
If [ABS] is not provided or zero, adjust the delay <value> seconds.
If [ABS] is not zero, the delay is <value> seconds.
[Brightness | contrast | gamma | hue | saturation] <value> [abs]
Set/adjust video parameters.
If [abs] is not provided or zero, change the parameter to <value>.
If [abs] is not zero, set the parameter to <value>.
<Value> the value range is [-100,100].
Change_rectangle <val1> <val2>
Change the coordinates of the rectangle of the rectangular filter.
<Val1>
Must be one of the following:
0 = width
1 = height
2 = x coordinate
3 = Y coordinate
<Val2>
If <val1> is 0 or 1:
Integer plus/minus width/height.
Width/height of a positive value and negative value minus it.
If <val1> is 2 or 3:
The integer relative to the upper left corner of the rectangle. Positive values move the rectangle to the right/down and negative values move the rectangle to the left/up.
Dvb_set_channel <channel_number> <card_number>
Set the DVB channel.
Dvdna v <button_name>
Specifies the dvdna V button.
Up
Down
Left
Right
Menu
Select
Prev
Mouse
Edl_mark
Write the current location to the EDL file.
Frame_drop [value]
Switch/set the frame mode.
Get_audio_bitrate
Print the audio bit rate of the current file.
Get_audio_codec
Name of the decoder of the current audio file.
Get_audio_samples
The number of audio channels printed and the current file.
Get_file_name
Print the current file name.
Get_meta_album
Print the metadata of the 'album 'of the current file.
Get_meta_artist
Print the metadata of the 'artist 'of the current file.
Get_meta_comment
Print the metadata of the 'comments' of the current file.
Get_meta_genre
Print the metadata of the 'stream' of the current file.
Get_meta_title
Print the metadata of the 'title' of the current file.
Get_meta_track
Print the metadata of the 'number of soundtracks 'of the current file.
Get_meta_year
Print the metadata of the 'Year' of the current file.
Get_percent_pos
The current position in the printed file is an integer percentage [0-100 ).
Get_property <property>
The current value of the printed attribute.
Get_sub_visibility
Print subtitle visibility (1 = enabled, 0 = disabled ).
Get_time_length
The length of the current file is displayed in seconds.
Get_time_pos
The current position of the file is displayed in seconds and the floating point is used.
Get_vo_fullscreen
Screen status (1 = full screen, 0 = Window ).
Get_video_bitrate
Print the video bit rate of the current file.
Get_video_codec
Print the name of the decoder for the current video file.
Get_video_resolution
Print the video resolution of the current file.
Screenshot <value>
Screenshots. Screen Filter loading is required.
0.
1 start/stop taking, each frame of the screen.
Gui _ [about | LoadFile | loadsubtitle | play | playlist | preferences | skinbrowser | stop]
Graphic user interface action
Key_down_event <value>
Events that inject <value> key code to mplayer.
Loadfile <file | url> <append>
Load the specified file/URL to stop playing/URL of the current file.
If it is <append> non-zero resume and file/URL
Append to the current playlist instead.
Loadlist <file> <append>
Load the specified playlist file to stop playing the current file.
If <append> is a non-zero-sum playback file, the file is appended to the current playback list.
Loop <value> [abs]
Adjust/set the type of movie to be repeated. -1 indicates no loop, always 0.
Menu command>
Execute the show OSD menu command.
Up move the cursor up.
Down move the cursor down.
OK.
Cancel the selection of cancel.
The hidden OSD menu of hide.
Set_menu <menu_name>
Display menu name <menu_name>.
Mute [value]
Switch the audio output to mute or set it to [value] (value> = 0)
(1 = enabled, 0 = disabled ).
OSD [level]
Switch the OSD mode or set it to [level] At [level]> = 0.
Osd_show_property_text <string> [duration] [level]
Display a string about the OSD extension property. You can see-playing-MSG is used to describe available extensions. If [duration]> = 0, it is displayed as [duration] ms. [Level] set the required minimum level OSD. This message is visible (default: 0-always displayed ).
Osd_show_text <string> [duration] [level]
View the OSD <string>.
Panscan <-1.0-1.0> | <0.0-1.0> <ABS>
Increase or decrease the <value> range of pan-and-scan. 1.0 is the highest.
Negative values reduce the pan-and-scan range.
If <abs>! = 0, then the pan-and-scan range is interpreted as an absolute range.
Pause
Pause/cancel pause.
Frame_step
Play a frame and pause.
Pt_step <value> [force]
Go to the next/top playback tree. Description of <value>
This direction. If there is no project, you can do nothing in the given direction, unless [force] is not zero.
Pt_up_step <value> [force]
Similar to pt_step, but jump to the previous project in the next/parent list.
It helps to get rid of loop within the playback tree.
Quit [value]
Exit MPlayer. Optional integer [value] value as return code
Mplayer processes (default value: 0 ).
Radio_set_channel <channel>
Switch to <channel>. You need to set the broadcast parameters in 'channel.
Radio_set_freq <frequency in MHz>
Set the broadcast frequency tuner.
Radio_step_channel <-1 | 1>
Step forward (1) or backward (-1 channel list ). Only when the 'channel' broadcast parameter is set.
Radio_step_freq <value>
Adjust the frequency <value> (positive-up, negative-down ).
Seek <value> [type]
Location of a movie.
0 is a relative position +/-<value> (default ).
1 is to locate <value> % in the movie.
2 is the <value> second that seeks an absolute position.
Seek_chapter <value> [type]
Locate the beginning of the chapter.
0 is a relatively seek +/-<value> section (default ).
1. Locate the <value> chapter.
Switch_angle <value>
Convert ID to angle [value]. If the angle [value] is omitted or a negative number is used through a loop.
Set_mouse_pos <x> <Y>
Tells mplayer the coordinates of the mouse in the window.
This command does not move the mouse!
Set_property <property> <value>
Set Properties.
Speed_incr <value>
Increase the <value> current playback speed.
Speed_mult <value>
Current Speed multiplied by <value>.
Speed_set <value>
Set the speed to <value>.
Step_property <property> [value] [direction]
Use value to change the attribute, or add the default value if it is not specified or is 0. If the value is smaller than zero, the direction is the opposite.
Stop
Stop playing.
Sub_alignment [value]
Switch/set the subtitle alignment.
0 top alignment
1 Center alignment
2 bottom alignment
Sub_delay <value> [abs]
Adjusted subtitle latency +/-<value> seconds or set <value>
In seconds, [abs] is not zero.
Sub_load <subtitle_file>
Load Subtitles from <subtitle_file>.
Sub_log
Subtitles displayed on the current log or ~/. mplayer/subtitle_log with the file name and time information.
Sub_pos <value> [abs]
Adjust/set the subtitle position.
Sub_remove [value]
If the [value] parameter is current and non-negative, the [value] index of the subtitle file is canceled. If the parameter is omitted or negative, remove
All subtitle files.
Sub_select [value]
Index [value] for displaying subtitles. Disable subtitle display. If you disable [value], the value is-1 or greater than the available subtitle index.
Available subtitle cycles, if [value] is omitted or less than-1. Subtitle sources are supported as-sub options in command line, VOBsubs, DVD Subtitles and Ogg and Matroska text streams.
This is mainly used to loop All subtitle commands. To set a specific subtitle, use sub_file, sub_vob, or sub_demux.
Sub_source [Source]
Display the first subtitle from [Source]. Here [Source] is an integer:
Sub_source_subs (0) for file subtitles
Sub_source_vobsub (1) vobsub File
Sub_source_demux (2) embed subtitles in a media file or DVD.
If [Source] is-1, subtitle display is disabled. If the value of [Source] is lower than-1, the first subtitle of an existing resource is cycled.
Sub_file [value]
Show the subtitle specifid by the [value] File subs. Value in [value]
The value reported by id_file_sub_id '-identify.
If the value of [value] is-1, subtitle display is disabled. If [value] is less than-1,
Run the subs command on all the objects in the loop.
Sub_vob [value]
Show subtitle specifid by vobsubs of [value. Value in [value]
The value reported by id_vobsub_id '-identify.
If the value of [value] is-1, subtitle display is disabled. If [value] is less than-1,
Returns all vobsubs of the loop.
Sub_demux [value]
Show subtitle specifid by [value] from a DVD subtitle or embedded in a media file. The value in [value] corresponds to the ID_SUBTITLE_ID value '-identify ',. If the value of [value] is-1, subtitle display is disabled.
If [value] is less than-1, all the DVD Subtitles or embedded subtitles are cyclically stored.
Sub_scale <value> [abs]
When you adjust the subtitle size +/-<value> or set it to <value>, [abs]
Not zero.
Vobsub_lang
This is backward compatible with sub_select.
Sub_step <value>
<Value> step forward in the subtitle list. If <value>
Is a negative step.
Sub_visibility [value]
Switch or set subtitles.
Forced_subs_only [value]
Force switch/set subtitle.
Switch_audio [value] (the current MPEG *, AVI, Matroska and libav libraries process streams)
Switch to the audio file using ID [value]. Loop
Song, if [value] is omitted or negative.
Switch_angle [value] (DVD only)
Switch to the DVD angle through ID [value]. Loop
If the angle is available, if [value] is omitted or negative.
Switch_ratio [value]
Change the aspect ratio during running. [Value] indicates the new aspect ratio.
As floating 16/9 (for example, 1.77778 ).
This may be related to some video filters.
Switch_title [value] (dvdna V only)
Switch to the DVD title using ID [value]. The title available for loop. If the value of [value] is omitted or negative.
Switch_vsync [value]
Switch the field synchronization (1 = enabled, 0 = disabled ). If the value of [value] is not provided, the refresh synchronization status is reversed.
Teletext_add_digit <value>
Enter/exit the subtitle editing mode and append the previously entered number.
0 .. 9-append the apropriate number. (Enable the editing mode. If you want to switch from the normal mode to the normal mode .)
--Delete the last page number. (For example, in the page number editing mode only .)
Teletext_go_link <1-6>
The link is provided based on the current subtitle page.
TV _start_scan
The TV channel starts automatic scanning.
TV _step_channel <channel>
Select the next/previous TV channel.
TV _step_norm
Change the TV system.
TV _step_chanlist
Change the channel list.
TV _set_channel <channel>
Set the current TV channel.
TV _last_channel
Set the current TV channel to the last one.
TV _set_freq <frequency in MHz>
Set the frequency of the TV tuner.
TV _step_freq <frequency offset in MHz>
Set the frequency of the TV tuner to the current value.
TV _set_norm <norm>
TV tuner setting specifications (including PAL, SECAM, NTSC ,...).
TV _set_brightness <-100-100> [ABS]
Set the brightness or adjustment of the TV tuner. For example, set [ABS] to 0.
TV _set_contrast <-100-100> [ABS]
Set the comparison or adjustment of the TV tuner. For example, set [ABS] to 0.
TV _set_hue <-100-100> [ABS]
Set the TV tuner tone or adjustment, for example, [ABS] to 0.
TV _set_saturation <-100-100> [ABS]
Set TV tuner saturation or adjustment, for example, [ABS] to 0.
Use_master
Switch between the master and PCM volume control.
Vo_border [value]
Switch/set the border display.
Vo_fullscreen [value]
Switch/set the full screen mode.
Vo_ontop [value]
Switch/set to the top layer.
Vo_rootwin [value]
Switch/set to play in the root window.
Volume <value> [abs]
Increase/decrease the volume or set it to <value> If [abs] is not zero.
The following command can only be used in the OSD menu Console mode:
Help
The help text is displayed. It is still empty.
Exit
Log out of the OSD console. Unlike 'quit', MPlayer does not exit.
Hide
The OSD menu console is hidden. Click the menu command unhides it. Other key binding actions are as usual.
Run <value>
Run the <value> shell command. Standard output and standard input in the OSD Console
Is output through video
This article from the CSDN blog, reproduced please indicate the source: http://blog.csdn.net/liangkaiming/archive/2010/08/05/5790893.aspx