mp4 on my Samsung D840

With some trial and error, I finally found how to encode videos to play on my Samsung D840.

Here is a shell script that does a good job thanks to the ffmpeg encoder. Hope the codecs and bitrates will be useful to others:

PYTHON:
  1. #!/bin/sh
  2. # This shell script encodes a decrypted VOB into a
  3. # mp4 file that is playable on Samsung mobile
  4. #
  5. #author Regis Decamps
  6. #
  7. f=$1
  8.  
  9. VIDEO_BITRATE=112
  10. VIDEO_FRAME_RATE=12
  11. VIDEO_SIZE=cif
  12.  
  13. AUDIO_FREQ=24000
  14. AUDIO_BITRATE=96
  15.  
  16. ffmpeg -i "$f" \
  17. -vcodec mpeg4 \
  18. -r $VIDEO_FRAME_RATE  \
  19. -b $VIDEO_BITRATE \
  20. -s $VIDEO_SIZE \
  21. -acodec aac \
  22. -ar $AUDIO_FREQ \
  23. -ab $AUDIO_BITRATE \
  24. -map 0.0 \
  25. -map 0.2 \
  26. "$(basename $f .vob).mp4"


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply