Many people asking: "How to get meta data from video file with technical information about video format on Linux?" Actually, If you surf Internet you won't find any direct answer. I've spent many hours to find such simple solution.
Mediainfo allow you to do it. I suggest to use console program, cause it is more efficient, fast and no bugs.
Cheers ;-)
Tuesday, December 04, 2007
Thursday, November 29, 2007
Mix 6 channels audio with MPEG2 video
Recently I had such task - mix 6 channels audio track with MPEG2 video. Sure, it is possible do with expensive video editing systems on Windows and MAC, but as a simple and free alternative It is possible do with Linux ;-)
The problem was that synchronization offset between audio and video equal 8 sec. The audio stream started before video. So I need fix it. It's possible do via console ;-) with such command:
By '-l 600' key is possible test how it works (tuning and debugging)
See ya,
The problem was that synchronization offset between audio and video equal 8 sec. The audio stream started before video. So I need fix it. It's possible do via console ;-) with such command:
# mplex -V -f 8 --sync-offset -8800ms -o mixedvideo.mpg videoshot.m2v audioshot.ac3
By '-l 600' key is possible test how it works (tuning and debugging)
See ya,
Wednesday, September 26, 2007
Transcode Dts sound into AC3
Do you think to transcode 6 channels of DTS sound into AC3 format is too difficult and need expensive hardware units and professional studios? If you plan to do it for non professional use - the answer is NO. You need Linux for it ;-) Sure it was tested on openSuSE10.2
You should pass two steps:
The next step convert multichannel.wav to AC3 by Aften:
A/52 audio encoder
That's it ;-) Add this multichannel.ac3 into your project.
You should pass two steps:
- Decode DTS file to multichannel WAV
- Transcode multichannel WAV to AC3
# dtsdec -o wavall dtsaudio.dts > multichannel.wav
The next step convert multichannel.wav to AC3 by Aften:
A/52 audio encoder
# aften multichannel.wav multichannel.ac3
That's it ;-) Add this multichannel.ac3 into your project.
Sunday, September 16, 2007
Batch Image Convert on SuSE10.2
I'm back from vacation and continue to write this blog.
As I wrote before I publish things here only I checked myself on real system.
Recently I had such task like convert 200 TIFF photos scanned by old fellow in JPG format :-(
Do it by hands? Nooo... Lets ask computer ;-)
Thanks god there is a Linux and ImageMagick program. This software includes mogrify which allows to scale and convert image files in batch mode from the command line. It provides a huge number of options but we only need a few examples to start use it.
Creates thumbnail images
using all the jpg files in the current directory:
Re-size all the jpg files in the current directory:
Create a PDF document using all the jpg files in the current directory:
Convert all tif images to jpgs:
Scale all jpgs in the current directory by 50%:
Long live Linux :-)
As I wrote before I publish things here only I checked myself on real system.
Recently I had such task like convert 200 TIFF photos scanned by old fellow in JPG format :-(
Do it by hands? Nooo... Lets ask computer ;-)
Thanks god there is a Linux and ImageMagick program. This software includes mogrify which allows to scale and convert image files in batch mode from the command line. It provides a huge number of options but we only need a few examples to start use it.
Creates thumbnail images
using all the jpg files in the current directory:
# mogrify -compress JPEG -quality 80 +profile *.jpg
Re-size all the jpg files in the current directory:
# mogrify -sample 800x1200 *.jpg
Create a PDF document using all the jpg files in the current directory:
# convert *jpg allinone.pdf
Convert all tif images to jpgs:
# mogrify -format jpg -quality 50 *.tif
Scale all jpgs in the current directory by 50%:
# mogrify -scale 50% *.jpg
Long live Linux :-)
Monday, August 13, 2007
3GPP vs MPEG4
In todays mobile phones the 3GPP standard is widely in use for videos on the phone. But what is 3GPP? The video is encoded in H.263 and the audio in narrow-band AMR (adaptive multi-rate) audio codec.
H.263 is a next of kin to MPEG4. The real difference for files in this format which is usable for cell phones in audio format. 3GPP use AMR mono, MPEG4 use MP3 audio in stereo. In addition 3GPP has a limit in bit rate. So, if your phone allow to play MPEG4 video - don't use 3GPP. The way to convert video files in MPEG4 format is easy. Do like this:
Enjoy
H.263 is a next of kin to MPEG4. The real difference for files in this format which is usable for cell phones in audio format. 3GPP use AMR mono, MPEG4 use MP3 audio in stereo. In addition 3GPP has a limit in bit rate. So, if your phone allow to play MPEG4 video - don't use 3GPP. The way to convert video files in MPEG4 format is easy. Do like this:
# ffmpeg -i myvideo.mpg -ss 00:00:00 -t 00:00:30 \
-vcodec mpeg4 -acodec aac -s qcif -r 15 myvideo.mp4
-vcodec mpeg4 -acodec aac -s qcif -r 15 myvideo.mp4
- -i input file
- -ss seek time
- -t finish time
- -vcodec video codec
- -acodec audio codec
- -s size of picture
- -r frame rate (don't use too high)
Enjoy
Sunday, August 12, 2007
openSuSE webpin CLI 0.8.1 notes
Have a note regarding THIS article. Thanks to yaloki for this software and I'm always glad to help.
Take care, Tnx
Take care, Tnx
Tuesday, July 31, 2007
DVD authoring on openSuSE
As I wrote BELOW there is a good stuff to do it. It calls Tovid and works brilliant. As example of my own script I frequently use you can get it HERE. Tnx
Sunday, July 15, 2007
Power Mac G5 Repair Extension Program for Power Supply Issues
Small notes regarding G5. If you get Mac G5 keep attention to serial numbers. Check it by this LINK
We had a lot of problems by this and sure had such units. :-(
We had a lot of problems by this and sure had such units. :-(
Monday, June 11, 2007
Archival with data loss protection
Have you ever had problems with CD/DVD media backups? You want to be sure your job will stay safe on media? CD and DVD media keep their data only for a finite time (typically for many years). After that time, data loss develops slowly with read errors growing from the outer media region towards the inside. If so there is a good software applicable for Darwin/Mac OS X, FreeBSD, Linux, NetBSD and Windows operating systems. Follow HERE to get more info.
Sunday, May 20, 2007
MP3 to AMR Nokia phones in Linux
Here is a small script I wrote. It allows you to convert MP3 call signals into AMR Nokia format. Put MP3's into directory and run this script from there. Copy and paste this code into amrnokia.sh
Code itself:
chmod 755 ./amrnokia.sh && ./amrnokia.sh
Code itself:
#!/bin/bash
# Audio Bitrate 32 for Nokia
# 64, 80, 128 is ok too
#
for MP3 in *.mp3; do
if [[ -e $MP3 ]]; then
echo "Converting $MP3 into amr Nokia file"
ffmpeg -i "$MP3" -acodec amr_nb -ar 8000 \
-ac 1 -ab 128 "${MP3%.mp3}.amr"
echo -e "\r"
echo "- - - 8< - - - - CUT HERE - - - -"
echo -e "\r"
sleep 1
else
echo "Found no source for $MP3 -- \
leaving it untouched!"
fi
done
echo -e "\rThat's it ... ;-)"
# Audio Bitrate 32 for Nokia
# 64, 80, 128 is ok too
#
for MP3 in *.mp3; do
if [[ -e $MP3 ]]; then
echo "Converting $MP3 into amr Nokia file"
ffmpeg -i "$MP3" -acodec amr_nb -ar 8000 \
-ac 1 -ab 128 "${MP3%.mp3}.amr"
echo -e "\r"
echo "- - - 8< - - - - CUT HERE - - - -"
echo -e "\r"
sleep 1
else
echo "Found no source for $MP3 -- \
leaving it untouched!"
fi
done
echo -e "\rThat's it ... ;-)"
Friday, March 30, 2007
DVD authoring under SuSE Linux
The interesting theme is a DVD authoring under Linux. HERE I've found some links to Linux software which can help in that. The information regarding my experience on SuSE Linux I'll post later.
Screensaver bug on openSuSE10.2
The most annoying thing in openSuSE10.2 is a screen saver problem. It works itself and won't to note your settings at all. No info in the Internet also. Maybe it depends on computer brand. But some laptops has a problem with it. Based on my experience if such situation happen I suggest to disable native KDE screen saver and disable 'kpowersave' program. 'xscreensaver' is running in background already. Under user start 'xscreensaver-demo' program and setup the screen saver you want from there + power saving mode.
It works well without any KDE stuff. God bless you...
It works well without any KDE stuff. God bless you...
Friday, February 09, 2007
Sun's Java and openSuSE10.2
HERE the article describes how to do the right installation of Java for your system. Sun's Java used for some Java applications as Azureus for example. I suggest to use the last version if possible. Tnx.
openSuSE10.2 fonts problem
Fresh installation give you a problem with a fonts presentation. HERE you'll find the information how to adjust it and get good viewed desktop. Take care your eyes...
P.S. "The subpixel hinting implementation in
P.S. "The subpixel hinting implementation in
freetype2 might infringe Microsoft's ClearType patents, which is why it is disabled both upstream (by the freetype2 authors) and in the freetype2 RPM packages that ship with openSUSE." Other words, if you plan to get it work on your system watch HERE (!!!)
openSuSE10.2 bug with WiFi Cardbus
The first bug I’ve found just after my SuSE upgrade to openSuSE10.2 version was that my ASUS WL-130g PCMCIA (Cardbus) card lost connection due to the driver problem. The fresh installation doesn’t cure it. Have to give a note, this card perfectly worked in SuSE9.3 This card is based on Ralink's RT2500 chip. Luckily I’ve found how to compile the new driver. This good article describes it HERE. Now it works perfectly. Cheers…
P.S. If You upgrade your 'kernel' You have to compile this driver again :-(
P.S. If You upgrade your 'kernel' You have to compile this driver again :-(
Wednesday, January 24, 2007
SSH security settings
If you get such messages in your sshd:
That means someone try to hack your system. It must be a human or just a ‘bot’ (MS virus on computer somewhere in the internet).
There is some remedy is not explained good in the Internet.
First of all block all ssh incoming connections except yours own. Add this into your hosts.allow file:
Into sshd_config:
Now we’ll think our system is secure ;-) enough and you will get for sshd only:
Take care and be smart!
sshd[21381]: Invalid user guest from 203.251.250.132
sshd[21386]: Invalid user admin from 203.251.250.132
…
sshd[21386]: Invalid user admin from 203.251.250.132
…
That means someone try to hack your system. It must be a human or just a ‘bot’ (MS virus on computer somewhere in the internet).
There is some remedy is not explained good in the Internet.
First of all block all ssh incoming connections except yours own. Add this into your hosts.allow file:
sshd : 203.250.50.7 : allow
sshd : 127.0.0.1/255.0.0.0 : allow
sshd : 192.168.1.100/255.255.255.0 : allow
sshd : ALL : deny
sshd : 127.0.0.1/255.0.0.0 : allow
sshd : 192.168.1.100/255.255.255.0 : allow
sshd : ALL : deny
Into sshd_config:
PermitRootLogin no
AllowUsers yourusername
AllowUsers yourusername
Now we’ll think our system is secure ;-) enough and you will get for sshd only:
sshd[22005]: refused connect from 61.142.83.245
Take care and be smart!
openSuSE10.2 upgrade notes
Based on my own experience I suggest doing the fresh installation of openSuSE10.2 cause otherwise you will get ‘bugged’ system. The differences between SuSE10.1 and openSuSE10.2 are big. I don’t wanna give more precise explanation, because if you do fresh installation most of these bugs will disappear.
konvenientSuSE application will help you with SuSE 10.2 setup. Download it for KDE and setup. Enjoy!
konvenientSuSE application will help you with SuSE 10.2 setup. Download it for KDE and setup. Enjoy!
Monday, November 20, 2006
Real Player and Sound
If you have a problem with sound on Real Player under SuSE (sorry no information about in the Internet, I was very surprised) So, simple setup in Control center -> Sound System the sleep time for Sound System. It may help. Cheers...
Personal note
Sorry, this NOTE for myself. ;-) If U have a problems with KDM connection to virtual screen on SuSE by VNC, check the routing table first! Tnx.
Monday, November 06, 2006
Convert Google Video FLV’s into AVI, MPG, etc…
You have FLV (flash video) file and don't know how to convert it. These notes is for you ;-)
First of all, you can play FLV on Linux by ffplay, Copyright (c) 2003 Fabrice Bellard or by VideoLAN Media Player
If you want to convert use it as example:
Where all that trash is:
-b bitrate: set the video bitrate in kbit/s (default = 200 kb/s)
-ab bitrate: set the audio bitrate in kbit/s (default = 64)
-ar sample rate: set the audio samplerate in Hz (default = 44100 Hz)
-s size: set frame size. The format is WxH (default 160x128)
This will convert your myvideo.flv into a test.mpg!
Enjoy! :-)
First of all, you can play FLV on Linux by ffplay, Copyright (c) 2003 Fabrice Bellard or by VideoLAN Media Player
If you want to convert use it as example:
# ffmpeg -i myvideo.flv -ab 56 -ar 22050 -b 500 -s 320x240 test.mpg
Where all that trash is:
-b bitrate: set the video bitrate in kbit/s (default = 200 kb/s)
-ab bitrate: set the audio bitrate in kbit/s (default = 64)
-ar sample rate: set the audio samplerate in Hz (default = 44100 Hz)
-s size: set frame size. The format is WxH (default 160x128)
This will convert your myvideo.flv into a test.mpg!
Enjoy! :-)
Sunday, November 05, 2006
Monitoring Hard Disks with SMART in Linux
If you have a problem with your hard drive this perfect article is for you. Click HERE
Tuesday, October 24, 2006
Fix Command
Very useful thing if you're lazy enough is a 'FIX command'. I'm not going to explain what is it just edit the .bashrc file in your local directory.
Add such line there:
So just after you login you can call last command in shell by:
Enjoy
Add such line there:
alias r='fc -s'
So just after you login you can call last command in shell by:
# r (some first letters)
Enjoy
Manual clock synchronization
How to synchronize your Linux computer clock with ntp server in the Internet?
1. Make the Script file like this and call it ntpsync as example:
2. Then give such command as root
Enjoy
1. Make the Script file like this and call it ntpsync as example:
#!/bin/bash
#
clear
case "$1" in
go)
echo "Starting NTP synchronization..."
ntpdate ntp1.ptb.de && echo "OK ;)" || echo "failed :("
;;
*)
echo "Usage: ntpsync {go}"
exit 1
esac
exit $RETVAL
#
clear
case "$1" in
go)
echo "Starting NTP synchronization..."
ntpdate ntp1.ptb.de && echo "OK ;)" || echo "failed :("
;;
*)
echo "Usage: ntpsync {go}"
exit 1
esac
exit $RETVAL
2. Then give such command as root
# ntpsync go
3. Give this as root also # clock -w
This will setup your hardware clockEnjoy
Monday, October 23, 2006
USB to serial port converter
Cause too few information in the Internet regarding the hardware compatibility with Linux SuSE I will post the information here about my hardware tested devices.
The first will be USB to serial port converter. If U need connect to SuSE RS232 Serial interface device you can buy "ATEN USB to SERIAL (DB9) CONVERTER UC-232A" and be happy.
The information about this device is HERE!
That was checked on my SuSE 9.3 version and it works fine without any drivers. Just PLUG&PLAY.
The first will be USB to serial port converter. If U need connect to SuSE RS232 Serial interface device you can buy "ATEN USB to SERIAL (DB9) CONVERTER UC-232A" and be happy.
The information about this device is HERE!
That was checked on my SuSE 9.3 version and it works fine without any drivers. Just PLUG&PLAY.
Thursday, July 27, 2006
How to reset firmware on MAC
Reset Firmware for Apple Macintosh
Resetting your firmware will reset all firmware settings back to factory defaults. Things like the boot rom, power management, etc. are found in the firmware. To do this hold down the following buttons on your keyboard at boot up:
Resetting your firmware will reset all firmware settings back to factory defaults. Things like the boot rom, power management, etc. are found in the firmware. To do this hold down the following buttons on your keyboard at boot up:
cmd+opt+O+F
Once in open firmware type these commands:reset-nvram (hit return)
reset-all (hit return once more, the system should reboot)
reset-all (hit return once more, the system should reboot)
Saturday, May 06, 2006
Mute the startup sound in MAC OS X
Your MAC too noisy, well follow this:
First, write a small script:
I named mine shutup.sh and saved it to /usr/local/bin/. Next, make it executable:
(note that the whole command is supposed to be a single line, just splitted for readability, but you can still copy/paste that line as-is into your shell)
Make a small AppleScript with Script Editor to set the sound back to a normal level when the user logs back in.
First, write a small script:
#!/bin/tcsh -f
osascript -e 'set volume 0'
osascript -e 'set volume 0'
I named mine shutup.sh and saved it to /usr/local/bin/. Next, make it executable:
$ sudo chmod u+x /usr/local/bin/shutup.sh
Add it as a logout hook using the defaults write command: $ sudo defaults write com.apple.loginwindow
LogoutHook /usr/local/bin/shutup.sh
LogoutHook /usr/local/bin/shutup.sh
(note that the whole command is supposed to be a single line, just splitted for readability, but you can still copy/paste that line as-is into your shell)
Make a small AppleScript with Script Editor to set the sound back to a normal level when the user logs back in.
set volume 3
Save it as a run-only application, and add it to your login items. Restart and listen to the startup sound, because you won't have to hear it again ;)Friday, April 28, 2006
HD replacement on Smoke SGI
Here is a brief procedure for HD replacement in the Discreet RAID.
(IRIX based system)
1. Become a root Don't ask how to do it ;)
2. Do data copy on spare disk by: sw_heal -h adapter,disk -n adapter,disk (bad -> new)
4. Stop the Smoke file system by:
7. Start Smoke file system by:
(IRIX based system)
1. Become a root Don't ask how to do it ;)
# sw_config
will show you 'dead' disk2. Do data copy on spare disk by: sw_heal -h adapter,disk -n adapter,disk (bad -> new)
# sw_heal -h 3,4 -n 5,6
3. Replace the 'dead' disk onto the new one4. Stop the Smoke file system by:
# sw_stop
# sw_unmount all
5. Save RAID configuration by:# sw_unmount all
# sw_config
6. Do 'save'!!!7. Start Smoke file system by:
# sw_restart
8. Be happy :)
Wednesday, April 26, 2006
Monday, April 10, 2006
System messages in Linux console
If U want to see the system messages in Linux console it is easy do. Use the following:
1. Open the console window;
2. Give such command as root or user:
It will show you last 20 lines in real time.
Have a good time ;)
1. Open the console window;
2. Give such command as root or user:
# tail -f -n 20 /var/log/messages
It will show you last 20 lines in real time.
Have a good time ;)
Sunday, April 02, 2006
Generating Yast Installation sources for SuSE
"Plain Cache Sources
A Plain Cache source is a directory containing RPM files. For YaST to recognize a directory as plain cache source, you must create a file (IS_PLAINcache) that contains the RPM header information of the available RPM packages. YaST needs the package data (name, version, dependencies, etc.) from the .rpm file in order to avoid reading the file over and over again. For large packages, this would result in extremely long transfer times, even if you do not want to install the package. Therefore, the needed package data is extracted from the packages and stored in a file.
This file can be create with the genIS_PLAINcache utility, which is included in the package yast2-packagemanager starting from SUSE LINUX 9.0.
Advantages
* Easy to generate
Disadvantages
* Source RPMs (src.rpm) are not supported
* Multiple architectures (i586, i686, noarch, ppc, etc.) are not supported
* No description of the installation source in YaST
* genIS_PLAINcache is a binary (not a script) that only runs on SUSE systems
Example
You have a directory with a number of binary RPM files on your server and want to make it available as YaST installation source via HTTP or FTP.
Run the following commands in order to generate a plain cache source:
Subsequently, you can add the directory as installation source in YaST -> Change Source of Installation. Note the restrictions mentioned above"
You can read more HERE
A Plain Cache source is a directory containing RPM files. For YaST to recognize a directory as plain cache source, you must create a file (IS_PLAINcache) that contains the RPM header information of the available RPM packages. YaST needs the package data (name, version, dependencies, etc.) from the .rpm file in order to avoid reading the file over and over again. For large packages, this would result in extremely long transfer times, even if you do not want to install the package. Therefore, the needed package data is extracted from the packages and stored in a file.
This file can be create with the genIS_PLAINcache utility, which is included in the package yast2-packagemanager starting from SUSE LINUX 9.0.
Advantages
* Easy to generate
Disadvantages
* Source RPMs (src.rpm) are not supported
* Multiple architectures (i586, i686, noarch, ppc, etc.) are not supported
* No description of the installation source in YaST
* genIS_PLAINcache is a binary (not a script) that only runs on SUSE systems
Example
You have a directory with a number of binary RPM files on your server and want to make it available as YaST installation source via HTTP or FTP.
Run the following commands in order to generate a plain cache source:
cd /srv/www/htdocs/suse/RPMS/
genIS_PLAINcache -f -r .
gzip genIS_PLAINcache
genIS_PLAINcache -f -r .
gzip genIS_PLAINcache
Subsequently, you can add the directory as installation source in YaST -> Change Source of Installation. Note the restrictions mentioned above"
You can read more HERE
Saturday, April 01, 2006
Wednesday, March 01, 2006
Monday, February 27, 2006
MAC OSX System Disk repair
All my hints based on my Own experience.
If you have a problem with your Macintosh running MAC OSX - check your system hard disk first. Unfortunately the native software can't cure it and crash sometimes.
So, best way is download it, install it on your computer, boot into single user mode by cmd-s (OS X only) , then run:
When it finished do:
Hope it helps. Sure backup your important data first.
If you have a problem with your Macintosh running MAC OSX - check your system hard disk first. Unfortunately the native software can't cure it and crash sometimes.
So, best way is download it, install it on your computer, boot into single user mode by cmd-s (OS X only) , then run:
# applejack auto
When it finished do:
# reboot
Hope it helps. Sure backup your important data first.
Saturday, February 25, 2006
Monday, February 20, 2006
Starting Linux in single user mode
The other day I need to start a friends Linux machine in single user mode so I could do a low level fsck. I didn't know how to do it and I thought I would share the information with you!
At the boot prompt (Grub or Lilo) type: linux single
Linux is the name of the boot option defined in the boot loader and most of the time it is just 'linux' and 'single' is the command to force boot up in single user mode.
At the boot prompt (Grub or Lilo) type: linux single
Linux is the name of the boot option defined in the boot loader and most of the time it is just 'linux' and 'single' is the command to force boot up in single user mode.
Monday, February 13, 2006
Convert MP3 to OGG in Linux
Convert MP3 to OGG in Linux:
"There has been occassion where I've needed to convert MP3 to OGG. I know, I know, I know, it's never a good idea to convert a lossy format to another lossy format, but sometimes it's unavoidable. I came up with the following command to do just what I needed. I had to include --downmix and -b 32 for what I was doing, but they're likely not required. This just tells mpg321 to write to STDOUT in raw wav format, and oggenc to read from STDIN the raw wav."
Such code I've found
Code:
Or
Note: raw is just a file name, it could be anything you want...
"There has been occassion where I've needed to convert MP3 to OGG. I know, I know, I know, it's never a good idea to convert a lossy format to another lossy format, but sometimes it's unavoidable. I came up with the following command to do just what I needed. I had to include --downmix and -b 32 for what I was doing, but they're likely not required. This just tells mpg321 to write to STDOUT in raw wav format, and oggenc to read from STDIN the raw wav."
Such code I've found
Code:
mpg321 input.mp3 -w - | oggenc -o output.ogg -
Or
mpg321 input.mp3 -w raw && oggenc raw -o output.ogg
Note: raw is just a file name, it could be anything you want...
Tuesday, January 31, 2006
About this Blog
This Blog dedicated to give people know more about me and my activities, my interests etc.
And sure I'll post some tips and tricks for Linux, IRIX and MAC OSX operating systems cause they are all UNIX based systems.
And sure I'll post some tips and tricks for Linux, IRIX and MAC OSX operating systems cause they are all UNIX based systems.
Friday, January 20, 2006
Subscribe to:
Posts (Atom)


