
Recherche avancée
Autres articles (78)
-
Problèmes fréquents
10 mars 2010, parPHP et safe_mode activé
Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
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 (...) -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)
Sur d’autres sites (12594)
-
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;
 }

 }
}




-
avfilter/dnn : Use dnn_backend_info_list to search for dnn module
7 mai 2024, par Zhao Zhiliavfilter/dnn : Use dnn_backend_info_list to search for dnn module
Signed-off-by : Zhao Zhili <zhilizhao@tencent.com>
Reviewed-by : Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by : Guo Yejun <yejun.guo@intel.com> -
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.