
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (48)
-
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)
Sur d’autres sites (5938)
-
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.

-
Understanding a script which uses ffmpeg to send rtmp input to node.js script
4 juin 2022, par Arpit ShuklaI was trying to understand this shell script which uses ffmpeg to take an rtmp input stream and send it to a node.js script. But I am having trouble understanding the syntax. What is going on here ?


The script :


while :
do
 echo "Loop start"

 feed_time=$(ffprobe -v error -show_entries format=start_time -of default=noprint_wrappers=1:nokey=1 $RTMP_INPUT)
 printf "feed_time value: ${feed_time}"

 if [ ! -z "${feed_time}" ]
 then
 ffmpeg -i $RTMP_INPUT -tune zerolatency -muxdelay 0 -af "afftdn=nf=-20, highpass=f=200, lowpass=f=3000" -vn -sn -dn -f wav -ar 16000 -ac 1 - 2>/dev/null | node src/transcribe.js $feed_time

 else
 echo "FFprobe returned null as a feed time."
 
 fi

 echo "Loop finish"
 sleep 3
done



- 

- What is
feed_time
here ? What does it represent ? - What is this portion doing
- 2>/dev/null | node src/transcribe.js $feed_time
? - What is the use of
sleep 3
? Does this mean that we are sending audio stream to node.js in chuncks of 3 seconds ?








- What is
-
Need help understanding this script which uses ffmpeg to send rtmp input to node.js script
4 juin 2022, par Arpit ShuklaI was trying to understand this shell script which uses ffmpeg to take an rtmp input stream and send it to a node.js script. But I am having trouble understanding the syntax. Can someone please explain what is going on here ?


The script :


while :
do
 echo "Loop start"

 feed_time=$(ffprobe -v error -show_entries format=start_time -of default=noprint_wrappers=1:nokey=1 $RTMP_INPUT)
 printf "feed_time value: ${feed_time}"

 if [ ! -z "${feed_time}" ]
 then
 ffmpeg -i $RTMP_INPUT -tune zerolatency -muxdelay 0 -af "afftdn=nf=-20, highpass=f=200, lowpass=f=3000" -vn -sn -dn -f wav -ar 16000 -ac 1 - 2>/dev/null | node src/transcribe.js $feed_time

 else
 echo "FFprobe returned null as a feed time."
 
 fi

 echo "Loop finish"
 sleep 3
done



- 

- What is
feed_time
here ? What does it represent ? - What is this portion doing
- 2>/dev/null | node src/transcribe.js $feed_time
? - What is the use of
sleep 3
? Does this mean that we are sending audio stream to node.js in chuncks of 3 seconds ?








- What is