Tuesday, August 12, 2014

avi to avc1 mkv. using ffmpeg on linux 2014

----/testing \-------
avi to avc1 mkv. using ffmpeg on linux 2014

mkdir encoded
for f in *.avi; do ./ffmpeg -i "$f" -vf scale=-1:720 -c:v libx264 -crf 18 -preset fast -c:a copy encoded/"${f%.avi}.mkv"; done
----------------
== huge file ==

mkdir encoded
for f in *.avi; do \
ffmpeg -i "$f" -vf scale=-1:720 -vcodec libx264 -crf 18 -preset fast -acodec copy encoded/"${f%.avi}.mkv"; done

----------------------
== smaller file===

mkdir encoded
for f in *.avi; do \
ffmpeg -i "$f" -vf scale=720: -vcodec libx264 -crf 18 -preset fast -acodec copy encoded/"${f%.avi}.mkv"; done

-------------/test 360p\-------
mkdir encoded
for f in *.avi; do \
ffmpeg -i "$f" -vf scale=-1:360 -vcodec libx264 -crf 18 -preset superfast -acodec copy encoded/"${f%.avi}.mkv"; done

i haven't played around alot with this code. it's just here for testing

2004 update ffmpeg ,mp4 to libxvid XVID avi

mp4 to libxvid XVID avi

mkdir encoded
for f in *.mp4; do \
ffmpeg -i "$f" -vf scale=720: -vcodec libxvid -vtag XVID -qmin 2 -qmax 4 -b:v 900K -minrate 900K -r 29.97 -async 0 -preset fast -acodec libmp3lame -ab 197k encoded/"${f%.avi}.avi"; done

--------------------------------
xxxxxxxxxxxxxxxxxx
To summarize:

(To set up a CBR process, use -b:v 3500K -minrate 3500K, or leave out the "-minrate " altogether)

8moy204 ffmpeg mpeg4 XVID updates

----------
low quality.
[-qmin 2 -qmax 4]

for f in *.mpeg; do ffmpeg -i "$f" -s 640x360 -vcodec mpeg4 -vtag XVID -qmin 2 -qmax 4 -b:v 986K -r 29.97 -async 0 -acodec libmp3lame -ab 197k encoded/"${f%.avi}.avi"; done

for f in *.mpeg; do ffmpeg -i "$f" -s 640x360 -vcodec mpeg4 -vtag XVID -qmin 2 -qmax 4 -b:v 986K -r 29.97 -async 0 -acodec libmp3lame -ab 197k encoded/"${f%.avi}.avi"; done


-----------------------
higher quality,
-qscale 2
------------------------
Try for example (change in/out files):
Code:
libxvid sucks it is out dated. mpeg4 works better on some videos files for me.
+++++++++++++++++++++++++++++++++++++
anime mode.
for f in *.mpeg; do ffmpeg -i "$f" -vcodec mpeg4 -vtag XVID -qscale 3 -s 640x360 -r 29.97 -b 900K -mbd rd -cmp 2 -subcmp 2 -async 0 -acodec libmp3lame -ab 197k encoded/"${f%.avi}.avi"; done
----------------
live mode.

for f in *.mpeg; do ffmpeg -i "$f" -vcodec mpeg4 -vtag XVID -qscale 2 -s 640x360 -r 29.97 -b 900K -mbd 2 -cmp 3 -async 0 -acodec libmp3lame -ab 197k encoded/"${f%.avi}.avi"; done

for f in *.mpeg; do ffmpeg -i "$f" -vcodec mpeg4 -vtag XVID -qscale 2 -s 640x360 -r 29.97 -b 900K -mbd 2 -cmp 3 -async 0 -acodec libmp3lame -ab 197k encoded/"${f%.avi}.avi"; done
----------------
----------------
edit 11moy2015
24fps:
ffmpeg -i *.mkv \ -vcodec msmpeg4 -b 592K -bufsize 4096K \ -qscale 2 \ -qmin 2 -qmax 4 \ -s 320x208 \ -r 23.975 \ -async 4800 -acodec libmp3lame -ab 160k \ -mbd 2 -precmp 0 -cmp 2 -subcmp 2 new-DIV3--[at512,,ab160K]msmpeg4.AVI
----------------
http://wardcraft.blogspot.com/2007/02/ffmpeg-cmp-2-test-on-dvp642.html


Monday, February 19, 2007
FFMPEG : cmp 2 test on dvp642
WARDCRAFT: I tried a couple more setting on (Phillips dvp640) divx DVD player to see if they would work. --
-- NOTE using ffmpeg: final video will be 352x240 ntsc cif - div3 avi and it will play on this divx DVD player (Phillips dvp640) but the player is junk and will probably brake on me any day . Do a Google search on the player and on Phillips they do not have a good track record. --
--
ffmpeg -i *.avi -vcodec msmpeg4 -ab 128 -b 592 -bufsize 4096 -mbd 2 -precmp 0 -cmp 2 -subcmp 2 -s 320x208 -padtop 16 -padbottom 16 -padleft 16 -padright 16 -t 00:24:04.6 new-DIV3--[at512ab96]msmpeg4.AVI --
-- The video did not scale well on my computer but it did scale well on my TV. - I padded the video so that the divx player on my TV would not cut of the sub tittles. -
- "what is cmp 2"
- Comparison Function for Motion estimation. I tried using cmp and I think it made the video look a little better. -
- cmp 0 = default *
* cmp 2 = handamard = anime ? *
* cmp 3 = dct =? and good for live action I think.*
* -*
* subcomp 2 ? Is good for anime, acording to some video site I read.*
* "subcomp 2 good for anime." -*
* precmp 0 - is the default and fastest . 0 is sufficient for precmp. I don't know why it's just something I read online. -*
* mbd 2*
* mbd 2 = High Quality Macroblock Decision Algorithem. mbd 2 is the same as vhq.*
* -*
* mbd 1 is faster but not the best quality.*
* -*
* THE video I tested on my player was 352x240 ntsc and it looked OK.*
* The final video size ended up at 126MB . -*
* I all so test 640x480 video . playback looked good but my computer is slow 800mhz so I'm not going to code a lot of video at 640x480.
-------------------------------

Sunday, July 1, 2012

debian lenny goodbye outdated archives

# See sources.list(5) for more information

# This file should be edited through synaptic

# MEPIS improvements, overrides and updates--the MEPIS magic
# deb ftp://ftp.mirrorservice.org/sites/ftp.mepis.org/mepis/ mepis-8.0 main 
# MEPIS master pools, please use only if mirror is slow or down
# deb ftp://ftp.mepis.com/mepis/ mepis-8.0 main 

# deb ftp://ftp.debian.org/debian/ lenny main contrib non-free 
# deb-src ftp://ftp.debian.org/debian/ lenny main contrib non-free 

# deb http://security.debian.org/ lenny/updates main contrib non-free 

# deb http://volatile.debian.org/debian-volatile/ lenny/volatile main contrib non-free 

# Some Debian Multimedia software might be illegal in some jurisdictions
deb http://www.debian-multimedia.org/ lenny main 

# compiz shame " debian lenny"
# deb http://download.tuxfamily.org/shames/debian-lenny/desktopfx/unstable/ ./ 






deb http://archive.debian.org/debian/ lenny main contrib non-free  



###############################
# now my old "dell gx260" is all most finished?
# or not?
it still one of my more solid pc's, but i don't think tethering androids usb wifi will NOT work on older linux kernals.

"debian lenny" served me well wile it lasted. Dell gx260 has a flaking intell onboard video card that does not work well with newer versions of of X-server and newer linux kernels.
so now my old dell gx260 is closed to being mothballed and put away do to obsoleteness.
I like google androids wifi usb tethering. My old HP_pc has (lmde)/linux mint debian edition, sp4, as of 7moy2012. The usb wifi tethering works good out of the box, no fussing or messing around with any of the config files, just works.

7moy2012, #lmde just might become my new desktop of chose, but on my laptop i realy like lubuntu. I guese i like my ".deb' based distros.

I can't get newer ubuntu/s to run on older system with 512mb and less ram. the ubuntu installers ether fails locks up or botches the install job. But Debian installer seem to work just find on old computers with less then 512mb of ram.

I like old cheap/computer especial the free ones.

Thursday, November 10, 2011

dell gx260 modprobe p4_clockmod

step1/3...................
to load cpu speed ondemand [powertop o].............
su: modprobe p4_clockmod =======================
step2/3...................
$ lsmod | grep freq
/*****************************************************
*** to set p4_clockmod  [my dell gx260 pc] on reboot **
*****************************************************/
step3/3:.............................
Now that [p4_clockmod.ko] works my dell gx260. I will want to load [p4_clockmod.ko] on boot. To do this on a Debian based system like K/X/Ubuntu put the following line in the /etc/modules file. ===========
line @ /etc/modules file: p4_clockmod #thats it powertop must of set it to ondemand.
###################################
su:
powertop
#####################################
option [O] oh will let powertop change cpu to ondemand mode. --------------------------------------
and it should save some power. ##########################################
view the changes made by powertop [sesion]...
$ watch -n 1 cat /proc/cpuinfo
note:.........................................
conky does the same thing. it wil monitor cpu speed.
##############################################
view cpu info..................................
code: $ cpufreq-info ==============================================
tut@http://doc.opensuse.org/products/draft/SLES/SLES-tuning_sd_draft/cha.tuning.power.html
#################################
$ cpufreq-info 
analyzing CPU 0:
  driver: p4-clockmod
  CPUs which need to switch frequency at the same time: 0
  hardware limits: 283 MHz - 2.27 GHz
  available frequency steps: 283 MHz, 567 MHz, 850 MHz, 1.13 GHz, 1.42 GHz, 1.70 GHz, 1.98 GHz, 2.27 GHz
  available cpufreq governors: powersave, conservative, ondemand, userspace, performance
  current policy: frequency should be within 283 MHz and 2.27 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.

  current CPU frequency is 283 MHz.
  cpufreq stats: 283 MHz:51.95%, 567 MHz:2.19%, 850 MHz:4.47%, 1.13 GHz:0.78%, 1.42 GHz:0.09%, 1.70 GHz:0.18%, 1.98 GHz:0.04%, 2.27 GHz:40.29%  (143)
--------------------------
how to load at boot.........
info @ http://www.pantz.org/software/cpufreq/usingcpufreqonlinux.html
i added p4_clockmod to /etc/modules file.
thats all i needed to do for a dell gx260 running mepis8 with the debian/lenny kernel

wallpaper blue gimp

my fav.



source wallpaper

Sunday, October 30, 2011

python loop 33cels to 91fahr

more stupid python code snippets from me by gleeming crap on the interwebs.

# convert Celsius to fahrenheit SCRIPT. #

print " type 'stop' to end this app and return to python shell"
print " this app converts celsius to Fahrenheit via loop nesting. "
print " if num line is what makes this app WORK!"

#####
## " this app is python 2point6 uses raw inpute "
#####

stop = 'stop'

###
#c = 33
#f = (reply)*9/5 + 32
#print (c), "degrees (c) celsius " "= " ,(f), "degrees (f) Fahrenheit  "
###

# f = (num)*9/5 + 32 

while True:
    reply = raw_input('Enter your text number now:')
    if reply == 'stop':
        break
    elif not reply.isdigit():
        print('Bad!' * 8)
    else:
        num = int(reply ) *9/5 + 32
        if num   :
        #     print('low')
        # else:
          print(num ) 
     
print('Bye')

stupid python 91fahr to 32cels code snippet



run code in console:
$ python ./my-dumb-code.py
##############
cut and paste code:
# python 
# fourmula //::: C = (F - 32) * (5 / 9)
# convert fahrenheit to Celsius   SCRIPT. #
# darn this lame scrip took me forever to guese #
################
print " type 'stop' to end this app and return to python shell"
print " this app converts   Fahrenheit to celsius via loop nesting. "
print " if num is what makes this app WORK!"

#####
## " this app is python 2point6 uses raw inpute "
#####

stop = 'stop'



 

while True:
    reply = raw_input('Type "stop" to exit or 1 to contunue:')
    if reply == 'stop':
        break
    elif not reply.isdigit():
        print('Bad!' * 8)
    else:
        num = int(reply )   ##-32
        if num   :
           f2c = int(raw_input("Please enter the temperature in Fahrenheit you wish to convert: "))
           f2c = (f2c - 32) *5/9 
          # print f 
           print ">> input converter to cels ="
           print  f2c
        #     print('low')
        # else:
        #  print(num ) 
     
print('Bye')

python fahrenheit to celsius.
NOTES::
//°C to °F Farenheit = (9/5)* celsius + 32
//°C to °F Multiply by 9, then divide by 5, then add 32
//// °F to °C Deduct 32, then multiply by 5, then divide by 9
// (fahr -32) * (5.0/9.0)