From f5b8b6ac126d8cef3860db16d3db8e72507a2258 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Fri, 14 Sep 2012 17:51:26 +0200 Subject: encode: video encoding now supported using mencoder-like options --- etc/encoding-example-profiles.conf | 189 +++++++++++++++++++++++++++++++++++++ etc/input.conf | 2 + 2 files changed, 191 insertions(+) create mode 100644 etc/encoding-example-profiles.conf (limited to 'etc') diff --git a/etc/encoding-example-profiles.conf b/etc/encoding-example-profiles.conf new file mode 100644 index 0000000000..5dc2908599 --- /dev/null +++ b/etc/encoding-example-profiles.conf @@ -0,0 +1,189 @@ +# +# MPlayer configuration file +# + +######################### +# encoding profile file # +######################### +# +# Usage of this file: copy/symlink it to a fixed location, and add +# include = /path/to/this/encoding-example-profiles.conf +# to your ~/.mplayer/config +# +# Then, list all profiles by +# mplayer -profile help | grep enc- +# +# The following kinds of encoding profiles exist: +# enc-a-*: initialize an audio codec including good defaults +# enc-v-*: initialize a video codec including good defaults +# enc-f-*: initialize a file format including good defaults, including +# selecting and initializing a good audio and video codec +# enc-to-*: load known good settings for a target device; this typically +# includes selecting an enc-f-* profile, then adjusting some +# settings like frame rate, resolution and codec parameters +# +# AFTER including a profile of these, you can of course still change +# options, or even switch to another codec. +# +# You can view the exact options a profile sets by +# mplayer -show-profile enc-to-bb-9000 +# +# Examples: +# mplayer -profile enc-to-dvdpal -o outfile.mpg infile.mkv +# mplayer -profile enc-f-avi -ofps 30 -o outfile.avi infile.mkv +# mplayer -profile enc-v-mpeg4 -ovcopts-add global_quality=7 -profile enc-a-mp3 -oacopts-add b=320k -o outfile.avi infile.mkv + +################ +# audio codecs # +################ +[enc-a-aac] +profile-desc = "AAC (libfaac or FFmpeg)" +oac = libfaac,aac +oacopts = b=128k + +[enc-a-ac3] +profile-desc = "AC3 (FFmpeg)" +oac = ac3 +oacopts = b=448k + +[enc-a-mp3] +profile-desc = "MP3 (LAME)" +oac = libmp3lame +oacopts = b=128k + +[enc-a-vorbis] +profile-desc = "Vorbis (libvorbis)" +oac = libvorbis +oacopts = global_quality=3 + +################ +# video codecs # +################ +[enc-v-h263] +profile-desc = "H.263 (FFmpeg)" +ovc = h263 +ovcopts = global_quality=4 + +[enc-v-h264] +profile-desc = "H.264 (x264)" +ovc = libx264 +ovcopts = preset=medium,crf=23,threads=0 + +[enc-v-mpeg2] +profile-desc = "MPEG-2 Video (FFmpeg)" +ovc = mpeg2video +ovcopts-clr = yes + +[enc-v-mpeg4] +profile-desc = "MPEG-4 Part 2 (FFmpeg)" +ovc = mpeg4 +ovcopts = global_quality=4 + +[enc-v-vp8] +profile-desc = "VP8 (libvpx)" +oac = libvpx +oacopts = qmin=4,b=10000000k # ought to be enough for anyone; for CBR use, set b=; for VBR use, set qmin= to quality + +########### +# formats # +########### +[enc-f-3gp] +profile-desc = "H.263 + AAC (for 3GP)" +of = 3gp +ocopyts = yes +profile = enc-v-h263 +profile = enc-a-aac +ofopts-clr = yes + +[enc-f-avi] +profile-desc = "MPEG-4 + MP3 (for AVI)" +of = avi +ocopyts = no +oautofps = yes +profile = enc-v-mpeg4 +profile = enc-a-mp3 +ofopts-clr = yes + +[enc-f-mp4] +profile-desc = "H.264 + AAC (for MP4)" +of = mp4 +ocopyts = yes +profile = enc-v-h264 +profile = enc-a-aac +ofopts-clr = yes + +[enc-f-webm] +profile-desc = "VP8 + Vorbis (for WebM)" +of = webm +ocopyts = yes +profile = enc-v-vp8 +profile = enc-a-vorbis +ofopts-clr = yes + +################## +# target devices # +################## +[enc-to-dvdpal] +profile-desc = "DVD-Video PAL, use dvdauthor -v pal+4:3 -a ac3+en" +profile = enc-v-mpeg2 +profile = enc-a-ac3 +of = dvd +ofopts-add = packetsize=2048,muxrate=10080000 +ofps = 25 +oharddup = yes +vf = expand=aspect=4/3,scale=720:576 +srate = 48000 +ovcopts-add = g=15,b=6000000,maxrate=9000000,minrate=0,bufsize=1835008 + +[enc-to-dvdntsc] +profile-desc = "DVD-Video NTSC, use dvdauthor -v ntsc+4:3 -a ac3+en" +profile = enc-v-mpeg2 +profile = enc-a-ac3 +of = dvd +ofopts-add = packetsize=2048,muxrate=10080000 +ofps = 24000/1001 +oharddup = yes +vf-add = expand=aspect=4/3,scale=720:480 +srate = 48000 +ovcopts-add = g=18,b=6000000,maxrate=9000000,minrate=0,bufsize=1835008 + +[enc-to-bb-9000] +profile-desc = "MP4 for Blackberry Bold 9000" +profile = enc-f-mp4 +vf-add = scale=480:-2 +ovcopts-add = maxrate=1500k,bufsize=1000k,rc_init_occupancy=900k,refs=1,profile=baseline +oacopts-add = b=96k + +[enc-to-nok-6300] +profile-desc = "3GP for Nokia 6300" +profile = enc-f-3gp +ofps = 25 +vf-add = scale=176:144 +srate = 16000 +channels = 1 +oacopts-add = b=32k + +[enc-to-psp] +profile-desc = "MP4 for PlayStation Portable" +profile = enc-f-mp4 +ofps = 30000/1001 +vf-add = scale=480:272,dsize=480:270 +srate = 48000 +channels = 2 +ovcopts-add = b=512k,profile=baseline + +[enc-to-iphone] +profile-desc = "MP4 for iPhone" +profile = enc-f-mp4 +oautofps = yes # iphone supports 30fps max +vf-add = scale=-2:320 # half native screen res is probably best here, full res is no fun on tiny display anyway +ovcopts-add = maxrate=2500k,bufsize=1000k,rc_init_occupancy=900k,level=30,profile=baseline +oacopts-add = b=128k + +[enc-to-iphone-4] +profile-desc = "MP4 for iPhone 4 (960x640)" +profile = enc-f-mp4 +oautofps = yes # iphone supports 30fps max +vf-add = scale=-2:640 # native screen res +ovcopts-add = maxrate=2500k,bufsize=1000k,rc_init_occupancy=900k,level=30,profile=baseline +oacopts-add = b=128k diff --git a/etc/input.conf b/etc/input.conf index aaadbfc8e3..2dd9fee758 100644 --- a/etc/input.conf +++ b/etc/input.conf @@ -53,6 +53,7 @@ PGDWN seek -600 } speed_mult 2.0 BS speed_set 1.0 # reset speed to normal q quit +q {encode} quit ESC quit p pause # toggle pause/playback mode . frame_step # advance one frame and pause @@ -122,6 +123,7 @@ VOLUME_UP volume 1 VOLUME_DOWN volume -1 MUTE mute CLOSE_WIN quit +CLOSE_WIN {encode} quit ! seek_chapter -1 # skip to previous chapter @ seek_chapter 1 # next E step_property_osd edition # next edition -- cgit v1.2.3