
Recherche avancée
Médias (39)
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (41)
-
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...) -
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 (7889)
-
different results when trying to close video
19 mars 2019, par mikiI am trying to use FFmpegWriter in order to write a video, which is most of the time working. But, sometimes it just does not want to close the video at the end and return simply this error "AttributeError : ’FFmpegWriter’ object has no attribute ’_proc’" which does not make sense to me, mostly because it works sometimes, and sometimes not. Also, sometimes restarting the kernel helps, but not always... any help is greatly appreciated.
Here is the code and error :writer = skvideo.io.FFmpegWriter(path_to_video,
inputdict={'-r': str(fps), '-s':'{}x{}'.format(width,height)},
outputdict={'-r': str(fps), '-c:v': 'libx264', '-crf': str(crf), '-preset': 'ultrafast', '-pix_fmt':'yuvj420p'})
'''...'''
#add frame to video
writer.writeFrame(li_images[i])
#close video
writer.close()produce this error :
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in <module>()
----> 1 writer.close()
c:\users\user\anaconda3\lib\site-packages\skvideo\io\ffmpeg.py in close(self)
428
429 """
--> 430 if self._proc is None: # pragma: no cover
431 return # no process
432 if self._proc.poll() is not None:
AttributeError: 'FFmpegWriter' object has no attribute '_proc'
</module> -
How to use FFMPEG -vframe in wordpress creates jpg then clean filename to have only single dot ?
18 mars 2019, par Mr.AXWhat is the best way to output jpg file from video file using FFMPEG avoiding file name to contain double dots resulting file being treated as non existent ?
My goal is to create a clean alternative solution to avoid making jpg extension file having double dots in its created filename, from its original video file (such as mp4). Below is the coding I’m currently using for video uploading via ffmpeg, creating an extra thumbnail file from its video file :
// get the videos uploaded
foreach ($videos as $video) {
if ($profile_author_id == $userid || current_user_can('level_10')) {
$imagebuttons = '<span class="edit-buttons"><span class="icon button-delete icon-cancel rad3"></span></span>';
}
echo '<div class="profile-video-thumb-wrapper"><div class="profile-img-thumb profile-video-thumb rad3" style="background: url('.$video->guid.'.jpg) center no-repeat; background-size: cover;">';
echo $imagebuttons;
if(get_post_meta($video->ID, 'processing', true) && !is_video_processing_running(get_post_meta($video->ID, 'processing', true))) {
delete_post_meta($video->ID, 'processing');
unlink(get_post_meta($video->ID, "original_file", true));
delete_post_meta($video->ID, 'original_file');
}
$file_path = get_attached_file($video->ID);
$file_path_thumb = $file_path.".jpg";
if(!file_exists($file_path_thumb)) {
$output = shell_exec("/usr/local/bin/ffmpeg -i $file_path");
$videoresizeheight = get_option("videoresizeheight") ? get_option("videoresizeheight") : '400';
$comd = "/usr/local/bin/ffmpeg -y -i \"$file_path\" -f mjpeg -vframes 1 -ss 00:00:03.000 -vf scale=".$videoresizeheight.":-1 \"$file_path_thumb\" 2>&1";
shell_exec($comd);
}
if(get_post_meta($video->ID, 'processing', true)) {
if ($profile_author_id == $userid || current_user_can('level_10')) {
echo '<span class="video-processing rad3">'._d('this video is still processing',1269).'</span>';
echo '<img data-original-url="'.get_template_directory_uri().'/i/video-placeholder.svg" class="mobile-ready-img rad3" alt="'.get_the_title().'" data-responsive-img-url="'.get_template_directory_uri().'/i/video-placeholder-mobile.svg" style='max-width: 300px; max-height: 300px' />';
}
} else {
echo '<div></div>([^a-zA-Z0-9])/", "", $video->post_title).'" class="video-player-lightbox text-center hide" itemprop="video" itemscope itemtype="http://schema.org/VideoObject">';
echo '';
echo '';
echo '<video height="100%" width="100%" controls="controls">';
echo '<source src="'.$video->guid.'" type="video/mp4">';
echo _d("Your browser does not support the video tag.",1270);
echo '</source></video> ';
echo '</div>';
echo '<a href="#'.preg_replace("></a>([^a-zA-Z0-9])/", "", $video->post_title).'" rel="profile-video">';
echo '<img src="http://stackoverflow.com/feeds/tag/src" style='max-width: 300px; max-height: 300px' />"'.$video->guid.'.jpg" class="hide" />';
echo '<img src="http://stackoverflow.com/feeds/tag/'.get_template_directory_uri().'/i/video-placeholder.svg" class="video-image-play" style='max-width: 300px; max-height: 300px' />';
echo '';
}
echo '<div class="clear"></div></div>'."\n";
}
if(count($videos) > 0) {
echo '<div class="clear10"></div>';
}One of the solution is to add and change
$file_path_v = $file_path
echo str_replace('.', '_', $file_path_v);
$file_path_thumb = pathinfo('$file_path_v.\".jpg\";')but how would I change the line that suppose to display its thumbnail at :
echo '';
I would like some pointers if anyone can have the cleanest solution to work around it ?
-
Changing/Replace 1st dot in every generated jpg filename from video to remain single dot
23 mars 2019, par Mr.AXmy site is using ffmpeg to generate a thumbnail jpg for every video being uploaded. The code as below :
// get the videos uploaded
foreach ($videos as $video) {
if ($profile_author_id == $userid || current_user_can('level_10')) {
$imagebuttons = '<span class="edit-buttons"><span class="icon button-delete icon-cancel rad3"></span></span>';
}
echo '<div class="profile-video-thumb-wrapper"><div class="profile-img-thumb profile-video-thumb rad3" style="background: url('.$video->guid.'.jpg) center no-repeat; background-size: cover;">';
echo $imagebuttons;
if(get_post_meta($video->ID, 'processing', true) && !is_video_processing_running(get_post_meta($video->ID, 'processing', true))) {
delete_post_meta($video->ID, 'processing');
unlink(get_post_meta($video->ID, "original_file", true));
delete_post_meta($video->ID, 'original_file');
}
$file_path = get_attached_file($video->ID);
$file_path_thumb = $file_path.".jpg";
if(!file_exists($file_path_thumb)) {
$output = shell_exec("/usr/local/bin/ffmpeg -i $file_path");
$videoresizeheight = get_option("videoresizeheight") ? get_option("videoresizeheight") : '400';
$comd = "/usr/local/bin/ffmpeg -y -i \"$file_path\" -f mjpeg -vframes 1 -ss 00:00:03.000 -vf scale=".$videoresizeheight.":-1 \"$file_path_thumb\" 2>&1";
shell_exec($comd);
}
if(get_post_meta($video->ID, 'processing', true)) {
if ($profile_author_id == $userid || current_user_can('level_10')) {
echo '<span class="video-processing rad3">'._d('this video is still processing',1269).'</span>';
echo '<img data-original-url="'.get_template_directory_uri().'/i/video-placeholder.svg" class="mobile-ready-img rad3" alt="'.get_the_title().'" data-responsive-img-url="'.get_template_directory_uri().'/i/video-placeholder-mobile.svg" style='max-width: 300px; max-height: 300px' />';
}
} else {
echo '<div></div>([^a-zA-Z0-9])/", "", $video->post_title).'" class="video-player-lightbox text-center hide" itemprop="video" itemscope itemtype="http://schema.org/VideoObject">';
echo '';
echo '';
echo '<video height="100%" width="100%" controls="controls">';
echo '<source src="'.$video->guid.'" type="video/mp4">';
echo _d("Your browser does not support the video tag.",1270);
echo '</source></video> ';
echo '</div>';
echo '<a href="#'.preg_replace("></a>([^a-zA-Z0-9])/", "", $video->post_title).'" rel="profile-video">';
echo '<img src="http://stackoverflow.com/feeds/tag/src" style='max-width: 300px; max-height: 300px' />"'.$video->guid.'.jpg" class="hide" />';
echo '<img src="http://stackoverflow.com/feeds/tag/'.get_template_directory_uri().'/i/video-placeholder.svg" class="video-image-play" style='max-width: 300px; max-height: 300px' />';
echo '';
}
echo '<div class="clear"></div></div>'."\n";
}
if(count($videos) > 0) {
echo '<div class="clear10"></div>';
}This as a result generates a thumbnail jpg file for every video uploaded ; but the problem occurs when the filename of jpg includes a dot brought forward from the original video file, example I upload a video with filename video.mp4, this will generate a jpg file call video.mp4.jpg. And this, my website will treat this file as none existence.
Now I need to find a solution that can generate the correct thumbnail filename while still sticking to use wordpress tags, which is changing the .mp4 to -mp4 when adding an additional .jpg extention.