mp3cd 1.0.22 copy "mp3cd: ^1.0.22" to clipboard
mp3cd: ^1.0.22 copied to clipboard

Mp3c Dart implementation.

mp3cd #

Mp3c implementation written in Dart.

Details #

Convert audio, images, text, and videos for specific portable media players. Profiles were meticulously reverse-engineered for optimal conversion. List of profiles are available through this spreadsheet.

Binary paths #

Binaries are assumed to be in your PATH, but can be overridden. These are the defaults:

/// Binary path for FFmpeg.
String binPathFfmpeg = 'ffmpeg';

/// Binary path for FFprobe.
String binPathFfprobe = 'ffprobe';

/// Binary path for FFmpeg with YP3 x264 patch.
String binPathFfmpegYp3Patch = 'ffmpeg-yp3-patch';

/// Binary path for Image Magick.
String binPathImageMagick = 'magick';

/// Binary path for ebook-convert.
String binPathEbookConvert = 'ebook-convert';

/// Binary path for MP4Box.
String binPathMp4box = 'MP4Box';

YP3 #

Certain MP3 players using the SmartLink 6806 (SL6806) chipset require special x264 patches and thus a special patched ffmpeg binary for x264 video conversion. Ensure the ffmpeg binary can be located in your PATH named ffmpeg-yp3-patch.

Dependencies #

Ensure these dependencies are available through your environment:

  • ffmpeg
  • ffmpeg-yp3-patch
  • ffprobe
  • ebook-convert (Calibre)
  • convert (Image Magick)
  • MP4Box (gpac)

Usage #

-h, --[no-]help               Show usage.
-i, --input (mandatory)       Input file.
-o, --output                  Output file. Uses the default profile suffix if null.
-c, --converters              Converters to apply.
                              [uid0001, uid0002, uid0003, uid0004, uid0005, uid0007, uid0008, uid0009, uid0010, uid0011, uid0013, uid0014, uid0016, uid0017, uid0018, uid0019]
-m, --mode (mandatory)        Mode of operation.
                              [audio, image, text, video]

Toolchain
    --bin-ffmpeg              Binary path for FFmpeg.
                              (defaults to "ffmpeg")
    --bin-ffprobe             Binary path for FFprobe.
                              (defaults to "ffprobe")
    --bin-ffmpeg-yp3-patch    Binary path for FFmpeg with YP3 x264 patch.
                              (defaults to "ffmpeg-yp3-patch")
    --bin-image-magick        Binary path for Image Magick.
                              (defaults to "magick")
    --bin-ebook-convert       Binary path for ebook-convert.
                              (defaults to "ebook-convert")
    --bin-mp4box              Binary path for MP4Box.
                              (defaults to "MP4Box")

Examples #

  • mp3cd -i myvideo.mp4 -c uid0001,uid0004 -m video
  • mp3cd -i myimage.png -c uid0018 -m image -o output.jpg

Docker #

An included Dockerfile will provide all necessary dependencies.

  1. Build the image: docker build -t mp3cd .
  2. Enter an interactive shell: docker run --rm -it mp3cd

You may also connect a local directory to operate on host files:

docker run --rm -it -v "$PWD:/root/working" mp3cd

The shared volume is accessible from /root/working.

You may also call mp3cd without entering an interactive shell:

docker run --rm -it -v "$PWD:/root/working" mp3cd mp3cd -i /root/working/myvideo.mp4 -c uid0001 -m video

1
likes
130
points
1.24k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Mp3c Dart implementation.

Repository (GitHub)
View/report issues

License

BSD-2-Clause (license)

Dependencies

args, path

More

Packages that depend on mp3cd