Recherche avancée

Médias (0)

Mot : - Tags -/performance

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (72)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The 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 (...)

  • 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 ;

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (9285)

  • if there is a way to add text to each image used to create video using ffmpeg ?

    1er mai 2020, par Mahmood Hussain

    I have successfully created a video (slide show) using FFmpeg from images and an additional text to it. Now I want the timestamp to be added as overlay text to each image.

    



    If the image is named 20191224133501.jpg I want 24 Dec 2019 01:35 PM as text over the image.

    


  • PyCharm terminal not detecting ffmpeg even after succesful installtion on Windows

    26 avril 2020, par Mandar

    I am working on Windows 10 and PyCharm 2019.2.6 Community Edition. I have followed all the steps for installing FFmpeg on windows. I'm currently working on a project in PyCharm. When I enter ffmpeg -h in command prompt, it works fine. However, when I enter the same command in PyCharm's terminal, it shows 'ffmpeg' is not recognized as an internal or external command,
operable program or batch file. I have added ffmpeg/bin to path as well.

    


  • FFmpeg disrupting "while/if" structure in Bash/shell scripting - how to fix ?

    25 avril 2020, par charles_river_runs

    I'm trying to extract a set number of frames from a series of .mp4 videos within several folders. I'm reading in variables from a CSV file, where each row of the CSV file contains the variables for each clip, which are : "dataset", "file name", "framelabel", "clip target start time", "clip target end time", "extract rate" (in seconds per frame), and "reason for exclusion."

    



    I'm using a while/if loop structure so I can avoid trying to process the videos that are excluded from our project.

    



    The while/if loop structure seems to work well when I just print out the variable names. However, when I insert a line of ffmpeg code, the variable assignments for the next video (ie, the following line read from the CSV file) go haywire.

    



    Here is the code WITHOUT the ffmpeg line, which seems to work (all the "echo" statements are just there as debugging aids to track the variable assignments) :

    



    IFS=‘,’
while read DATASET FILENAME FRAMELABEL TARGET_START TARGET_END TOTAL_DURATION EXTRACT_RATE REASON_FOR_EXCLUSION 
do  
echo “PRE FFMPEG”
echo “dataset and filename are “ $DATASET/$FILENAME
echo “target start is “ $TARGET_START
echo “target end is “ $TARGET_END

if [ $TARGET_START != EXCLUDED ] && [ $TARGET_START != Target_start ]
then
IFS=‘:’ 
read -r -a fps_array <<< "$EXTRACT_RATE"
IFS=‘,’
let "secs = ${fps_array[0]}*3600 + ${fps_array[1]}*60 + ${fps_array[2]}"
FPS_RATE=$(echo "scale=20;1/$secs" | bc)

echo “AFTER FFMPEG”
echo “dataset and filename are “ $DATASET/$FILENAME
echo “target start is “ $TARGET_START
echo “target end is “ $TARGET_END

fi
done < Test_Key.csv`



    



    The output for the code above looks like this, which is correct (I have 2 folders, "cats" and "es123", with two videos each ; one of the es123 videos is excluded from frame extraction) :

    



    “PRE FFMPEG”
“dataset and filename are “ cats/IMG_3460
“target start is “ 0:00:02
“target end is “ 0:00:24
“AFTER FFMPEG”
“dataset and filename are “ cats/IMG_3460
“target start is “ 0:00:02
“target end is “ 0:00:24
“PRE FFMPEG”
“dataset and filename are “ cats/IMG_4137
“target start is “ 0:00:10
“target end is “ 0:00:40
“AFTER FFMPEG”
“dataset and filename are “ cats/IMG_4137
“target start is “ 0:00:10
“target end is “ 0:00:40
“PRE FFMPEG”
“dataset and filename are “ es123/IMG_4577
“target start is “ EXCLUDED
“target end is “
“PRE FFMPEG”
“dataset and filename are “ es123/IMG_4839
“target start is “ 0:00:05
“target end is “ 0:00:25
“AFTER FFMPEG”
“dataset and filename are “ es123/IMG_4839
“target start is “ 0:00:05
“target end is “ 0:00:25


    



    However, I then try to add my ffmpeg line in that does the actual frame extraction :

    



    IFS=‘,’
while read DATASET FILENAME FRAMELABEL TARGET_START TARGET_END TOTAL_DURATION EXTRACT_RATE REASON_FOR_EXCLUSION 
do  
echo “PRE FFMPEG”
echo “dataset and filename are “ $DATASET/$FILENAME
echo “target start is “ $TARGET_START
echo “target end is “ $TARGET_END

if [ $TARGET_START != EXCLUDED ] && [ $TARGET_START != Target_start ]
then
IFS=‘:’ 
read -r -a fps_array <<< "$EXTRACT_RATE"
IFS=‘,’
let "secs = ${fps_array[0]}*3600 + ${fps_array[1]}*60 + ${fps_array[2]}"
FPS_RATE=$(echo "scale=20;1/$secs" | bc)

ffmpeg -i $DATASET/$FILENAME.mp4 -ss $TARGET_START -to $TARGET_END -vf fps=$FPS_RATE ${DATASET}/${DATASET}_${FILENAME}_%03d.jpg

echo “AFTER FFMPEG”
echo “dataset and filename are “ $DATASET/$FILENAME
echo “target start is “ $TARGET_START
echo “target end is “ $TARGET_END

fi
done < Test_Key.csv


    



    The result is that frames are correctly extracted for the first movie, but then the variable names for the second movie are completely screwed up (and then, of course, the code fails because the video names are wrong). You can see this in the 'echo' statements I used to track the variable naming, which become :

    



    “PRE FFMPEG”
“dataset and filename are “ cats/IMG_3460
“target start is “ 0:00:02
“target end is “ 0:00:24
“AFTER FFMPEG”
“dataset and filename are “ cats/IMG_3460
“target start is “ 0:00:02
“target end is “ 0:00:24
“PRE FFMPEG”
“dataset and filename are “ IMG_4839/es123_2
“target start is “ 0:00:25
“target end is “ 0:00:20


    



    Does anyone know why ffmpeg is affecting the functioning of the while/if loop structure here ? (I'm pretty new to shell scripting, sorry if this is something obvious). And what I can do to fix it ?

    



    Thank you !

    



    For reference, here is everything printed when I run the code with the ffmpeg line included— there are some parse errors showing up that I don't really understand but probably explain this.

    



    “PRE FFMPEG”&#xA;“dataset and filename are “ cats/IMG_3460&#xA;“target start is “ 0:00:02&#xA;“target end is “ 0:00:24&#xA;ffmpeg version 4.2.2-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2019 the FFmpeg developers&#xA;  built with Apple clang version 11.0.0 (clang-1100.0.33.16)&#xA;  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;cats/IMG_3460.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf58.29.100&#xA;  Duration: 00:00:25.15, start: 0.000000, bitrate: 6866 kb/s&#xA;    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1080x1920, 6796 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)&#xA;    Metadata:&#xA;      handler_name    : Core Media Video&#xA;    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 69 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : Core Media Audio&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))&#xA;Press [q] to stop, [?] for help&#xA;&#xA;Enter command: <target>|all <time>|-1 <command>[ <argument>]&#xA;&#xA;Parse error, at least 3 arguments were expected, only 1 given in string &#x27;ats,IMG_4137,cats_2,0:00:10,0:00:40,0:00:30,0:00:03,none,,&#x27;&#xA;[swscaler @ 0x7fd3fc953400] deprecated pixel format used, make sure you did set range correctly&#xA;Output #0, image2, to &#x27;cats/cats_IMG_3460_%03d.jpg&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf58.29.100&#xA;    Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 1080x1920, q=2-31, 200 kb/s, 0.50 fps, 0.50 tbn, 0.50 tbc (default)&#xA;    Metadata:&#xA;      handler_name    : Core Media Video&#xA;      encoder         : Lavc58.54.100 mjpeg&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1&#xA;frame=    8 fps=3.2 q=1.6 size=N/A time=00:00:16.00 bitrate=N/A speed=6.33x    0.00 bitrate=N/A speed=6.59x    &#xA;Enter command: <target>|all <time>|-1 <command>[ <argument>]&#xA;&#xA;Parse error, at least 3 arguments were expected, only 1 given in string &#x27;LUDED,,,,boring,,&#x27;&#xA;frame=   11 fps=3.0 q=2.6 L00120000000000000000000000000000size=N/A time=00:00:22.00 bitrate=N/A speed=6.06x    &#xA;video:803kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown&#xA;“AFTER FFMPEG”&#xA;“dataset and filename are “ cats/IMG_3460&#xA;“target start is “ 0:00:02&#xA;“target end is “ 0:00:24&#xA;“PRE FFMPEG”&#xA;“dataset and filename are “ IMG_4839/es123_2&#xA;“target start is “ 0:00:25&#xA;“target end is “ 0:00:20&#xA;-bash: let: secs = none*3600 &#x2B; *60 &#x2B; : syntax error: operand expected (error token is "*60 &#x2B; ")&#xA;ffmpeg version 4.2.2-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2019 the FFmpeg developers&#xA;  built with Apple clang version 11.0.0 (clang-1100.0.33.16)&#xA;  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;IMG_4839/es123_2.mp4: No such file or directory&#xA;“AFTER FFMPEG”&#xA;“dataset and filename are “ IMG_4839/es123_2&#xA;“target start is “ 0:00:25&#xA;“target end is “ 0:00:20&#xA;</argument></command></time></target></argument></command></time></target>

    &#xA;