Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (60)

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

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (10642)

  • How do I combine PyTube audio and video streams in a Flask app and let the user download as one file without storing on the web server ?

    10 avril 2022, par AJB9384

    I'm building a YouTube downloader as a side project in Flask. It allows users to input a url and download the video without storing anything on the server I'm hosting on

    


    Lower quality videos can be sent to the user easily as they from PyTube as one file. I use the code below :

    


    import os
import flask
from flask import redirect, url_for, session, send_file
import requests

import pytube
from pytube import YouTube
from io import BytesIO

@app.route('/pull_videos', methods = ['GET', 'POST'])
def pull_videos(): 
  buffer=BytesIO()
  yt_test=YouTube('https://www.youtube.com/watch?v=NNNPgIfK2YE')
  video = yt_test.streams.get_by_itag(251)

  video.stream_to_buffer(buffer)
  buffer.seek(0)

  return send_file(buffer, as_attachment=True, download_name="Test video")


    


    However, I struggle when trying to pull in higher quality videos as they come in as separate audio and videos streams (see documentation here : https://pytube.io/en/latest/user/streams.html#)

    


    I am trying to use ffmpeg to combine the two and then send to the user, but the code below isn't working as expected and throws an error :

    


    Code :

    


    import os
import flask
from flask import redirect, url_for, session, send_file
import requests
import ffmpeg

import pytube
from pytube import YouTube
from io import BytesIO

@app.route('/pull_videos', methods = ['GET', 'POST'])
def pull_videos(): 
  buffer=BytesIO()
  
  video = yt_test.streams.get_by_itag(137)
  input_video = ffmpeg.input(video)
  
  audio = yt_test.streams.get_by_itag(137)
  input_audio = ffmpeg.input(audio)
  
  combined = ffmpeg.concat(input_video, input_audio, v=1, a=1)
  combined.stream_to_buffer(buffer)
  buffer.seek(0)

  return send_file(buffer, as_attachment=True, download_name="Test video")


    


    Error : AttributeError : 'FilterableStream' object has no attribute 'stream_to_buffer'

    


    How could I combine these audio and video streams from PyTube into one file for the user to download without storing on the server ?

    


  • libavutil/hwcontext_qsv : Align width and heigh when download qsv frame

    6 avril 2022, par Wenbin Chen
    libavutil/hwcontext_qsv : Align width and heigh when download qsv frame
    

    The width and height for qsv frame to download need to be
    aligned with 16. Add the alignment operation.
    Now the following command works :
    ffmpeg -hwaccel qsv -f rawvideo -s 1920x1080 -pix_fmt yuv420p -i \
    input.yuv -vf "hwupload=extra_hw_frames=16,format=qsv,hwdownload, \
    format=nv12" -f null -

    Signed-off-by : Wenbin Chen <wenbin.chen@intel.com>
    Signed-off-by : Haihao Xiang <haihao.xiang@intel.com>

    • [DH] libavutil/hwcontext_qsv.c
  • I download audio files but in m3u8 format. How to convert to mp3 ?

    26 mai 2022, par Александр Кузнецов

    I download audio files but in m3u8 format. How to convert to mp3 ? tried with ffmpeg. But nothing is downloading at the output, and only some strange characters are visible in the console.

    &#xA;

    def vk_music_get(login,password):&#xA;&#xA;    vk_session = vk_api.VkApi(login=login, password=password)&#xA;    vk_session.auth(token_only=False)&#xA;    vk_session.get_api()&#xA;    vk_aud = vk_api.audio.VkAudio(vk_session)&#xA;    for i in vk_aud.get():&#xA;        print(i)&#xA;        music_name = i[&#x27;artist&#x27;]&#xA;        urllib.request.urlretrieve(i[&#x27;url&#x27;], f&#x27;\\Users\\AlexK\\PycharmProjects\\MyArchive\\music_vk\\{music_name}.m3u8  &#x27;)&#xA;    print(&#x27;VK Download Success! ^_^&#x27;)&#xA;

    &#xA;

    When I try ffmpeg, I get these characters

    &#xA;

    enter image description here

    &#xA;