Recherche avancée

Médias (1)

Mot : - Tags -/illustrator

Autres articles (54)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (8115)

  • 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


    


  • ffmpeg options to stream to Youtube

    24 octobre 2022, par David Goncalves

    Please bear with me as I don't really understand most of the commands behind ffmpeg.

    


    I am using this code to live stream from a raspberry 4B with a USB Logitech C920 to YouTube :
ffmpeg -re -f s16le -i /dev/zero -f v4l2 -thread_queue_size 512 -codec:v h264 -s 1920x1080 -i /dev/video0 -codec:v copy -acodec aac -b:v 128k -g 60 -f flv rtmp ://a.rtmp.youtube.com/live2/[key]

    


    The streaming works but I get the following error in the command line :
Non-monotonous DTS in output stream 0:0 ; previous : 0, current : -167 ; changing to 0. This may result in incorrect timestamps in the output file.

    


    I also get this error in Youtube studio :
Please use a keyframe frequency of four seconds or less. Currently, keyframes are not being sent often enough, which can cause buffering. The current keyframe frequency is 8.0 seconds. Note that ingestion errors can cause incorrect GOP (group of pictures) sizes.
Any help ?

    


  • FFMPEG : Reducing bandwidth usage while trimming youtube audio

    24 octobre 2022, par nash

    I have created a python script which creates audio trims of youtube videos using ffmpeg.

    


    The script works fine for small videos of about <20m, however my intention is to use this for large videos most of which are several hours long.&#xA;It appears ffmpeg may be streaming the entire audio while seeking the trim points, not only is this slow but it adds a lot of unnecessary network overhead, especially since the trims I'm making are barely a minute long.

    &#xA;

    Here is the script :

    &#xA;

    from yt_dlp import YoutubeDL as ydl&#xA;import ffmpeg, sys, getopt&#xA;&#xA;&#xA;default_url = "https://youtu.be/FtutLA63Cp8"&#xA;default_start = "6"&#xA;default_end = "36"&#xA;&#xA;&#xA;def get_secs(time_str) -> int:&#xA;&#xA;    h = "0"&#xA;    m = "0"&#xA;    s = "0"&#xA;&#xA;    time_hms = time_str.split(":")&#xA;&#xA;    if len(time_hms) == 1:&#xA;        s = time_hms[0]&#xA;    elif len(time_hms) == 2:&#xA;        m, s = time_hms&#xA;    elif len(time_hms) == 3:&#xA;        h, m, s = time_hms&#xA;&#xA;    secs = (int(h) * 3600) &#x2B; (int(m) * 60) &#x2B; int(s)&#xA;    return secs&#xA;&#xA;&#xA;# Extract Url&#xA;def get_url(url):&#xA;&#xA;    ydl_opts = {}&#xA;    info = ydl(ydl_opts).extract_info(url, download=False)  # dict of lists&#xA;    # info = ydl.sanitize_info(info)&#xA;&#xA;    title = info["title"].strip() &#x2B; ".mp4"&#xA;&#xA;    formats = info["formats"]  # list of dicts&#xA;    audio_direct_url = ""&#xA;    for format in formats:&#xA;        if format["audio_ext"] != "none":&#xA;            audio_direct_url = format["url"]&#xA;            break&#xA;&#xA;    # return r["formats"][-1]["url"]&#xA;    return audio_direct_url, title&#xA;&#xA;&#xA;def snip_url(url, title, start, end):&#xA;    input = ffmpeg.input(url)&#xA;    pts = "PTS-STARTPTS"&#xA;    audio = input.filter_("atrim", start=start, end=end).filter_("asetpts", pts)&#xA;    out = ffmpeg.output(audio, ("out/" &#x2B; title))&#xA;&#xA;    return ffmpeg.run(out)&#xA;&#xA;&#xA;def mince():&#xA;    pass&#xA;&#xA;&#xA;def main(argv):&#xA;    usage_str = "main.py -u <url> -o <outputfile> -s <starttime> -t <stoptime>"&#xA;    target_url = ""&#xA;    out_filename = ""&#xA;    start_time = default_start&#xA;    stop_time = default_end&#xA;&#xA;    try:&#xA;        opts, args = getopt.getopt(&#xA;            argv, "hu:o:s:t:", ["url=", "ofile=", "start=", "terminate="]&#xA;        )&#xA;&#xA;    except getopt.GetoptError:&#xA;        print(usage_str)&#xA;        sys.exit(2)&#xA;&#xA;    for opt, arg in opts:&#xA;        if opt == "-h":&#xA;            print(usage_str)&#xA;            sys.exit()&#xA;        elif opt in ("-u", "--url"):&#xA;            target_url = arg&#xA;        elif opt in ("-o", "--ofile"):&#xA;            out_filename = arg&#xA;        elif opt in ("-s", "--start"):&#xA;            start_time = arg&#xA;        elif opt in ("-t", "--terminate"):&#xA;            stop_time = arg&#xA;&#xA;        if target_url == "":&#xA;            print(usage_str)&#xA;            sys.exit(2)&#xA;&#xA;        # URLs may have seperators, remove them&#xA;        target_url = target_url.rsplit("?")[0]&#xA;&#xA;    stream_url, title = get_url(target_url)&#xA;    if out_filename != "":&#xA;        title = out_filename&#xA;    start_time = get_secs(start_time)&#xA;    stop_time = get_secs(stop_time)&#xA;    snip_url(stream_url, title, start_time, stop_time)&#xA;&#xA;&#xA;if __name__ == "__main__":&#xA;&#xA;    main(sys.argv[1:])&#xA;</stoptime></starttime></outputfile></url>

    &#xA;

    There is a similar question on this site, however this involves grabbing still frames and not audio sections.

    &#xA;

    I have also looked through both theffmpeg-python and regular ffmpeg documentation and not found anything relevant.

    &#xA;

    Is there a way to get ffmpeg to 'skip' to the desired trim position without streaming the entire audio ? Preferrably using the ffmpeg-python library.

    &#xA;

    If not, are there ways I can reduce the bandwidth overhead and/or speed up this process.

    &#xA;

    I am also open to using other software (preferrably python libraries) similar to ffmpeg that can achieve the same task.

    &#xA;