Recherche avancée

Médias (91)

Autres articles (96)

  • Configuration spécifique d’Apache

    4 février 2011, par

    Modules spécifiques
    Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
    Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
    Création d’un (...)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (6866)

  • Python code to download hls stream to mp4

    2 décembre 2024, par Maad A.Galil

    I wrote the following code to download a video from a website. Chrome extensions can detect the video and download it. However, my code gets the following errors. Any help ?

    


    from bs4 import BeautifulSoup
import requests
from subprocess import check_output

video_url = 'https://www.dimakids.com/ab6al-aldigetal-s3-1415387355-21011.html#sets'
headers = {'User-Agent': 'Mozilla/5.0'}

url = requests.get(video_url, headers=headers)
page = url.content
soup = BeautifulSoup(page, "html.parser")

result = str(soup.find_all('video')[0])
result = result.split('src="')[1].split('" type=')[0] 
print(result)

# seg = requests.get(result)
# """
# Error: requests.exceptions.SSLError: HTTPSConnectionPool(host='stream.foupix.com', port=443): Max retries exceeded with url: /animeios/1415387355/ab6al_aldigetal_s3_01.mp4/index.m3u8?tkn=jja4Czj-AzbJx1JmvDvQeA&tms=1733079050 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')))
# """
# print(seg)


print(check_output(f'ffmpeg -i "{result}" -codec copy file.mp4', shell=True))
"""
Error: https://stream.foupix.com/animeios/1415387355/ab6al_aldigetal_s3_01.mp4/index.m3u8?tkn=SWf7n3qH8MwFLlq18wngIQ&tms=1733079103: Server returned 403 Forbidden (access denied)
"""


    


    The link works as any hls downloader can capture the video and download it as seen here (of course token and timestamp values change everytime it captures the video) :

    


    Page URL https://www.dimakids.com/ab6al-aldigetal-s3-1415387355-21011.html#sets

    


    Thumbnail https://www.dimakids.com/images/anime/cat_1415387355.jpg

    


    main url https://stream.foupix.com/animeios/1415387355/ab6al_aldigetal_s3_01.mp4/index.m3u8?tkn=6nyEskSbHBI713sG0uhZJQ&tms=1733171604

    


    video component https://stream.foupix.com/animeios/1415387355/ab6al_aldigetal_s3_01.mp4/index.m3u8?tkn=6nyEskSbHBI713sG0uhZJQ&tms=1733171604

    


  • How to download ffmpeg utilities into Python venv with pip or manual way for torchaudio

    14 décembre 2024, par Furkan Gözükara

    torchaudio requiring avutil and other binary dll files

    


    Source : https://pytorch.org/audio/2.3.0/installation.html

    


    However they given example only for Anaconda

    


    I am not using Anaconda but I am using Python 3.10.11 pip venv

    


    I can't find these DLL files anywhere

    


    How can I find and install them into Python venv ?

    


    Since I can't find, I am getting below error

    


    Traceback (most recent call last):
  File "R:\MMAudio_v1\MMAudio\venv\lib\site-packages\gradio\queueing.py", line 625, in process_events
    response = await route_utils.call_process_api(
  File "R:\MMAudio_v1\MMAudio\venv\lib\site-packages\gradio\route_utils.py", line 322, in call_process_api
    output = await app.get_blocks().process_api(
  File "R:\MMAudio_v1\MMAudio\venv\lib\site-packages\gradio\blocks.py", line 2047, in process_api
    result = await self.call_function(
  File "R:\MMAudio_v1\MMAudio\venv\lib\site-packages\gradio\blocks.py", line 1594, in call_function
    prediction = await anyio.to_thread.run_sync(  # type: ignore
  File "R:\MMAudio_v1\MMAudio\venv\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "R:\MMAudio_v1\MMAudio\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 2505, in run_sync_in_worker_thread
    return await future
  File "R:\MMAudio_v1\MMAudio\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 1005, in run
    result = context.run(func, *args)
  File "R:\MMAudio_v1\MMAudio\venv\lib\site-packages\gradio\utils.py", line 869, in wrapper
    response = f(*args, **kwargs)
  File "R:\MMAudio_v1\MMAudio\venv\lib\site-packages\torch\utils\_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "R:\MMAudio_v1\MMAudio\gradio_demo.py", line 60, in video_to_audio
    clip_frames, sync_frames, duration = load_video(video, duration)
  File "R:\MMAudio_v1\MMAudio\mmaudio\eval_utils.py", line 178, in load_video
    reader = StreamingMediaDecoder(video_path)
  File "R:\MMAudio_v1\MMAudio\venv\lib\site-packages\torio\io\_streaming_media_decoder.py", line 526, in __init__
    self._be = ffmpeg_ext.StreamingMediaDecoder(os.path.normpath(src), format, option)
  File "R:\MMAudio_v1\MMAudio\venv\lib\site-packages\torio\_extension\utils.py", line 25, in __getattr__
    self._import_once()
  File "R:\MMAudio_v1\MMAudio\venv\lib\site-packages\torio\_extension\utils.py", line 39, in _import_once
    self.module = self.import_func()
  File "R:\MMAudio_v1\MMAudio\venv\lib\site-packages\torio\_extension\utils.py", line 143, in _init_ffmpeg
    ext = _find_ffmpeg_extension(ffmpeg_vers)
  File "R:\MMAudio_v1\MMAudio\venv\lib\site-packages\torio\_extension\utils.py", line 122, in _find_ffmpeg_extension
    raise ImportError(
ImportError: Failed to intialize FFmpeg extension. Tried versions: ['6', '5', '4', '']. Enable DEBUG logging to see more details about the error.


    


  • Regarding rotation information when rotating a movie in Avfoundation

    15 août 2017, par howmanylife

    I was able to rotate the movie with the following code

    videoCompositionTrack.preferredTransform = CGAffineTransform(rotationAngle: CGFloat(M_PI_2))

    I confirmed the information of the rotated video by ffmpeg. Rotate in the tag does not fluctuate as shown below, but a tag called side_data_list was generated and the value of rotation in side_data_list fluctuated, while keeping the information of rotate in tag unchanged.I want to change "tag" information.

    "tags": {
                   "rotate": "90"
           },
    "side_data_list": [
                   {
    "rotation": -90
                   }

    Are there any good advice on AVFoundation and ffmpeg ?