
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (95)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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 (...) -
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)
Sur d’autres sites (9046)
-
Python : Error Combining Audio and Video Files using ffmpeg concat
4 juillet 2022, par AmanI have a function that downloads videos using pytube. I have to download both the audio and the video files separately and then combine them using ffmpeg. This is what I have :


def DownloadVideo(video_link,folder,maxres=None):
 if maxres==None: 
 print("Video Started") 
 video_file = YouTube(video_link).streams.order_by('resolution').desc().first().download()
 print("Video Done")
 
 else:
 print("Video Started") 
 video_file = YouTube(video_link).streams.filter(res=maxres).order_by('resolution').desc().first().download(output_path=folder) 
 print("Video Done", video_file)
 
 
 video_name = slugify(video_file.replace(".webm","").split("/")[-1]) 
 print("Audio Started")

 audio_file = YouTube(video_link).streams.filter(only_audio=True).order_by('abr').desc().first().download(filename_prefix="audio_", output_path=folder)

 print("Audio Done")
 
 source_audio = ffmpeg.input(audio_file)
 source_video = ffmpeg.input(video_file)

 print("source audio: ", source_audio)
 print("source video: ", source_video)

 print("Concatenation Started")

 ffmpeg.concat(source_video, source_audio, v=1, a=1).output(f"{folder}/{video_name}.mp4").run()

 # Combine the video and audio
 
 print("Concatenation Done")
 return None



However, this gives me the following error :


...
Video Started
Video Done D:/Data Projects/downloads/videos\The media.webm
Audio Started
Audio Done
source audio: input(filename='D:/Data Projects/downloads/videos\\audio_The media.webm')[None] <1792faaa507b>
source video: input(filename='D:/Data Projects/downloads/videos\\The media.webm')[None] <1f47beb69b93>
Concatenation Started
Traceback (most recent call last):
 File "<stdin>", line 4, in <module>
 File "<stdin>", line 20, in DownloadVideo
 File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python39\lib\site-packages\ffmpeg\_run.py", line 313, in run
 process = run_async(
 File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python39\lib\site-packages\ffmpeg\_run.py", line 284, in run_async
 return subprocess.Popen(
 File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in __init__
 self._execute_child(args, executable, preexec_fn, close_fds,
 File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child
 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
</stdin></module></stdin>


But both
The media.webm
andaudio_The media.webm
exist in the folder.

What am I doing wrong and how can I fix this ?


-
FFmpeg can't process videos with filenames containing emojis on Google Colab
25 novembre 2022, par athenaI mounted my Google Drive on Google Colab, inside the Drive, there's a video file with an emoji on it's filename (example :
20221124 [우리의식탁 W TABLE] 직접 기른 허브로 만들면 더 맛있는 허브포카치아 🌿 (8m2hNIEoXEw).mkv
).

!ffmpeg -i "/content/drive/MyDrive/DOWNLOAD/20221124 [우리의식탁 W TABLE] 직접 기른 허브로 만들면 더 맛있는 허브포카치아 🌿 (8m2hNIEoXEw).mkv"



Trying to run FFmpeg gives me this error :


---------------------------------------------------------------------------
UnicodeEncodeError Traceback (most recent call last)
 in <module>
 3 video = "/content/drive/MyDrive/DOWNLOAD/20221124 [\u110B\u116E\u1105\u1175\u110B\u1174\u1109\u1175\u11A8\u1110\u1161\u11A8 W TABLE] \u110C\u1175\u11A8\u110C\u1165\u11B8 \u1100\u1175\u1105\u1173\u11AB \u1112\u1165\u1107\u1173\u1105\u1169 \u1106\u1161\u11AB\u1103\u1173\u11AF\u1106\u1167\u11AB \u1103\u1165 \u1106\u1161\u11BA\u110B\u1175\u11BB\u1102\u1173\u11AB \u1112\u1165\u1107\u1173\u1111\u1169\u110F\u1161\u110E\u1175\u110B\u1161 \uD83C\uDF3F (8m2hNIEoXEw).mkv" #@param {type: "string"}
 4 
----> 5 get_ipython().system('ffmpeg -i "$video" #-hide_banner')

4 frames
/usr/local/lib/python3.7/dist-packages/google/colab/_shell.py in system(self, *args, **kwargs)
 93 kwargs.update({'also_return_output': True})
 94 
---> 95 output = _system_commands._system_compat(self, *args, **kwargs) # pylint:disable=protected-access
 96 
 97 if pip_warn:

/usr/local/lib/python3.7/dist-packages/google/colab/_system_commands.py in _system_compat(shell, cmd, also_return_output)
 435 # stack.
 436 result = _run_command(
--> 437 shell.var_expand(cmd, depth=2), clear_streamed_output=False)
 438 shell.user_ns['_exit_code'] = result.returncode
 439 if -result.returncode in _INTERRUPTED_SIGNALS:

/usr/local/lib/python3.7/dist-packages/google/colab/_system_commands.py in _run_command(cmd, clear_streamed_output)
 189 stdin=stdin,
 190 stderr=child_pty,
--> 191 close_fds=True)
 192 # The child PTY is only needed by the spawned process.
 193 os.close(child_pty)

/usr/lib/python3.7/subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors, text)
 798 c2pread, c2pwrite,
 799 errread, errwrite,
--> 800 restore_signals, start_new_session)
 801 except:
 802 # Cleanup if the child failed starting.

/usr/lib/python3.7/subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session)
 1480 errread, errwrite,
 1481 errpipe_read, errpipe_write,
-> 1482 restore_signals, start_new_session, preexec_fn)
 1483 self._child_created = True
 1484 finally:

UnicodeEncodeError: 'utf-8' codec can't encode characters in position 131-132: surrogates not allowed
</module>


My Colab uses Python 3.7.15 and ffmpeg/ffprobe version N-109226-g2ad199ae31-20221125 (from https://github.com/BtbN/FFmpeg-Builds).


I tried searching similar issues as mine here, but most of the solutions are way beyond my knowledge, I'm not sure how to apply them to my use case.


I'll appreciate your help, thank you !


-
Getting this error in next js 13 app router “Module not found : Can't resolve './lib-cov/fluent-ffmpeg'”
14 novembre 2023, par Aamir KhanI want to convert mp4 to mp3 using the npm package 'fluent-ffmpeg’, in the express application it is working fine but not in NextJS 13, And even after removing the node_modules folder, package-lock.js and doing "npm install" again, it still didn't work. Does anyone have a solution for this ?


This error is coming in the console.


> my-app@0.1.0 dev
> next dev

 ▲ Next.js 14.0.2
 - Local: http://localhost:3000
 - Environments: .env.local

<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/next isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/next isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
 ✓ Ready in 2.2s
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-win32-ia32-msvc isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-win32-x64-msvc isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-linux-x64-gnu isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-linux-arm64-musl isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-win32-arm64-msvc isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-linux-x64-musl isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-darwin-x64 isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-linux-arm64-gnu isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
 ⨯ ./node_modules/fluent-ffmpeg/index.js:1:48
Module not found: Can't resolve './lib-cov/fluent-ffmpeg'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./src/app/api/new/route.js
 ○ Compiling /not-found ...
(node:3236) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
 ⨯ ./node_modules/fluent-ffmpeg/index.js:1:48
Module not found: Can't resolve './lib-cov/fluent-ffmpeg'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./src/app/api/new/route.js
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/next isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
 ⨯ ./node_modules/fluent-ffmpeg/index.js:1:48
Module not found: Can't resolve './lib-cov/fluent-ffmpeg'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./src/app/api/new/route.js
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-linux-x64-musl isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-win32-ia32-msvc isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-linux-x64-gnu isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-darwin-x64 isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-linux-arm64-musl isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-linux-arm64-gnu isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-win32-arm64-msvc isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-win32-x64-msvc isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-win32-ia32-msvc isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-win32-arm64-msvc isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-win32-x64-msvc isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-linux-x64-musl isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-linux-arm64-musl isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-darwin-x64 isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-linux-x64-gnu isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/creative_aamir/Documents/My Website Projects /nextjs apps/testing-fluent-ffmpeg/node_modules/@next/swc-linux-arm64-gnu isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
</w></w></w></w></w></w></w></w></w></w></w></w></w></w></w></w></w></w></w></w></w></w></w></w></w></w></w>


I also tried creating the webpack.config.js file in the root directory of the project but it did not work


<


import webpack from 'webpack'

module.exports = {
 plugins: [
 new webpack.DefinePlugin({
 'process.env.FLUENTFFMPEG_COV': JSON.stringify(false),
 }),
 ],
};



>


This is my src/app/api/new/route.js file code


import { NextResponse, NextRequest } from "next/server";
import ffmpeg from 'fluent-ffmpeg'
var command = ffmpeg()

export function GET(){

 command.input('mp4/video.mp4')
 
 .save('converted/audio.mp3')

 return NextResponse.json('Done')
}



This is next.config.js file


/** @type {import('next').NextConfig} */

const nextConfig = {}

module.exports = nextConfig



This is package.js file


{
 "name": "my-app",
 "version": "0.1.0",
 "private": true,
 "scripts": {
 "dev": "next dev",
 "build": "next build",
 "start": "next start",
 "lint": "next lint"
 },
 "dependencies": {
 "ffmpeg": "^0.0.4",
 "fluent-ffmpeg": "^2.1.2",
 "next": "14.0.2",
 "react": "^18",
 "react-dom": "^18",
 "webpack": "^5.89.0"
 }
}



How to fix this error ?