ffmpeg, converting 5K video to 1080p (FHD)
Reading time: 5 – 8 minutesJust a reminder:
ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i "input_file.mp4" -c:a copy -vf "scale_cuda=-2:1080" -c:v h264_nvenc "output_file.mp4"
Just a reminder:
ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i "input_file.mp4" -c:a copy -vf "scale_cuda=-2:1080" -c:v h264_nvenc "output_file.mp4"
Very simple and useful parameters of ffmpeg:
ffmpeg -ss HH:MM:SS -i INPUT_FILE -to HH:MM:SS -c copy OUTPUT_FILE
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:
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.
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.
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.
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.
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 1920x1080+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
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:
And if you have a directory with a lot of files to convert you could use:
find . -name "*.webm" -print0 |while read -d
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.
\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.
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.
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.