Short: FFmpeg + FFplay video player Author: Michael Niedermayer Uploader: Piotr Bandurski Type: gfx/conv Version: git-7df9937 Requires: 020+881, CGX/P96, AHI, ixemul.library v63.1+ Architecture: m68k-amigaos >= 2.0.4 FFmpeg + FFplay git-7df9937 (29.01.2012) I. FFmpeg FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. FFmpeg can also convert from any sample rate to any other, and resize video on the fly with a high quality polyphase filter. 1. Usage a) convert avi video file to mpg with audio bitrate 128kb and video bitrate 1024kb: ffmpeg -i test.avi -acodec mp2 -b:a 128k -vcodec mpeg1video -b:v 1024k out.mpg b) convert wmv video file to avi (divx) with audio bitrate 256kb and video bitrate 1024kb: ffmpeg -i test.wmv -acodec libmp3lame -b:a 256k -vcodec msmpeg4v2 -b:v 1024k out.avi c) convert mkv video file to avi (h264) with audio bitrate 256kb and video bitrate 1024kb: ffmpeg -i test.wmv -acodec libmp3lame -b:a 256k -vcodec libx264 -b:v 1024k out.avi d) convert jpeg2000 image to bmp: ffmpeg -i test.jp2 test.bmp e) convert flac audio file to wma: ffmpeg -i test.flac test.wma f) grab the network stream (requires correct assign to amitcp package): assign amitcp: :amitcp ffmpeg -i [http/mmsh/mmst/rtp/rtmp/rtsp]://x.x.x.x/file.ra -acodec copy out.ra II. FFplay There is also an FFplay video player included in the archive. FFplay can play/show any multimedia file type like avi/mov/asf/wmv/mkv/rmv/mp3/ogg/wma/jpg/jp2/png etc. 1. Amiga related features a) built-in GUI ffplay -gui [1/2] -gui 0 - disable -gui 1 - normal -gui 2 - glued (default) SF = skip frame SS = save screenshot CA = cycle audio tracks CV = cycle video tracks CS = cycle subtitle tracks AW = show/hide audio wave FS = full screen/window mode I = about requester Q = quit The "Load File" gadget works via ARexx script, so: - RexxMast must be run before FFplay - "ffplay_loadfile.rexx" script must be located in "S:" dir - "RX" command must be located in "SYS:RexxC" dir - "Wait" command must be located in "C:" dir - FFplay must be located in "C:" dir (this can be changed, read bolow) The "ffplay_loadfile.rexx" script can be modified to for example enable framedrop option, select the default dir where the requester will be opened etc.: "Address Command 'Run <>NIL: C:FFplay -gui 2 -framedrop -quiet DH1:Movies'" The GUI can be opened at (x,y) position on the screen with -gui_x -gui_y options. b) Arexx port rexxmast rx "ADDRESS FFPLAY_AREXX " available commands: QUIT, PAUSE, AUDIOWAVE, FULLSCREEN, BACKWARD, FORWARD, FBACKWARD, FFORWARD, SKIPFRAME, SCREENSHOT, CYCLEAUDIO, CYCLEVIDEO, CYCLESUBTITLE, ABOUT, VOLMIN, VOLHALF, VOLMAX, HELP c) Workbench support (inc. tooltypes and def_icons) switchable tooltypes can be set to 1/0 or ON/OFF available tooltypes: WIDTH=[NUMBER] HEIGHT=[NUMBER] BYTES=[ON/OFF] NODISP=[ON/OFF] GENPTS=[ON/OFF] DRP=[ON/OFF] LOOP=[NUMBER/-1] FRAMEDROP=[ON/OFF] AUDIOVIS=[1/2] AST=[NUMBER] SST=[NUMBER] VST=[NUMBER] FAST=[ON/OFF] LOWRES=[1-5] FULLSCREEN=[ON/OFF] AUDIO=[ON/OFF] SUBTITLES=[ON/OFF] VIDEO=[ON/OFF] AUTOEXIT=[ON/OFF] SKIPFRAME=[16/32] DITHER=[GRAY/HICOLOR/TRUECOLOR] SYNC=[AUDIO/VIDEO/EXT] STARTPATH=[PATH] AUDIOBLOCK=[ON/OFF] EXITONKEYDOWN=[ON/OFF] EXITONMOUSEDOWN=[ON/OFF] GUI_X=[NUMBER] GUI_Y=[NUMBER] GUI=[0/1/2] MOUSEWHEEL=[1/2] VOL=[1-11] some tooltypes have a different names compared to the command line options: "-x" = WIDTH "-y" = HEIGHT "-fs" = FULLSCREEN=ON "-an" = AUDIO=OFF "-sn" = SUBTITLES=OFF "-vn" = VIDEO=OFF d) file requester 2. Usage a) while playing q, ESC quit f, ENTER toggle full screen p, SPACE pause a cycle audio channel v cycle video channel t cycle subtitle channel w show audio waves s activate frame-step mode x save screenshot i show about window left/right seek backward/forward 15 seconds down/up seek backward/forward 1 minute increase/decrease audio volume LMB click seek to percentage in file corresponding to fraction of width RMB click hide/show mouse pointer b) default directory * from CLI ffplay - "ffplay_startpath" env variable will be read and if the dir set in the variable exists, requester will be opened in that dir. in case there is no "ffplay_startpath" env variable or the dir doesn't exist then the requester will opened in the current dir. ffplay - the requester will be opened in the , even if "ffplay_startpath" variable exists. * from WB ffplay's icon clicked - the tooltype "STARTPATH" will be read from ffplay's icon and if the dir does exist, the requester will be opened there, otherwise the requester will be opened in the current WB directory. c) misc * mousewheel ffplay -mousewheel 1 - use mousewheel for stream seeking ffplay -mousewheel 2 - use mousewheel for audio volume change (default) * audio volume ffplay -vol 1 - set the audio volume to minimum ffplay -vol 11 - set the audio volume to maximum (default) * autoexit ffplay -autoexit - exit player when stream reaches the end * loop ffplay -loop -1 - loop the stream infinite number of times ffplay -loop 2 - loop the stream only one time * disable audio, video or subtitles ffplay -an - disable audio playback ffplay -vn - disable video playback ffplay -sn - disable displaying of subtitles * dither ffplay -dither gray - play the video on 8-bit screen ffplay -dither hicolor - play the video on 15/16-bit screen ffplay -dither truecolor - play the video on 24/32-bit screen * quiet ffplay -quiet - do not output FFmpeg's warnings/messages to the console * realtime video filter fun ffplay -vf hflip ffplay -vf vflip ffplay -vf unsharp ffplay -vf hqdn3d=200 ffplay -vf mp=tile=2:2 ffplay -vf mp=mirror ffplay -vf mp=down3dright ffplay -vf mp=boxblur=6:6 ffplay -vf mp=noise=25 * network streaming (test stream) ffplay mmsh://208.75.229.58/1tv 3. Notes a) for a playback on slow systems try to use a combination of these options: ffplay -quiet -an -framedrop -lowres [1/2/3] -skipframe [16/32] -dither [gray/hicolor] b) IMPORTANT: Under WinUAE copy the "env/ahi_minbufflen" file to "ENV:" and "ENVARC:" before using FFplay and set the video memory to at least 16MB. c) some people seems to get "ffplay failed returncode 161" error message while using ffplay under DOpus 5.x. I can't reproduce this on my system, but I got a report that this workround happen to fix the problem: {AmigaDOS} Run >NIL: C:FFplay {f} Thanks to Bernd Roesch for his bugfixed/improved ixemul/SDL libraries and Matt Hey for optimized 68060 asm routines. Installation: copy "bin/ffmpeg[040fpu/060fpu]" to "c:ffmpeg" copy "bin/ffplay[040fpu/060fpu]" to "c:ffplay" copy "bin/ffprobe[040fpu/060fpu]" to "c:ffprobe" copy "env/*" to "env:" and "envarc:" copy "rexx/ffplay_loadfile.rexx" to "s:ffplay_loadfile.rexx" Requirements: 68020+ with FPU 64MB of RAM AHI CyberGfx or Picasso96 ixemul.library v63+ Changes: 11.02.2012 - fixed "skip one frame" mode ("SF" button / "s" key) If you think my work is useful to you, please consider donating via PayPal to my e-mail address: ami_stuff @ o2 . pl Amiga 68k port by Piotr Bandurski