How does one create a preset?

Asked by nucc1

I would like to create a preset for converting videos to my phone, a Nokia E51. It is able to play videos using the MPEG-4 codec and either AAC or MP3 audio in an "mp4" file. Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
Arista Transcoder Edit question
Assignee:
No assignee Edit question
Solved by:
Daniel G. Taylor
Solved:
Last query:
Last reply:
Revision history for this message
Best Daniel G. Taylor (danielgtaylor) said :
#1

Currently there is no graphical preset editor, but you can create presets by making a small XML file describing the output format. The easiest way to do this is to take an existing preset and modify it slightly, for examples see here:

http://bazaar.launchpad.net/%7Edanielgtaylor/arista/main/files/head%3A/presets/

The audio and video encoder name and options are the same as you would pass to gst-launch, and you can query what is available on your installation of GStreamer with gst-inspect [name], e.g. in the ipod.xml preset you see that 'faac' is used to encode. To see full information about that encoder you can run 'gst-inspect faac' and it will show you what it encodes to and what options are available.

In the near future I plan on having a graphical editor available with some common formats and such that will greatly simplify the process of creating new presets.

Revision history for this message
nucc1 (nucc1) said :
#2

Thanks Daniel G. Taylor, that solved my question.

Revision history for this message
hackmeister (pdavila) said :
#3

Daniel,
That link appears to be broken. Do you have an updated link?
Thanks

Revision history for this message
hackmeister (pdavila) said :
#4

Daniel,
I'm interested in created an Android preset. I noticed there is a blueprint open for Android. Is anyone actively working on it?
Thanks

Pat

Revision history for this message
Daniel G. Taylor (danielgtaylor) said :
#5

I'm really starting to loathe launchpad... sorry about that. It seems not just that link that is broken but a whole bunch of things related to viewing code.

Just take a look at the preset files in the code, either in the presets directory of a checkout or in e.g. /usr/share/arista/presets on your system if Arista has been installed. To get a checkout easily you can do 'bzr branch lp:arista' and look through the files. Hope this helps!

If you create a preset you will also find my email in the AUTHORS file, feel free to send it and I'll put it into the repository. AFAIK Android supports the same stuff as iPods (H.264/AAC in MP4) but I can't confirm nor deny that as I don't have an Android device.

Revision history for this message
hackmeister (pdavila) said :
#6

Daniel,
Thanks for the quick response. I'll start with the iPod preset as my base and work from there to tweak it. I have a G1 which is considered low end for an Android phone these days. Maybe later we could split Android to low quality & high quality depending on the phone?
Thanks again

Pat

Revision history for this message
Tim Goodwin (goodwin-my5w) said :
#7

I've been trying to create a preset for Sony Walkman X (NWZ-X1050) without much success. I've encoded video successfully using ffmpeg from the command line using:

ffmpeg -i "infile.avi" -f mp4 -acodec libfaac -ab 192k -ac 2 -ar 48000 -vcodec libx264 -vpre walkmanx -crf 22 -s 432x240 -threads 0 outfile.mp4

How would I get similar results in Arista preset? I've tried using presets for the walkman NWZ-818 and changing the output to 432X240 and though the mp4 file is created OK and plays on my computer, it won't play on the X - I just get an 'unsupported file format' error.

Any ideas?

Revision history for this message
Daniel G. Taylor (danielgtaylor) said :
#8

Tim,

I need you to show me what's in that video preset file you used for FFmpeg (the walkmanx file). It should be very easy to create the preset once we have that.

Also, a question - does the iPod preset work for that? (I have a feeling it might, though I guess the video dimensions will need to be forced to 432x240, but that's easier than copying the NWZ-818 preset)

Revision history for this message
Tim Goodwin (goodwin-my5w) said :
#9

coder=0
flags=+loop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
me_method=hex
subq=6
Hi Daniel

Thanks for the response. The walkmanx file is as follows:

me_range=16
g=250
keyint_min=25
sc_threshold=40
i_qfactor=0.71
b_strategy=1
qcomp=0.6
qmin=10
qmax=51
qdiff=4
bf=0
refs=2
directpred=3
trellis=0
flags2=+bpyramid+fastpskip
level=13

I will try the IPod preset and see if it works. I have a feeling I tried it before, but can't remember! Thanks for your help.

Revision history for this message
Tim Goodwin (goodwin-my5w) said :
#10

That went pear shaped for some reason:

coder=0
flags=+loop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
me_method=hex
subq=6
me_range=16
g=250
keyint_min=25
sc_threshold=40
i_qfactor=0.71
b_strategy=1
qcomp=0.6
qmin=10
qmax=51
qdiff=4
bf=0
refs=2
directpred=3
trellis=0
flags2=+bpyramid+fastpskip
level=13

Revision history for this message
Tim Goodwin (goodwin-my5w) said :
#11

Hi Daniel

I can confirm the the iPod preset does not work - also gives the 'unsupported file format' error.