
Recherche avancée
Autres articles (43)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
Sur d’autres sites (5415)
-
fate : fix generating references when sh=dash
12 mars 2024, par Nicolas Gaullier -
FFmpeg / python - command works when run from shell but fails when run from python
4 avril 2019, par artembusI have a python script which should run an ffmpeg command with this function :
def transcode(in_path, out_path):
cmd = ["ffmpeg", "-y", "-i", in_path, '-vf smartblur=lr=1']
cmd += ["-an", out_path]
print("Running:", " ".join(cmd))
subprocess.run(cmd, stdout=cmdout, stderr=cmdout)When I run the python script it fails with this ffmpeg error :
Running: ffmpeg -y -i raid/orig/scenes/train/5786088.mp4 -vf smartblur=lr=1 -an raid/4K/scenes/train/5786088.mp4
ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Unrecognized option 'vf smartblur=lr=1'.
Error splitting the argument list: Option not foundYou can see the command it tries to execute in the first line, when I run it in the command line it works fine. When I run the command in the shell it outputs the same version and parameters of the ffmpeg as written in the error above.
I feel like I missed something simple yet crucial, anyone can point me to the right direction ?
-
How create dynamic folder with input structure in shell script when using ffmpeg ?
23 octobre 2020, par Sathish Kumari have created this shell script to encode videos using ffmpeg. i need to maintain the folder structure of input and output folder automatically when i run this script.


Problem : As of now, it moves all videos to root of destination directory. it need to create subfolder and output file should save in it.


Input folder :


Folder1
--sub_folder
---video1.mkv
---video2.ts
---video3.mp4
Folder2
---cat.mkv
---mouse.ts
---train.mp4




Expected Output folder :


Folder1
--sub_folder
---video1.mp4
---video2.mp4
---video3.mp4
Folder2
---cat.mp4
---mouse.mp4
---train.mp4



Code :


srcDir=$1
destDir=$2

for filename in $(find "$srcDir" -type f); do

 basePath=${filename%.*}
 baseName=${basePath##*/}

 audioformat=$(ffprobe -loglevel error -select_streams a:0 -show_entries stream=codec_name -of default=nw=1:nk=1 "$filename")
 videoformat=$(ffprobe -loglevel error -select_streams v:0 -show_entries stream=codec_name -of default=nw=1:nk=1 "$filename")

 if [ "$audioformat" == "aac" ] && [ "$videoformat" == "h264" ] ; then
 echo $filename
 echo $audioformat + $videoformat
 ffmpeg -i "$filename" -y -c:v copy -c:a copy "$destDir"/"$baseName.mp4" -hide_banner -loglevel warning 
 elif [ "$audioformat" == "aac" ] && [ "$videoformat" != "h264" ] ; then
 echo $filename
 echo $audioformat + $videoformat
 ffmpeg -i "$filename" -y -c:v libx264 -c:a copy "$destDir"/"$baseName.mp4" -hide_banner -loglevel warning 
 elif [ "$audioformat" != "aac" ] && [ "$videoformat" == "h264" ] ; then
 echo $filename
 echo $audioformat + $videoformat
 ffmpeg -i "$filename" -y -c:v copy -c:a aac "$destDir"/"$baseName.mp4" -hide_banner -loglevel warning 
 else
 echo $filename
 echo $audioformat + $videoformat
 ffmpeg -i "$filename" -y -c:v libx264 -c:a aac "$destDir"/"$baseName.mp4" -hide_banner -loglevel warning 
 fi


done



if possible , check whether this code looks good.