danielgtaylor/arista — Issue #131: Add H.263 codec
Author: marvil07
Created: 2012-02-04 05:25:56+00:00
State: open

It would be great to have H.263 as a possible codec to use, so old phones(like LG-A235) who only support H.263 codec can have presets too.

I have seen that all codecs depends on a binary encoder. Sadly I could not find one like that for H.263 so not sure if this ticket would be really possible without creating one before.

Anyway, it would be great to hear about suggestions, or maybe I am just totally wrong.

But, just in case, here a little script which describe what works for me on that phone, which maybe can help to complement this.

```bash
#!/bin/bash
ORIGINAL=$1

## create an AVI (h263+aac)
OUTPUT_FILE=/dev/null
for PASS in `seq 1 2`; do
mencoder \
-o "$OUTPUT_FILE" \
-ovc lavc \
-lavcopts vcodec=h263:vpass=$PASS:turbo:vbitrate=145:refs=5 \
-vf scale=128:96,harddup \
-oac faac \
-faacopts br=128:mpeg=4:object=2 -channels 2 -srate 48000 \
"$ORIGINAL"
OUTPUT_FILE="$ORIGINAL.avi"
done;

# then build a MP4 (h263+aac)
NAME=`echo $ORIGINAL | sed 's/\(.*\)\..../\1/'`
MP4Box -aviraw video "$ORIGINAL.avi"
mplayer "$ORIGINAL.avi" -dumpaudio -dumpfile "$ORIGINAL.aac"
MP4Box -add "$ORIGINAL.aac" "$NAME.mp4"
MP4Box -add "${ORIGINAL}_video.h263" "$NAME.mp4"

# clean
rm -f divx2pass.log "$ORIGINAL.avi" "$ORIGINAL.aac" "${ORIGINAL}_video.h263"
```