Recherche avancée

Médias (3)

Mot : - Tags -/image

Autres articles (93)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

Sur d’autres sites (11297)

  • Fun With Tablets And Amazon’s App Store

    24 décembre 2011, par Multimedia Mike — General, amazon, android, app store, cyanogenmod, ios, smurfs, tablet

    I bought an Android tablet a few months ago. It is less expensive than the best tablets but no where near the bottom end of the market. I think it’s pretty good. However, one downside is that it’s not “certified” to use Google’s official marketplace. That would seem to be somewhat limiting, however…

    Enter Amazon’s Android App Store
    Amazon got into the business of selling Android Apps some time ago. I started experimenting with this on a Nexus One phone that Google gave me. When I installed the App Store on the Android tablet and logged in, I was pleasantly surprised to see all of my Amazon apps ready for downloading onto the tablet.

    So I have an App Store for use with this Android tablet.

    Anyway, the reason I bring this up is because I managed to screw up this tablet in an unusual and humorous manner. You might be wondering if an app downloaded from the Amazon App Store requires the App Store to be present in order to run. The answer is : Oh yeah ! It works like this :



    This means that if — perhaps out of curiosity, for example — you login to the Amazon App Store, download an app, install it, and then subsequently log out of the App Store or uninstall it altogether, the downloaded app will decline to run until you log back into the store.

    Here’s the thing– I wanted to provide a minimal level of security for my Android tablet. At the very least, I wished to lock the Amazon App Store itself since Amazon is famously (and, let’s face it, understandably) reluctant to deliberately add any friction to their shopping processes. I.e., without any external protection app, the App Store app would allow anyone to purchase any app using my tablet.

    So I purchased App Protector Pro from the Amazon App Store and it worked quite well. By default, it also password protects against modifying any system settings as well as installing new apps.

    So, here’s where I screwed up : App Protector Pro was doing its faithful duty and I uninstalled the Amazon App Store as an experiment. Suddenly, no apps obtained from the App Store would work unless I reinstalled the App Store. Okay, fair enough, except for one thing– App Protector Pro wouldn’t run without the App Store. Well, it did, it started to, tried to, but then exited. So I couldn’t re-install the App Store :



    Oops

    I eventually learned how to perform a factory reset of the unit which solved the problem. And, as indicated earlier, all of my apps were available for me to re-download.

    Modding, Cyanogen-style
    Open source aficionados will likely point out that there are alternate firmware options which allow me to take control of my Android tablet in a free and open manner. Among these options is CyanogenMod. After I got stuck in the situation described above, I thought I would have to resort to such an option.

    On the plus side, researching alternative firmware options is what taught me to boot the device into a recovery mode and ultimately restore to a factory default setting. But if you’ll allow me to indulge in a mini-rant regarding accessibility of open source software : I was more than a little frustrated in trying to understand what CyanogenMod could possibly offer me. Their homepage says it’s “an aftermarket firmware”. I’m not entirely sure what that means or how it can benefit me. Fortunately, they have a full feature list linked from the front page. They are, in order : Lockscreen gestures, phone goggles, OpenVPN, incognito mode, themes support, and DSP equalizer. I can’t say that any of those really add any value for me. I’d love to know if CyanogenMod supports Google Android Market and various other Google apps (such as maps and GMail). That’s a question that I can’t seem to find the answer to.

    The themes feature opens another old wound for me. Back around 1999 when I was first getting into Linux in a serious way, I remember that themes were a big theme at the Linux User Groups I would attend. I also remember lots are online articles at the time that emphasized how highly customizable the Linux desktop was in comparison to Windows 9x. I was bothered for 2 reasons : First, I thought there were more pressing problems that needed to be addressed in Linux ; and second, none of these customization options seemed particularly straightforward ; many apparently required hours of compiling and tinkering.

    Small digression. Anyway, back to CyanogenMod, I was glad to see that they prominently display a button in order to “View Video Tour”. Ah, internet video has us so spoiled these days. I was eager to see this aftermarket firmware in action to see what it could do for me. However, the link leads to… a forum post ? The thread seems to discuss how it would be a cool idea if the community could put together a video tour. At this point, the investigation just seems bizarre. It feels like a bunch of kids doing their best to do things the grown-up way.

    Okay, sorry, rant over. I try to stay positive these days. I’m sure the CyanogenMod folks are doing great, fun, and interesting work on their project. The problems they choose to solve might lack mainstream appeal, however.

    Free iPad
    Ultimately, I recently unloaded the little Android tablet because, well… when a free iPad comes your way, lower spec tablets feel a little silly to keep around. Yeah, it’s great to play around with. Though here’s one unsettling thing I noticed about Apple’s App Store. While browsing for worthwhile games to indulge in, I noticed that they had a section for “Top Grossing Games”. This was a separate list from the “Top Apps” charts. I found the list weird for 2 reasons : 1) Why do I care which games are raking in the most cash ? How does this communicate value to me, personally ? Seriously, why would I base a purchasing decision around which vendor has earned the most money ?

    Anyway, let’s move on to reason #2 this was scary : Most of the games in this list had a price of FREE. One of them was that Capcom Smurfs game that stirred up controversy some months ago because of kids making unsupervised in-app purchases of virtual smurfberries. I tend to think that a top-grossing, free to play game is probably one that heavily encourages in-app purchases. Strange how this emerging trend actually encourages me to seek out games from the “top paid” list vs. “top free”.

  • Could anyone help me understand why moviepy is rendering at 2.5 it/s ?

    23 décembre 2023, par tristan

    I'm writing a program that uses moviepy to make those weird reddit thread videos with mc parkour playing in the background (real original ik), and everything is good except for when im rendering video which seems to consume a ton of memory and moves really... really slow, like 2.5 it/s. could anyone help ? also im a novice programmer that has no bearing on what is conventional or proper, so sorry if my code is very bad.

    &#xA;

    from moviepy.video.fx.all import resize&#xA;from moviepy.video.tools.subtitles import SubtitlesClip&#xA;from moviepy.editor import (&#xA;    CompositeVideoClip,&#xA;    AudioFileClip,&#xA;    VideoFileClip,&#xA;    ImageClip,&#xA;    TextClip&#xA;)&#xA;import random&#xA;import moviepy.config as cfg&#xA;import librosa&#xA;from imagegenerator import draw_title&#xA;from audioeditor import concatenate_audios&#xA;import soundfile as sf&#xA;import numpy as np&#xA;&#xA;# Constants&#xA;VIDEO_FADE_DURATION = 0.4&#xA;SPEED_FACTOR = 1.1&#xA;TEXT_WIDTH = 600&#xA;MINIMUM_FONT_SIZE = 60&#xA;FONT_COLOR = "white"&#xA;OUTLINE_COLOR = "black"&#xA;TITLE_ANIMATION_DURATION = 0.25&#xA;ANIMATION_DURATION = 0.2&#xA;&#xA;# Configure imagemagick binary&#xA;cfg.change_settings(&#xA;    {&#xA;        "IMAGEMAGICK_BINARY": "magick/magick.exe"&#xA;    }&#xA;)&#xA;&#xA;# Ease-out function&#xA;def ease_out(t):&#xA;    return 1 - (1 - t) ** 2&#xA;&#xA;# Overlap audio files&#xA;def overlap_audio_files(audio_path1, audio_path2):&#xA;    # Load the first audio file&#xA;    audio1, sr1 = librosa.load(audio_path1, sr=None)&#xA;&#xA;    # Load the second audio file&#xA;    audio2, sr2 = librosa.load(audio_path2, sr=None)&#xA;&#xA;    # Ensure both audio files have the same sample rate&#xA;    if sr1 != sr2:&#xA;        raise ValueError("Sample rates of the two audio files must be the same.")&#xA;&#xA;    # Calculate the duration of audio2&#xA;    audio2_duration = len(audio2)&#xA;&#xA;    # Tile audio1 to match the duration of audio2&#xA;    audio1 = np.tile(audio1, int(np.ceil(audio2_duration / len(audio1))))&#xA;&#xA;    # Trim audio1 to match the duration of audio2&#xA;    audio1 = audio1[:audio2_duration]&#xA;&#xA;    # Combine the audio files by superimposing them&#xA;    combined_audio = audio1 &#x2B; audio2&#xA;&#xA;    # Save the combined audio to a new file&#xA;    output_path = "temp/ttsclips/combined_audio.wav"&#xA;    sf.write(output_path, combined_audio, sr1)&#xA;&#xA;    return output_path&#xA;&#xA;# Generator function for subtitles with centered alignment and outline&#xA;def centered_text_generator_white(txt):&#xA;    return TextClip(&#xA;        txt,&#xA;        font=r"fonts/Invisible-ExtraBold.otf",&#xA;        fontsize=86,&#xA;        color=FONT_COLOR,&#xA;        bg_color=&#x27;transparent&#x27;,  # Use a transparent background&#xA;        align=&#x27;center&#x27;,  # Center the text&#xA;        size=(1072, 1682),&#xA;        method=&#x27;caption&#x27;,  # Draw a caption instead of a title&#xA;    )&#xA;&#xA;# Generator function for subtitles with centered alignment and blurred outline&#xA;def centered_text_generator_black_blurred_outline(txt, blur_factor=3):&#xA;    outline_clip = TextClip(&#xA;        txt,&#xA;        font=r"fonts/Invisible-ExtraBold.otf",&#xA;        fontsize=86,&#xA;        color=OUTLINE_COLOR,&#xA;        bg_color=&#x27;transparent&#x27;,  # Use a transparent background&#xA;        align=&#x27;center&#x27;,  # Center the text&#xA;        size=(1080, 1688),&#xA;        method=&#x27;caption&#x27;,  # Draw a caption instead of a title&#xA;    )&#xA;&#xA;    # Blur the black text (outline)&#xA;    blurred_outline_clip = outline_clip.fx(resize, 1.0 / blur_factor)&#xA;    blurred_outline_clip = blurred_outline_clip.fx(resize, blur_factor)&#xA;&#xA;    return blurred_outline_clip&#xA;&#xA;# Compile video function&#xA;def compile_video(title_content, upvotes, comments, tone, subreddit, video_num):&#xA;    # Set the dimensions of the video (720x1280 in this case)&#xA;    height = 1280&#xA;&#xA;    # Concatenate the audios&#xA;    concatenate_audios()&#xA;&#xA;    concatenated_audio_path = r"temp/ttsclips/concatenated_audio.mp3"&#xA;    title_audio_path = r"temp/ttsclips/title.mp3"&#xA;&#xA;    title_audio = AudioFileClip(title_audio_path)&#xA;    concatenated_audio = AudioFileClip(concatenated_audio_path)&#xA;&#xA;    # Calculate for video duration&#xA;    title_duration = title_audio.duration&#xA;    duration = concatenated_audio.duration&#xA;&#xA;    # Set background&#xA;    background_path = f"saved_videos/newmcparkour.mp4"&#xA;    background = VideoFileClip(background_path)&#xA;    background_duration = background.duration&#xA;    random_start = random.uniform(0, background_duration - duration)&#xA;    background = background.subclip(random_start, random_start &#x2B; duration)&#xA;&#xA;    # Apply fade-out effect to both background clips&#xA;    background = background.crossfadeout(VIDEO_FADE_DURATION)&#xA;&#xA;    # Generate the background image with rounded corners&#xA;    background_image_path = draw_title(title_content, upvotes, comments, subreddit)&#xA;&#xA;    # Load the background image with rounded corners&#xA;    background_image = ImageClip(background_image_path)&#xA;&#xA;    # Set the start of the animated title clip&#xA;    animated_background_clip = background_image.set_start(0)&#xA;&#xA;    # Set the initial position of the text at the bottom of the screen&#xA;    initial_position = (90, height)&#xA;&#xA;    # Calculate the final position of the text at the center of the screen&#xA;    final_position = [90, 630]&#xA;&#xA;    # Animate the title clip to slide up over the course of the animation duration&#xA;    animated_background_clip = animated_background_clip.set_position(&#xA;        lambda t: (&#xA;            initial_position[0],&#xA;            initial_position[1]&#xA;            - (initial_position[1] - final_position[1])&#xA;            * ease_out(t / TITLE_ANIMATION_DURATION),&#xA;        )&#xA;    )&#xA;&#xA;    # Set the duration of the animated title clip&#xA;    animated_background_clip = animated_background_clip.set_duration(&#xA;        TITLE_ANIMATION_DURATION&#xA;    )&#xA;&#xA;    # Assign start times to title image&#xA;    stationary_background_clip = background_image.set_start(TITLE_ANIMATION_DURATION)&#xA;&#xA;    # Assign positions to stationary title image&#xA;    stationary_background_clip = stationary_background_clip.set_position(final_position)&#xA;&#xA;    # Assign durations to stationary title image&#xA;    stationary_background_clip = stationary_background_clip.set_duration(&#xA;        title_duration - TITLE_ANIMATION_DURATION&#xA;    )&#xA;&#xA;    #  Select background music&#xA;    if tone == "normal":&#xA;        music_options = [&#xA;            "Anguish",&#xA;            "Garden",&#xA;            "Limerence",&#xA;            "Lost",&#xA;            "NoWayOut",&#xA;            "Summer",&#xA;            "Never",&#xA;            "Miss",&#xA;            "Touch",&#xA;            "Stellar"&#xA;        ]&#xA;    elif tone == "eerie":&#xA;        music_options = [&#xA;            "Creepy",&#xA;            "Scary",&#xA;            "Spooky",&#xA;            "Space",&#xA;            "Suspense"&#xA;        ]&#xA;    background_music_choice = random.choice(music_options)&#xA;    background_music_path = f"music/eeriemusic/{background_music_choice}.mp3"&#xA;&#xA;    # Create final audio by overlapping background music and concatenated audio&#xA;    final_audio = AudioFileClip(&#xA;        overlap_audio_files(background_music_path, concatenated_audio_path)&#xA;    )&#xA;&#xA;    # Release the concatenated audio&#xA;    concatenated_audio.close()&#xA;&#xA;    # Create subtitles clip using the centered_text_generator&#xA;    subtitles = SubtitlesClip("temp/ttsclips/content_speechmarks.srt",&#xA;                            lambda txt: centered_text_generator_white(txt))&#xA;    subtitles_outline = SubtitlesClip("temp/ttsclips/content_speechmarks.srt",&#xA;                            lambda txt: centered_text_generator_black_blurred_outline(txt))&#xA;&#xA;    # Overlay subtitles on the blurred background&#xA;    final_clip = CompositeVideoClip(&#xA;        [background, animated_background_clip, stationary_background_clip, subtitles_outline, subtitles]&#xA;    )&#xA;&#xA;    # Set the final video dimensions and export the video&#xA;    final_clip = final_clip.set_duration(duration)&#xA;    final_clip = final_clip.set_audio(final_audio)&#xA;&#xA;    final_clip.write_videofile(&#xA;        f"temp/videos/{video_num}.mp4",&#xA;        codec="libx264",&#xA;        fps=60,&#xA;        bitrate="8000k",&#xA;        audio_codec="aac",&#xA;        audio_bitrate="192k",&#xA;        preset="ultrafast",&#xA;        threads=8&#xA;    )&#xA;&#xA;    # Release the concatenated audio&#xA;    concatenated_audio.close()&#xA;&#xA;    # Release the title audio&#xA;    title_audio.close()&#xA;&#xA;    # Release the background video and image&#xA;    background.close()&#xA;    background_image.close()&#xA;&#xA;    # Release the final audio&#xA;    final_audio.close()&#xA;&#xA;    # Release the subtitle clips&#xA;    subtitles.close()&#xA;    subtitles_outline.close()&#xA;&#xA;    # Release the final video clip&#xA;    final_clip.close()&#xA;

    &#xA;

    ive tried turning down my settings, like setting it to "ultrafast" and dropping the bitrate, but nothing seems to work. the only thing I can think of now is that there is something Im doing wrong with moviepy.

    &#xA;

  • FFMPEG Add thumbnail to video [duplicate]

    18 mai 2020, par james-norman

    add a thumbnail to my video file. I have the code that I have compiled with the help of other people from StackOverflow and I have one bit left to finish it off and that is to add a line of code to add video thumbnail.

    &#xA;&#xA;

    you will see some weird text in command like targggget these are words that get replaced by the software so ignore it.

    &#xA;app.path\ffmpeg gets replaced with file-path/ffmpeg
    &#xA;targgggett\targ3et.mp4 file-path/xx.mp4
    &#xA;targgggett\targetimgee - output is example C :\Users\username\Desktop\vidz\New folder\images\demo.png

    &#xA;&#xA;

    "app.path\ffmpeg" -y -i "targgggett\targ3et.mp4" -loop 1 -framerate 30000/1001 -t 5 -i "targgggett\targetimgee" -t 0.5 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -filter_complex "[0:a]atempo=1.0,pan=stereo|c0code>

    &#xA;&#xA;

    i want to add a video thumbnail using targgggett\targetimgee and set video thumbnail only

    &#xA;&#xA;

    "app.path\ffmpeg" -y -i "targgggett\targ3et.mp4" -loop 1 -framerate 30000/1001 -t 5 -i "targgggett\targetimgee" -t 0.5 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -filter_complex "[0:a]atempo=1.0,pan=stereo|c0code>

    &#xA;&#xA;

    i get error

    &#xA;&#xA;

    ffmpeg version git-2020-04-13-59e3a9&#xA;a Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 9.3.1 (GCC) 20200328&#xA;  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --&#xA;enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx &#xA;--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-li&#xA;bspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf&#xA;  libavutil &#xA;     56. 42.102 / 56. 42.102&#xA;  libavcodec     58. 78.102 / 58. 78.102&#xA;  libavformat    58. 42.100 / 58. 42.100&#xA;  libavdevice    58.  9.103 / 58.  9.103&#xA;  libavfilter     7. 77.101 /  7. 77.101&#xA;  libswscale      5.  6.101 /  5.  6.101&#xA;  libswresample &#xA;  3.  6.100 /  3.  6.100&#xA;  libpostproc    55.  6.100 / 55.  6.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;C:\Users\user\Desktop\vidz\New folder\55.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 0&#xA;    compatible_brands: isommp42&#xA;&#xA;    creation_time   : 2020-03-26T08:17:13.000000Z&#xA;  Duration: 00:04:29.12, start: 0.000000, bitrate: 1402 kb/s&#xA;    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 1270 kb/s, 29.97 fps, 29.97 tbr,&#xA; 30k tbn, 59.94 tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 2020-03-26T08:17:13.000000Z&#xA;      handler_name    : ISO Media file produced by Google Inc. Created on: 03/26/2020.&#xA;    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, &#xA;stereo, fltp, 127 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2020-03-26T08:17:13.000000Z&#xA;      handler_name    : ISO Media file produced by Google Inc. Created on: 03/26/2020.&#xA;Input #1, image2, from &#x27;C:\Users\user\Desktop\vidz\New folder\\ima&#xA;ges\20191002_132728.jpg&#x27;:&#xA;  Duration: 00:00:00.03, start: 0.000000, bitrate: 1223868 kb/s&#xA;    Stream #1:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 4032x3024, 29.97 tbr, 29.97 tbn, 29.97 tbc&#xA;Input #2, lavfi, from &#x27;anullsrc=channel&#xA;_layout=stereo:sample_rate=44100&#x27;:&#xA;  Duration: N/A, start: 0.000000, bitrate: 705 kb/s&#xA;    Stream #2:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s&#xA;Option b:v (video bitrate (please use -b:v)) cannot be applied to input url C:\Users\user\Desktop\vidz\&#xA;New folder\\images\20191002_132728.jpg -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.&#xA;Error parsing options for input file C:\Users\user\Desktop\vidz\New folder\\images\20191002_&#xA;132728.jpg.&#xA;Error opening input files: Invalid argument&#xA;

    &#xA;