
Recherche avancée
Autres articles (103)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Sélection de projets utilisant MediaSPIP
29 avril 2011, parLes exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
Ferme MediaSPIP @ Infini
L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)
Sur d’autres sites (12014)
-
How to batch process a series of video files with powershell and other-transcode/ffmpeg
7 juin 2022, par DarkDiamondTL ;DR


What did I do wrong in the following PowerShell-Script ? It does not work as expected.



I am recording some of my lectures in my university with a photo camera. This works pretty well although I have to split the single lecture into three to four parts because the camera can only record 29 minutes of video in one take. I know that this is a common issue related to some licensensing problem that most photo cameras simply don't have the right license to record longer videos. But it confronts me with the problem that I later have to edit the files together after I did some post processing on them.


With the camera I produce up to four video files with sizes around 3.5 GB which is way to big in order to be of any use because our IT department understandably doesn't want to host so much data, as I produce around 22 GB of video material each week.


Some time ago I came across a very useful tool called "other-video-transcoding" by Don Melton over on GitHub, written in ruby, that allows me to compress the files to a reasonable file size without any visual loss. In addition I crop the videos to remove the part of each frame that is neither the board nor a place where my professor stands in order to decrease the filesize even further and do some privacy protection by cutting out most of the students.


As the tools are accessable via the command line, it is relatively easy to configure and does not cost additional computational power to render a nice gui, so I can edit one of the 29 minute clips in less than 10 minutes.


Now I wanted to optimize my workflow by writing a PowerShell script that only takes the parameters what to crop and which files to work on and then does the rest on its own so I can just start the script and then do something else while my laptop renders the new files.


So far I have the following :


$video_path = Get-ChildItem ..\ -Directory | findstr "SoSe"

Get-ChildItem $video_path -name | findstr ".MP4" | Out-File temp.txt -Append 
Get-Content temp.txt | ForEach-Object {"file " + $_} >> .\files.txt

Get-ChildItem $video_path |
Foreach-Object {
other-transcode --hevc --mp4 --target 3000 --crop 1920:780:0:0 $_.FullName
}

#other-transcode --hevc --mp4 --crop 1920:720:60:0 ..\SoSe22_Theo1_videos_v14_RAW\
ffmpeg -f concat -i files.txt -c copy merged.mp4
Remove-Item .\temp.txt



but it does not quite do what I it expect to do.
This is my file system :


sciebo/
└── SoSe22_Theo1_videos/
 ├── SoSe22_Theo1_videos_v16/
 │ ├── SoSe22_Theo1_videos_v16_KOMPR/
 │ │ ├── C0001.mp4
 │ │ ├── C0002.mp4
 │ │ ├── C0003.mp4
 │ │ ├── C0004.mp4
 │ │ ├── temp.txt
 │ │ ├── files.txt
 │ │ └── merged.mp4
 │ └── SoSe22_Theo1_videos_v16_RAW/
 │ ├── C0001.mp4
 │ ├── C0002.mp4
 │ ├── C0003.mp4
 │ └── C0004.mp4
 └── SoSe22_Theo1_videos_v17/
 ├── SoSe22_Theo1_videos_v17_KOMPR
 └── SoSe22_Theo1_videos_v17_RAW/
 ├── C0006.mp4
 ├── C0007.mp4
 ├── C0008.mp4
 └── C0009.mp4



where the 16th lecture is already processed and the 17th is not. I always have the raw video data in the folders ending on
RAW
and the edited/compressed output files in the one ending onKOMPR
. Note that the video files in theKOMPR
folder are the output files of theother-transcode
tool.

The real work happens in the line where it says


other-transcode --hevc --mp4 --target 3000 --crop 1920:780:0:0 $_.FullName



and in the line


ffmpeg -f concat -i files.txt -c copy merged.mp4



where I concat the output files into the final version I can upload to our online learning platform.
What is wrong with my script ? In the end I'd like to pass the
--crop
parameter just to my script, but that is not the primary problem.


A little information on the transcoding script so you don't have to look into the documentation :

As the last argument the tool takes the location of the video files to work on, be it relative or absolute file paths. The output is placed in the folder the script is called in, so if I cd into one of theKOMPR
directories and then call

other-transcode --mp4 ../SoSe22_Theo1_videos_v16_RAW/C0001.mp4



a new file
C0001.mp4
is created in theKOMPR
directory and the transcoded video and old audio are written to that new video file.

-
python Instagram API doesnt work
9 avril 2017, par sdgmI was looking for a c++-Instagram API but there was not any complete project. Now,I am using python-Instagram API. whenever I execute my code, too many errors occur. this is my code :
from InstagramAPI import InstagramAPI
InstagramAPI = InstagramAPI("no_ideaw", "xs*************#")
InstagramAPI.login()
InstagramAPI.removeProfilePicture()Then, these are the errors :
Traceback (most recent call last):
File "tester.py", line 1, in <module>
from InstagramAPI import InstagramAPI
File "/home/muhammad/Downloads/Instagram-API-python-master/InstagramAPI.py", line 25, in <module>
from moviepy.editor import VideoFileClip
File "/home/muhammad/.local/lib/python2.7/site-packages/moviepy/editor.py", line 22, in <module>
from .video.io.VideoFileClip import VideoFileClip
File "/home/muhammad/.local/lib/python2.7/site-packages/moviepy/video/io/VideoFileClip.py", line 3, in <module>
from moviepy.video.VideoClip import VideoClip
File "/home/muhammad/.local/lib/python2.7/site-packages/moviepy/video/VideoClip.py", line 20, in <module>
from .io.ffmpeg_writer import ffmpeg_write_image, ffmpeg_write_video
File "/home/muhammad/.local/lib/python2.7/site-packages/moviepy/video/io/ffmpeg_writer.py", line 15, in <module>
from moviepy.config import get_setting
File "/home/muhammad/.local/lib/python2.7/site-packages/moviepy/config.py", line 38, in <module>
FFMPEG_BINARY = get_exe()
File "/home/muhammad/.local/lib/python2.7/site-packages/imageio/plugins/ffmpeg.py", line 86, in get_exe
raise NeedDownloadError('Need ffmpeg exe. '
imageio.core.fetching.NeedDownloadError: Need ffmpeg exe. You can download it by calling:
imageio.plugins.ffmpeg.download()
</module></module></module></module></module></module></module>I tried to install
imageio.plugins.ffmpeg.download()
but nothing happened. what is wrong with my python code ?
-
Révision 22206 : Deux bugs dans le phraseur illustré par l’exemple ci-dessous fourni par Georges K...
6 juin 2015, par esj -* (ligne 295) ce qu’il y a avant un nom de balise dans un argument n’est pas forcément du texte brut, il peut y avoir des chaînes de langues ;* (ligne 256) les apostrophes et guillemets en début d’argument ne sont pas forcément des délimiteurs SPIP, il faut qu’il y en ait un 2e plus loin, ce que preg_match contrôlait sans que SPIP tienne compte de son résultat. On y veille à présent mais il est à noter que cette condition est nécessaire mais non suffisante, du fait de la terrible ambiguité de la syntaxe des squelettes. Il y a donc d’autres bugs potentiels quand on met des balises comme arguments d’une balise.Autre chose qui ne relève pas du phraseur : dans le code ci-dessous le "**" après #SESSION n’est pas seulement destiné à produire un code plus efficace (il ne sécurise pas car ce n’est pas nécessaire quand on ne s’intéresse qu’au résultat booléen), mais aussi parce que le "interdire_script" introduit sinon transcode le chevron dans le "< ?php" de la balise dynamique #URL_LOGOUT, ce qui la neutralise. C’est un autre bug à creuser.
<span class="CodeRay">[(#SESSION**{nom}|?{
<span class="tag"><:bienvenue:></span> <span class="tag"><strong></strong></span>#SESSION{nom}<span class="tag"></span>
<span class="tag">span> <span class="tag">/></span><span class="tag">span> <span class="attribute-name">href</span>=<span class="string"><span class="delimiter">'</span><span class="content">#URL_LOGOUT</span><span class="delimiter">'</span></span><span class="tag">></span><span class="tag"><:logout:></span><span class="tag"></span>
,
<span class="tag"><p></p></span><span class="tag"><small></small></span><span class="tag">span> <span class="attribute-name">alt</span>=<span class="string"><span class="delimiter">"</span><span class="content"><:zonep:</span></span><span class="error">></span>" src="#CHEMIN{encrypted.png}" /<span class="error">></span> <span class="tag"><:acces:></span> <span class="tag">span> <span class="attribute-name">href</span>=<span class="string"><span class="delimiter">"</span><span class="content">#URL_PAGE{login,url=#SELF}</span><span class="delimiter">"</span></span><span class="tag">></span><span class="tag"><:ident:></span><span class="tag"></span>
<span class="tag"></span><span class="tag"></span>
})]
</span></span></span></span></span>