
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (15)
-
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
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 -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (5705)
-
Applying audio to video background using ffmpeg_kit_flutter package not working in flutter
2 décembre 2024, par MhmD YoI am trying to merge video and audio and downloading the video in a flutter app using ffmpeg_kit_flutter package, it works fine with the videos that recorded by screen recorder app which records the screen of my phone, but it does not works with the videos that recorded by my phone camera or any video else and I do not know where the problem is.
Here's my code :


Future<void> mergeRecordWithIntro({required String videoPath, required String audiPath, }) 
async 
 {
 final random = Random();
 final directory = await getTemporaryDirectory();

 String outputVideoPath = '${directory.path}/${random.nextInt(10000)}_merged_video.mp4';
 String ffmpegCommand = '-i $videoPath -i $audiPath -c:v copy -c:a aac $outputVideoPath';

 await FFmpegKit.execute(ffmpegCommand)
 .then((value) async {
 await Gal.putVideo(outputVideoPath);
 emit(MergeVideoAudioSuccessState());
 }).catchError((error){
 emit(MergeVideoAudioFailureState());
 });
}
</void>


-
Ngh, whitespace lines are significant in package import
11 août 2011, par Monty -
Haskell - Turning multiple image-files into one video-file using the ffmpeg-light package
25 avril 2021, par oRoleBackground

I wrote an application for image-processing which uses theffmpeg-light
package to fetch all the frames of a given video-file so that the program afterwards is able to apply grayscaling, as well as edge detection alogrithms to each of the frames.

Now I'm trying to put all of the frames back into a single video-file.


Used Libs

ffmpeg-light-0.12.0

JuicyPixels-3.2.8.3

...

What have I tried ?

I have to be honest, I didn't really try anything because I'm kinda clueless where and how to start. I saw that there is a package calledCommand
which allows running processes/commands using the command line. With that I could use ffmpeg (notffmpeg-light
) to create a video out of image-files which I would have to save to the hard drive first but that would be kinda hacky.
Within the documentation of
ffmpeg-light
on hackage (ffmpeg-light docu) I found the frameWriter function which sounds promising.

frameWriter :: EncodingParams -> FilePath -> IO (Maybe (AVPixelFormat, V2 CInt, Vector CUChar) -> IO ()) 



I guess
FilePath
would be the location where the video file gets stored but I can't really imagine how to apply the frames asEncodingParams
to this function.

Others

I can access :

- 

r
,g
,b
,a
as well asy
.a
values- image width / height / format






Question

Is there a way to achieve this using theffmpeg-light
package ?

As the
ffmpeg-light
package lacks of documentation when it comes to conversion from images to video, I really would appreciate your help. (I do not expect a fully working solution.)

Code

The code that reads the frames :

-- Gets and returns all frames that a given video contains
getAllFrames :: String -> IO [(Double, DynamicImage)]
getAllFrames vidPath = do 
 result <- try (imageReaderTime $ File vidPath) :: IO (Either SomeException (IO (Maybe (Image PixelRGB8, Double)), IO()))
 case result of 
 Left ex -> do 
 printStatus "Invalid video-path or invalid video-format detected." "Video" 
 return []
 Right (getFrame, _) -> addNextFrame getFrame [] 

-- Adds up all available frames to a video.
addNextFrame :: IO (Maybe (Image PixelRGB8, Double)) -> [(Double, DynamicImage)] -> IO [(Double, DynamicImage)]
addNextFrame getFrame frames = do
 frame <- getFrame
 case frame of 
 Nothing -> do 
 printStatus "No more frames found." "Video"
 return frames
 _ -> do 
 newFrameData <- fmap ImageRGB8 . swap . fromJust <$> getFrame 
 printStatus ("Frame: " ++ (show $ length frames) ++ " added.") "Video"
 addNextFrame getFrame (frames ++ [newFrameData]) 



Where I am stuck / The code that should convert images to video :


-- Converts from several images to video
juicyToFFmpeg :: [Image PixelYA8] -> ?
juicyToFFmpeg imgs = undefined