Recherche avancée

Médias (17)

Mot : - Tags -/wired

Autres articles (88)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (15920)

  • How to batch process a series of video files with powershell and other-transcode/ffmpeg

    7 juin 2022, par DarkDiamond

    TL ;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 on KOMPR. Note that the video files in the KOMPR folder are the output files of the other-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 the KOMPR directories and then call

    


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


    


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

    


  • Anomalie #3412 (Nouveau) : Préfixe de table non substitué lors de l’utilisation de lien vers un do...

    19 mars 2015, par Pascal Verrier

    Bonjour,

    Sur un SPIP neuf 3.0.17, sans aucun plugin, installé sous SQLite avec un préfixe de table particulier (ici "monprefixe" à la place de "spip"),
    après enregistrement d’une première rubrique et d’un premier article contenant un document (photo), le tout d’identifiants n°1,
    après insertion dans le corps de l’article du lien [->doc1] j’obtiens lors de l’enregistrement de l’article :
    Erreur SQL HY000 / 1<br />no such table: spip_documents<br />SELECT mime_type FROM monprefixe_types_documents WHERE extension IN (SELECT extension FROM spip_documents where id_document =1)

    En fait, le préfixe particulier a bien été substitué pour spip_types_documents mais pas pour spip_documents dans la sous-requête.

    Après examen du code, je constate dans /ecrire/inc/lien.php LL171-172 et /plugins-dist/textwheel/inc/lien.php LL419-420 :
       AND $mime = sql_getfetsel('mime_type', 'spip_types_documents',<br />            "extension IN (SELECT extension FROM spip_documents where id_document =".intval($id).")",<br />

    Je ne pense pas que la substitution de préfixe puisse fonctionner dans cette utilisation directe en sous-requête (?) d’où probablement cette erreur SQL.

  • Convert Audio to Video (with Poster) and Convert Audio for HLS (Laravel-FFMpeg)

    4 octobre 2020, par m_zanjani

    I implemented a code with Laravel and used Laravel-FFMpeg for media processing.&#xA;I could not find the answers to my questions so I am asking them here and I hope someone can help me.

    &#xA;

      &#xA;
    • How can I convert an audio file (wav, mp3, etc.) to a video file&#xA;(mp4) using Laravel-FFmpeg or PHP-FFMpeg (with an image as a&#xA;poster) ?
    • &#xA;

    &#xA;

    // something like this command&#xA;ffmpeg -loop 1 -i image.jpg -i audio.wav -c:v libx264 -tune stillimage &#xA;-c:a aac -b:a 192k -pix_fmt yuv420p -shortest out.mp4&#xA;

    &#xA;

      &#xA;
    • How can I convert an audio file (wav, mp3, etc.) to HLS using Laravel-FFmpeg or PHP-FFMpeg ?&#xA;
        &#xA;
      • I did this correctly for the video file and I had no problem but I&#xA;did not see a sample for the audio file.
      • &#xA;

      • Is it possible to stream an audio file and convert it to HLS (making ts and m3u8 files) ? I mean, do I need to create HLS files to stream audio files on players like Video.js ? Does streaming an audio file make sense ?
      • &#xA;

      • Do we need to convert the audio file to a video file first and then build the HLS, or can we build the HLS directly ?
      • &#xA;

      &#xA;

    • &#xA;

    • With this package, can a watermark be placed on a photo ? Or wrote a text on it (drawtext command) ?
    • &#xA;

    • How to add album art (jpg) to audio file (mp3) using this package ?
    • &#xA;

    &#xA;

    // something like this command&#xA;ffmpeg -i in.mp3 -i test.png -map 0:0 -map 1:0 -c copy -id3v2_version 3 -metadata:s:v &#xA;title="Album cover" -metadata:s:v comment="Cover (front)" out.mp3&#xA;

    &#xA;

    If you provide a sample code of this package or PHP-FFMpeg for the above three questions, I would be grateful.

    &#xA;

    Thank You

    &#xA;