Recherche avancée

Médias (91)

Autres articles (84)

  • 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

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 is the first MediaSPIP stable release.
    Its official release date is June 21, 2013 and is announced here.
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

Sur d’autres sites (8072)

  • 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
  • Download hls m3u8 stream with ffmpeg comes only with video - no audio

    20 avril 2022, par Arthur Meier

    I want to download a hls m3u8 stream from an internet source. I was able to get the video as mp4-file. But there is no audio. I've tried already serveral ffmpeg instructions in the windows terminal but with no success. I've change from power shell to cmd and use some of this

    &#xA;

    ffmpeg -i https://dms.redbull.tv/v4/dms/media/stv/AAEJ0EHC58GGJY1D7GWS/640x360@971824/personal_computer/chrome/at/playlist.m3u8 -c:v copy -c:a copy -t 30 -bsf:a aac_adtstoasc output.mp4

    &#xA;

    or

    &#xA;

    ffmpeg.exe -i "https://dms.redbull.tv/v4/dms/media/stv/AAEJ0EHC58GGJY1D7GWS/640x360@971824/personal_computer/chrome/at/playlist.m3u8" -map -codec:a libmp3lame -b:a 96k -bsf:a aac_adtstoasc -c copy output.mp4

    &#xA;

    The m3u8 addresses I've got using the browser tools for developers from firefox by searching in the network analysis.

    &#xA;

    I also tried to get the video converted and saved with vlc - but also had no success. For the profile, I tried "Video - H.264 + MP3 (MP4)" with the setting "Keep original audio track". But also with other choices, I have had no success.

    &#xA;

    I hope someone here has a working solution :-))

    &#xA;