Recherche avancée

Médias (91)

Autres articles (86)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

Sur d’autres sites (5111)

  • Revision 8abd92f12f : Remove mode_skip_start and mask code for sub 8x8 This code serves no purpose in

    4 octobre 2013, par Paul Wilkins

    Changed Paths :
     Modify /vp9/encoder/vp9_rdopt.c



    Remove mode_skip_start and mask code for sub 8x8

    This code serves no purpose in the re-factored sub 8x8 code.

    Change-Id : I5364986224d1a28b71bcb046ec8557a3d14aaa47

  • I can't get my backend working with frontend in production but in local environment [duplicate]

    3 août 2024, par YouareGrouseChris

    This is the frontend code :

    


    import React, { useState } from &#x27;react&#x27;;&#xA;import axios from &#x27;axios&#x27;;&#xA;import fileDownload from &#x27;js-file-download&#x27;;&#xA;&#xA;function HomePage() {&#xA;    const [url, setUrl] = useState(&#x27;&#x27;);&#xA;    const [filename, setFilename] = useState(&#x27;&#x27;);&#xA;&#xA;    const handleSubmit = async (e) => {&#xA;        e.preventDefault();&#xA;        try {&#xA;            const response = await axios.post(&#x27;https://api-lnp5.onrender.com/api/download&#x27;, { url, filename }, { responseType: &#x27;blob&#x27; });&#xA;            fileDownload(response.data, filename);&#xA;            console.log(response.data);  // handle the response as needed&#xA;        } catch (error) {&#xA;            console.error(error);&#xA;        }&#xA;    };&#xA;&#xA;    return (&#xA;        <div classname="flex flex-col items-center justify-center h-screen overflow-hidden">&#xA;            <h1 classname="text-3xl font-bold mb-6">Download Reddit video!!!</h1>&#xA;            <form classname="flex flex-col items-center">&#xA;                <label classname="mb-4">&#xA;                    <div classname="text-lg mb-4 inline-block">Video URL:</div>&#xA;                    <div>&#xA;                        <input type="text" value="{url}" />> setUrl(e.target.value)} required &#xA;                            className="border px-3 py-2 rounded focus:outline-none focus:ring focus:border-blue-300 w-96"/>&#xA;                    </div>&#xA;                </label>&#xA;                <label classname="mb-4">&#xA;                    <div classname="text-lg mb-4 inline-block">Filename:</div>&#xA;                    <div>&#xA;                        <input type="text" value="{filename}" />> setFilename(e.target.value)} required &#xA;                            className="border px-3 py-2 rounded focus:outline-none focus:ring focus:border-blue-300 w-96"/>&#xA;                    </div>&#xA;                </label>&#xA;                <button type="submit" classname="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600">Download</button>&#xA;            </form>&#xA;        </div>&#xA;    );&#xA;}&#xA;&#xA;export default HomePage;&#xA;

    &#xA;

    This is the backend code using python fastapi :

    &#xA;

    from fastapi import FastAPI, HTTPException&#xA;&#xA;from fastapi.responses import FileResponse&#xA;from fastapi.middleware.cors import CORSMiddleware&#xA;from pydantic import BaseModel&#xA;import requests&#xA;import json&#xA;import subprocess&#xA;import os&#xA;&#xA;app = FastAPI()&#xA;&#xA;origins = [&#xA;    "https://videodownload-frontend.onrender.com",  # replace with the origin of your frontend&#xA;]&#xA;&#xA;app.add_middleware(&#xA;    CORSMiddleware,&#xA;    allow_origins=["*"],&#xA;    allow_credentials=True,&#xA;    allow_methods=["*"],&#xA;    allow_headers=["*"],&#xA;)&#xA;&#xA;class Video(BaseModel):&#xA;    url: str&#xA;    filename: str&#xA;&#xA;&#xA;def get_unique_filename(filename):&#xA;    counter = 1&#xA;    base_filename, extension = os.path.splitext(filename)&#xA;    unique_filename = filename&#xA;&#xA;    while os.path.isfile(unique_filename):&#xA;        unique_filename = f"{base_filename}({counter}){extension}"&#xA;        counter &#x2B;= 1&#xA;&#xA;    return unique_filename&#xA;&#xA;@app.post("/api/download")&#xA;async def download_video(video: Video):&#xA;    url = video.url&#xA;    filename = get_unique_filename(video.filename)&#xA;&#xA;    url &#x2B;= &#x27;.json&#x27;&#xA;    response = requests.get(url, headers={&#x27;User-agent&#x27;: &#x27;Mozilla/5.0&#x27;})&#xA;&#xA;    if response.status_code != 200:&#xA;        raise HTTPException(status_code=404, detail="Video not found")&#xA;&#xA;    json_response = json.loads(response.text)&#xA;    video_url = json_response[0]["data"]["children"][0]["data"]["secure_media"]["reddit_video"]["fallback_url"]&#xA;    audio_url = video_url.rsplit(&#x27;/&#x27;, 1)[0] &#x2B; &#x27;/DASH_audio.mp4&#x27;&#xA;&#xA;    video_response = requests.get(video_url, stream=True)&#xA;    audio_response = requests.get(audio_url, stream=True)&#xA;&#xA;    with open(&#x27;video_temp.mp4&#x27;, &#x27;wb&#x27;) as f:&#xA;        for chunk in video_response.iter_content(chunk_size=1024 * 1024):&#xA;            if chunk:&#xA;                f.write(chunk)&#xA;    if audio_response.status_code == 200:&#xA;        with open(&#x27;audio_temp.mp4&#x27;, &#x27;wb&#x27;) as f:&#xA;            for chunk in audio_response.iter_content(chunk_size=1024 * 1024):&#xA;                if chunk:&#xA;                    f.write(chunk)&#xA;        subprocess.run([&#x27;ffmpeg&#x27;, &#x27;-i&#x27;, &#x27;video_temp.mp4&#x27;, &#x27;-i&#x27;, &#x27;audio_temp.mp4&#x27;, &#x27;-c&#x27;, &#x27;copy&#x27;, filename])&#xA;    else:&#xA;        os.rename(&#x27;video_temp.mp4&#x27;, filename)&#xA;&#xA;    return FileResponse(filename, media_type=&#x27;application/octet-stream&#x27;, filename=filename)&#xA;

    &#xA;

    I deployed the fastapi by docker to Render. When I start the frontend development server, I could communicate with the backend without problems. But when I deployed both frontend and backend to Render, it shows always the CORS policy

    &#xA;

    enter image description here

    &#xA;

    Why is it ? if I could communicate with backend when starting local development server, it should be not related to backend.

    &#xA;

    This is URL to my frontend : https://videodownload-frontend.onrender.com/

    &#xA;

    Thank you !

    &#xA;

    I tried reconnect and restart the web service, also I tried to add CORS in fastapi. The api works fine with local server opened up. What should I do to debug ? thank you

    &#xA;

  • I am streaming mp3 music via ffmpeg to a local rtmp server then converting to hls, but am having difficulties end to end testing

    12 avril 2020, par SquirrelSenpai

    I am streaming mp3 music via ffmpeg to a local rtmp server then converting to hls, but am having difficulties end to end testing. I am know test.m3u8 playlist should be produce, however I am unable to check inside /nginx/hls/ as it is locked by www-data during operation. I have tried multiple permutation of what I thought the output hls stream would be in vlc with no luck. localhost:8080/live/test.m3u8, localhost:8080/hls/test.m3u8

    &#xA;&#xA;

    Any tips on effective testing would be much appreciated.

    &#xA;&#xA;

    Technologies involved :

    &#xA;&#xA;

      &#xA;
    • FFMPEG
    • &#xA;

    • NGINX (This and the below 3 are part of a module)
    • &#xA;

    • HLS
    • &#xA;

    • RTMP
    • &#xA;

    &#xA;&#xA;

    Working :

    &#xA;&#xA;

    ffmpeg -hide_banner -i http://149.255.59.164:8138 -f mp3 test.mp3&#xA;

    &#xA;&#xA;

    Seemingly working, correctly reads files, shows conversion of some kind
    &#xA;size= 362kB time=00:00:23.09 bitrate= 128.3kbits/s speed=3.21x

    &#xA;&#xA;

    fmpeg -hide_banner -i http://x.x.x.x:8138 -f mp3 rtmp://localhost:1935/live/test&#xA;

    &#xA;&#xA;

    Nginx.conf

    &#xA;&#xA;

    user www-data;&#xA;worker_processes auto;&#xA;pid /run/nginx.pid;&#xA;include /etc/nginx/modules-enabled/*.conf;&#xA;&#xA;events {&#xA;        worker_connections 768;&#xA;        # multi_accept on;&#xA;}&#xA;&#xA;rtmp_auto_push on;&#xA;&#xA;rtmp{&#xA;&#xA;        server{&#xA;&#xA;                listen 1935;&#xA;&#xA;                chunk_size 4000;&#xA;&#xA;                #one publisher, many subscribers&#xA;&#xA;                application live {&#xA;&#xA;                        # enable live streaming&#xA;                        live on;&#xA;                        record off;&#xA;&#xA;                        # publish only from localhost&#xA;                        allow publish 127.0.0.1;&#xA;                        deny publish all;&#xA;&#xA;                        # hls - required for web browser consumption&#xA;                        hls on;&#xA;                        hls_path /tmp/hls;&#xA;                        hls_fragment 3;&#xA;                        hls_playlist_length 60;&#xA;&#xA;                        # disable consuming the streaming from nginx as rtmp&#xA;                        deny play all;&#xA;&#xA;                }&#xA;&#xA;        }&#xA;&#xA;}&#xA;&#xA;# HTTP can be used for accessing RTMP stats&#xA;http {&#xA;&#xA;    server {&#xA;&#xA;        listen      8080;&#xA;&#xA;        # This URL provides RTMP statistics in XML&#xA;        location /stat {&#xA;            rtmp_stat all;&#xA;&#xA;            # Use this stylesheet to view XML as web page&#xA;            # in browser&#xA;            rtmp_stat_stylesheet stat.xsl;&#xA;        }&#xA;&#xA;        location /stat.xsl {&#xA;            # XML stylesheet to view RTMP stats.&#xA;            # Copy stat.xsl wherever you want&#xA;            # and put the full directory path here&#xA;            root /path/to/stat.xsl/;&#xA;        }&#xA;&#xA;        location /hls {&#xA;            # Serve HLS fragments&#xA;            types {&#xA;                application/vnd.apple.mpegurl m3u8;&#xA;                video/mp2t ts;&#xA;            }&#xA;            root /tmp;&#xA;            add_header Cache-Control no-cache;&#xA;        }&#xA;&#xA;        location /dash {&#xA;            # Serve DASH fragments&#xA;            root /tmp;&#xA;            add_header Cache-Control no-cache;&#xA;        }&#xA;    }&#xA;}&#xA;

    &#xA;