Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (45)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (4835)

  • The Mystery of the No such file or directory exception

    22 avril 2022, par JohnWick

    No idea what's going on here. Set a breakpoint after the for of loop in the following function. temp/concat.txt exists but the following exception is thrown :

    


    


    Uncaught Error Error : ffmpeg exited with code 1 : temp/concat.txt : No
such file or directory

    


    


    Outputting stderr gives a bit more info :

    


    


    [concat @ 000001e2e30124c0] Impossible to open
'temp/concat.txt#voiceover #funny #fall #lol.mp4' index.js:19
temp/concat.txt : No such file or directory

    


    


    And here is the contents of concat.txt, standard ffmpeg concat demuxer format :

    


    file '#voiceover #funny #fall #lol.mp4'
file 'part 2 repost 🙄 #fyp #funny @jordond262 @princemoonjq add my snap heroicdw333.mp4'
file 'This is my hair wet wet WOAHHH #GrowUpWithMe #fyp #foryoupage #love #funny #puppy #goldenretriever #cute #dog #wetwet.mp4'
file 'POV calling your friends when your 90#FootlongShuffle #GhostMode #funny #grandma  #fyp #halloween #collegegotmelike #tiktok #foryoupage.mp4'
file 'Sam Ki Singing Kaisi Lgi 😂😜 insta-samayranarula #foryou #trending #lockdown #queen_samayra #tiktokindia #funny #gharbaithoindia 🏠 #comedyindia.mp4'
file 'Reply to @juswa646  #fyp#funny #relatable.mp4'
file 'RaNdOm ViDeOs! #fy #fypシ #viral #meme #funny #xyzbca #funnyvideos #randomvideo.mp4'
file 'Reply to @bratzdoll.maya what should I do next 🙄 #fyp #foryoupage #leethe4th #memes #tall #funny #lol.mp4'
file 'Part 2 #fyp #foryou #viral #foryoupageofficiall #funny #trending.mp4'
file 'Lmfao 😂 (via @danibreezy01) #lmao #lmfao #funny #cousins #family #fyp #foryou #foryoupage.mp4'
file 'When you are a clumsy kitty #trend #joke #Khaleesi #funny #kittensoftiktok #foryou #fyp #foryoupage #cute #catsoftiktok.mp4'
file 'Tag That Friend That Always Be Falling Asleep 😂 #foryou #funny #fail #nap #sleep #pennsylvania #SHEINcares #viral #trending #meme #memes #foryoupage.mp4'
file '#funny #funnyvideos #girlfriend #crzy #Birdshit.mp4'
file 'He forgot he was a dog.                #dog #fyp #talkingdog #cute #pet #funny.mp4'
file 'Bad Day #part1 #badday #falling #funny #memes #viral #jokes #comedy #trending #fyp #foryou #share #likes #us #uk #xyzbca  #epic #pourtoi #fail #wee.mp4'
file 'I think he got offended ( #catsoftiktok #fyp #funny #catlover #MyJob #yellow #foryoupage.mp4'
file 'They took OFF today 🐶🤠🐶 #joshbutlertv #roxyandremi #funny #comedy #dogs #viral #memes.mp4'
file 'Had to make sure momma was there #funny #fyp #raccoons #love #bff #foryoupage #ThisorThatSBLV.mp4'
file 'That\'s not how you get out... #mysterymakers #escaperoom #foryou #fyp #crazystory #friends #funny #crazy #teammate.mp4'


    


    The function throwing the exception.

    


    async function makeCompilation(paths, outPath) {
  for (const filePath of paths) {
    await fs.appendFile(
      "temp/concat.txt",
      `file '${path.basename(filePath).replace("'", "\\'")}'${os.EOL}`
    );
  }
  return new Promise((resolve, reject) => {
    ffmpeg("temp/concat.txt")
      .inputOptions(["-f concat", "-safe 0"])
      .outputOption("-c copy")
      .on("stderr", (line) => console.log(line))
      .on("end", async () => {
        await fs.rm("temp/concat.txt");
        resolve();
      })
      .save(outPath);
  });
}


    


  • discord.py 0pusError:Invalid Argument M1 Pro Macbook

    16 juin 2022, par xuo

    Discord music bot not able to be initialized and play music on MacOS. Works fine on other unix-based systems and windows.

    


    Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/xuo/Desktop/coding stuff/musicbot/music.py", line 158, in play
    await self.play_song(ctx, song) #involes player
  File "/Users/xuo/Desktop/coding stuff/musicbot/music.py", line 47, in play_song
    ctx.voice_client.play(discord.PCMVolumeTransformer(discord.FFmpegPCMAudio(url)), after=lambda error: self.bot.loop.create_task(self.check_queue(ctx)))
  File "/opt/homebrew/lib/python3.9/site-packages/discord/voice_client.py", line 564, in play
    self.encoder = opus.Encoder()
  File "/opt/homebrew/lib/python3.9/site-packages/discord/opus.py", line 290, in __init__
    self.set_bitrate(128)
  File "/opt/homebrew/lib/python3.9/site-packages/discord/opus.py", line 308, in set_bitrate
    _lib.opus_encoder_ctl(self._state, CTL_SET_BITRATE, kbps * 1024)
  File "/opt/homebrew/lib/python3.9/site-packages/discord/opus.py", line 92, in _err_lt
    raise OpusError(result)
discord.opus.OpusError: invalid argument

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "/opt/homebrew/lib/python3.9/site-packages/discord/ext/commands/core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/discord/ext/commands/core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: OpusError: invalid argument


    


  • FFmpeg - convert 2 audio tracks from video to 5.1 audio, (play video with different languages to different devices) [closed]

    10 février, par Sandre

    How to watch a movie with one language playing through the speakers and another through the headphones ?

    


    Disclaimer : I know nothing about audio conversion, and don't want to study ffmpeg. I spend a few hours searching how to do, actually much more than I want. I found a bunch of questions from different people and not a single working solution, so I made a clunky but working solution. If someone helps me make it more elegant, I'll be happy. If my question just gets downvoted like most ffmpeg newbie questions, it probably deserves it. And I hope my question can help people who want enjoy video with 2 different languages.

    


    A clumsy but working solution.

    


      

    1. Setup Aggregate Audio Device to play 2 channels of 5.1 through speakers and 2 through bluetooth headphones. (On screenshot Audio MIDI Setup for MacOS)
Agregate Device config

      


    2. 


    3. Use ffmpeg to convert 2 audio tracks into 5.1 audio.

      


    4. 


    5. Play video with new external audio track.

      


    6. 


    


    # print list of channels
ffprobe INPUT.mkv 2>&1 >/dev/null | grep Stream

--- sample output ---
    Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1280x544, SAR 1:1 DAR 40:17, 23.98 fps, 23.98 tbr, 1k tbn (default)
    Stream #0:1(rus): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
    Stream #0:2(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 640 kb/s

# extract audio
ffmpeg -i INPUT.mkv -map 0:1 -acodec copy ru.ac3
ffmpeg -i INPUT.mkv -map 0:2 -acodec copy en.ac3

# extract only front_center channel from 5.1 - speach
ffmpeg -i en.ac3 -filter_complex "channelsplit=channel_layout=5.1:channels=FC[center]" -map "[center]" en_front_center.wav
ffmpeg -i ru.ac3 -filter_complex "channelsplit=channel_layout=5.1:channels=FC[center]" -map "[center]" ru_front_center.wav

# join to 5.1
ffmpeg -i en_front_center.wav -i ru_front_center.wav -filter_complex "[0:a][0:a][0:a][0:a][1:a][1:a]join=inputs=6:channel_layout=5.1[a]" -map "[a]" output.wav


    


    Is it possible to avoid re-encoding the audio and copying the same channel many times to reduce the file size ?