Search

Loading...

Friday, May 10, 2013

Extract audio from video file without change

The audio file contained should be the same format as the output. For flv and mp4 it is usually aac. But raw aac files can't contain metadata; to keep metadata from the original files better use m4a (which is just another name for mp4, but is fairly widely recognised by audio players) instead of aac as a file extension.

So:

the general formula is:
 
 avconv -i "INPUT FILE" -map 0:1 -c:a copy "OUTPUT FILE" 
 
For multiple files:

for mp4:

for i in *.mp4; do avconv -i "${i}" -map 0:1 -c:a copy "${i%.mp4}.m4a"; done


For flv:

for i in *.flv; do avconv -i "${i}" -map 0:1 -c:a copy "${i%.flv}.m4a"; done

Avi videos usually contain mp3:

for i in *.avi; do avconv -i "${i}" -map 0:1 -c:a copy "${i%.avi}.mp3"; done

(source

The disadvantage is that they cannot be added in Thunar custom actions. A command that can be added and also works for all selected files (but should be limited to videos that contain `aac` files or to `aac` files as such) is:

gnome-terminal -e "parallel avconv -i '{}' -map 0:1 -c:a copy '{}.m4a' -- %F"


To limit Thunar custom actions applications to `aac` and video containing this, make these settings:



(see here)

Replace accordingly for other input/output. 

To see audio of the input video, use exiftools, avprobe or MediaInfo. More here.

Tuesday, April 30, 2013

Saturday, April 27, 2013

Add convert media command to Thunar Custom actions

To add convert commands to Thunar's custom actions or similar:


sudo apt-get install ffmpeg libavcodec-extra-53
 


Then, use such commands to add to Thunar custom actions:

ffmpeg -i %f %f.mp3

or

avconv -i %f %f.mp3 

To see it in a Terminal it should look like:

gnome-terminal --window-with-profile=new1 -e "avconv -i %f %f.mp3" 

(In Gnome Terminal, create a new profile called "new1" and edit it ('Edit/Profiles/Title and Command') to 'When command exits: Hold the Terminal open'.)

But in fact the new profile is not important, only that the terminal would close after the task is finished. Xfce-terminal can also be used in this case.

To convert multiple media files in Thunar, add this:

xfce4-terminal -e "parallel avconv -i '{}' '{}.mp3' -- %F"

Can be used for converting video or audio files to different formats.

Tuesday, March 26, 2013

INSYNC - Google drive client in Linux

It is still free in Linux.

Different versions here.

Like Dropbox, it associates with the file manager.

A Thunar-Xfce version here.

If it asks for thunarx-python, look around here.

For other versions, here.

Wednesday, March 20, 2013

Crossover: commercial Wine

Crossover is a commercial version of Wine. It has some advantages: installing Office and so on goes much smoother.

What it lacks is the customization of Wine.

- To make some customizations in Crossover:

  Go to Menu - Crossover - Run a Windows command, and, after selecting the corresponding 'bottle', enter 'regedit' (this would have to be done for each specific 'bottle')

  Navigate to and click on the following key: HKEY_CURRENT_CONFIG\Software\Fonts.

  Double-click on the "LogPixels" value.

  Change the base to "Decimal" and enter your desired font size.Note that the font size here isn't measured in standard "points"--the best way to get a size that's right for you is through cautious trial and error. Close the Registry Editor when you're done.

To enlarge the font of the menus, search for ' ~/.cxoffice/NAME_OF_BOTTLE/drive_c/windows/win.ini', open it in a text editor, add these two lines at the end, and save:
 
[Desktop]

MenuFontSize=18

Replace the "18" with whatever font size.

(This has to be done for each specific 'bottle' (which I guess is the equivalent of a wineprefix). Each program may have its own bottle which contains its own separate drive_c and windows folders. Customizations for a certain 'bottle' would have effect only for the programs installed in that bottle. 'Bottles' and the rest of CrossOver is installed in ~/.cxoffice.)

--------------------------

If file association is not ok, search in smth like, e.g. for Office, in '/.cxoffice/Microsoft Office 2007/desktopdata/cxmenu/StartMenu.C^5E3A^5Fusers^5Fcrossover^5FStart^2BMenu/Programs/Microsoft+Office/'; eventually save that script in a more convenient place and add it under Open with' option, 'custom command'.
 



Tuesday, March 19, 2013

Download subtitles with VLC

VLC has an addons/extension site: addons.videolan.org.


- put the file in the vlc subfile /lua/extensions, by default:
* Windows (all users): %ProgramFiles%\VideoLAN\VLC\lua\extensions\
* Windows (current user): %APPDATA%\vlc\lua\extensions\
* Linux (all users): /usr/lib/vlc/lua/extensions/
* Linux (current user): ~/.local/share/vlc/lua/extensions/
* Mac OS X (all users): /Applications/VLC.app/Contents/MacOS/share/lua/extensions/
(create directories if they don't exist)

VLSub: Search and download subtitles from opensubtitles.org using the hash of the video currently playing or its title. Also here.

Subtitle Finder: Get the subtitles of movies from the internet, currently only from OpenSubtitles.org (just displays subs, doesn't saves them; but sometimes finds much more subs).

Modified version to save subtitles here.

This extensions are better used at the same time.