• 
    

  • <code id="xuipv"></code>

    Category: OSX

    Tips tricks and how tos for using Apple Mac OSX

    OSX is Apple’s UNIX based operating system and GUI that has been sold since 2002 as a replacement for the classic Mac OS which ended at version 9. This section contains tips and tricks and howtos for using OSX. I have been using OSX as my day to day desktop and development environment since June 2010.

    Join video files together on Mac with cat and mencoder

    I have a whole bunch of short avi files (not sure what format they actually are, but the extension is .avi) and needed to join them together quickly and easily so the 3 year old could watch some TV without bothering me every 5 minutes to start the next one ?? This post shows how to do this from the command line with the cat and mencoder commands

    Get mencoder

    It looks like you can download mencoder as part of the mplayer package here, but I’m not really sure about that. I use the PS3 media server app which includes mencoder so I used that.

    Concatenate the files

    Open up Terminal (Applications -> Utilities -> Teminal) and use the “cat” command to join the files into one great big file. Let’s say the files are in your Downloads folder, they’re all named something.avi and there are no other .avi files in the folder. Do this:

    cd ~/Downloads
     cat *.avi > combined.avi
     

    They’re now in one big file, but if you play the combined media file it will only play the first video in it. That’s because there’s header information which tells the media player it’s only X minutes long, so it will stop playing then. We need to use mencoder to fix the header.

    Use mencoder to fix the file so it plays them all

    So for me, mencoder is at /Applications/PS3 Media Server.app/Contents/Resources/Java/osx/mencoder Unless you use PS3 Media Server then it’ll be somewhere else. I’ll leave it up to you to work out where it is…

    Replace “mencoder” in the following command with the full path to your mencoder. If there are spaces anywhere in the path, you need to put quotes around it. So for me, mencoder = ‘/Applications/PS3 Media Server.app/Contents/Resources/Java/osx/mencoder’

    mencoder -forceidx -oac copy -ovc copy combined.avi -o fixed.avi

    combined.avi is the name of the combined file we created at the “cat” step above. fixed.avi is the name we want to name the final file that works. Change that to the actual name.

    ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

    As mencoder writes the file it will show a percentage counter. I’ve found once it gets to 100% you start seeing stuff like this:

    Writing header...
     ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
     Writing header...
     ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
     Pos:2868.0s71702f (100%) 4195.31fps Trem:0min 565mbA-V:0.000 [1523:128]
     Skipping frame!
     Pos:2868.1s71703f (100%) 4195.37fps Trem:0min 565mbA-V:0.004 [1523:128]

    At this point, as far as I can tell, it will do this forever. Just hit Control + C to cancel. The file (named combined.avi in my example above) is there and works from my experience.

    Voila, all done! Enjoy your joined video!!

    Read More ?

    Remove input shadows on iOS devices

    One thing I’ve found annoying with the mobile Safari browser on iOS is the shadows that appear at the top of input boxes. It’s not normally too much of an issue unless you are doing fancy styling and then they can make it really messy and ugly. Fortunately David Walsh has provided a solution. I won’t repeat the solution but do post some screenshots here showing the issue and how much better it can look after applying his fix.

    Read More ?

    Showing seconds with ls on Linux and OSX

    Using the "ls" command to list directory contents from the command line with the -l flag will include the date and time down to the minute, but not show the seconds. This post shows how to display the seconds as well with bash on Linux and OSX.

    Read More ?

    How to shrink a VMWare Fusion Linux virtual disk

    VMWare Fusion on Mac OSX allows you to shrink virtual disks easily for Windows virtual machines right from the graphical interface (Virtual Machine -> Settings -> General -> Clean Up Virtual Machine) but there isn’t the same option to do this with Linux, so you need to do it from the command line.

    Read More ?

    Purge all Google Chrome user data on a Mac

    In Google Chrome you can easily purge browsing data including cookies, history, etc using the application preferences. But there are still a bunch of files that it doesn’t touch. I was having some weird issues with my SilverStripe installs (I won’t go into that here) which didn’t happen when using incognito mode but did under normal browsing. Deleting all browsing data made no difference so I needed to really poke under the hood to delete all data.

    Read More ?

    Scroll Lock Key on a Mac

    I am the king of random shortcuts and always seem to hit keys when typing that have unexpected consequences, such as this morning when I was doing something in Excel and managed to trigger scroll lock. But there’s no scroll lock on a Mac keyboard…

    Read More ?

    Mac mail queue commands

    This post is a quick reference for some of the mail server commands for Apple Mac OSX: how to show the queue, flush it, delete everything, delete a particular message, etc.

    Read More ?
    棋牌下载