Difference between revisions of "Video management"

From Sinfronteras
Jump to: navigation, search
(How to create an animated GIF from MP4 video via command line)
(How to create an animated GIF from MP4 video via command line)
Line 108: Line 108:
 
gifsicle opengl-rotating-triangle.gif --loopcount=3 > opengl-rotating-triangle_3.gif
 
gifsicle opengl-rotating-triangle.gif --loopcount=3 > opengl-rotating-triangle_3.gif
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
 +
<br />
 +
=====Ejemplo de como incluir el gif en MediaWiki=====
 +
<div class="mw-collapsible-content">
 +
<div style="max-width: 450pt">
 +
<img style="width: 420pt" src="http://wiki.sinfronteras.ws/images/1/11/The_big_bang.gif" onclick="this.src = this.src + 'sklfjlx;'">
 +
 +
[[:File:The_big_bang.gif]]
 +
 +
<!-- This is how to embebe the file from the general link to the file. The problem is that this way I was not able to resize it: -->
 +
<!-- [[File:The_big_bang.gif|none|frame]] -->
 +
</div>
  
  

Revision as of 18:33, 19 October 2020


Edición de videos en Linux


Aplicaciones para editar videos en Linux

http://www.linux.com/news/software/applications/693365-top-3-linux-video-editors

http://www.batanga.com/tech/13942/5-editores-de-video-para-linux-que-no-envidian-nada-a-los-de-windows

http://filmora.wondershare.com/video-editor/free-linux-video-editor.html



OpenShot


Blender


Cinelarra


Edición de vídeos desde el terminal

Los programas que he encontrado para este fin son: Mencoder y ffmpeg

http://www.taringa.net/posts/linux/9943347/Unir-canciones-y-convertir-audio-y-video-con-Ffmpeg.html



Dividir un video desde el terminal

http://www.atareao.es/ubuntu/dividir-un-video-desde-el-terminal-de-ubuntu/



Extracting, cleaning and re-merging audio

https://ubuntuforums.org/showthread.php?t=2074181

Use ffmpeg to separate audio and video. First check properties of videofile see if your audio is aac or mp3 and write in accordingly below.

ffmpeg -i musica_celestial.mp4

Para extraer el audio:

ffmpeg -i musica_celestial.mp4 -vn -acodec copy audio_musica_celestial.aac

ffmpeg audio format conversions

https://linuxconfig.org/ffmpeg-audio-format-conversions#h1-3-1-ac3-to-mp3

Convert aac to mp3 with ffmpeg:

ffmpeg -i audio.aac -acodec libmp3lame audio.mp3



Unir dos archivos de audio

Para unir dos archivos de audio (.mp3 por ejemplo) podemos utilizar cat. Sin embargo, la metadada del video no será creada correctamente. Por ejemplo si uno dos audios con cat y luego abro el archivo resultante un un reproductor de música, el reproductor dirá que este archivo tiene una longitud igual a la del primer archivo concatenado. Aún así el archivo será reproducido en su totalidad por el reproductor (el total de los dos archivos concatenados).

cat archivo1.mp3 archivo2.mp3 > archivo1_2.mp3

Si queremos que la longitud del archivo resultante sea mostrada correctamente en el reproductor de audio, podemos usar:

ffmpeg -i "concat:archivo1.mp3|archivo2.mp3" -acodec copy salida.mp3



Cambiar el formato de un Video

.avi" to ".flv" con ffmpeg http://forums.liveleak.com/showthread.php?t=1716

ffmpeg -i input.avi -b 2028k -s 640x480 -r 30 -acodec copy movie_2028_640_30.flv
explanation:
-i input.avi the input file
-b 1024k the output bitrate
-s 320x240 the output resolution
-r 25 the output frames per second
-acodec copy the output audio codec
movie_1024_320_25.flv the output file

Para que el archivo resultante presente las mismas características que el original en términos de resolución, bitrate, etc, debemos primero chequear las características del archivo original con ffmpeg -i video.avi; para luego ajustar los mismos valores en la ejecución del comando ffmpeg.



How to create an animated GIF from MP4 video via command line

https://askubuntu.com/questions/648603/how-to-create-an-animated-gif-from-mp4-video-via-command-line

sudo apt install ffmpeg

ffmpeg \
  -i opengl-rotating-triangle.mp4 \
  -r 15 \
  -vf scale=512:-1 \
  -ss 00:00:03 -to 00:00:06 \
  opengl-rotating-triangle.gif


Luego, para limitar el número de loops: https://davidwalsh.name/prevent-gif-loop#comment-502961

sudo apt install gifsicle

gifsicle opengl-rotating-triangle.gif --loopcount=3 > opengl-rotating-triangle_3.gif



Ejemplo de como incluir el gif en MediaWiki

Cortar o unir mp3

sudo apt-get install mp3wrap mp3splt

Now you can merge two mp3 files (let's say 1.mp3 and 2.mp3) by typing:

mp3wrap merged.mp3 2.mp3 1.mp3

note that the merged.mp3 will start with 2.mp3 and finish with 1.mp3

You can split mp3's now by typing:

mp3splt merged.mp3 0.0 1.2 3.4

this will split file merged.mp3 into two parts:

00:00 - 01:02 01:02 - 03:04

where xx:xx represents minutes:seconds.






Videos Mediawiki

En esta página se encuentran todas las extensiones relacionadas con vídeos: https://www.mediawiki.org/wiki/Category:Video_player_extensions



Extension:EmbedVideo

Esta parace ser la mejor actualmente, permite integrar videos que se encuentran almacenados internamente un nuestro wiki, y también desde otras plataformas de videos como youtube.


https://www.mediawiki.org/wiki/Extension:EmbedVideo

https://gitlab.com/hydrawiki/extensions/EmbedVideo


To install the extension, download the extension this way:

git clone https://gitlab.com/hydrawiki/extensions/EmbedVideo.git

I had first download the extension using the downloading button and choosing the tar.gz file and it doesn't work.


Then, in the LocalSettings.php:

wfLoadExtension("EmbedVideo");


Example:

From an internal video file, the syntax is like when embedding an image file:

  • [[File:RapidMiner_Linear_regression-examples1.mp4|600px|start=2|end=10]]


From youtube:

  • {{#ev:youtube|https://www.youtube.com/watch?v=GWQZE0HPoAY|||||start=160&end=180&loop=2}}



Extension:YouTube



MultimediaPlayer

https://www.mediawiki.org/wiki/Extension:MultimediaPlayer

The MultimediaPlayer plays a list of multimedia files. It is intended for use with multimedia items hosted by an external service - not stored in the wiki.




MediawikiPlayer

https://www.mediawiki.org/wiki/Extension:MediawikiPlayer

The MediawikiPlayer extension embeds the JW FLV Media Player into a wiki page and supports multiple formats like FLV, MP4 (H264/AAC), MP3, Youtube-related formats, various streaming server-related formats and various XML playlists formats.

It is, however, licensed under a non-free CC BY-NC-SA license with noncommercial restrictions.

Para instalarla se debe descargar el JW Player de la página www.jwplayer.com. Hay que registrarse en el sitio e ingresar a "License Keys & Downloads". Ahí se puede obtener una versión del JM Player y obtener una License Key. Luego de descargar el JWPlayer, debemos colocar los archivos:

  • player.swf
  • jwplayer.js

en el directorio de instalación de la extensión.

Ahora, como se indica en la página de Discusión de la extensión:

https://www.mediawiki.org/wiki/Extension_talk:MediawikiPlayer#Where_to_put_the_jsplayer_license_key_for_JwPlayer_v7

En la línea 218 del MediawikiPlayer.php:

$code .= "jwplayer($wgMWPlayerIDJS).setup({flashplayer: $playerUrl";

hay que ingresar el License Key. En mi caso, utilizando el código de licencia disponible en www.jwplayer.com:

$code .= "jwplayer($wgMWPlayerIDJS).setup({flashplayer: $playerUrl, key:'ZS3YdyCA6nL2bf5KbP/7Ro4Tt/mp8AG9X/HTNg=='";

De esta forma pude integrar un vídeo de youtube a través de la siguiente orden:

<mediaplayer>http://www.youtube.com/watch?v=y8Kyi0WNg40</mediaplayer>

<mediaplayer>http://www.youtube.com/watch?v=y8Kyi0WNg40</mediaplayer>