Showing posts with label multimedia. Show all posts
Showing posts with label multimedia. Show all posts

2015-11-30

Software: MediaInfo

Currently, MediaInfo is probably the best free & open-source utility for extracting technical info (metadata) from multimedia files (most frequently, containers with audio and video streams).
It's quite portable (runs on various Linux distributions, MS Windows, Apple Mac OS X, FreeBSD etc.; released regularly in source and compiled binary forms) and comes with CLI and GUI interfaces.

External links:

2013-04-11

HOWTO: convert audio CD image (FLAC + CUE) to MP3 tracks in Linux

Imagine you've archived your favourite audio CD into FLAC/CUE pair format (or maybe you've purchased some album in that digital downloadable lossless audio format, who knows), and now you want to convert it to the standard MP3 files for playing that album in your good old digital music player.

Let the files be processed in Debian GNU/Linux environment (sample commands tested in Debian 7.0 "Wheezy", and should also work for all Debian-based distros, e. g. Ubuntu, Mint etc.; Bash shell is assumed to be installed & used by default).

First of all, you should install all the necessary tools: FLAC (for decoding FLAC to WAV), LAME (to convert WAV to MP3), cuetools (to parse the CUE sheet) and shntool (to cut the big WAV file into smaller tracks according to the CUE sheet breakpoints).
# apt-get install flac lame cuetools shntool
Then the conversion process itself begins.
$ flac -d MyMusic.flac
$ cuebreakpoints MyMusic.cue | shnsplit MyMusic.wav
$ rm MyMusic.wav
$ for file in split-track*.wav; do lame -V0 $file; done
$ rm split-track*.wav
The output files are by default MP3 VBR V0, 44.1 KHz, Joint Stereo; it should be decent for most situations.
After conversion, you can process split-track*.mp3 files with your favourite media tagger application.
Enjoy.

2013-03-10

HOWTO: losslessly convert FLV video to MP4 in Linux (Debian)

Well, let's imagine we have a Flash Video (FLV/F4V) container file (possibly "unseekable" or with other minor problems) containing MPEG-4 AVC video & AAC (or MP3) audio.

We'll convert ("remux") it to MP4 without any transcoding (re-encoding), so it'll be very fast, and using only the free tools (available in the official Debian GNU/Linux repositories).

Note: unfortunately, old FLV videos containing VP6 and Sorenson video formats can't be remuxed into MP4 format; if you don't want re-encoding, you can try to remux them into MKV (Matroska); if you just want to fix the seek problems, you can just try FLV-to-FLV remuxing.

  • Method #1 (recommended): use ffmpeg (it's the main utility from the FFmpeg project).
    Install the "ffmpeg" package:
    # apt-get install ffmpeg
    Convert a FLV file to MP4, preserving audio & video:
    $ ffmpeg -i input.flv -codec copy output.mp4
    And even optimizing it for faster loading:
    $ ffmpeg -i input.flv -codec copy -movflags faststart output_optim.mp4
    To extract audio only:
    $ ffmpeg -i input.flv -codec copy -vn output_a.mp4
    To extract video only:
    $ ffmpeg -i input.flv -codec copy -an output_v.mp4
    Note: you can also use M4A (audio) / M4V (video) file extensions for output, if you like those Apple formats.
  • Method #2 (alternative): using avconv (it's a part of Libav project, a fork of FFmpeg).
    Install the "libav-tools" package:
    # apt-get install libav-tools
    Convert a FLV file to MP4, preserving audio & video:
    $ avconv -i input.flv -codec copy output.mp4
    To extract audio only:
    $ avconv -i input.flv -codec copy -vn output_a.mp4
    To extract video only:
    $ avconv -i input.flv -codec copy -an output_v.mp4
  • Method #3 (a somewhat ugly one): using MEncoder (a part of the MPlayer project).
    Install MEncoder:
    # apt-get install mencoder
    Convert a FLV file to MP4:
    $ mencoder input.flv -ovc copy -oac copy -of lavf -o output.mp4
    Note: according to the warning from MEncoder itself, output file can be corrupt:
    ** MUXER_LAVF *****************************************************************
    REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
    INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer
    will play these INCORRECT files as if nothing were wrong!
    *******************************************************************************
    So probably it suggests that you should better try the MEncoder's favorite AVI format:
    $ mencoder input.flv -ovc copy -oac copy -o output.avi
    (But that's not what we want here, right?)

Source software packages availability for Debian releases:
  • ffmpeg: up to Debian 6 "Squeeze", and then again from 9 "Stretch" (also in 8 "Jessie" backports);
  • libav: starting from 7 "Wheezy" (also in 6 "Squeeze" backports), up to 8 "Jessie";
  • mplayer: up to 7 "Wheezy", and then from 9 "Stretch".

And yes, it should work for Ubuntu too; any current FFmpeg version should also work in other GNU/Linux or *BSD distros, MS Windows, Apple Mac OS X etc.

References:
  1. ffmpeg Documentation
  2. Libav documentation : avconv
  3. 6.1. Selecting codecs and container formats - Chapter 6. Basic usage of MEncoder (MPlayer - The Movie Player documentation)
  4. Wikipedia:
    1. Flash Video
    2. MPEG-4 Part 14
    3. M4V
    4. H.264/MPEG-4 AVC
    5. Advanced Audio Coding
    6. Audio Video Interleave
---
Last updated: 2017-12-28

2012-12-13

Debian Multimedia vs dmo

Be careful:
  • http://www.deb-multimedia.org [AKA "dmo",
    formerly debian-multimedia.org (CAUTION: as of June 2013, the old domain has expired and been taken over by some cybersquatters; thanks to the official Debian Project blog for news)]
    is not an official Debian repository —
    it's a private archive administered by a DD [Debian Developer] named Christian Marillat (with some assistance from another DD, Thibaut Varene):
    please read the explanation in the Debian Multimedia FAQ and a discussion between Christian Marillat & Stefano Zacchiroli (the DPL [Debian Project Leader] at that time) regarding the dmo domain name etc.;
  • well, dmo contains some useful software which still hasn't made its way into Debian archives or simply can't be pushed there due to non-free licenses, software patents etc.;
    some packages duplicate the official Debian ones, but differ in some configurations etc.;
  • installing multimedia software from dmo also pulls dmo versions of related libraries (e. g., libavcodec*);
    all installed packages which have corresponding dmo ones will get "upgraded" to dmo versions too (if you don't lock them explicitly);
    it can not only break some "unrelated" software functionality:
    if you decide to stop using dmo repository, you'll also need to restore the affected packages to Debian official versions manually
    due to version conflicts (e. g., to get a higher priority, dmo packages often use a greater "epoch" version number compared to packages in official Debian archives);
  • the best way to use that resource is not to add it to the APT reposiories lists;
    instead of that, it's better to download & install individual packages from there;
    in many cases, dmo's binary DEB packages wouldn't install correctly on a clean Debian system, so you need to download the source packages, correct them (in most cases, all you need is just to correct / modify / clean the dependencies) and build the binary packages with an automated tool like pbuilder;
    after that, manually install the built packages:
    # dpkg -i somepackage.deb
    
    and attempt to resolve the dependencies:
    # apt-get -f install
  • if you still want to use dmo as an APT repository, consider using mirrors to save some bandwidth for the main dmo website :)

2012-04-07

MultiMedia Players in Windows and Linux

For MS Windows, my favourite audio player is foobar2000 [official site / Wikipedia]
(I'm tired of Winamp [official site / Wikipedia], and especially of the Windows Media Player [Wikipedia]; some people may like something else, e. g. AIMP [official site / Wikipedia]).

---

For playing video, I use VLC media player [official site / Wikipedia], MPC-HC ("Media Player Classic - Home Cinema") [official site / Wikipedia] and (very rarely) MPlayer (incl. forks).

===

In GNU/Linux, there are 2 powerful media players I frequently use (mostly for playing video): VLC and mpv [official site / Wikipedia].
mpv is a popular fork of MPlayer [official site / Wikipedia] & mplayer2 (itself a fork of MPlayer; now abandoned); they say it has more features and more rapid development process than the original one.
Sometimes I used mplayer[2] with a (now abandoned) GUI called gnome-mplayer.
BTW, I neither like nor use GNOME Videos (formerly called Totem) [official site / Wikipedia].
And some users also like xine [official site / Wikipedia] and Kodi (formerly XBMC) [official site / Wikipedia].

---

There are some pretty console audio players: mpg123 (probably the best MP3 player around) [official site / Wikipedia], cmus ("C* Music Player") [official site / Wikipedia], moc ("music on console") [official site / Wikipedia], mp3blaster (now obsolete) etc., but I prefer mpv there :)

And now about GUI audio players. Some years ago I used XMMS ("X MultiMedia System") [official site / Wikipedia] (now discontinued) and Amarok [official site / Wikipedia] (it was too overweight for me). In the near past, I used Rhythmbox [official site / Wikipedia]; when Banshee [official site / Wikipedia] became the default player in Ubuntu, I was very disappointed (it was much more buggier than Rhythmbox and used that C# / Mono / .NET / etc. stuff); then I tried to use LXMusic (it uses XMMS2 [official site / Wikipedia] backend and has a minimalist GUI) for some time, used Exaile [official site / Wikipedia] a few times...
...and finally switched to Audacious [official site / Wikipedia]
(Audacious is a fork of (now defunct) Beep Media Player [official site / Wikipedia], which itself was a fork of XMMS; BTW, it supports Winamp skins; not to be confused with Audacity [official site / Wikipedia], a popular audio editor).

Some other popular players:
---
Last updated: 2016-12-11