oriolrius.cat

Des del 2000 compartiendo sobre…

Category: Multimedia, Gadgets, Mobile phones and Tablets

Cut video clip using ffmpeg

Reading time: < 1 minute

Very simple and useful parameters of ffmpeg:

ffmpeg -ss HH:MM:SS -i INPUT_FILE -to HH:MM:SS -c copy OUTPUT_FILE

OBS Studio – cómo usar los perfiles, escenas y fuentes

Reading time: < 1 minute

Cada vez uso más OBS Studio y hace unos meses me decidí a sacarle todo el jugo a la herramienta. Pues bien, para ello me tuve que ir al manual para entender cual era la finalidad de los perfiles, las escenas y las fuentes. Para que no se me olvide registré este vídeo:

Android ROMs and maintenance

Reading time: 1 – 2 minutes

Some day ago I had problems with two mobile devices, the last one was with Nexus 7 tablet; the problems started because of so stupid issue I confused my Nexus 7 V2 (2013) with a V1 (2012) and of course flashing recovery and system images everything was broken. Finally, I had to re-flash stock images for recovery and system. In the middle of the process and thanks to XDA-Developers, I found a really useful toolkit called SkipSoft

I just want to remark the work done by people of SkipSoft and give thanks to them for their great work. They simplified long processes downloading and flashing images to my devices to a simple wizard process with their scripts.

BTW, thanks also to Pof who gave me the inspiration for solving my mistakes flashing improper images to the Nexus 7.

Three headphones until I get succeed

Reading time: 3 – 4 minutes

This is post entry is a summary of my experience with three different headphones until I found one which is compatible with Google Meet (professional version of Google Hangout). I spent a lot of hours every day working with video conference applications like Skype and others. It means stay sat for a long time, and when I don’t have to be in front of my screen I appreciate if I can walk around my room. Of course, this is only possible when the headphones that you use are wireless. A long time ago I had wired headphones and ended tired of having small incidents which damage my ears or drop off anything which was on my table.

So, I decided to read some benchmarks about high-quality headphones, I considered a tool for my job and I decided to spend my money. Having my requirements as a reference and using the benchmark readings for checking them I finally bought the Sennheiser PXC550. I’m not going to say whatever you can find in regular reviews, just some words to say this is a very good product with an excellent sound quality. But, not works with Google Meet (Hangout). What I mean is my voice it could not be understood by other peers. It’s impossible to understand anything. Using applications like Skype, or phone calls the quality was very good. Or using the headphones from my mobile phone and the Google Meet application the quality was good.

Thanks to Amazon guarantee I returned the product and I bought the Bose QuietComfort 35. Also a very good product, maybe a little bit worse than the Sennheiser one in some aspects but anyway a world-class product. Problems with Google Meet (Hangout) were even worst, in this case, sound quality was bad not only from my mic also other people of conversation had a really bad quality. Again with Skype, the quality was good. But when I connect the headphones to my mobile using Google Meet the sound quality was horrible, impossible to use.

Finally, I bought the Plantronics BackBeat PRO 2 SE. From those three that I tried this is the product with less quality IMHO. But Google Meet from my laptop works, my voice quality is not very good but it’s good enough for using them. Again I’m talking about a very good product, with a very good quality. In front of the other two, these ones are weighty, old fashion design, less comfortable, and worst sound quality. Some advantages that I found, the most important of course is it works with Google Meet (Hangout). The sound is louder at the maximum volume, and there are physical buttons for mute and on/off/pairing. Another advantage is the Bluetooth class 1 which give better coverage when I’m not next to the computer.

I didn’t say anything so far, but I’m talking always about Bluetooth connections with my laptop where I have a Windows 10 installed with Google Chrome. Laptop Bluetooth version is 4.0 HCI and LMP version: 6.1280 manufactured by Intel and driver version is 19.30.1646.853 (date: 2016-11-14).

If anybody knows a little bit more about this topic or wants to exchange any similar experience I’ll appreciate.

USB 2.0 VGA from DealExtreme

Reading time: 1 – 2 minutes

Several months ago I bought a video graphics adapter for USB 2.0 port. It’s compatible with Linux, Mac and Windows but for a while I’ve only used it with Windows where it works as a extended screen for my HDMI main display. It works very good with 1920×1080 pixels resolution and it can play videos fast enough using a standalone video player or HTML5 video streaming from the internet.

The chipset used by this product is DISPLAYLINK DL-165 with DVI, HDMI and VGA adapters. It is powered by USB port with 5V DC and 450mA about 2,25W of consumption; but after installing the display driver I lost 2GB of RAM, which in my case it isn’t a problem but sometimes it could be a handicap.

USB 2.0 VGA

USB 2.0 VGA

If you are interested in this product I bought it in DealExtreme webpage, the product page is here and costs 34,28€ with free shipping.

Recording linux desktop and audio

Reading time: < 1 minute I have two full-HD displays as a desktop and I want to record the second one of them while I record mic too. The output format of the record has to be MKV with h264 as video codec and AAC as audio codec. After some tests with VLC and FFMPEG finally I get the solution with this command:

ffmpeg -f alsa -ac 2 -i default -f x11grab -r 15 -s 1920×1080+0+0 -i :0.0+1920,0 \
       -acodec pcm_s16le -vcodec libx264  -preset ultrafast  -threads 0 -y Test.mkv

when I finish recording the clip I have to convert the audio channel because if I try to convert the audio format while I’m recording the audio channel I have delays or sync problems with video channel.

ffmpeg -i Test.mkv -map 0:0 -map 0:1 \
       -c:v copy \
       -c:a:1 libfdk_aac -profile:a aac_he_v2 -b:a:1 96k \
       output.mkv

How to get MP3 file from a WebM video

Reading time: < 1 minute Another title for this post could be: "Getting audio from video clips". Because you could do it with MP4 (Mpeg4), WebM, Mov, FLV, etc. We are going to use ffmpeg to that:

ffmpeg -i input_file.webm -ab 128k -ar 44100 out_file.mp3

The meaning of the parameters:

  • ab: the audio bitrate in bps
  • ar: the audio sample rate in hz

And if you have a directory with a lot of files to convert you could use:

find . -name "*.webm" -print0 |while read -d $'\0' file; do ffmpeg -i "$file" -ab 128k -ar 44100 -y "${file%.webm}.mp3";done

Pay attention to “find” and “while read” commands combinations because we want to support files with spaces.

I hope this is as useful for you as for me.

RTMP source to HLS (HTTP Live Streaming) Apple

Reading time: 2 – 3 minutes

I just solved a very specific problem and I have to write some notes here to remember the solution. Given a RTMP source we have to stream the content to Apple devices like iPad, iPhone and iPod because RTMP couldn’t be played using Safari browser.

If we need to play streaming on Apple devices the best solution is convert it to HLS and publish generated files using HTTP server.

To solve this issue I use rtmpdump and vlc. Firstly rtmpdump gets video stream from source. Secondly the stream is sent to vlc and finally vlc transcodes de video and audio and outputs small .ts files and one .m3u8 index file.

The command is something like this:

rtmpdump -v -r "$RTMP" | sudo -u xymon vlc -I dummy fd://0 vlc://quit --sout="#transcode{width=320,height=240,fps=25,vcodec=h264,vb=256,venc=x264{aud,profile=baseline,level=30,keyint=30,ref=1,nocabac},acodec=mp3,ab=96,audio-sync,deinterlace,channels=2,samplerate=44100}:std{access=livehttp{seglen=10,delsegs=true,numsegs=5,index=$M3U8,index-url=$TS_URL},mux=ts{use-key-frames},dst=$TSF}"

Variables descriptions are:

RTMP=rtmp://example.tld/path/stream_id
WD=/local_path
TS=live-####.ts
TSF=$WD/$TS
TS_URL=http://example.tld/path/$TS
M3U8=$WD/live.m3u8

Then create an HTML file, for example live.html, with a reference to .m3u8 file, the relevant code of the HTML file is like this:

<video width="320" height="240"><source src="http://example.tld/path/live.m3u8" /></video>

A simple code to public files via HTTP:

python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"

Then we only need to open Safary browser in Apple device and set the proper URL, in our case:

http://example.tld/path/live.html

IMPORTANT NOTE: the audio output have to be with two channels and a sample rate of 44KHz in other cases the audio fails.

Tablet Motorola Xoom + Teclat + Llapis

Reading time: 2 – 4 minutes

Un altre juguet del que puc disfrutar des d’aquest estiu és el Motorola Xoom, el table de Google. És curió perquè m’he adonat que els no-geeks no tenen ni idea de que existeixen tables més enllà del iPad. Però el que més em sorprèn és que més enllà de l’usabilitat i la fluidesa en l’ús dels iPad no acabo de veure massa qualitats. És evident que els tablets amb Android estan encara per darrera d’aquesta fluidesa i experiència d’usuari. Però el seu entorn amb un disseny més flexible i la possibilitat d’arribar fins a un nivell de control del sistema més obert a més d’una comunitat que comparteix molts dels seus avanços em reforça la idea que el creixement que estan tenint aquest tablets acabarà per imposar-se com ja ha passat en els telèfons mòbils. La diversitat de formes, models, mides, preus, etc. crec que és evident que acabarà imposant-se a la dictadura d’Apple.

Bé doncs, a part d’aquesta petita reflexió volia comentar que també disposo d’un teclat i un llapis per interactuar amb el tablet. Ambdós accessoris he de dir que tenen una experiència d’usuari molt pobre. De fet, tan pobre que pràcticament no són ni usables per propostis professionals. Però de fet, la finalitat que perseguia era saber quin és l’estat d’aquests dispositius i poder evaludar l’API 3.0 d’Android que pel que he vist té poc a veure amb la 2.3.X.

Arribats a aquest punt suposo que els propers mesos la posaré a la venda amb l’objectiu d’aquirir alguna de les noves tables que han sortit i buscant donar-li un enfoc amb coneixement de causa a la mateixa. És a dir, aneu en compte no he dit que la tablet no valgui per res sinó que té alguns aspectes que han de madurar. Però he de dir que li he trobat un ús molt concret que pel meu perfil és idoni. És a dir, tinc un equip amb una bateria que em dura quasi una setmana amb que permet accedir a xarxes socials i a la web, a més de fer-me de magatzem multimedia amb una nota molt alta. Obviament la sortida HDMI em va genial per ensenyar fotografies de viatges a familiars, emportar-me altres continguts multimèdia arreu del món i poder-los visualitzar tan en la pantalla de la Xoom com al monitor de qualsevol TV d’hotel, amic, familiar, etc.

Així doncs, la meva opinió és que si sou amants de la tecnologia i us ho podeu permetre és un equip que esta molt bé. Això si, sota el meu punt de vista encara va una mica coix per poder tenir utilitats productives almenys en els entorns en els que jo em moc.

Les últimes setmanes en fotografies

Reading time: 8 – 12 minutes

Com sembla que és una tònica en la meva vida tot corre molt, tot va molt ràpid i sempre hem passen mil i una coses. Qualsevol diria que normalment treballo des de casa, potser és gràcies a internet que hem permet mourem molt i aprofitar al màxim les sortides. Així doncs, per posar-me al dia he decidit re-editar un post que vaig fer l’any 2007: Fotografies dels últims dos dies. En aquest cas potser parlem de més de dues setmanes però la idea és la mateixa: buidar la targeta del mòbil i anotar coses curioses o no tan curioses al blog.

Des del 24 de gener continuo sense el meu portàtil, o sigui, que ja porto més d’un mes de patiments i esperes. De fet, gràcies a uns companys de LanA2 vaig poder-lo disfrutar garibé una setmana només netejant-lo ben net, però finalment va tornar a morir amb el mateix problema que el primer dia:

Malgrat alguna gent ha tingut la sort de que Dell li ha reparat el problema gratuitament, a d’altres com ara jo no hem tingut tanta sort. Així doncs, per eBay he demanat una placa base nova i encara estic a l’espera de rebre-la. Així podré recuperar el Dell m1330 que tan bon rendiment m’ha donat aquests quasi 3 anys.

Per altre banda, he demanat un Dell Studio 13 que fa més d’1mes que espero que Dell es digni a entregar-me, de fet, avui havia de rebre’l però segons l’estat de la comanda això no serà fins la setmana que ve, cosa que ja hem costa de creure quan han incomplert més de 3 vegades la data d’entrega.

Dell Studio XPS13

A nivell tècnic podriem dir que és l’evolució del m1330. Amb 8GB de RAM, 500GB d’HD i algunes millores en el lector de targetes flash a més d’una gràfica més potent, etc. Però el que realment m’ha fet comprar-ne un de nou no és tan el hardware sinó una garantia de 3 anys del dia després perquè no torni a estar com ara.
Canviant de tema, fa unes setmanes vaig ser al Mobile World Congress (MWC’10) de Barcelona, on vaig aprofitar per retrobar-me amb molts amics, no només durant la fira sinó durant tot el dia. Fins hi tot vaig retrobar-me amb el Fernando que després d’uns anys a Dublin a decidit establir-se a Barcelona. Pel que fa a la fira si no hi heu pogut anar, més enllà de mirar-vos mil fotografies i videos dels mòbils i d’altres cosetes que hi van presentar ús recomano llegir: 20 key trends at Mobile World Congress 2010 (1-10, 11-20).

Aquest any l’entrada va ser gentilesa de Google i més concretament de l’Ernest, que no només ens va aconseguir aquest passe als amiguetes sinó també una entrada a la conferència de desenvolupadors d’Android que es feia a la fira. La sorpresa que ens tenien preparats l’Ernest i la gent de Google és el regal d’un Nexus One al final de la xerrada.

Google Nexus One

Sobre el telèfon comentar que és un Android i com a tal tampoc es diferència tan del HTC Hero que ja tenia, això si quan sortim del sistema operatiu per mirar-nos el telèfon és impressionant el ràpid que arriba a funcionar la CPU d’1GHz i els més de 500MB de RAM. Tot el que feia amb la Hero ara mateix vola amb el Nexus One i quan dic vola vull dir que vola, estic impressionat. Per cert, el meu més gran descobriment dels últims dies a nivell d’aplicacions és una aplicació que es diu WebSharing i que permet compartir tot el mèdia que tinc al meu telèfon via Wi-Fi a través d’una interficie web senzillíssima d’usar i molt potent.

Aquesta setmana passada també ha estat molt especial perquè movilpoint ha venut la seva primera unitat de la nova gama de productes. Després de molts mesos de feina s’ha reorientat totalment la companyia i de forma oficiosa ja puc informar que els nous productes de l’empresa seran totalment hardware, o sigui, que ja no farem software. Són productes totalment ecològics, molt econòmics i fets a mida de cada client a través d’una configuració via web. La gama de producte esta totalment orientada a fires i events, espero poder-vos presentar la nova web ben aviat.

Mentretant podeu veure com estem treballant amb els nous punts d’informació:

i també donar un cop d’ull a la primera unitat instalada a casa d’un client:

Finalment aquest cap de setmana he estat a la DrupalCamp 2010 que es feia al Citilab de Cornellà; després de fer campana al phpWorkShop d’aquest any he passat a coneixer una mica més a fons a la gent i la tecnologia de Drupal. En general he sortit amb molt bon gust de boca de tot plegat, unes xerrades amb un bon nivell tècnic, una organització molt ben portada i una col·lecció de geeks més gran i fidel del que m’imaginava, això si, molt de Mac suelto 😉

Parlant de temes tècnics potser el que més m’ha agradat és SCRUM, que com cap metodologia de projectes és perfecte però si que aporta certs elements d’XP (eXtreme Programming) que sempre he trobat molt interessants. Potser la decepció més gran Open Atrium, no sé perquè m’esperava alguna cosa molt més potent. Per cert, alguna gent com en @quimet i en @linobertrand m’han preguntat què montava jo encomptes d’Open Atrium i això ho vaig respondre a un podcast que vaig fer el maig del 2008: Podcast 1×07: gestió de projectes. Per altre banda, des de llavors també he treballat amb Redmine i el recomano moltíssim, ja que esta molt ben integrat i malgrat esta fet amb RubyOnRails del que no en sé res de res, he de reconeixer que és una solució molt ben pensada i ben feta.

Abans d’acabar algunes fotos de la DrupalCamp 2010: