
Recherche avancée
Autres articles (47)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
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 (...)
-
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (8006)
-
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.


-
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> -
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;
 }

 }
}