
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (48)
-
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (6218)
-
Converting MP3/MP4 to WAV in the Frontend Using ffmpegwasm with Next.js Results in Module Not Found Error
31 mars 2024, par ryumaI'm attempting to use ffmpegwasm in a Next.js project to convert MP3 or MP4 files to WAV format directly in the frontend. However, I encounter a "Module not found" error during the process. I have made sure to use the latest version of Next.js. Below is the error message and the code snippet where the issue occurs. I'm seeking assistance to resolve this problem, as it has become quite troubling.


error


./node_modules/@ffmpeg/ffmpeg/dist/esm/classes.js:104:27 Module not found
 102 | if (!this.#worker) {
 103 | this.#worker = classWorkerURL ?
> 104 | new Worker(new URL(classWorkerURL, import.meta.url), {
 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 105 | type: "module",
 106 | }) :
 107 | // We need to duplicated the code here to enable webpack



"use client"

import { FFmpeg } from "@ffmpeg/ffmpeg"
import { fetchFile, toBlobURL } from "@ffmpeg/util"
import React, { useEffect, useRef, useState } from "react"

export default function TestPage() {
 const [loaded, setLoaded] = useState(false)
 const ffmpegRef = useRef(new FFmpeg())
 const messageRef = useRef(null)

 useEffect(() => {
 load()
 }, [])

 const load = async () => {
 const baseURL = "https://unpkg.com/@ffmpeg/core@0.12.6/dist/umd"
 const ffmpeg = ffmpegRef.current
 ffmpeg.on("log", ({ message }) => {
 if (messageRef.current) messageRef.current.innerHTML = message
 console.log(message)
 })

 await ffmpeg.load({
 coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`, "text/javascript"),
 wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`, "application/wasm"),
 })
 setLoaded(true)
 }

 const convertToWav = async ({ target: { files } }) => {
 const ffmpeg = ffmpegRef.current
 const file = files[0]

 await ffmpeg.writeFile("input.mp4", await fetchFile(file))
 await ffmpeg.exec(["-i", "input.mp4", "output.wav"])
 const data = await ffmpeg.readFile("output.wav")

 const url = URL.createObjectURL(new Blob([data.buffer], { type: "audio/wav" }))
 const link = document.createElement("a")
 link.href = url
 link.setAttribute("download", "output.wav")
 document.body.appendChild(link)
 link.click()
 }

 return (
 <div>
 {loaded ? (
 <>
 <input type="file" accept="audio/mp3,video/mp4" />
 <p ref="{messageRef}"></p>
 >
 ) : (
 <button>Load ffmpeg-core</button>
 )}
 </div>
 )
}




Attempted Solutions :


I've ensured that I'm using the latest version of Next.js.
I've tried various configurations for the ffmpeg instance.


Questions :


How can I resolve the "Module not found" error when using ffmpegwasm with Next.js ?
Are there any specific configurations or setups within Next.js that I need to be aware of to successfully use ffmpegwasm ?
Any guidance or assistance with this issue would be greatly appreciated. Thank you in advance for your help.


-
Nginx RTMP module not creating .m3u8 in correct format
24 juin 2024, par Moiz HassanI am creating a rtmp server using nginx-rtmp-module inside a docker container. Using OBS I can connect with the server to start a live stream. M3U8 and .ts files are being created successfully but the .m3u8 file isn't in format I want. The generated .m3u8 file is like :


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:5
#EXT-X-TARGETDURATION:10



but I want to generate .m3u8 file so it is simialr to this :


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:10.000000,
0.ts
#EXTINF:10.000000,
1.ts
#EXTINF:10.000000,
2.ts
#EXTINF:10.000000,
3.ts
#EXTINF:10.000000,
4.ts
#EXTINF:10.000000,
5.ts




. The following is the nginx config that I am using :


user root;
worker_processes auto;
#error_log logs/error.log;

events {
 worker_connections 1024;
}

# RTMP configuration
rtmp {
 server {
 listen 1935; # Listen on standard RTMP port
 chunk_size 4000; 
 # ping 30s;
 # notify_method get;

 # This application is to accept incoming stream
 application live {
 live on; # Allows live input

 
 push rtmp://localhost:1935/show; 
 drop_idle_publisher 10s; 
 }

 # This is the HLS application
 application show {
 live on; # Allows live input from above application
 deny play all; # disable consuming the stream from nginx as rtmp

 
 hls on; # Enable HTTP Live Streaming
 hls_fragment 10;
 hls_playlist_length 0;
 hls_path /mnt/hls/; # hls fragments path
 hls_nested on;

 hls_fragment_naming sequential;
 
 hls_cleanup off;
 
 }


 }
}


http {
 sendfile off;
 tcp_nopush on;
 directio 512;
 # aio on;
 
 # HTTP server required to serve the player and HLS fragments
 server {
 listen 8080;
 
 # Serve HLS fragments
 location /hls {
 types {
 application/vnd.apple.mpegurl m3u8;
 video/mp2t ts;
 }
 
 root /mnt;

 add_header Cache-Control no-cache; # Disable cache
 
 # CORS setup
 add_header 'Access-Control-Allow-Origin' '*' always;
 add_header 'Access-Control-Expose-Headers' 'Content-Length';
 
 # allow CORS preflight requests
 if ($request_method = 'OPTIONS') {
 add_header 'Access-Control-Allow-Origin' '*';
 add_header 'Access-Control-Max-Age' 1728000;
 add_header 'Content-Type' 'text/plain charset=UTF-8';
 add_header 'Content-Length' 0;
 return 204;
 }
 }
 
 # Serve DASH fragments
 location /dash {
 types {
 application/dash+xml mpd;
 video/mp4 mp4;
 }

 root /mnt;
 
 add_header Cache-Control no-cache; # Disable cache


 # CORS setup
 add_header 'Access-Control-Allow-Origin' '*' always;
 add_header 'Access-Control-Expose-Headers' 'Content-Length';

 # Allow CORS preflight requests
 if ($request_method = 'OPTIONS') {
 add_header 'Access-Control-Allow-Origin' '*';
 add_header 'Access-Control-Max-Age' 1728000;
 add_header 'Content-Type' 'text/plain charset=UTF-8';
 add_header 'Content-Length' 0;
 return 204;
 }
 } 
 
 # This URL provides RTMP statistics in XML
 location /stat {
 rtmp_stat all;
 rtmp_stat_stylesheet stat.xsl; # Use stat.xsl stylesheet 
 }

 location /stat.xsl {
 # XML stylesheet to view RTMP stats.
 root /usr/local/nginx/html;
 }

 }
}




-
Distributing a Python module with ffmpeg dependency
17 août 2024, par arafasseI’m working on a Python module that harnesses some functionality from the FFmpeg framework - specifically, the ebur128 filter function. Ideally the module will stand on its own as an independent, platform agnostic tool for verifying that audio clips comply with EBU loudness standards. It’s designed so that end users need only perform one simple, (hopefully !) painless installation procedure, which will encompass the installation of both the FFmpeg libraries and my Python wrapper/GUI.


Does anyone have general advice for creating Python module with external dependencies, or specific advice for standardizing the FFmpeg installation across platforms ? Distutils seems pretty helpful – are there other guidelines or standard practices for developing a neatly packaged Python tool ? I want to minimize any installation headaches for end users.