
Recherche avancée
Médias (3)
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (93)
-
Amélioration de la version de base
13 septembre 2013Jolie 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, parLe 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, parLa 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, tabletI 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 tristanI'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.


from moviepy.video.fx.all import resize
from moviepy.video.tools.subtitles import SubtitlesClip
from moviepy.editor import (
 CompositeVideoClip,
 AudioFileClip,
 VideoFileClip,
 ImageClip,
 TextClip
)
import random
import moviepy.config as cfg
import librosa
from imagegenerator import draw_title
from audioeditor import concatenate_audios
import soundfile as sf
import numpy as np

# Constants
VIDEO_FADE_DURATION = 0.4
SPEED_FACTOR = 1.1
TEXT_WIDTH = 600
MINIMUM_FONT_SIZE = 60
FONT_COLOR = "white"
OUTLINE_COLOR = "black"
TITLE_ANIMATION_DURATION = 0.25
ANIMATION_DURATION = 0.2

# Configure imagemagick binary
cfg.change_settings(
 {
 "IMAGEMAGICK_BINARY": "magick/magick.exe"
 }
)

# Ease-out function
def ease_out(t):
 return 1 - (1 - t) ** 2

# Overlap audio files
def overlap_audio_files(audio_path1, audio_path2):
 # Load the first audio file
 audio1, sr1 = librosa.load(audio_path1, sr=None)

 # Load the second audio file
 audio2, sr2 = librosa.load(audio_path2, sr=None)

 # Ensure both audio files have the same sample rate
 if sr1 != sr2:
 raise ValueError("Sample rates of the two audio files must be the same.")

 # Calculate the duration of audio2
 audio2_duration = len(audio2)

 # Tile audio1 to match the duration of audio2
 audio1 = np.tile(audio1, int(np.ceil(audio2_duration / len(audio1))))

 # Trim audio1 to match the duration of audio2
 audio1 = audio1[:audio2_duration]

 # Combine the audio files by superimposing them
 combined_audio = audio1 + audio2

 # Save the combined audio to a new file
 output_path = "temp/ttsclips/combined_audio.wav"
 sf.write(output_path, combined_audio, sr1)

 return output_path

# Generator function for subtitles with centered alignment and outline
def centered_text_generator_white(txt):
 return TextClip(
 txt,
 font=r"fonts/Invisible-ExtraBold.otf",
 fontsize=86,
 color=FONT_COLOR,
 bg_color='transparent', # Use a transparent background
 align='center', # Center the text
 size=(1072, 1682),
 method='caption', # Draw a caption instead of a title
 )

# Generator function for subtitles with centered alignment and blurred outline
def centered_text_generator_black_blurred_outline(txt, blur_factor=3):
 outline_clip = TextClip(
 txt,
 font=r"fonts/Invisible-ExtraBold.otf",
 fontsize=86,
 color=OUTLINE_COLOR,
 bg_color='transparent', # Use a transparent background
 align='center', # Center the text
 size=(1080, 1688),
 method='caption', # Draw a caption instead of a title
 )

 # Blur the black text (outline)
 blurred_outline_clip = outline_clip.fx(resize, 1.0 / blur_factor)
 blurred_outline_clip = blurred_outline_clip.fx(resize, blur_factor)

 return blurred_outline_clip

# Compile video function
def compile_video(title_content, upvotes, comments, tone, subreddit, video_num):
 # Set the dimensions of the video (720x1280 in this case)
 height = 1280

 # Concatenate the audios
 concatenate_audios()

 concatenated_audio_path = r"temp/ttsclips/concatenated_audio.mp3"
 title_audio_path = r"temp/ttsclips/title.mp3"

 title_audio = AudioFileClip(title_audio_path)
 concatenated_audio = AudioFileClip(concatenated_audio_path)

 # Calculate for video duration
 title_duration = title_audio.duration
 duration = concatenated_audio.duration

 # Set background
 background_path = f"saved_videos/newmcparkour.mp4"
 background = VideoFileClip(background_path)
 background_duration = background.duration
 random_start = random.uniform(0, background_duration - duration)
 background = background.subclip(random_start, random_start + duration)

 # Apply fade-out effect to both background clips
 background = background.crossfadeout(VIDEO_FADE_DURATION)

 # Generate the background image with rounded corners
 background_image_path = draw_title(title_content, upvotes, comments, subreddit)

 # Load the background image with rounded corners
 background_image = ImageClip(background_image_path)

 # Set the start of the animated title clip
 animated_background_clip = background_image.set_start(0)

 # Set the initial position of the text at the bottom of the screen
 initial_position = (90, height)

 # Calculate the final position of the text at the center of the screen
 final_position = [90, 630]

 # Animate the title clip to slide up over the course of the animation duration
 animated_background_clip = animated_background_clip.set_position(
 lambda t: (
 initial_position[0],
 initial_position[1]
 - (initial_position[1] - final_position[1])
 * ease_out(t / TITLE_ANIMATION_DURATION),
 )
 )

 # Set the duration of the animated title clip
 animated_background_clip = animated_background_clip.set_duration(
 TITLE_ANIMATION_DURATION
 )

 # Assign start times to title image
 stationary_background_clip = background_image.set_start(TITLE_ANIMATION_DURATION)

 # Assign positions to stationary title image
 stationary_background_clip = stationary_background_clip.set_position(final_position)

 # Assign durations to stationary title image
 stationary_background_clip = stationary_background_clip.set_duration(
 title_duration - TITLE_ANIMATION_DURATION
 )

 # Select background music
 if tone == "normal":
 music_options = [
 "Anguish",
 "Garden",
 "Limerence",
 "Lost",
 "NoWayOut",
 "Summer",
 "Never",
 "Miss",
 "Touch",
 "Stellar"
 ]
 elif tone == "eerie":
 music_options = [
 "Creepy",
 "Scary",
 "Spooky",
 "Space",
 "Suspense"
 ]
 background_music_choice = random.choice(music_options)
 background_music_path = f"music/eeriemusic/{background_music_choice}.mp3"

 # Create final audio by overlapping background music and concatenated audio
 final_audio = AudioFileClip(
 overlap_audio_files(background_music_path, concatenated_audio_path)
 )

 # Release the concatenated audio
 concatenated_audio.close()

 # Create subtitles clip using the centered_text_generator
 subtitles = SubtitlesClip("temp/ttsclips/content_speechmarks.srt",
 lambda txt: centered_text_generator_white(txt))
 subtitles_outline = SubtitlesClip("temp/ttsclips/content_speechmarks.srt",
 lambda txt: centered_text_generator_black_blurred_outline(txt))

 # Overlay subtitles on the blurred background
 final_clip = CompositeVideoClip(
 [background, animated_background_clip, stationary_background_clip, subtitles_outline, subtitles]
 )

 # Set the final video dimensions and export the video
 final_clip = final_clip.set_duration(duration)
 final_clip = final_clip.set_audio(final_audio)

 final_clip.write_videofile(
 f"temp/videos/{video_num}.mp4",
 codec="libx264",
 fps=60,
 bitrate="8000k",
 audio_codec="aac",
 audio_bitrate="192k",
 preset="ultrafast",
 threads=8
 )

 # Release the concatenated audio
 concatenated_audio.close()

 # Release the title audio
 title_audio.close()

 # Release the background video and image
 background.close()
 background_image.close()

 # Release the final audio
 final_audio.close()

 # Release the subtitle clips
 subtitles.close()
 subtitles_outline.close()

 # Release the final video clip
 final_clip.close()



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.


-
FFMPEG Add thumbnail to video [duplicate]
18 mai 2020, par james-normanadd 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.



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

app.path\ffmpeg gets replaced with file-path/ffmpeg

targgggett\targ3et.mp4 file-path/xx.mp4

targgggett\targetimgee - output is example C :\Users\username\Desktop\vidz\New folder\images\demo.png


"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>



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



"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>



i get error



ffmpeg version git-2020-04-13-59e3a9
a Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 9.3.1 (GCC) 20200328
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --
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 
--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
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
 libavutil 
 56. 42.102 / 56. 42.102
 libavcodec 58. 78.102 / 58. 78.102
 libavformat 58. 42.100 / 58. 42.100
 libavdevice 58. 9.103 / 58. 9.103
 libavfilter 7. 77.101 / 7. 77.101
 libswscale 5. 6.101 / 5. 6.101
 libswresample 
 3. 6.100 / 3. 6.100
 libpostproc 55. 6.100 / 55. 6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\user\Desktop\vidz\New folder\55.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42

 creation_time : 2020-03-26T08:17:13.000000Z
 Duration: 00:04:29.12, start: 0.000000, bitrate: 1402 kb/s
 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,
 30k tbn, 59.94 tbc (default)
 Metadata:
 creation_time : 2020-03-26T08:17:13.000000Z
 handler_name : ISO Media file produced by Google Inc. Created on: 03/26/2020.
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, 
stereo, fltp, 127 kb/s (default)
 Metadata:
 creation_time : 2020-03-26T08:17:13.000000Z
 handler_name : ISO Media file produced by Google Inc. Created on: 03/26/2020.
Input #1, image2, from 'C:\Users\user\Desktop\vidz\New folder\\ima
ges\20191002_132728.jpg':
 Duration: 00:00:00.03, start: 0.000000, bitrate: 1223868 kb/s
 Stream #1:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 4032x3024, 29.97 tbr, 29.97 tbn, 29.97 tbc
Input #2, lavfi, from 'anullsrc=channel
_layout=stereo:sample_rate=44100':
 Duration: N/A, start: 0.000000, bitrate: 705 kb/s
 Stream #2:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s
Option b:v (video bitrate (please use -b:v)) cannot be applied to input url C:\Users\user\Desktop\vidz\
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.
Error parsing options for input file C:\Users\user\Desktop\vidz\New folder\\images\20191002_
132728.jpg.
Error opening input files: Invalid argument