
Recherche avancée
Autres articles (13)
-
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...) -
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 (...) -
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)
Sur d’autres sites (6297)
-
PHP Foreach query only displays final result for slideshow ?
22 janvier 2023, par ShaneRibzUsing a query I pull the most liked video's on a localhosted stream webpage, and use FFMPEG to create a thumbnail if one isnt already existing and the video length.


The query succesfully pulls the 4 most liked video's and displays them in a carousel. FFMPEG succesfully creates each thumbnail, and gets the length of each video.


Somewhere, for whatever reason I cant figure out, only the final slide in the carousel displays the thumbnail as its background.


Sorry if my code is messy, I'm learning how to better optimize.


<?php
 $sql = "use info";
 $pdo->exec($sql);
 $stmt = $pdo->query("SELECT * FROM `files` ORDER BY `like` DESC LIMIT 4");
 $filelist = $stmt->fetchAll(PDO::FETCH_ASSOC);
 $h = 0;
 foreach ($filelist as $row) {
 if ($h < 25){
 $h++;
 
 $name = $row['name'];
 $location = $row['location'];
 $type = $row['type'];
 $uploadby = $row['uploadby'];
 $like = $row['like'];
 $id = $row['fileid'];
 $cat1 = $row['Cat1'];
 $cat2 = $row['Cat2'];
 
 $ffmpeg = 'F:\\xampp\ffmpeg.exe'; 
 $location = str_replace("/","\\", $location);
 $video = 'F:\xampp\htdocs\\'. $location; 
 $bigloc = "F:\\xampp\htdocs\\thumb\big";
 $smallloc = "F:\\xampp\htdocs\\thumb\small";
 $image = $bigloc . "\\" . $name . ".jpg"; 
 $image2 = $smallloc . "\\" . $name. ".jpg"; 
 
 if (file_exists($image) and (file_exists($image2))) {
 
 } else {
 echo $image . " does not exist";
 $cmd="$ffmpeg -ss 00:25:00 -i ". "\"" . $video . "\"". " -s 1920x540 -vframes 1 ". "\"" .$image. "\"" . " -report"; 
 $cmd2="$ffmpeg -ss 00:25:00 -i ". "\"" . $video . "\""." -s 270x370 -vframes 1 ". "\"" .$image2. "\"";
 echo "<br />". $cmd . "<br />".$cmd2."<br />";
 exec($cmd);
 exec($cmd2);
 }
 
 $file = "\"". $video. "\"";
 $result = shell_exec('ffmpeg -i ' . escapeshellcmd($file) . ' 2>&1');
 preg_match('/(?<=Duration: )(\d{2}:\d{2}:\d{2})\.\d{2}/', $result, $match);
 $time = $match[1];
 $image = "thumb/big/" . $name . ".jpg"; 
 $image2 = "thumb/small/" . $name. ".jpg";

 ?>

 <div class="single-hero-slider-wrap single-animation-wrap slider-height-hm4 bg-image-hm4 slider-bg-color-black d-flex align-items-center slider-bg-position-1 bg-black" style="&lt;?php echo &#x27;background-image:url(&#x27;. $image.&#x27;);&#x27;;?>">
 <div class="slider-content-hm4 slider-animated">
 <h1 class="title animated"><?php echo $name;?></h1>
 <div class="sub-title-time-wrap">
 <span class="sub-title animated"><?php if ($cat2 != ""){ echo $cat1 .", ". $cat2; }else{ echo $cat1;}?></span>
 <span class="time animated"><?php echo $time;?></span>
 </div>
 <div class="slider-button">
 <a href="http://stackoverflow.com/feeds/tag/movie-details.html" class="btn-style-hm4 animated">Watch Now</a>
 </div>
 </div>
 </div>

 <?php 
 }
 } 
 ?>



When inspecting the source code on my web browser ;
"
style="<?php echo 'background-image:url('. $image.');';?>"
", this will only appear on the final slide. The first 3 slides wont have "background-image" at all.

I feel as though I'm making a silly mistake and just cant see it.


EDIT
I should note, the "$name" and "$time" for each displays properly, its just the background-image that does not.


EDIT 2
Here is the source code :


<div class="single-hero-slider-wrap single-animation-wrap slider-height-hm4 bg-image-hm4 slider-bg-color-black d-flex align-items-center slider-bg-position-1 bg-black" style="background-image: url(&#x27;thumb/big/Alita Battle Angel.png&#x27;);">
</div>


The "background-image" shows in source, but during inspect element it does not. No errors populate either.


-
How to get frame number of Blackdetect result ?
16 janvier 2023, par JustNoobish619I am attempting to get the frame number of a black detect result. For instance, on Blackdetect I get two results that display a start time, end time and duration, how do I get the frame number of the start time ?


FPS is 59.94


Here's my command I'm working with to get my blackdetect :


ffmpeg –i e1.mp4 –vf “blackdetect=d=0:pix_th=0.40,” –an –f null -



It results in (the start time value is the frame's timestamp (ffmpeg wiki says))


[blackdetect @ 000001f4d022c900] black_start:1.06773 black_end:1.08442 black_duration:0.0166833
[blackdetect @ 000001f4d022c900] black_start:1.41808 black_end:1.43477 black_duration:0.0166833



When I append
-n
to it to hopefully display the frame number however, it spits out 3 entries of random frame numbers that aren't even remotely close to the blackdetect frame number really is

ffmpeg –i e1.mov –vf “blackdetect=d=0:pix_th=0.40” -n –an –f null - 2>showinfo.log



How can I get the frame number of the start time of blackdetect ?


-
ffmpeg cut the video and get accurate begining time of the result
1er décembre 2022, par Pavlo SharhanI do the cut via :


ffmpeg -i long_clip.mp4 -ss 00:00:10.0 -c copy -t 00:00:04.0 short_clip.mp4



I need to know the precise time where did the ffmpeg do the cut (Time of the closest keyframe before the 00:00:10.0)


Currently, I'm using the following ffprobe command to list all the keyframes and select the closest before 00:00:10.0


ffprobe -show_frames -skip_frame nokey long_clip.mp4



It works extremely slow (I run It on Jetson Nano, and It is a few minutes to list the keyframes for 30 sec video, although the cutting is done in 0.2seconds)


I hope there is the much faster way to know the time of the keyframe where ffmpeg does the cut, at least because ffmpeg seeks to this keyframe and cuts the video less than in half a second.


So in other words the question is : How to get the time of the keyframe where ffmpeg does the cut not listing all the keyframes ?