[MEncoder-users] Loosing sync
Alex Samad
alex at samad.com.au
Tue Oct 28 12:06:27 CET 2008
Hi
I am trying to convert my dvd's onto my media box. I have used vocopy to
extract/copy the dvd's to my hd and I am using this script to convert
to a h264/DTS(copied) .mkv file
I have edited out comments and spaces
DVDT="${DVDT:-1}"
# Set with "-dvd-device /exports/video/ISO/XMEN2_DISC1/"
DVDDEVICE=${DVDDEVICE:-""}
AID=${AID:-'-aid 128'}
INF=${INF:-"DVD://$DVDT"}
OUTD=${OUTD:-"/exports/video/Movies/UNCLASSIFIED"}
#BASE=${BASE:-"UNKNOWN"}
BITRATE=${BITRATE:-1000}
PASSCOMMON='subq=6:partitions=all:8x8dct:frameref=3:b_pyramid:me=umh:bframes=4:weight_b:nopsnr:threads=auto:brdo:trellis=1:level_idc=41:direct_pred=auto:bime'
PASS1='pass=1:turbo=1'
PASS2='pass=2'
ENC1="x264 -x264encopts $PASS1:$PASSCOMMON:bitrate=$BITRATE"
ENC2="x264 -x264encopts $PASS2:$PASSCOMMON:bitrate=$BITRATE"
AENC=${AENC:-""}
OAC=${OAC:-"copy"}
OACOPT=${OACOPT:-""}
CROP=${CROP:-"crop=720:416:0:80"}
FILTER1="$CROP,spp,scale,harddup"
FILTER2="$CROP,spp,scale,harddup"
OUTF="$OUTD/$BASE.mkv"
PASSLOG="$BASE.divx2pass.log"
WRKDIR="$(mktemp -t -d -p $TMP)"
TMPF="$WRKDIR/$BASE.avi"
nice mencoder -quiet \
-vf $FILTER1 \
-ovc $ENC1 \
-oac "$OAC" $OACOPT \
-passlogfile "$PASSLOG" \
-o /dev/null \
"$INF" $ADDOPT $AID $DVDDEVICE
nice mencoder -quiet \
-vf $FILTER2 \
$AENC \
-ovc $ENC2 \
-passlogfile "$PASSLOG" \
-oac "$OAC" $OACOPT \
-o "$TMPF" \
"$INF" $ADDOPT $AID $DVDDEVICE
# remux into mkv container
nice mkvmerge -q -o "$OUTF" --title "$BASE" --default-language 'en'
"$TMPF"
When I watch this the sounds drifts out sync
this is the output from
mplayer -vo null -identify -frames 0 -dvd-device
/exports/video/ISO/XMEN_1_5_DISC1 DVD://1 -aid 138
============
audio stream: 1 format: dts (5.1) language: en aid: 138.
ID_AUDIO_ID=138
ID_AID_138_LANG=en
ID_VIDEO_ID=0
MPEG-PS file format detected.
ID_AUDIO_ID=131
ID_AUDIO_ID=128
ID_AUDIO_ID=138
VIDEO: MPEG2 720x576 (aspect 3) 25.000 fps 7500.0 kbps (937.5
kbyte/s)
ID_FILENAME=DVD://1
ID_DEMUXER=mpegps
ID_VIDEO_FORMAT=0x10000002
ID_VIDEO_BITRATE=7500000
ID_VIDEO_WIDTH=720
ID_VIDEO_HEIGHT=576
ID_VIDEO_FPS=25.000
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=8193
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_LENGTH=6002.40
ID_SEEKABLE=1
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred colorspace: Mpeg PES)
VDec: using Mpeg PES as output csp (no 0)
VO: [null] 720x576 => 1280x1024 Mpeg PES [fs] [vm] [zoom]
Selected video codec: [mpegpes] vfm: mpegpes (MPEG-PES output (.mpg or
DXR3/IVTV/DVB/V4L2 card))
==========================================================================
ID_VIDEO_CODEC=mpegpes
==========================================================================
Opening audio decoder: [libdca] DTS decoding with libdca
Stream with high frequencies VQ coding
AUDIO: 48000 Hz, 2 ch, s16le, 768.0 kbit/50.00% (ratio: 96000->192000)
ID_AUDIO_BITRATE=768000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
Selected audio codec: [dts] afm: libdca (DTS-libdca)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
ID_AUDIO_CODEC=dts
and from the resultant file
mplayer -vo null -identify -frames 0 X-Men\ 1.5\ \(2000\).mkv
Playing X-Men 1.5 (2000).mkv.
Cache fill: 0.00% (0 bytes)
ID_VIDEO_ID=0
[mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0
ID_AUDIO_ID=0
ID_AID_0_LANG=eng
[mkv] Track ID 2: audio (A_DTS), -aid 0, -alang eng
[mkv] Will play video track 1.
Matroska file format detected.
VIDEO: [avc1] 704x432 24bpp 25.000 fps 0.0 kbps ( 0.0 kbyte/s)
ID_FILENAME=X-Men 1.5 (2000).mkv
ID_DEMUXER=mkv
ID_VIDEO_FORMAT=avc1
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=704
ID_VIDEO_HEIGHT=432
ID_VIDEO_FPS=25.000
ID_VIDEO_ASPECT=2.3171
ID_AUDIO_FORMAT=8193
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=6
ID_LENGTH=6002.39
ID_SEEKABLE=1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
ID_VIDEO_CODEC=ffh264
==========================================================================
Opening audio decoder: [libdca] DTS decoding with libdca
Stream with high frequencies VQ coding
AUDIO: 48000 Hz, 2 ch, s16le, 768.0 kbit/50.00% (ratio: 96000->192000)
ID_AUDIO_BITRATE=768000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
Selected audio codec: [dts] afm: libdca (DTS-libdca)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
ID_AUDIO_CODEC=dts
When I tested the output'ed .avi file seemed to be okay
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mencoder-users/attachments/20081028/afbc6ab3/attachment.pgp>
More information about the MEncoder-users
mailing list