
Recherche avancée
Autres articles (28)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users.
Sur d’autres sites (5645)
-
Segmenting a video and adding text that differs in each segment [FFMPEG]
31 octobre 2023, par Kal-TohI have a folder full of videos I want to segment, resize and add text to. So far I've managed to segment and resize them.


I'm trying to add text in a TikTok Style : [Kind of like][1] this but black text in a white background. (If that isn't possible, I'd be fine with just white text).


I already have the font file(.oft file type, is that ok or does it need to be .ttf ?)
The video is being converted to 720x1280 (9:16) and I'd like the text to display at the top centre of the video, taking up roughly the top 25%.


Further to this, and this is where I'm having trouble understanding the process :


I'd like text at the bottom of the video in the same style, that would change each segment.


For example :


I have a 10 minute long video. I want to split this video into 60 second segments. Each segment will have a title (the same across each segment) and a sub title at the bottom that would differ for each segment (for example 'Part 1/10', 'Part 2/10' etc)


I know I could run one command to segment each video, add the title and change the aspect ratio and a second command to add the bottom text, feeding in a variable based on the number of mp4 files in the folder, however that doesn't seem like the most efficient process. Is there a way to do this all in one command ?


This is the command I'm using so far :


ffmpeg_command = [
 'ffmpeg',
 '-i', os.path.join(input_folder, video_file),
 '-vf', f'scale=720:1280:force_original_aspect_ratio=decrease,pad=720:1280:(ow-iw)/2:(oh-ih)/2
 ,drawtext=text=\'{text}\':x=(w-tw)/2:y=(h/4)-th:fontsize=24:fontfile={font_path}:fontcolor=black:box=1:boxcolor=white',
 '-threads', '100',
 "-c:a", "copy",
 '-t', str(duration),
 '-segment_time', '160', # 3 minutes
 '-reset_timestamps', '1',
 '-f', 'segment',
 os.path.join(output_subfolder, f'{video_name}_%03d.mp4')
 ]



Although not styled the way I want it to be, it's a decent start and all else works fine.


It's just the bottom text I can't figure.
[1] : https://i.insider.com/61aa608a983f360019c854a5?width=1300&format=jpeg&auto=webp


-
Displaying ffmpeg conversion progress
29 mars 2014, par HiigaranI'm trying to get an admin function made, in which I want to show a basic status of any file conversion(s) that may or may not be happening upon page load. I'm not entirely sure how to proceed with this, so here is what I have at the moment :
exec("ffprobe -v quiet -print_format json -show_format '".$fileNameIn.".".$ext."' > /var/www/resources/ffmpegFormat.log");
exec("/ffmpeg/ffmpeg -loglevel 'verbose' -i '".$fileNameIn.".".$ext."' '".$fileNameOut.".flac' null >/dev/null 2>/var/www/resources/ffmpeg.log &",$ffmpegOutput);My idea is to use ffprobe to output some information about the file to be converted, then use PHP in some way to read the output file (ffmpegFormat.log) for the total file duration. Once read, ffmpeg begins, while outputting to its own file (ffmpeg.log).
I'm not looking for anything fancy, like live updates on the progress, so I'm content with simply having a script read the current duration from the last line of the ffmpeg.log file, compare it to the total duration from the ffmpegFormat.log file, and display a percentage only after a page load/refresh.
I've placed a restriction on conversion to only one file at a time, for the sake of simplifying this progress indicator (and due to a lack of processing power on this computer).
Assuming there's no simpler way than my idea, how can I do this ?
-
Video playing, how to play a video back a a rapid rate at random timestamp locations
10 avril 2020, par Zarc RowdenNote : this is a mildly general question that is looking more for pointers in the right direction and not exactly requiring a concise coded answer. I appreciate any and all input, thank you for lending your brain power to me for this moment :)



I have a script that receives midi messages in real time and triggers playback of a single video on various timestamps that are changed/selected regularly and randomly by a user. Currently this is working in the browser, however, I've realized that there is some noticeable latency between (i'm guessing the cause here so please correct me) the moment a request to play a video at a specific time is made(note : the video is not being requested over the wire, this action does not take place until a JS Blob Url is loaded into the player) and the moment where that request is fulfilled and delivered from storage to pixels on the screen.



My question is : Is it reasonable to assume that there is a tool out there, that given the correct video format and optimizations both in the code and in the file that could load an entire, say : 1 gb video into memory and play it back at random timestamps every 60 milliseconds at completely random, constantly changing timestamps.



If you're now all the way down here... Thanks for reading this far, or scanning ! Please let me know if this question makes any sense / could be improved, I'm happy to clarify further.