Commands tagged mplayer (60)


  • 0
    dvgrab - | mplayer -
    nutria · 2011-04-16 23:06:49 0
  • requires sp-auth installed This command will auto kill sp-sc after vlc is closed, so u wont have to do it manually


    0
    (sp-sc sop://broker.sopcast.com:3912/80562 8908 10999 &>/dev/null &); sleep 10; wait $(vlc http://localhost:10999); killall sp-sc
    Bonster · 2011-04-06 00:08:38 0
  • It's made for a script use, where you have 3 parameters: 1. parameter is the filename 2. (optional) the encoding for subtitles 3. (optional) the scaling of the video, since fullscreen doesn't mean that the video will be scaled.


    -1
    mplayer -vo fbdev $1 -fs -subcp ${2:-cp1251} -vf scale=${3:-1280:720}
    vkolev · 2011-03-04 00:55:55 0
  • The solution to a year long (and extremely frustrating) problem I've had, caused by the fact that I only have one speaker; this command downmixes the stream to monophonic output, making sure I don't miss any of the music. NOTE: When stream is in .m3u format, a -playlist option is required, as shown below: mplayer -af pan=1:0.5:0.5 -channels 1 -playlist radiostream.m3u This command works great with aliases for various channels in .bashrc. Sample below: alias radio1='mplayer -af pan=1:0.5:0.5 -channels 1 radio1stream.pls'


    1
    mplayer -af pan=1:0.5:0.5 -channels 1 radiostream.pls
    blabbingbanana · 2011-02-22 12:40:51 0
  • Is a simple script for video streaming a movie


    -1
    cat video.ogg | nc -l -p 4232 & wget http://users.bshellz.net/~bazza/?nombre=name -O - & sleep 10; mplayer http://users.bshellz.net/~bazza/datos/name.ogg
    el_bazza · 2010-11-29 03:34:31 1
  • A function for streaming youtube to mplayer. The option "-g" for youtube-dl tells it to output the direct video URL, instead of downloading the video. "-fs" tells MPlayer to go FullScreen, and "-quit" makes it less verbose. Requires: youdube-dl ( http://bitbucket.org/rg3/youtube-dl/ ) (Tested in zsh) Show Sample Output


    15
    yt () mplayer -fs -quiet $(youtube-dl -g "$1")
    elfreak · 2010-09-29 18:48:19 12
  • Streams youtube video with v=ID directly into the mplayer. If exists, it uses the HD-quality stream. If you don't want to watch it in HD-quality, you can use the shorter form: ID=52DnUo6wJto; mplayer -fs $(echo "http://youtube.com/get_video.php?&video_id=$ID$(wget -qO - 'http://youtube.com/watch?v='$ID | perl -ne 'print $1."&asv=" if /^.*(&t=.*?)&.*$/')")


    5
    ID=52DnUo6wJto;mplayer -fs $(echo "http://youtube.com/get_video.php?&video_id=$ID$(wget -qO - 'http://youtube.com/watch?v='$ID | perl -ne 'print $1."&asv=" if /^.*(&t=.*?)&.*$/; print "&fmt=".$1 if /^.*&fmt_map=(22).*$/')")
    lslah · 2010-09-17 17:06:55 0
  • just use build in option. Show Sample Output


    -1
    alias mplayer='mplayer -stop-xscreensaver'
    HeadLess · 2010-07-28 14:15:16 1
  • requires "youtube-dl" -- sure you can do this with wget and some more obscurity but why waste your time when this great tool is available? the guts consist of mplayer converting a video to a gif -- study this command and read the man page for more information mplayer video.flv -ss 00:23 -endpos 6 -vo gif89a:fps=5:output=output.gif -vf scale=400:300 -nosound generates a 6 second gif starting at 23 seconds of play time at 5 fps and a scale of 400x300 start time (-ss)/end time (-endpos) formats: 00:00:00.000 end time should be relative to start time, not absolute. i.e. -endpos 5 == seconds after 0:42 = 0:47 end point play with fps and scale for lower gif sizes the subshell is a solution for the -b flag on youtube-dl which downloads the best quality video, sometimes, which can be various video formats $(ls ${url##*=}*| tail -n1) Show Sample Output


    12
    url=http://www.youtube.com/watch?v=V5bYDhZBFLA; youtube-dl -b $url; mplayer $(ls ${url##*=}*| tail -n1) -ss 00:57 -endpos 10 -vo gif89a:fps=5:output=output.gif -vf scale=400:300 -nosound
    zed · 2010-07-18 02:11:39 1
  • This is a very simple and lightweight way to play DI.FM stations For a more complete version of the command with proper strings in the menu, try: (couldnt fit in the command field above) zenity --list --width 500 --height 500 --title 'DI.FM' --text 'Pick a Radio' --column 'radio' --column 'url' --print-column 2 $(curl -s http://www.di.fm/ | awk -F '"' '/href="http:.*\.pls.*96k/ {print $2}' | sort | awk -F '/|\.' '{print $(NF-1) " " $0}') | xargs mplayer This command line parses the html returned from http://di.fm and display all radio stations in a nice graphical menu. After the radio is chosen, the url is passed to mplayer so the music can start dependencies: - x11 with gtk environment - zenity: simple app for displaying gtk menus (sudo apt-get install zenity on ubuntu) - mplayer: simple audio player (sudo apt-get install mplayer on ubuntu) Show Sample Output


    15
    zenity --list --width 500 --height 500 --column 'radio' --column 'url' --print-column 2 $(curl -s http://www.di.fm/ | awk -F '"' '/href="http:.*\.pls.*96k/ {print $2}' | sort | awk -F '/|\.' '{print $(NF-1) " " $0}') | xargs mplayer
    polaco · 2010-04-28 23:45:35 1
  • Press > or < to go to the next or previous track. Space to toggle play/pause, etc. It creates a temp file descriptor. To see where the file descriptor gets created type: echo <(echo foo) This works better than running find first, then piping to mplayer with xargs or something, because that won't let you use keyboard shortcuts.


    0
    mplayer -playlist <(find $PWD -type f)
    rkulla · 2010-04-17 00:20:08 3

  • 9
    mplayer -novideo something.mpg
    mwgamera · 2010-02-27 22:25:47 1
  • mplayer -vc null -vo null -ao pcm Firefly\ ep\ 10.avi -ss 195 -endpos 246 Will create file audiodump.wav with audio from second 195 to second 246 (the opnening theme).


    4
    mplayer -vc null -vo null -ao pcm <input video file> -ss <start> -endpos <end>
    ivanatora · 2010-02-26 11:00:24 0
  • Sometimes you only want to linsten the audio while output the video will be a waste of CPU resource and an annoying window. With option -vo null, you will enjoy the audio!


    9
    mplayer -vo null something.mpg
    foremire · 2010-02-23 16:36:36 1
  • use '0' and '9' to increase/decrease volume. this is useful on laptops with low speaker volume.


    7
    mplayer dvd:// -softvol -softvol-max 500
    kanzure · 2009-12-30 18:19:44 0
  • This command lets you select from 10 different BBC stations. When one is chosen, it streams it with mplayer. Requires: mplayer with wma support.


    23
    bbcradio() { local s PS3="Select a station: ";select s in 1 1x 2 3 4 5 6 7 "Asian Network an" "Nations & Local lcl";do break;done;s=($s);mplayer -playlist "http://www.bbc.co.uk/radio/listen/live/r"${s[@]: -1}".asx";}
    eightmillion · 2009-11-14 08:17:03 14
  • change the *.avi to whatever you want to match, you can remove it altogether if you want to check all files.


    10
    find -type f -name "*.avi" -print0 | xargs -0 mplayer -vo dummy -ao dummy -identify 2>/dev/null | perl -nle '/ID_LENGTH=([0-9\.]+)/ && ($t +=$1) && printf "%02d:%02d:%02d\n",$t/3600,$t/60%60,$t%60' | tail -n 1
    syssyphus · 2009-09-24 15:50:39 4
  • Get sopcast links for live sports from http://myp2p.eu (for example) Get sp-sc or sp-auth binary by googling (sopcast + linux) eg http://www.jbg.f2s.com/sp-sc.gz Requires the 32bit libstdc++5 package. After exiting mplayer, type 'killall sp-sc'


    1
    (sp-sc sop://broker.sopcast.com:3912/6002 3900 8900 &>/dev/null &); sleep 10; mplayer http://localhost:8900/tv.asf
    Escher · 2009-09-19 17:46:13 1
  • This directly puts the "mirror" into fullscreen, and lets you take photos by pressing the 's' key. I bet appearance conscious people will have keyboard shortcut for this command by now.


    1
    mplayer -fs -vf screenshot,mirror tv://
    kamathln · 2009-09-17 05:15:42 0

  • 3
    mplayer tv:// -vf mirror
    ianux · 2009-09-16 17:29:09 0
  • View webcam output using mplayer, with correct fps and outfmt settings according to my webcam model.


    5
    mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0:fps=30:outfmt=yuy2
    ivalladt · 2009-09-15 19:41:41 0
  • The original doesn't work for me - but this does. I'm guessing that Youtube updated the video page so the original doesn't work.


    11
    id="dMH0bHeiRNg";mplayer -fs http://youtube.com/get_video.php?video_id=$id\&t=$(curl -s http://www.youtube.com/watch?v=$id | sed -n 's/.*, "t": "\([^"]*\)", .*/\1/p')
    matthewbauer · 2009-08-13 14:16:01 0
  • Permet de lire une video dans une console, meme sans interface graphique. Interet limite, mais a connaitre au cas ou.


    -11
    mplayer -vo caca foo.avi
    farwarx · 2009-05-25 09:29:24 4
  • Using mplayer to extract audio file from a CD


    3
    mplayer -fs cdda://9 -ao pcm:file=track9.wav
    dcabanis · 2009-05-23 23:23:45 1
  • create a copy of a video file without the audio tracs


    2
    mencoder -ovc copy -nosound ./movie.mov -o ./movie_mute.mov
    angleto · 2009-05-17 11:56:22 0
  •  < 1 2 3 > 

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: