Recherche avancée

Médias (91)

Autres articles (79)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

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

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

Sur d’autres sites (14278)

  • ffmpeg - maintain video quality as I apply multi-pass workflow, each includes decoding and encoding again, in video editing

    27 septembre 2020, par QRrabbit

    I'm using FFMPEG libraries do do some video manipulation, and due to complexity of filters and image overlaying, I have to run the process in multiple passes.
This means, my process is as such :
Open original video, decode it, run -complex_filter, recompress the video in whichever format the original video was encoded.
Open the output from the first pass, run another -complex_filter, etc-etc.
Sometimes I have to do the above 3-4 times. My concern is that the video, with every compression is losing quality - obvious signs of that is the file is shrinking in size with every pass.

    


    With the above, I have two questions :

    


      

    1. Would it make sense to, after first manipulation, instead of saving the video in its original format, I chose some format that is lossless, and then perform my passes one after the other, knowing that the quality remains the same, then on the final pass I recompress one-time into the format of the source. If so, what format of a video would you recommend ? ProRes 4444 ? Any other formats I shell consider ? Any parameters I should set and carry-over from encoding to encoding ?

      


    2. 


    3. With every step I carry over all extra streams of audio and other meta data.
Wouldn't it be more efficient to strip everything except the video, run my video passages over and over and not to need for adding -c:a copy and c:s copy ? Then on my final run, merge all streams from the original source to the output file ? If yes, how will I carry the ffmpeg command specifically ? I have a video that has 1 video stream + 15 audio streams + some extra tmcd which my ffmpeg cannot read.

      


    4. 


    


    Thank you.

    


    Edit 1 :

    


    if the input video has a video codec = dvvideo, and if dimensions of the video is 1280x1080, that means the video doesn't have a typical square pixels.
I first need to resize the video, in doing so I scale the video up. Then I can run my filters :

    


    pass-1 : -vf scale=1920x1080 (this step is skipped if the video is of a normal x to y ratio)
pass-2 : -filter_complex : which calls my special filter that adds some proprietary watermark to a video
pass-3 : -filter_complex : "0overlay=5:21:enable='between(t,2,3)+between(t,4,5)+between(t,6,8)'" (sole objective is to inserts an icon.png at a location near where the watermark was placed in previous step.)
pass-4 : -vf scale=1280x1080 (this step scales the video back, if pass-1 was executed)

    


    I could probably rewrite my 'C' filter code at some point in the future to accommodate this logic of checking for 1280x1080, as well as inserting this icon.png, and do it all in one step, but for right now, I thought just using 2-step process if a normal video, or a 4 passes if needs scaling, and utilize something of a lossless format as a temp file solution (I arbitrary chose ProRes 4444 v5, but open to suggestions), should minimize the losses during recompression to the video.

    


    Steps 1 and 4 are conditional, and only applicable if :&#xA;if vcodec == 'dvvideo' and aspect_ratio < 1.2 : # 1280x1080 ratio has about 1.16&#xA;I run steps 1->4. Otherwise only steps 2 & 3 :

    &#xA;

    Step1 :

    &#xA;

    ffmpeg -i in.mov -vf scale=1920x1080 -map 0:v? -map 0:a? -map 0:s? -map_metadata 0 -b:v 115084915 -maxrate 115084915 -minrate 115084915 -c:v prores_ks -profile:v 5 -preset ultrafast -crf 0 -c:a copy -timecode 00:00:00.00 -c:s copy -y step2.mov&#xA;

    &#xA;

    Step2 :

    &#xA;

    ffmpeg -i step2.mov -filter_complex " myFilter=enable=&#x27;between(t,0,30)&#x27;:x=15:y=25:size=95:etc-etc..." -map 0:v? -map 0:a? -map 0:s? -map_metadata 0 -b:v 115084915 -maxrate 115084915 -minrate 115084915 -c:v prores_ks -profile:v 5 -preset ultrafast -crf 0 -c:a copy -timecode 00:00:00.00 -c:s copy -y step3.mov&#xA;

    &#xA;

    Step3 :

    &#xA;

    ffmpeg -i step3.mov -i icon.png -filter_complex "[0][1]overlay=15:20:enable=&#x27;between(t,1,3.600)&#x2B;between(t,4,5.500)&#x2B;between(t,6,20)&#x27; " -map 0:v? -map 0:a? -map 0:s? -map_metadata 0 -b:v 115084915 -maxrate 115084915 -minrate 115084915 -c:v prores_ks -profile:v 5 -preset ultrafast -crf 0 -c:a copy -timecode 00:00:00.00 -c:s copy -y step4.mov&#xA;

    &#xA;

    Step4 :

    &#xA;

    ffmpeg -i step4.mov -map 0:v? -vf scale=1280x1080 -map 0:a? -map 0:s? -c:v dvvideo -pix_fmt yuv422p -b:v 115084915 -maxrate 115084915 -minrate 115084915 -r 29.97 -top 1 -color_primaries bt709 -color_trc bt709 -colorspace bt709 -vtag dvh6 -map_metadata 0 -c:a copy -timecode 00:00:00.00 -c:s copy -y final-output.mov&#xA;

    &#xA;

    Since I post my entire set of ffmpeg commands, maybe someone could recommend how to make my output match input so that I don't lose timecode entry :input is on the left panel, my output is on the right

    &#xA;

  • FFPMEG : stream local file to UDP address, make client aware about video length and current frame time offset (make stream seekable ?)

    10 décembre 2014, par klim

    Just started to use FFMPEG. This is a really great library which is capable of video life transcoding and streaming.

    I use following commands to transcode and stream local video file to UDP address :
    ffmpeg -y -re -i inputvideo.mpeg2 -vsync 1 -vcodec mpeg4 -b 1600k -r 15 -crf 20 -acodec aac -ar 44100 -strict -2 -f mpegts udp ://192.168.1.30:1234

    It works smooth. I can open this udp address in VLC player and play life stream.

    Does anybody know how to make client aware about video duration and current time stamp ?

    Ideally would be nice to make stream seekable, as far as I understand it is not possible, but at least I would like to tell VLC client the total duration of the video and current frame time stamp, so it could show the progress.

    Thanks.

  • Problems with video length when join video file using ffmpeg concat [migrated]

    27 décembre 2013, par nhanpt

    I have 3 videos, open.avi :duration 0:46:37.885933 , middle.avi : 0:02:56.991927, fin.avi : 0:02:48.199268.
    I try to concat 3 videos using command :

    ffmpeg -i "concat:fin.avi|open.avi|middle.avi" -preset ultrafast -c copy -y vide.avi

    ffmpeg version 1.2.4 Copyright (c) 2000-2013 the FFmpeg developers
    built on Oct 16 2013 22:38:01 with gcc 4.8.1 (GCC) 20130603 (Red Hat 4.8.1-1)
    configuration : —prefix=/usr —bindir=/usr/bin —datadir=/usr/share/ffmpeg —incdir=/usr/include/ffmpeg —libdir=/usr/lib —mandir=/usr/share/man —arch=i686 —optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector —param=ssp-buffer-size=4 -grecord-gcc-switches -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables' —enable-bzlib —disable-crystalhd —enable-frei0r —enable-gnutls —enable-libass —enable-libcelt —enable-libdc1394 —disable-indev=jack —enable-libfreetype —enable-libgsm —enable-libmp3lame —enable-openal —enable-libopencv —enable-libopenjpeg —enable-libopus —enable-libpulse —enable-libschroedinger —enable-libspeex —enable-libtheora —enable-libvorbis —enable-libv4l2 —enable-libvpx —enable-libx264 —enable-libxvid —enable-x11grab —enable-avfilter —enable-avresample —enable-postproc —enable-pthreads —disable-static —enable-shared —enable-gpl —disable-debug —disable-stripping —shlibdir=/usr/lib —cpu=i686 —enable-runtime-cpudetect
    libavutil 52. 18.100 / 52. 18.100
    libavcodec 54. 92.100 / 54. 92.100
    libavformat 54. 63.104 / 54. 63.104
    libavdevice 54. 3.103 / 54. 3.103
    libavfilter 3. 42.103 / 3. 42.103
    libswscale 2. 2.100 / 2. 2.100
    libswresample 0. 17.102 / 0. 17.102
    libpostproc 52. 2.100 / 52. 2.100
    Input #0, avi, from 'concat:fin.avi|open.avi|middle.avi' :
    Duration : 00:02:48.20, start : 0.000000, bitrate : 28159 kb/s
    Stream #0:0 : Video : mjpeg (MJPG / 0x47504A4D), yuvj422p, 640x480, 11.20 tbr, 11.20 tbn, 11.20 tbc
    Output #0, avi, to 'vide.avi' :
    Metadata :
    ISFT : Lavf54.63.104
    Stream #0:0 : Video : mjpeg (MJPG / 0x47504A4D), yuvj422p, 640x480, q=2-31, 11.20 tbn, 11.20 tbc
    Stream mapping :
    Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    frame=27988 fps=2386 q=-1.0 Lsize= 578159kB time=00:41:38.70 bitrate=1895.5kbits/s
    video:577498kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.114549%

    When I change the oder of input video :

    Input #0, avi, from &#39;concat:open.avi|middle.avi|fin.avi&#39;:

    Duration : 00:46:37.89, start : 0.000000, bitrate : 1692 kb/s
    Stream #0:0 : Video : mjpeg (MJPG / 0x47504A4D), yuvj422p, 640x480, 8.61 tbr, 8.61 tbn, 8.61 tbc
    Output #0, avi, to 'vide.avi' :
    Metadata :
    ISFT : Lavf54.63.104
    Stream #0:0 : Video : mjpeg (MJPG / 0x47504A4D), yuvj422p, 640x480, q=2-31, 8.61 tbn, 8.61 tbc
    Stream mapping :
    Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    frame=27988 fps=2343 q=-1.0 Lsize= 578159kB time=00:54:11.01 bitrate=1456.9kbits/s
    video:577498kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.114549%

    What can I do to fix it ?