FFmpeg new version

Changelog for 0.9 version.

Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest.

version 0.9:

- openal input device added
- boxblur filter added
- BWF muxer
- Flash Screen Video 2 decoder
- lavfi input device added
- added avconv, which is almost the same for now, except
for a few incompatible changes in the options, which will hopefully make them
easier to use. The changes are:
* The options placement is now strictly enforced! While in theory the
options for ffmpeg should be given in [input options] -i INPUT [output
options] OUTPUT order, in practice it was possible to give output options
before the -i and it mostly worked. Except when it didn’t – the
behavior was
a bit inconsistent. In avconv, it is not possible to mix input and output
options. All non-global options are reset after an input or
output filename.
* All per-file options are now truly per-file – they apply only to the next
input or output file and specifying different values for different files
will now work properly (notably -ss and -t options).
* All per-stream options are now truly per-stream – it is possible to
specify which stream(s) should a given option apply to. See the Stream
specifiers section in the avconv manual for details.
* In ffmpeg some options (like -newvideo/-newaudio/…) are irregular in the
sense that they’re specified after the output filename instead of before,
like all other options. In avconv this irregularity is removed,
all options
apply to the next input or output file.
* -newvideo/-newaudio/-newsubtitle options were removed. Not only were they
irregular and highly confusing, they were also redundant. In
avconv the -map
option will create new streams in the output file and map input streams to
them. E.g. avconv -i INPUT -map 0 OUTPUT will create an output stream for
each stream in the first input file.
* The -map option now has slightly different and more powerful syntax:
+ Colons (‘:’) are used to separate file index/stream type/stream index
instead of dots. Comma (‘,’) is used to separate the sync
stream instead
of colon.. This is done for consistency with other options.
+ It’s possible to specify stream type. E.g. -map 0:a:2 creates an
output stream from the third input audio stream.
+ Omitting the stream index now maps all the streams of the given type,
not just the first. E.g. -map 0:s creates output streams for all the
subtitle streams in the first input file.
+ Since -map can now match multiple streams, negative mappings were
introduced. Negative mappings disable some streams from an already
defined map. E.g. ‘-map 0 -map -0:a:1′ means ‘create output
streams for
all the stream in the first input file, except for the second audio
stream’.
* There is a new option -c (or -codec) for choosing the decoder/encoder to
use, which allows to precisely specify target stream(s) consistently with
other options. E.g. -c:v lib264 sets the codec for all video
streams, -c:a:0
libvorbis sets the codec for the first audio stream and -c copy copies all
the streams without reencoding. Old -vcodec/-acodec/-scodec
options are now
aliases to -c:v/a/s
* It is now possible to precisely specify which stream should an AVOption
apply to. E.g. -b:v:0 2M sets the bitrate for the first video
stream, while
-b:a 128k sets the bitrate for all audio streams. Note that the
old -ab 128k
syntax is deprecated and will stop working soon.
* -map_chapters now takes only an input file index and applies to the next
output file. This is consistent with how all the other options work.
* -map_metadata now takes only an input metadata specifier and applies to
the next output file. Output metadata specifier is now part of the option
name, similarly to the AVOptions/map/codec feature above.
* -metadata can now be used to set metadata on streams and chapters, e.g.
-metadata:s:1 language=eng sets the language of the first stream to ‘eng’.
This made -vlang/-alang/-slang options redundant, so they were removed.
* -qscale option now uses stream specifiers and applies to all streams, not
just video. I.e. plain -qscale number would now apply to all
streams. To get
the old behavior, use -qscale:v. Also there is now a shortcut -q
for -qscale
and -aq is now an alias for -q:a.
* -vbsf/-absf/-sbsf options were removed and replaced by a -bsf option which
uses stream specifiers. Use -bsf:v/a/s instead of the old options.
* -itsscale option now uses stream specifiers, so its argument is only the
scale parameter.
* -intra option was removed, use -g 0 for the same effect.
* -psnr option was removed, use -flags +psnr for the same effect.
* -vf option is now an alias to the new -filter option, which uses
stream specifiers.
* -vframes/-aframes/-dframes options are now aliases to the new
-frames option.
* -vtag/-atag/-stag options are now aliases to the new -tag option.
- XMV demuxer
- LOAS demuxer
- ashowinfo filter added
- Windows Media Image decoder
- amovie source added
- LATM muxer/demuxer
- Speex encoder via libspeex
- JSON output in ffprobe
- WTV muxer
- Optional C++ Support (needed for libstagefright)
- H.264 Decoding on Android via Stagefright
- Prores decoder
- BIN/XBIN/ADF/IDF text file decoder
- aconvert audio filter added
- audio support to lavfi input device added
- libcdio-paranoia input device for audio CD grabbing
- Apple ProRes decoder
- CELT in Ogg demuxing
- G.723.1 demuxer and decoder
- libmodplug support (–enable-libmodplug)
- VC-1 interlaced decoding
- libutvideo wrapper (–enable-libutvideo)
- aevalsrc audio source added
- Ut Video decoder
- Speex encoding via libspeex
- 4:2:2 H.264 decoding support
- 4:2:2 and 4:4:4 H.264 encoding with libx264
- Pulseaudio input device
- Prores encoder
- Video Decoder Acceleration (VDA) HWAccel module.
- replacement Indeo 3 decoder
- new ffmpeg option: -map_channel
- volume audio filter added
- earwax audio filter added
- libv4l2 support (–enable-libv4l2)
- TLS/SSL and HTTPS protocol support
- AVOptions API rewritten and documented
- most of CODEC_FLAG2_*, some CODEC_FLAG_* and many codec-specific fields in
AVCodecContext deprecated. Codec private options should be used instead.
- Properly working defaults in libx264 wrapper, support for native presets.
- Encrypted OMA files support
- Discworld II BMV decoding support
- VBLE Decoder
- OS X Video Decoder Acceleration (VDA) support
- compact and csv output in ffprobe
- pan audio filter
- IFF Amiga Continuous Bitmap (ACBM) decoder
- ass filter #meldels
- CRI ADX audio format demuxer
- Playstation Portable PMP format demuxer
- Microsoft Windows ICO demuxer
- life source
- PCM format support in OMA demuxer
- CLJR encoder
- new option: -report
- Dxtory capture format decoder
- cellauto source

Rating 3.00 out of 5
[?]

YAPC::Brasil 2011 Yet Another Perl Conference

É com muita satisfação que venho anunciar que a grade de palestras do YAPC::Brasil 2011 já está no ar (minha palestra será sábado)!

http://www.yapcbrasil.org.br/2011/schedule

Esse ano o evento contará ainda com ninguém menos que *brian d foy* como keynote, em sua segunda visita ao Brasil! Brian é o criador da primeira comunidade Perl Mongers do mundo e autor/co-autor de diversos livros de Perl, como “Learning Perl” (o livro da lhama), “Mastering Perl” e “Effective Perl Programming”.

Demais palestras contém temas muito bacanas como Webdev, TDD, OpenData, JavaScript, Facebook e muito mais, em dois dias inteiros regados de palestras de qualidade para todos os níveis de conhecimento.

Mas… dois dias? Não eram três?

Sim, e essa é mais uma novidade: na sexta-feira, dia 4, teremos um mini-curso de UM DIA INTEIRO com o tema “Effective Perl Programming”, ministrado pelo próprio brian d foy!

http://www.yapcbrasil.org.br/2011/minicurso.html

Não fique fora dessa! As vagas são limitadas, então acesse o link e inscreva-se já!

Rating 3.00 out of 5
[?]

Perl Moderno no III FSLDC neste sábado

Passei a utilizar o twitter (@pac_man) como ferramenta de comunicação e divulgação, assim este blog tem andado um pouco abandonado, fato que deve se encerrar agora.

O fato é que neste sábado (4 de junho) acontecerá o Terceiro Fórum de Software Livre de Duque de Caxias (link para o site aqui). Será um dia cheio de palestras sobre software livre, programação, mini cursos e até uma oficina de Arduino. O evento conta com palestrantes internacionais, destaque para Rasmus Lerdorf (criador do PHP) e John “Maddog” Hal (diretor executivo da Linux Internacional). A programação completa vc encontra aqui.

O fato é que vou ministrar uma palestra as 14 hs no auditório 3 sobre Perl Moderno. Apesar de trabalhar pouco com esta linguagem no meu trabalho sinto um prazer imenso em programar em Perl, em particular as versões mais recentes e com alguns módulos maravilhosos do CPAN que espero ter tempo para falar de todos. A palestra será inspirada no livro Modern Perl do chromatic , livro este que pode ser baixado em pdf gratuitamente.

Perl hoje ainda é sinônimo de código obscuro e complexo, o que é uma grande besteira. Qualquer linguagem pode produzir programas ilegíveis e de péssima manutenção e a origem disto é o programador (mas a linguagem pode ajudar, mas ai são outros quinhentos).

Perl é uma das linguagens de propósito geral mais antigas e estáveis ainda em atividade. A quantidade de documentação disponível e os quase 100.000 módulos disponíveis no CPAN fazem de Perl uma escolha interessante tanto para desenvolver soluções com qualidade.

A cultura Perl inclui uma cultura muito forte de documentação, testes e produção de módulos e bibliotecas de propósito geral. Não raro alguém resolve um problema e contribui com a comunidade sob forma de um módulo, por exemplo.

Uma boa forma de começar a usar Perl Moderno é utilizar uma versão recente (no mínimo a 5.10) e instalar o módulo Modern::Perl. Este módulo não faz nada além de ativar features novas além de habilitar os modos strict e warnings. Veja só, antes um “hello world” tinha uma uma cara assim:

use strict;
use warnings;
 
print "Ola mundo\n";

Agora é possivel fazer assim:

use Modern::Perl;
 
say "Ola mundo";

Seria o equivalente a

use strict;
use warnings;
use 5.010_000;
 
say "Ola mundo";

Porém com escrevendo menos. É facil perceber que surgiu uma nova função built-in chamada say que, simplesmente, imprime adicionando uma “nova linha” ao final.

Mas isto é só o começo. A excelente documentação da versão Perl 5.14 se encontra on-line aqui, em particular as mudanças entre versões estão listadas na pagina de histórico.

Além das novas features, vale a pena conhecer alguns módulos core:
http://sao-paulo.pm.org/artigo/2008/ModulosCore

E alguns módulos do CPAN:
http://sao-paulo.pm.org/artigo/2009/ModulosRecomendadosCPAN

Por fim, vale a pena mencionar dois caras muito uteis.

Moose – A postmodern object system for Perl 5
http://search.cpan.org/~flora/Moose-2.0007/

Com Moose a orientação a objetos em Perl 5 ficou excelente. Vale a pena olhar o Manual e o CookBook.

E o Mojolicious – divertido e simples framework web
http://sao-paulo.pm.org/artigo/2010/Mojolicious

Site oficial:
http://www.mojolicious.org/

Espero colocar os slides rapidamente aqui no Blog além de detalhar melhor algumas coisas. No nosso idioma é possível encontrar muito material nos sites dos Perl Mongers

http://sao-paulo.pm.org/
http://rio.pm.org/

Logo devo contar como foi o Workshop ocorrido em São Paulo com a ilustre presença de Larry Wall e em breve deverá sair a data do YAPC::Brasil (Yet Another Perl Conference) que acontecerá no Rio de Janeiro.

Rating 4.00 out of 5
[?]

Vote no BeerCheck.in no RailsRumble

Ola
Vc conhece o BeerCheck.in http://beercheck.in/ ?
É um site desenvolvido em 48 horas por amigos meus para a competição Rails Rumble.
Ele é muito simples: vc loga com a sua conta do twitter e ganha uma “estante” onde vc pode colocar as suas cervejas favoritas. Para que os outros vejam a sua estante basta acessar o seu perfil.
Se vc curtiu, vote no Beer Check.in no site do Rails Rumble.

http://railsrumble.com

A votação vai ate o dia 23. Acho que realmente vale a pena votar pois se em dois dias ficou maneiro, depois da competição muitas outras melhorias podem ser adicionadas! Sem falar que existem outras aplicações divertidas no railsrumble para vc votar, algumas feitas por Brasileiros.
o meu

http://beercheck.in/pac_man

Rating 3.00 out of 5
[?]

Como saber se uma musica parou de tocar em html 5

Anteriormente vimos como descobrir que uma musica parou de tocar em ActionScript 3. Hoje em dia temos uma quantidade interessante de browsers que suportam alguma coisa de html 5 (safari, chrome, firefox…), portanto nada mais justo que analisar também esta solução.

Vejamos como tocar o nosso jazz.mp3

<audio id="mp3" src="jazz.mp3" type="audio/mpeg" controls/>

Apenas esta tag vai gerar um pequeno player com controles customizados pelo browser. E como saber que a musica parou? Basta escutar pelo evento ended

var mp3 = document.getElementById('mp3');
 
mp3.addEventListener('ended', function(){ 
	alert("fim"); 
});

Para customizar os controles basta omitir o atributo controls na tag audio e usar os métodos play e pause, por exemplo.

Um bom exemplo pode ser encontrado aqui:
http://ajaxian.com/archives/html5-media-support-video-and-audio-tags-and-scriptability

E documentação sobre html 5 vc encontra aqui:
http://www.w3schools.com/html5/html5_reference.asp

A tag video segue a mesma idéia, mas será assunto para um próximo post.

Rating 4.60 out of 5
[?]

Como saber que uma musica acabou em actionscript

Para fazer um tocador de mp3, por exemplo, em actionscript 3, basta vc criar uma instância da classe Sound e invocar os métodos load e play para carregar o arquivo e toca-lo, respectivamente.

Porém como saber que a musica acabou? A classe sound possui um listener para o evento COMPLETE porém isto é para completar o donwload da musica, não o final da mesma. E ai, comofas/

Simples: o método play retorna uma instância SoundChannel que, por sua vez, possui um listener para o evento SOUND_COMPLETE, logo bastaria fazer

var snd:Sound = new Sound();
snd.load(new URLRequest("jazz.mp3"));
var channel:SoundChannel = snd.play();
channel.addEventListener(Event.SOUND_COMPLETE, 
      soundCompleteHandler);
 
private function soundCompleteHandler(e:Event):void{
  /* insira aqui o que deve fazer quando a musica acabar */
}

Rating 4.00 out of 5
[?]