[MEncoder-users] trouble creating a mp4 file

Alex Samad alex at samad.com.au
Tue Jan 22 09:14:52 CET 2008


Hi

I am trying to encode some mpeg src files (from a panasonic video camera)

this is the jist of the script

INFILE="$1"
OUTFILE="${INFILE/.mpg/}.mp4"

# Passlog
	PASSLOG="$WRKDIR/divx2pass.log"

	# Higher - 1500
	# High - 1400 2cd
	# Normal ? - 700  1cd
	BITRATE=${BITRATE:-1000}


	ENC1="x264 -x264encopts 
subq=4:bframes=4:b_pyramid:weight_b:pass=1:psnr:bitrate=$BITRATE:turbo=1"
	ENC2="x264 -x264encopts 
subq=5:partitions=4x4:8x8dct:frameref=3:me=hex:bframes=4:b_pyramid:pass=2:psnr:bitrate=$BITRATE"

	AENC="-af volnorm=1"

	FILTER1="-vf crop=704:464:6:58"
	FILTER1=""
	FILTER2="-vf spp,hqdn3d=2:1:2,crop=704:464:6:58"
	FILTER2="-vf spp,hqdn3d=2:1:2"

	# Audio
	AUDIO="-oac faac -faacopts object=1:tns:quality=300:mpeg=2"

	LAMEOPTS="preset=standard"
	#LAMEOPTS="br=96:cbr:vol=6"
	AUDIOOPT="-lameopts "$LAMEOPTS""
	#AUDIO="-oac mp3lame $AUDIOOPT"

	# Apect ratio input !?
	ASPECT="-aspect 16:9"

	# Additional stuff
	ADDOPT="-frames 300"
	ADDOPT=


	nice mencoder -quiet \
			$ASPECT \
			-alang en\
			$FILTER1 \
			-ovc $ENC1 \
			-oac copy \
			-passlogfile "$PASSLOG" \
			-o /dev/null \
			"$INFILE" $ADDOPT

	nice mencoder -quiet \
			$ASPECT \
			-alang en\
			$FILTER2 \
			$AENC \
			-ovc $ENC2 \
			-passlogfile "$PASSLOG" \
			$AUDIO \
			-o "$OUTFILE" \                                                                                             
"$INFILE" $ADDOPT

when I run this again one of the files, I get this with identify
Playing MOV001.mp4.
AVI file format detected.
ID_VIDEO_ID=0
[aviheader] Video stream found, -vid 0
ID_AUDIO_ID=1
[aviheader] Audio stream found, -aid 1
VIDEO:  [h264]  704x576  24bpp  25.000 fps  998.6 kbps (121.9 kbyte/s)
Clip info:
 Software: MEncoder 1.0rc2-4.2.3
ID_CLIP_INFO_NAME0=Software
ID_CLIP_INFO_VALUE0=MEncoder 1.0rc2-4.2.3
ID_CLIP_INFO_N=1
ID_FILENAME=MOV001.mp4
ID_DEMUXER=avi
ID_VIDEO_FORMAT=h264
ID_VIDEO_BITRATE=998576
ID_VIDEO_WIDTH=704
ID_VIDEO_HEIGHT=576
ID_VIDEO_FPS=25.000
ID_VIDEO_ASPECT=1.7778
ID_AUDIO_FORMAT=28781
ID_AUDIO_BITRATE=274696
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_LENGTH=73.76
==========================================================================
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: [faad] AAC (MPEG2/4 Advanced Audio Coding)
AUDIO: 48000 Hz, 2 ch, s16le, 274.7 kbit/17.88% (ratio: 34337->192000)
ID_AUDIO_BITRATE=274696
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio) decoder)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
ID_AUDIO_CODEC=faad


ID_DEMUXER=avi worries me ?

Also I can't hear any audio when played on a windows box, with media player or 
vlc - I have the ffdshow codecs install

I remember reading (here I think) that aac + H264 in avi can have problems in 
audio such that only mplayer can play it.  And mplayer plays the output okay.

I can work around by using mp3, but I thought I would ask the list first 

I will see if I can find a newer version of mencoder as well

Thanks 

Alex

-- 
"All my life I wanted to be someone; I guess I should have been more specific."
		-- Jane Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mencoder-users/attachments/20080122/d607bd77/attachment.pgp>


More information about the MEncoder-users mailing list