
Recherche avancée
Autres articles (54)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
L’utiliser, en parler, le critiquer
10 avril 2011La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
Une liste de discussion est disponible pour tout échange entre utilisateurs. -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...)
Sur d’autres sites (9041)
-
FFMPEG how to record aac codec audio same time with video ?
13 décembre 2017, par Gomi OdabaşıoğluI am trying to use FFMPEG console tools effectively. Now I can record video and audio same time but my issue audio is delaying. I use following code :
C:\Users\gomid_000\Desktop\ffmpeg.exe -y -f dshow -i audio="Stereo Mix (Realtek High Definition Audio)" -f gdigrab -show_region 1 -framerate 60 -i desktop -map 0 -map 1 -c:v libx264 -preset ultrafast -pix_fmt yuv420p C:\Users\gomid_000\Desktop\out.mp4 -threads:1 4
I want to use h264 - Intel quick sync codec for video and for the audio
AAC codec My machine accepts it.I tried to use Intel QSV with following code, is that correct ? (scroll "-c:v h264_qsv" part of the code)
C:\Users\gomid_000\Desktop\ffmpeg.exe -y -f dshow -i audio="Stereo Mix (Realtek High Definition Audio)" -f gdigrab -show_region 1 -framerate 60 -i desktop -map 0 -map 1 -c:v h264_qsv -pix_fmt yuv420p C:\Users\gomid_000\Desktop\out.mp4
Still do not know How to use AAC to record audio and keeep video and audio matching times automaticly. It is not installed maybe (?) (I do not know how to tell this in English will try :"Person speaks but audio comes very near but delays a little bit when I try bandicam they just match each other without any delay this is not hardware related.")
-
ffmpeg crashed if run as subprocess from nicegui
23 mars 2023, par user1113159I need to trigger a long ffmpeg process by nicegui button.
I have created a code :


from concurrent.futures import ProcessPoolExecutor
import shlex, subprocess
import argparse
import asyncio
from nicegui import ui, app

def run_cmd():
 cmd = "ffmpeg -y -i data/video.mp4 -acodec libmp3lame -ab 128000 data/video.mp3"
 subprocess.call(shlex.split(cmd))

pool = ProcessPoolExecutor()
async def async_run():
 loop = asyncio.get_running_loop()
 await loop.run_in_executor(pool, run_cmd)

args = argparse.ArgumentParser()
args.add_argument("--webui", action="store_true")
args = args.parse_args()

if args.webui:
 ui.button('Translate', on_click=async_run)
 app.on_shutdown(pool.shutdown)
 ui.run()
else:
 run_cmd()



ffmpeg works well if run just from python.
But when I run it from nicegui (
python3 ./main.py --webui
)
ffmpeg failed or crashed :

...
Error while decoding stream #0:1: Invalid argument
[aac @ 0x555e54100440] Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 0x555e54100440] Inconsistent channel configuration.
[aac @ 0x555e54100440] get_buffer() failed
...
ac @ 0x555e54100440] Error decoding AAC frame header.
Error while decoding stream #0:1: Error number -50531338 occurred
[aac @ 0x555e54100440] channel element 2.8 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x555e54100440] Pulse data corrupt or invalid.
Error while decoding stream #0:1: Invalid data found when processing input
ffmpeg: psymodel.c:576: calc_energy: Assertion `el >= 0' failed.
...



What am I doing wrong ?
Or maybe there is a more straightforward pattern to start long-term background process with nicegui ?


-
Use ffmpeg to match an image to source frames in video [closed]
25 mai 2024, par user22335954I'm trying to write an application to split a single video into multiple pieces based on the appearance of a specific image. (Think title cards). I have video files that may have more than one episode or content inside of a single file and I want them split anywhere I find that title card or image.


My application works by the user providing a timestamp in the format of 00:00:00 to specify the title card image which is then used like this :


ffmpeg -i FILE -qmin 1 -qscale:v 1 -vframes 00:00:00 -f image2 img.png



Now I want to compare that image (img.png) to the source video file using the following example command I've found :


ffmpeg -i FILE -loop 1 -i img.png -an -filter_complex "blend=difference:shortest=1,blackframe=90:20" -f null



I've had to play around with the blackframe=90:20 values to get what I think are correct matches, but I don't understand what these values and/or the blackframe filter is actually controlling. The blend documentation : https://ffmpeg.org/ffmpeg-filters.html#Examples-46 doesn't seem to go into much detail about what is actually happening. I do understand the difference blend means I'm essentially looking for the smallest difference, indicating a frame match to my img, but beyond that I'm sort of just guessing.


Additionally, the output shows a bunch of :


[Parsed_blackframe_1 @ 0x5c1183081880] frame:195 pblack:99 pts:6506 t:6.506000 type:B last_keyframe:135



Based on the frames I can parse those out to find the non-sequential frames and find how how many segments I expect in the video, but when I go to split them, I don't know how to translate the frame or the t value into a timestamp format of 00:00:00. Even for matches that I'm 100% sure of, the frame values don't seem to line up with what I expect. For example, from watching the video, I know that a perfect match occurs at exactly 00:01:45, but the blackframe data says the match occurs at frame 1471 or t:49.08 (the video has a framerate of 29.97). 1471 / 29.97 is indeed 49.08, but that does not correlate to the actual time of 1:45 (105 seconds). How can I convert these values into timestamps (or just show the timestamps of the frames) ?