Recherche avancée

Médias (91)

Autres articles (84)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

Sur d’autres sites (6525)

  • How to encode video with ffmpeg using AMD h264_amf

    10 novembre 2022, par Ivy Growing

    Given :

    


      

    • Win10
    • 


    • AMD CPU
    • 


    • Video capturing card Avermedia Live Gamer Extreme 3
    • 


    • ffmpeg versions and encoders :
    • 


    


    >ffmpeg.exe -encoders | find "264"
ffmpeg version 5.1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
// cut
 V....D libx264              libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
 V....D libx264rgb           libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)
 V....D h264_amf             AMD AMF H.264 Encoder (codec h264)
 V....D h264_mf              H264 via MediaFoundation (codec h264)
 V....D h264_nvenc           NVIDIA NVENC H.264 encoder (codec h264)
 V..... h264_qsv             H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration) (codec h264)


    


    Required to capture the video into H.264 encoded file using AMD's hardware accelerator in the CPU (AMF, or VCE).
Tried : ffmpeg -y -f dshow -rtbufsize 2002000k -framerate 30 -i video="Live Gamer EXTREME 3"  -t 00:00:10  -c:v h264_amf output.ts
Result :

    


    Input #0, dshow, from 'video=Live Gamer EXTREME 3':
  Duration: N/A, start: 88548.973998, bitrate: N/A
  Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422(tv, bt709/bt709/unknown), 1280x720, 30 fps, 30 tbr, 10000k tbn
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_amf))
Press [q] to stop, [?] for help
[h264_amf @ 000002404328c700] DLL amfrt64.dll failed to open
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!


    


    For some reason ffmpeg uses resolution 1280x720... When trying to specifiy the capture card resolution the following error appears :

    


    >ffmpeg -y -f dshow -rtbufsize 2002000k -framerate 30 -video_size 3840x2160 -i video="Live Gamer EXTREME 3" -r 30 -t 00:00:10   -c:v h264_amf -f mpegts output.ts
//cut
[dshow @ 0000029d7c0f84c0] Could not set video options
video=Live Gamer EXTREME 3: I/O error


    


    This is not unique error for Avermedia card. The same error appears with Dell web cam and for Magewell.

    


    From this answer the extra flags to be used with h264_amf. I guessed the default values should be good enough. It seems something needs to be configured or initialized when using AMF/VCE.

    


    The video encoding in software (without AMF) works just fine but loads the CPU. The goal is using dedicated hardware module and release computational power of the CPU for the other apps.

    


    Command example will be appreciated.

    


  • ffmpeg convert images to video and add audio in one command

    9 novembre 2022, par user2108258

    I have two commands that I would like consilidate to a 1 liner.
Here are the two queries.

    


    Here are the steps i need help

    


      

    1. create a video based on a directory of jpegs
    2. 


    


    ffmpeg -f image2 -pix_fmt yuv420p -r 10 -s 1080x1920 -i 'Roach spray high-25263/%d.jpg' -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -crf 25 -vcodec h264 'Roach spray high.mp4' -y


    


      

    1. Merge audio with video from step 1
    2. 


    


    ffmpeg -stream_loop -1 -i 'Roach spray high.mp4' -i '/beats/2022/Roach spray high.mp3' -shortest -map 0:v:0 -map 1:a:0 '/videos/Roach spray high/Roach spray high.mp4' -y


    


    Is there a way to combine these two steps into 1 ?

    


  • shell script - youtube stream - ffmpeg [duplicate]

    9 octobre 2022, par CodeMaker748

    Hey guys i found that script in web and try to get it to run. But i get some errors and wounder how this happens with this script maybe someone can help me to get this script running at ubuntu.

    


    All Files are in the same directory.

    


    #! /bin/bash
VBR="1500k"
FPS="24"
QUAL="superfast"

YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
KEY="aaaa-aaaa-aaaa-aaaa-aaaa"

VIDEO_SOURCE= "./video.mp4"
AUDIO_SOURCE= "./audio.mp3" 
NP_SOURCE="./song.txt"
FONT="./ARIBL0.tff"

ffmpeg -re -f lavfi -i "movie=filename=$VIDEO_SOURCE:loop=0, setpts=N/(FRAME_RATE*TB)" -thread_queue_size 512 -i "$AUDIO_SOURCE" -map 0:v:0 -map 1:a:0 -map_metadata:g 1:g -vf drawtext="fontsize=20: fontfile=$FONT: box=0: boxcolor=black@0.5: boxborderw=20: textfile=$NP_SOURCE: reload=1: fontcolor=white@0.8: x=50: y=th" -vcodec libx264 -pix_fmt yuv420p -preset $QUAL -r $FPS -g $(($FPS * 2)) -b:v $VBR -acodec libmp3lame -ar 44100 -threads 6 -qscale:v 3 -b:a 320000 -bufsize 512k -f flv "$YOUTUBE_URL/$KEY"


    


    and i get this errors :

    


    root@v33476:~/LiveRadioScript2# bash startRadio.sh
startRadio.sh: line 9: ./video.mp4: Permission denied
startRadio.sh: line 10: ./audio.mp3: Permission denied
ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[Parsed_movie_0 @ 0x55d0e2286080] Failed to avformat_open_input ''
[lavfi @ 0x55d0e2284280] Error initializing filter 'movie' with args 'filename=:loop=0'
movie=filename=:loop=0, setpts=N/(FRAME_RATE*TB): No such file or directory