LinHES Forums
http://forums.linhes.org/

mpeg4 (x264) export script with cutlist
http://forums.linhes.org/viewtopic.php?f=3&t=12583
Page 3 of 3

Author:  RCS [ Sat Sep 22, 2007 3:39 pm ]
Post subject: 

if I am on the right track it looks like the file name in the tmp dir is to264-xxxxx\r.sed\r

so lets see if I can figure this out :D

Author:  uzik [ Sat Sep 22, 2007 4:39 pm ]
Post subject: 

I think I just got it. I think you saved the script or edited it on a windows
machine and then transferred it to linux? I think the '\r' is the visual
representation of the return character. Dos/windows uses carriage
return and line feed both, but unix only uses one. In the linux
command line edit the file in binary mode:

vi -b to264

Then use the following to remove all the return characters

:1,$s/.$//

this will take the last character off every line in the file.

Author:  RCS [ Sat Sep 22, 2007 4:42 pm ]
Post subject: 

well I give up .. I can not see a difference between the to770 and the to264 file except for the FPS check (which is ok since I put it in the to770 script) and the "MYSQL="/usr/bin/mysql -u root"" other than that the to770 runs and the to264 does not. C'est La Vie, I have a gremlin somewhere that just would go away. So I will just use the to770 script and put the FPS check in and mod the mencoder settting

Author:  RCS [ Sat Sep 22, 2007 4:44 pm ]
Post subject: 

nope SuSe 10.1 here .. it is just a wierd error I can not find

uzik wrote:
I think I just got it. I think you saved the script or edited it on a windows
machine and then transferred it to linux? I think the '\r' is the visual
representation of the return character. Dos/windows uses carriage
return and line feed both, but unix only uses one. In the linux
command line edit the file in binary mode:

vi -b to264

Then use the following to remove all the return characters

:1,$s/.$//

this will take the last character off every line in the file.

Author:  uzik [ Sat Sep 22, 2007 4:46 pm ]
Post subject: 

Try editing it with "vi -b" and see if there are special characters on the end of each line. I might have accidently done it on my end.

Author:  RCS [ Sat Sep 22, 2007 5:23 pm ]
Post subject: 

Ok that is prob it ... I will post the results in a few hours .. time for a break

Author:  RCS [ Sat Sep 22, 2007 6:23 pm ]
Post subject: 

yeepers that was it

I could not see the ^M in nano the editor I tend to use. So it is running now COOL :)

Author:  dwaine [ Tue Oct 02, 2007 5:10 pm ]
Post subject: 

RCS wrote:
Great script :D

I had a little trouble getting it to work but once I did SWEET

FYI I am running R5F27 with the mplayer upgrades. I added the permissions and commands to the job list but when I ran the job I would get a 0 byte file.

To get mine to work I had to add a bitrate to the first mencode line, there was a ratecontrol error in debug. I also remove the me=2 option in the second mencode line, the debug file stated that me was an unknown option.

I also replaced aspect with ...
-vf crop=712:456:4:6,lavcdeint,spp,scale=320:240 (personal preference on the video size and the debug said something about using -vf spp,scale)

so the 2 mencode lines look like this for me
Code:
$MENCODER $REC_DIR/$1 $AUDIO  -ovc x264 -x264encopts bitrate=1800:turbo=1:subq=1:frameref=1:bframes=2:pass=1 -vf crop=712:456:4:6,lavcdeint,spp,scale=320:240 $EDL -o "/dev/null"

$MENCODER $REC_DIR/$1 $AUDIO  -ovc x264 -x264encopts bitrate=1800:subq=4:8x8dct:frameref=3:bframes=2:b_pyramid:weight_b:pass=2 -vf crop=712:456:4:6,lavcdeint,spp,scale=320:240 $EDL -o "$OUT_FILE"


I still have to play with the biterates I used to use 1500 on the first pass and 500 on the second pass, so I will try that out and see how it looks.

Oh forgot to mention that is for the to264 script


Did you test out the different bitrates? How did they look? I got my setup working with your mencoder lines and it's working great. I'm using the latest sync to svn mplayer.

Dwaine

Author:  uzik [ Tue Oct 02, 2007 5:17 pm ]
Post subject: 

I've always just left the resolution as it comes from the encoding device except for the Nokia 770 script. I haven't tried changing it. The nokia doesn't
have enough cpu power to play a high bitrate movie. They look great
on it's screen though. Just as a guess if you want smaller files I don't
think it will be a problem.

Author:  dwaine [ Tue Oct 02, 2007 8:25 pm ]
Post subject: 

Here are my mencoder lines... I add threads and some deinterlace parameters.

# deinterlace options
DEINT="-yadif=3 -mcdeint"
AUDIO="-oac mp3lame -lameopts abr:br=128"
EDL="-edl $TMPFILE.edl"

# run mencoder to do conversion
# NOTE this runs mencoder at high quality with very low priority. It won't be fast but it will not mess
# up recordings by sucking up all the cpu time.
# pass 1 - run at lower quality for motion estimation
$MENCODER $REC_DIR/$1 $AUDIO -ovc x264 -x264encopts bitrate=500:threads=2:turbo=1:subq=1:frameref=1:bframes=2:pass=1 -vf yadif=3,mcdeint -aspect 4:3 $EDL -o "/dev/null"

$MENCODER $REC_DIR/$1 $AUDIO -ovc x264 -x264encopts bitrate=1800:threads=2:subq=4:8x8dct:frameref=3:bframes=2:b_pyramid:weight_b:pass=2 -vf yadif=3,mcdeint -aspect 4:3 $EDL -o "$OUT_FILE"

Dwaine

Page 3 of 3 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/