Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (61)

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

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

Sur d’autres sites (11431)

  • How to get ffmpeg configuration similar to that of youtube for 480p and 1080p video ? I have got a function but the output quality is too low

    14 avril 2021, par prehistoricbeast

    Hey guys I am learning to develop a website that converts videos to youtube quality (or close enough) 480p and 1080p, I am not much familiar with ffmpeg and struggling with its documentation.

    


    I have these functions,

    


    video_480p      = subprocess.call([FFMPEG_PATH, '-i', input_file, '-codec:v', 'libx264', '-crf', '20', '-preset', 'medium',
                    '-b:v', '1000k', '-maxrate', '1000k', '-bufsize', '2000k','-vf', 'scale=-2:480', '-codec:a', 'aac', '-b:a',
                     '128k', '-strict', '-2', file_480p])


    


    similarly I have another function,

    


    new_video       = subprocess.call([FFMPEG_PATH, '-i', input_file, '-codec:v', 'libx264', '-crf', '20', '-preset', 'medium',
                    '-b:v', '1000k', '-maxrate', '1000k', '-bufsize', '2000k','-vf', 'scale=-2:1080', '-codec:a', 'aac', '-b:a',
                     '128k', '-strict', '-2', output_file])


    


    Both these functions, transcode the video, but returns low quality videos, Can anyone provide me with the right settings for 480p and 1080p which is similar or close to youtube quality ?

    


    Thanks

    


  • Why i'm failing to download mp4 file using youtube-dl in python

    9 décembre 2019, par Joao

    Python noob :(

    I created a script that downloads any youtube video.

    Then the script inserts a subtitle into the video and that works fine.

    However, I have a problem, I can’t make the script always download the video in mp4. Most of the time it is downloaded in mkv and i can’t understand why that happens and how can I change the code in order to always download the video in the format I prefer.

    The function in charge to download the video is this one :

    def video_download():
       #global resolution
       try:
           print(linkvideo)
           ydl_opts = {
               'format': 'bestvideo[ext=mp4]+bestaudio/best',
               'outtmpl': video_id+"."+'%(ext)s'
               #'bestvideo': 'mp4',
               #'bestaudio': 'm4a',
               #'ext': 'mp4'
           }
           with youtube_dl.YoutubeDL(ydl_opts) as ydl:
               ydl.download([linkvideo])
               result = ydl.extract_info("{}".format(linkvideo))
               title = result.get("id", None)
               videoext = result.get("ext", None)
               resolution = result.get("resolution", None)
       except:
           print("falhou")
           pass
       global ficheiro
       ficheiro2 = str(title)+"."+"mkv"
       ficheiro =""
       for i in ficheiro2:
           if (i == '"' or i =="'" or i =="/"):
               pass
           else:
               ficheiro += i

    Can any one help me ? Thanks in advance.

    I got it, thanks to everyone who tried to help me.

    The problem is this : when we try to download any video with the opts i’ve selected, youtube-dl will download the best video/audio combination in the same file, so I’ve added the following in my code :

    ytdl = YoutubeDL()
       result = ytdl.extract_info(linkvideo, download=False)
       formats = result['formats']
       formato = ""
       formatoaudio =  ""
       extaudio = ""
       for format in formats:
           if format['format_note'] == "1080p" and format['ext'] == "mp4":
               print(format)
               formato = (format['format_id'])
               break
           else:
               print("no 1080p mp4?!")

       if formato == "":
           for format in formats:
               if format['format_note'] == "720p" and format['ext'] == "mp4":
                   print(format)
                   formato = (format['format_id'])
                   break
               else:
                   print("no 720p mp4")

    Then I did the same to the sound file, checking if there is any m4a or webm sound file. To finish I’m joining both files using FFmpeg.

    Maybe this is not the best solution, but I’m still learning. :)

    Thank you all

  • ffmpeg cannot open connection tcp ://a.rtmp.youtube.com

    13 mars 2024, par Hiji Deui

    I want to live stream using ffmpeg, when live on Facebook it runs normally, but when I live on YouTube there is an error, is there anything wrong with the command I entered ? even though the command is the same as live on Facebook, but only the RTMP link has been changed

    


    

    

    ffmpeg -re -i out.mp4 -c:v copy -c:a aac -ar 44100 -ab 128k -ac 2 -strict -2 -flags +global_header -bsf:a aac_adtstoasc -bufsize 3000k -f flv "rtmp://a.rtmp.youtube.com/live2/my-key-streaming"

    


    


    



    and the output is

    


    

    

    ffmpeg version N-55112-g7eb9cf593e-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      56. 61.100 / 56. 61.100
  libavcodec     58.114.100 / 58.114.100
  libavformat    58. 64.100 / 58. 64.100
  libavdevice    58. 11.103 / 58. 11.103
  libavfilter     7. 91.100 /  7. 91.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2020-12-26T11:13:27.000000Z
    com.android.version: 10
  Duration: 00:00:03.27, start: 0.000000, bitrate: 21344 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, unknown/bt470bg/unknown), 1920x1080, 20225 kb/s, SAR 1:1 DAR 16:9, 29.99 fps, 30.01 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      rotate          : 90
      creation_time   : 2020-12-26T11:13:27.000000Z
      handler_name    : VideoHandle
    Side data:
      displaymatrix: rotation of -90.00 degrees
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 128 kb/s (default)
    Metadata:
      creation_time   : 2020-12-26T11:13:27.000000Z
      handler_name    : SoundHandle
[tcp @ 0x58bf880] Connection to tcp://a.rtmp.youtube.com:1935 failed: Connection timed out
[rtmp @ 0x5893140] Cannot open connection tcp://a.rtmp.youtube.com:1935
rtmp://a.rtmp.youtube.com/live2/my-key: Connection timed out

    


    


    



    how to fix this, btw i use vps, sorry, my english so bad and this is the first time i asked on this website