Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (89)

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

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (10226)

  • "fmpeg" has no attribute "input"

    2 mai 2024, par Robin Singh

    I had previously built this youtube downloader but when I tested it recently ; it stopped working.

    


    from pytube import YouTube
import ffmpeg
import os

raw = 'C:\ProgramData\ytChache'

path1 = 'C:\ProgramData\ytChache\Video\\'
path2 = 'C:\ProgramData\ytChache\Audio\\'

file_type = "mp4"

if os.path.exists(path1 and path2):
    boo = True
else:
    boo = False

while boo:

    url = str(input("Link : "))
    choice = int(input('Enter 1 for Only Audio and Enter 2 For Both Audio and Video \n: '))

    video = YouTube(url)
    Streams = video.streams

    if choice == 1:
        aud = Streams.filter(only_audio=True).first().download(path2)

    elif choice == 2:
        resol = str(input("Resolution : "))
        vid = Streams.filter(res=resol, file_extension=file_type).first().download(path1)
        aud = Streams.filter(only_audio=True).first().download(path2)

        file = video.title + '.mp4'
        # location = path1
        # location2 = path2
        rem = os.path.join(path1, file)
        rm = os.path.join(path2, file)

        video_stream = ffmpeg.input(path1, video.title + '.mp4')
        audio_stream = ffmpeg.input(path2, video.title + '.mp4')
        ffmpeg.output(audio_stream, video_stream, video.title + '.mp4').run()
        os.remove(rem)
        os.remove(rm)

    else:
        print('Invalid Selection')

if not boo:
    os.mkdir(raw)
    os.mkdir(path1)
    os.mkdir(path2)


    


    so it gives an error saying :

    


    Traceback (most recent call last):&#xA;  File "E:\dev files\YouTube Video Downloader\Video Downloader.py", line 39, in <module>&#xA;    video_stream = ffmpeg.input(path1 &#x2B; video.title &#x2B; &#x27;.mp4&#x27;)&#xA;AttributeError: module &#x27;ffmpeg&#x27; has no attribute &#x27;input&#x27;&#xA;</module>

    &#xA;

    I can't figure out what happened. I think it may have something to do about the versions of ffmpeg or something ??

    &#xA;

  • Executing shell script on Google Cloud Functions

    9 juillet 2020, par João Abrantes

    I am trying to encode .mp4 videos into hls using FFmpeg.

    &#xA;

    I am using subprocess to call FFmpeg :

    &#xA;

    def transcoder(data, context):&#xA;    """Background Cloud Function to be triggered by Cloud Storage.&#xA;       This generic function logs relevant data when a file is changed.&#xA;&#xA;    Args:&#xA;        data (dict): The Cloud Functions event payload.&#xA;        context (google.cloud.functions.Context): Metadata of triggering event.&#xA;    Returns:&#xA;        None; the output is written to Stackdriver Logging&#xA;    """&#xA;    try:&#xA;        input_filename = data[&#x27;name&#x27;].split(&#x27;/&#x27;)[-1] #videos have no extension&#xA;        input_path = f&#x27;/tmp/{input_filename}&#x27;&#xA;        print(f&#x27;filename {input_filename}&#x27;)&#xA;        print(f&#x27;input_path {input_path}&#x27;)&#xA;        print(f"bucket {data[&#x27;bucket&#x27;]}")&#xA;        print(f"name {data[&#x27;name&#x27;]}")&#xA;&#xA;        outdir_path = f&#x27;/tmp/output/{input_filename}&#x27;&#xA;        os.makedirs(outdir_path, exist_ok=True)&#xA;&#xA;        bucket = client.get_bucket(data[&#x27;bucket&#x27;])&#xA;        blob = bucket.get_blob(data[&#x27;name&#x27;])&#xA;        blob.download_to_filename(input_path)&#xA;&#xA;        cmd = f&#x27;&#x27;&#x27;ffmpeg -y -i {input_path} \&#xA;              -preset ultrafast -g 60 -sc_threshold 0 \&#xA;              -map 0:0 -map 0:1 -map 0:0 -map 0:1 \&#xA;              -s:v:0 360x640 -c:v:0 libx264 -b:v:0 365k \&#xA;              -s:v:1 720x1280 -c:v:1 libx264 -b:v:1 3000k \&#xA;              -c:a copy \&#xA;              -var_stream_map "v:0,a:0 v:1,a:1" \&#xA;              -master_pl_name master.m3u8 \&#xA;              -f hls -hls_time 6 -hls_list_size 0 \&#xA;              -hls_segment_filename "{outdir_path}/%v_fileSequence%d.ts" \&#xA;              -hls_playlist_type vod \&#xA;               {outdir_path}/%v_prog_index.m3u8&#x27;&#x27;&#x27;&#xA;&#xA;        process = subprocess.Popen(cmd)&#xA;        stdout, stderr = process.communicate()&#xA;        upload_local_directory_to_gcs(outdir_path, upload_bucket, input_filename)&#xA;    except Exception as e:&#xA;        print(e)&#xA;

    &#xA;

    The problem is that I get an error :

    &#xA;

    [Errno 2] No such file or directory: &#x27;ffmpeg -y -i /tmp/video -preset ultrafast -g 60 -sc_threshold 0 -map 0:0 -map 0:1 -map 0:0 -map 0:1 -s:v:0 360x640 -c:v:0 libx264 -b:v:0 365k -s:v:1 720x1280 -c:v:1 libx264 -b:v:1 3000k -c:a copy -var_stream_map "v:0,a:0 v:1,a:1" -master_pl_name master.m3u8 -f hls -hls_time 6 -hls_list_size 0 -hls_segment_filename "/tmp/output/video/%v_fileSequence%d.ts" -hls_playlist_type vod /tmp/output/video/%v_prog_index.m3u8&#x27;: &#x27;ffmpeg -y -i /tmp/video -preset ultrafast -g 60 -sc_threshold 0 -map 0:0 -map 0:1 -map 0:0 -map 0:1 -s:v:0 360x640 -c:v:0 libx264 -b:v:0 365k -s:v:1 720x1280 -c:v:1 libx264 -b:v:1 3000k -c:a copy -var_stream_map "v:0,a:0 v:1,a:1" -master_pl_name master.m3u8 -f hls -hls_time 6 -hls_list_size 0 -hls_segment_filename "/tmp/output/video/%v_fileSequence%d.ts" -hls_playlist_type vod /tmp/output/video/%v_prog_index.m3u8&#x27;&#xA;

    &#xA;

    But I know that the input files and the output files do exist because I debugged that using print(os.listdir(path)) so now I am wondering if the FFmpeg I call with subprocess has access to the /tmp folder..?

    &#xA;

    I know that there is a Python FFmpeg library I could use, but I don't know how to run my FFmpeg command using that library. Can you help ?

    &#xA;

    p.s. I can run this locally with success.

    &#xA;

  • Anomalie #2866 : SPIP sous estime les visites de 30 à 50% par rapport à Google Analytics

    16 mai 2013, par cedric -

    Pour info tu dis Après consultation auprès d’autres utilisateurs, il semblerait que le même problème survienne. mais je n’ai aucune trace d’autre retour dans ce sens, au contraire : http://forum.spip.net/fr_247990.html