
Recherche avancée
Autres articles (46)
-
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. -
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...) -
MediaSPIP Player : les contrôles
26 mai 2010, parLes contrôles à la souris du lecteur
En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)
Sur d’autres sites (5311)
-
Revision 1d3ca088f6 : obj_int_extract.bat : Pass obj_int_extract.exe path to obj_int_extract.bat. - Up
21 février 2014, par Tom FineganChanged Paths :
Modify /build/arm-msvs/obj_int_extract.bat
Modify /build/make/gen_msvs_vcxproj.sh
Modify /build/x86-msvs/obj_int_extract.bat
obj_int_extract.bat : Pass obj_int_extract.exe path to obj_int_extract.bat.Update the vcxproj generator to pass the path to the batch file.
Update the batch file the take the path to obj_int_extract.exe as arg
2.Fixes this warning :
warning MSB8012 : TargetPath does not match Linker's OutputFile property
value.Change-Id : I5825f1d1d79f370aeb295bbd2aeb08b22c0e73ab
-
Inserting clips into mp4 via ffmpeg
15 septembre 2024, par lfganI am looking to create mp4 files by combining multiple static mp4s and mp3s.
I have a script already to convert mp3 to mp4 and using the album art as a static background image, and inserting the intro.
What I am having problems with is that it cannot concatenate the videos reliably, or at all for that matter.


This is the code that I currently have, it is ChatGPT, however I gave up as it seemed like it was just running in circles.


setlocal

:: Set variables
set "mp3file=myfile.mp3"
set "coverart=extracted_cover.jpg"
set "outputfile=music.mp4"
set "introfile=intro.mp4"
set "outputendfile=Outro.mp4"
set "wowfile=Wow!.mp4"

:: Step 1: Extract cover art from MP3
ffmpeg -i "%mp3file%" -an -vcodec copy "%coverart%"
if %errorlevel% neq 0 (
 echo Error: Failed to extract cover art from MP3 file.
 exit /b 1
)

:: Step 2: Convert MP3 to MP4 using the extracted cover art
ffmpeg -loop 1 -i "%coverart%" -i "%mp3file%" -c:v libx264 -tune stillimage -c:a aac -b:a 192k -shortest "%outputfile%"
if %errorlevel% neq 0 (
 echo Error: Conversion from MP3 to MP4 failed.
 exit /b 1
)

:: Step 3: Randomly generate two positions for Wow!.mp4 insertions
:: Random positions will be between 10 and 50 seconds
set /a "pos1=%random% %% 40 + 10"
set /a "pos2=%random% %% 40 + 10"

:: Ensure pos1 and pos2 are different
if %pos1% EQU %pos2% (
 set /a "pos2=%pos1%+10"
)

:: Print positions for debugging
echo Random insertion positions:
echo Position 1: %pos1%
echo Position 2: %pos2%

:: Step 4: Split the music mp4 into parts at the random positions
:: Part 1: From the beginning to pos1
ffmpeg -i "%outputfile%" -c copy -ss 0 -to %pos1% -y "part1.mp4"
if not exist "part1.mp4" (
 echo Error: Failed to create part1.mp4
 exit /b 1
)

:: Part 2: From pos1 to pos2
ffmpeg -i "%outputfile%" -c copy -ss %pos1% -to %pos2% -y "part2.mp4"
if not exist "part2.mp4" (
 echo Error: Failed to create part2.mp4
 exit /b 1
)

:: Part 3: From pos2 to the end
ffmpeg -i "%outputfile%" -c copy -ss %pos2% -y "part3.mp4"
if not exist "part3.mp4" (
 echo Error: Failed to create part3.mp4
 exit /b 1
)

:: Step 5: Concatenate the files in the required order
(
 echo file 'intro.mp4'
 echo file 'part1.mp4'
 echo file 'Wow!.mp4'
 echo file 'part2.mp4'
 echo file 'Wow!.mp4'
 echo file 'part3.mp4'
 echo file 'Outro.mp4'
) > concat_list.txt

ffmpeg -f concat -safe 0 -i concat_list.txt -c copy final_output.mp4
if %errorlevel% neq 0 (
 echo Error: Failed to concatenate the video files.
 exit /b 1
)

:: Cleanup
del part1.mp4 part2.mp4 part3.mp4 concat_list.txt "%coverart%"

echo Done! The final video is saved as final_output.mp4



exactly what it is supposed to do :


- 

- Convert "myfile.mp3" to "music.mp4" with image (works)
- Add "intro.mp4" to the start of "music.mp4" and "Output.mp4" to the end (works)
- Split "music.mp4" into 3 parts, randomly, at a minimum 10s after intro.mp4 and 10s before Outro.mp4 (can for some reason only create part 1)
- Put all clips in order (unknown, probably works but part 2 and 3 wont generate so it cannot get to that step.)










Edit :
I forgot to add the error message that I am getting. Here it is :


[out#0 @ 000002e024a6ed00] -to value smaller than -ss; aborting.
Error opening output file part2.mp4.
Error opening output files: Invalid argument
Error: Failed to create part2.mp4



-
First Capturing thumbnail from a Video using php ?
28 juillet 2012, par AjayI have an upload functionality on my site. And i want the php script to take out a random frame from the uploaded video, and save it as an image. Is that possible ?please guide me how can i get first capture image in video upload in php
Thanks for Advance.