
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (42)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
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 -
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)
Sur d’autres sites (8046)
-
error on Heroku application log after deployment
30 juin 2021, par SDB PROGRAM LEARNERI had made a discord bot and deploy it to Heroku in this bot I can play youtube songs normally but after deploying on Heroku it gives me errors on application logs when I am trying to play my song


My code :-


import discord,requests, sys, webbrowser, bs4
import youtube_dl
import os
from dotenv import load_dotenv
import ffmpeg
from discord.ext import *
from discord.ext import commands
from discord.ext.commands import Bot
from discord.voice_client import VoiceClient
import asyncio
@client.command(pass_context=True) #====================================Join
async def join(ctx):
 channel = ctx.author.voice.channel
 await channel.connect()
@client.command() #==================================Play
async def play(ctx, url:str):
 song_there = os.path.isfile("song.mp3")
 try:
 if song_there:
 os.remove("song.mp3")
 player.clear()
 except PermissionError:
 await ctx.send("Wait for the current playing music end or use the 'stop' command...")
 return
 await ctx.send("Getting everything ready, playing audio soon, depends on your internet speed...")
 print("Someone wants to play music let me get that ready for them...")
 voice = discord.utils.get(client.voice_clients, guild=ctx.guild)
 ydl_opts = {
 'format': 'bestaudio/best',
 'postprocessors': [{
 'key': 'FFmpegExtractAudio',
 'preferredcodec': 'mp3',
 'preferredquality': '192',
 }],
 }
 with youtube_dl.YoutubeDL(ydl_opts) as ydl:
 ydl.download([url])
 for file in os.listdir("./"):
 if file.endswith(".mp3"):
 os.rename(file, 'song.mp3')
 voice.play(discord.FFmpegPCMAudio("song.mp3"))
 
 voice.volume = 100



It works properly on localhost from vscode


but when I trying to use this after deployment on Heroku it gives me the error below


2021-06-30T07:41:09.476383+00:00 app[worker.1]: The above exception was the direct cause of the following exception:
2021-06-30T07:41:09.476384+00:00 app[worker.1]: 
2021-06-30T07:41:09.476384+00:00 app[worker.1]: Traceback (most recent call last):
2021-06-30T07:41:09.476422+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 939, in invoke
2021-06-30T07:41:09.476423+00:00 app[worker.1]: await ctx.command.invoke(ctx)
2021-06-30T07:41:09.476427+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/discord/ext/commands/core.py", line 863, in invoke
2021-06-30T07:41:09.476427+00:00 app[worker.1]: await injected(*ctx.args, **ctx.kwargs)
2021-06-30T07:41:09.476451+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/discord/ext/commands/core.py", line 94, in wrapped
2021-06-30T07:41:09.476452+00:00 app[worker.1]: raise CommandInvokeError(exc) from exc
2021-06-30T07:41:09.476487+00:00 app[worker.1]: discord.ext.commands.errors.CommandInvokeError: Command raised an exception: DownloadError: ERROR: ffprobe/avprobe and ffmpeg/avconv not found. Please install one.



Please help me to solve this problem


-
FFMPEG : alphaextract+split create transparent video in 1080 x 1920 pixels not working
30 juin 2021, par Karim ElhalloumiCreate your transparent video :
i found a solution to a problem of creating alpha from a video then put it next to original as an output it give one video with original+alpha
using this ffmpeg cmd :


ffmpeg -i video_name.video_extension -vf "split [a], pad=iw*2:ih [b], [a] alphaextract, [b] overlay=w" -y final_name_alpha.mp4



source :https://docs.minsar.app/create/howtos/transparentvideos/
the problem is This operation with Ffmpeg will not work if your video is not in 16:9 format, or has no alpha background.


Result :
CMD Result 
iwant put as input a template for phone size with black background and generate the 2 video in one


what Iam trying to get is video.mp4 :
Process here


I'm new to ffmpeg, is there any cmd to generate alpha next to original without having only black back ground and with 9:16 instead ?



ffmpeg version 4.4-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf57.83.100
 Duration: 00:00:14.02, start: 0.000000, bitrate: 797 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 540x960, 662 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[Parsed_alphaextract_2 @ 000001a9dae4bdc0] Requested planes not available.
[Parsed_alphaextract_2 @ 000001a9dae4bdc0] Failed to configure input pad on Parsed_alphaextract_2
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
[aac @ 000001a9dadd4280] Qavg: 6441.061
[aac @ 000001a9dadd4280] 2 frames left in the queue on closing
Conversion failed!



cmd I'm using to merge video :


- filter_complexe "[2]split=2[color][alpha];[color]crop=iw/2:ih:0:0[color];[alpha]crop=iw/2:ih:iw/2:0[alpha];[color][alpha]alphamerge[ovrly];[0]scale=460:505,setsar=1[0_scaled];[1]scale=460:505,setsar=1[1_scaled];[3][0_scaled]overlay=x=80:y=175[base_img_1];[3][1_scaled]overlay=x=80:y=175[base_img_2];[base_img_1]zoompan=z='if(lte(zoom,1.0),1.2,max(1.001,zoom-0.0006))':d=25*14:s=540x960,fade=out:st=6:d=1:alpha=1,fade=t=in:st=0:d=1[video1];[base_img_2]zoompan=z='if(lte(on,25*6),1,if(lte(zoom,-1.0),1.2,min(zoom+0.0006,1.2)))':d=25*14:s=540x960[video2];[video2][video1]overlay[overlay_video1];[overlay_video1][ovrly]overlay=0:0[base_video];[base_video][4]overlay=enable='between(t,0,7)':x=30:y=30[watermarked_part1];[watermarked_part1][4]overlay=enable='between(t,7,14)':x=(main_w-overlay_w-30):y=(main_h-overlay_h-10)[final_video]"



-
Dcode time-metadata from .mov files by ffmepg or C++ libraries
8 juillet 2021, par shortz79I record a .mov files from swift, by using "AVTimedMetadataGroup" to save metadata per frame (rawdata) into the track.


Here is the example how I save according swift


var newItem = AVMutableMetadataItem()
 newItem.identifier = AVMetadataIdentifier.quickTimeUserDataTrack
 newItem.dataType = kCMMetadataBaseDataType_RawData as String
 var newGroup = AVTimedMetadataGroup(items: [newItem], timeRange: timeRange)
 m_depth_writer_input_adap!.append(newGroup)



I also copy the track data into a .bin files, but it's there any way to get the track data from linux or windows side instead from swift.


Below is the log according to the ffmpeg.


ffmpeg -i .\input_file.mov
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '.\input_file.mov':
 Metadata:
 major_brand : qt
 minor_version : 0
 compatible_brands: qt
 creation_time : 2021-07-06T07:24:12.000000Z
 Duration: 00:00:05.23, start: 0.000000, bitrate: 77273 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt709), 1920x1440, 19524 kb/s, 29.81 fps, 30 tbr, 600 tbn, 1200 tbc (default)
 Metadata:
 rotate : 90
 creation_time : 2021-07-06T07:24:13.000000Z
 handler_name : Core Media Video
 encoder : H.264
 Side data:
 displaymatrix: rotation of -90.00 degrees
 Stream #0:1(und): Data: none (mebx / 0x7862656D), 57743 kb/s (default)
 Metadata:
 creation_time : 2021-07-06T07:24:13.000000Z
 handler_name : Core Media Metadata



(Even if it could be solve by recording with another file type(eg:mp4,mov) which swift support to save.)