I wonder how to manually transcode a Quicktime Movie using mencoder and tsMuxer.
PMS is basically a graphical interface around shell commands, so based on the commands in the debug.log it should be possible to recreate the same steps.
Here is what I have come up with so far:
- Code: Select all
#!/bin/bash
# test.sh - Script to test mencoder and tsMuxeR on OSX without the noisy PMS log messages
# - Install PS3 Media Server
# - Download a QuickTime movie (e.g. from trailers.apple.com), save it as "test.mov"
# - Run this script with "sh test.sh"
MENCODER="/Applications/PS3 Media Server.app/Contents/Resources/Java/osx/mencoder"
TSMUXER="/Applications/PS3 Media Server.app/Contents/Resources/Java/osx/tsMuxeR"
# PMS would create this file
if [ ! -f tsMuxeR.meta ]; then
cat > tsMuxeR.meta <<EOM
MUXOPT --no-pcr-on-video-pid --new-audio-pes --no-asyncio --vbr --vbv-len=500
V_MPEG4/ISO/AVC, "video", fps=25, level=4.1, insertSEI, contSPS, track=1
A_AC3, "audio", track=2
EOM
fi
# Same as PMS calls from debug.log, but stripped of "-quiet" and "-really-quiet" arguments and used simple filenames
"$MENCODER" -ss 0 test.mov -msglevel statusline=2 -ovc copy -nosound -mc 0 -noskip -of rawvideo -o video
"$MENCODER" -ss 0 test.mov -msglevel statusline=2 -channels 6 -ovc copy -of rawaudio -mc 0 -noskip \
-oac lavc -lavcopts acodec=ac3:abitrate=256 -af lavcresample=48000 -srate 48000 -o audio
"$TSMUXER" tsMuxeR.meta video.mp4
The mencoder bit works, but tsMuxer bugs out with an error.
Somehow PMS seems to be able to make it work and generate some output, though.
How do I get this to work?
