Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (66)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

  • Sélection de projets utilisant MediaSPIP

    29 avril 2011, par

    Les exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
    Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
    Ferme MediaSPIP @ Infini
    L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (5397)

  • ffmpeg status & quality / cuda (CPU/GPU)

    18 juin 2024, par cocco

    ffmpeg am I doing it right ?

    


    So much time has passed since I use ffmpeg to convert clips on my home web server, now that mp4 (h264 & aac) is the current overall standard (works on every console, smartphone, smartTV, pc) I decided to convert my old clips from various digital cameras to to this new container/codecs.

    


      

    1. less space & the same quality.
    2. 


    3. compatibility
    4. 


    5. support for tags (subler for mac)
    6. 


    


    after some research I opted for ffmpeg because of various reasons

    


      

    1. commandline (I made my simple web interface with default settings which I execute with php's exec)
    2. 


    3. the quality/size amount
    4. 


    


    I read that many expensive video conversion software programs are not able to handle low bitrate videos properly. I also tested some of them and personally I could not find the proper export settings or I was not impressed by the results... some had fixed default export settings, most had a lower video quality at the same filesize. ffmpeg allows me to set the -crf (18-24 usually) and -preset (veryslow, fast..) which allows me to reduce the filesize drastically maintaining the same visible quality.

    


    Said that I'm using the preset at very slow (there is also placebo but the final video file is only 1% smaller in size).

    


    And here is the command I use

    


    ffmpeg
-y //overwrite the file if it exists

-i INPUTFILE // replace with the input file

-metadata title=THETITLE // set a nice title, visible on modern devices
-metadata date=THEDATE // set a nice title, visible on modern devices

-c:v libx264 // use the h264 codec
 -crf 21 // try different numbers between 18-26
 -preset veryslow // placebo,slow,fast,ultrafast==big file 
 -tune film // tune it a little
 -pix_fmt yuv420p // preferred on most modern devices
 -profile:v main // preferred on most modern devices
 -level 3.1 // preferred on most modern devices 
 -refs 4 // preferred on most modern devices

-c:a libfdk_aac // use aac
 -metadata:s:a language=eng // set a language, visible on modern devices 
 -b:a 128k // audio bitrate 128k is like mp3 192k
 -ar 48000 // 44100 ... whatever
 -ac 2 // audiochannels
 -movflags +faststart //move the metadata in the front of the video so it loads faster

OUTPUTFILE


    


    Some camcorder clips with m2ts already have the avc/h264 compatible codec so I just copy the stream.
    
some have the ac3/Dolby surround audio. I convert the audio but keep the ac3 as second audio track mapping the ffmpeg streams. this allows me to watch the mp4 on browsers and mobile devices but I'm able to keep the surround sound to playback on some tv's, advanced media players or devices like apple tv.

    


    Not that I'm not happy with the speed (using quad core's) but I recently read again about cuda opencl and there is also the simple fact that I'm not using other converters than ffmpeg since a lot of time.

    


    Is ffmpeg (with the setting I use) a good converter to keep the same video quality than the source reducing the space occupied by and average of 30-40% ?

    


    Is GPU conversion really that bad (cuda .. testing a gtx970) ?
it would be nice to add some more speed to the conversions by using both the gpu and the cpu..but for my understanding they cannot work together ??? and using only GPU is a drastically quality loss...cpu is more precise, GPU is faster in calculation are too imprecise from what I read.. so expensive software programs use cuda only for preview purpose... right ?

    


    Is ffmpeg or another software compatible with CPU+GPU encoding ?
I really don't remember where, but I read that the ffmpeg is not a good videoconverter.

    


    I'm really happy with the size/quality, I gained an average of 30% in space with no visible quality loss. With some extra parameters i can adjust some really old analog videos that are deinterlaced in a really bad way.

    


    


    maybe I could gain more size/quality with another software ???

    


    


    note : I like ffmpeg.it's free and it has commandline so I can create my own interface with php html & js and use it on various machines without the need to install it in every device I use. I upload the idevice clips directly to the ffmpeg server.

    


    EDIT :

    


    @talonmies ...cuda tag removed :

    


    http://www.nvidia.com/object/cuda_home_new.html

    


    


    CUDA® is a parallel computing platform and programming model invented
by NVIDIA. It enables dramatic increases in computing performance by
harnessing the power of the graphics processing unit (GPU). With
millions of CUDA-enabled GPUs sold to date, software developers,
scientists and researchers are finding broad-ranging uses for GPU
computing with CUDA. Here are a few examples : - See more at :
http://www.nvidia.com/object/cuda_home_new.html#sthash.dEYaqae7.dpuf

    


    


    isn't cuda the programming model that a theoretical ffmpeg library should support to handle GPU encoding on nvidia cards like the gtx 970 ?? like the badaboom software http://www.geforce.com/games-applications/pc-applications/badaboom-media-converter.

    


  • nodejs fluent-ffmpeg process is too slow

    22 août 2021, par snovosel

    I'm attempting to run the following ffmpeg command using fluent-ffmpeg and locally this command will take between 5-10 seconds. I have the same service deployed to a digital ocean server with 4CPU and 32GB of RAM as a test and the command will hang for sometimes up to 40 minutes. I'm uploading files 15mb-50mb in size as .mov files or .mp4 files. In all cases this has been too slow to be feasible... How can I begin to debug this ?

    


    const handleVideoResize = async (filePath) => {
  try {
    const { height, width } = await getVideoDimensions(filePath); // ffmpeg probe to get the dimensions

    const newWidth = 423;
    const newHeight = 534;

    const x = width - (newWidth / newHeight) * height;

    const destFilePath = path.resolve(`./tmp/final-${uuidv4()}.webm`);

    const outputStream = fs.createWriteStream(destFilePath);

    FFmpeg()
      .input(filePath)
      .input(path.resolve("assets/watermark.png"))
      .complexFilter([
        `[0]crop=${width - x}:${height},scale=${newWidth}:${newHeight}[a]`,
        "[1]scale=iw*0.2:-1[wm];[a][wm]overlay=x=(W-w)-15:y=(H-h)-15",
        `colorchannelmixer=aa=0.6[1]`
      ])
      .format("webm")
      .outputFormat("webm")
      .on("start", () => {
        printText("ffmpeg child process spawned ---");
      })
      .on("end", () => {
        printText("video stream finished");
      })
      .on("error", err => {
        printError("err ffmpeg", err);
      })
      .output(outputStream)
      .run();
  } catch (error) {
    printError("error handle video resize", error);
    return;
  }
};


    


  • Youtube stream of looping JPG stops randomly

    6 juillet 2021, par timw99

    Hi I'm fairly new at ffmpeg.

    


    I'm currently trying to get a low FPS Youtube stream working over RTMP using a JPG on loop which content gets changed using a NodeJS script periodically. I'm using the following command to stream (variable 3 is my stream key) :

    


    ffmpeg -re -loop 1 -pix_fmt bgr24 -framerate 5 -i img/now.jpg -re -stream_loop -1 -i output.mp3 -f flv -vcodec libx264 -profile:v main -g 60 -keyint_min 30 -b:v 400k -minrate 400k -maxrate 400k -preset ultrafast -tune zerolatency -bufsize 2000k rtmp://a.rtmp.youtube.com/live2/$3


    


    There's multiple things wrong here. The bitrate doesn't actually stay at 400k/s. It just goes to around 200-1000k and then just starts decreasing until the stream stops (usually at around 200-300k bitrate). It still seems like data is being sent (bitrate and current FPS are still updated (though they're very low) and speed goes parabolic. The frame counter itself just stops and Youtube doesn't continue streaming. See example :

    


    frame=  515 fps=5.0 q=12.0 size=    5803kB time=00:01:42.84 bitrate= 462.3kbits/
frame=  518 fps=5.0 q=11.0 size=    5824kB time=00:01:43.41 bitrate= 461.3kbits/
frame=  519 fps=5.0 q=11.0 size=    5838kB time=00:01:43.92 bitrate= 460.2kbits/
frame=  519 fps=5.0 q=11.0 size=    5838kB time=00:01:44.42 bitrate= 457.9kbits/
frame=  519 fps=4.9 q=11.0 size=    5838kB time=00:01:44.92 bitrate= 455.8kbits/
frame=  519 fps=4.9 q=11.0 size=    5838kB time=00:01:45.43 bitrate= 453.6kbits/
frame=  519 fps=4.9 q=11.0 size=    5838kB time=00:01:45.93 bitrate= 451.4kbits/
frame=  519 fps=4.9 q=11.0 size=    5838kB time=00:01:46.44 bitrate= 449.3kbits/
frame=  519 fps=4.8 q=11.0 size=    5838kB time=00:01:46.94 bitrate= 447.2kbits/
frame=  519 fps=4.8 q=11.0 size=    5838kB time=00:01:47.44 bitrate= 445.1kbits/
frame=  519 fps=4.8 q=11.0 size=    5838kB time=00:01:47.95 bitrate= 443.0kbits/
frame=  519 fps=4.8 q=11.0 size=    5838kB time=00:01:48.45 bitrate= 440.9kbits/
frame=  519 fps=4.8 q=11.0 size=    5838kB time=00:01:48.96 bitrate= 438.9kbits/
frame=  519 fps=4.7 q=11.0 size=    5838kB time=00:01:49.46 bitrate= 436.9kbits/
frame=  519 fps=4.7 q=11.0 size=    5838kB time=00:01:49.96 bitrate= 434.9kbits/
frame=  519 fps=4.7 q=11.0 size=    5838kB time=00:01:50.44 bitrate= 433.0kbits/
frame=  519 fps=4.7 q=11.0 size=    5838kB time=00:01:50.95 bitrate= 431.0kbits/
frame=  519 fps=4.7 q=11.0 size=    5838kB time=00:01:51.45 bitrate= 429.1kbits/
frame=  519 fps=4.6 q=11.0 size=    5838kB time=00:01:51.96 bitrate= 427.1kbits/
frame=  519 fps=4.6 q=11.0 size=    5838kB time=00:01:52.46 bitrate= 425.2kbits/
frame=  519 fps=4.6 q=11.0 size=    5838kB time=00:01:52.99 bitrate= 423.2kbits/


    


    I'm using a Digital Ocean VPS to run it, but the same happens on my own desktop which definitely has the hardware for a simple stream like this. Could it have something to do with me replacing the JPG content while trying to stream it ? I get this error every once in a while, but it seems like it fixes itself judging by the info :

    


    [mjpeg @ 0x562824d1fb40] overread 8
[mjpeg @ 0x562824d1fb40] EOI missing, emulating


    


    I can provide more information if it's needed. Thanks in advance.