
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (56)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
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 (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (5513)
-
Thumbnail is not created in php
21 novembre 2014, par Desipicforu BlogspotI am writing this code to create thumbnail of uploaded video. Video is successfully created but thumbnail is not crated to directory.
There is no error in apache error log file. And when i run this command in terminal thumbnail is successfully created to my directory, But it’s not working by php.
Here is my code :-
<?php
if(isset($_REQUEST['AddFiles'])){
$targetFolder = 'uploads'; //Path to the Uploads Folder
if (!empty($_FILES)) {
for($i=0;$i' . uniqid().".".$info->getExtension();
$fileParts = pathinfo($_FILES['upload_file']['name'][$i]);
if(isset($fileParts['extension'])){
//if (in_array($fileParts['extension'],$fileTypes))
{
move_uploaded_file($tempFile,$targetFile);
echo '<div class="success">'.$_FILES['upload_file']['name'][$i].' was saved successfully inside '. $_SERVER['HTTP_HOST']."/". dirname($_SERVER["REQUEST_URI"])."/".$targetFile.' Directory</div>';
$videoUrl=$_SERVER['HTTP_HOST']."/". dirname($_SERVER["REQUEST_URI"])."/".$targetFile;
$servername = "localhost";
$username = "root";
$password = "root";
$dbname = "a7630155_google";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "INSERT INTO video (title, artist, duration,thumb_url,video)
VALUES ('".$_REQUEST['videoName']."', '".$_REQUEST['category']."','', 'john@example.com','".$videoUrl."')";
if ($conn->query($sql) === TRUE) {
// where ffmpeg is located
$ffmpeg = '/usr/bin/ffmpeg';
//video dir
$video = "http://".$videoUrl;
//where to save the image
$image = rtrim($targetFolder,'/');
//time to take screenshot at
$interval = 5;
//screenshot size
$size = '640x480';
//ffmpeg command
$cmd = "$ffmpeg -i $video -deinterlace -an -ss $interval -f mjpeg -t 1 -r 1 -y -s $size $image 2>&1";
shell_exec($cmd);
echo $cmd;
exit;
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br />" . $conn->error;
}
$conn->close();
}
/*else{
echo '<div class="fail">'.$_FILES['upload_file']['name'][$i].' couldn\'t be saved because of invalid file type.</div>';
}*/
}else{
echo '<div class="fail">'.$_FILES['upload_file']['name'][$i].' couldn\'t be saved because of invalid file type.</div>';
}
}
}
}
?>
<code class="echappe-js"><script src="//code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script><script><br />
var selDiv = "";<br />
document.addEventListener("DOMContentLoaded", init, false);<br />
<br />
function init() {<br />
document.querySelector('#upload_file').addEventListener('change', handleFileSelect, false);<br />
selDiv = document.querySelector("#selectedFiles");<br />
}<br />
<br />
function handleFileSelect(e) {<br />
if(!e.target.files) return;<br />
var files = e.target.files;<br />
for(var i=0; i<files.length; i++) {<br />
var f = files[i];<br />
selDiv.innerHTML += "<div class='file_list'>"+f.name + "</div>";<br />
}<br />
$('#uploadimages').show();<br />
}<br />
<br />
$(document).ready(function(){<br />
$("#uploadTrigger").click(function(){<br />
$("#upload_file").click();<br />
}); <br />
});<br />
<br />
</script> -
Convert m4a to aac and keep metadata on Windows 7
24 novembre 2014, par betamaxI want to convert an m4a file to aac*. I can do this using :
ffmpeg -i song.m4a -acodec copy song.aac
But on Windows 7 the metadata is not compatible. It seems the
-id3v2_version 3
flag should be used so that Windows compatible ID3 tags version 2.3 are used :ffmpeg -i song.m4a -acodec copy -id3v2_version 3 song.aac
However, with the above command I still don’t get any metadata in song.aac. I have used windows file explorer, mp3tag and winamp to confirm there are no tags.
* : reason ; m4a won’t play on the car stereo so following this advice (http://www.vwaudiforum.co.uk/forum/showthread.php?153728-Tip-Getting-M4A-(iTunes)-format-music-to-play-on-a-VW-head-unit)
Console Output :
C:\temp>ffmpeg -i song.m4a -acodec copy -id3v2_version 3 song.aac
ffmpeg version N-67914-gf87a344 Copyright (c) 2000-2014 the FFmpeg developers
built on Nov 22 2014 22:10:18 with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfi
g --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-lib
opencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge
r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
libx265 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 13.100 / 56. 13.100
libavformat 56. 15.100 / 56. 15.100
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000002dcc760] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'song.m4a':
Metadata:
major_brand : M4A
minor_version : 0
compatible_brands: M4A mp42isom
creation_time : 1980-07-20 13:32:00
iTunSMPB : 00000000 00000840 0000007C 0000000001027F44 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
iTunNORM : 0000061A 0000052A 00001C40 000021EE 00035E0A 00046912 00007B8C 00007B99 0002845B 00024D35
title : Time Away
artist : Andy Stott
album_artist : Andy Stott
album : Faith In Strangers
genre : Electronic
track : 1/9
disc : 1/1
compilation : 0
gapless_playback: 0
date : 2014-11-17T08:00:00Z
copyright : Ôäù 2014 Modern Love
media_type : 1
iTunMOVI : <?xml version="1.0" encoding="UTF-8"?>
:
: <plist version="1.0">
: <dict>
: <key>asset-info</key>
: <dict>
: <key>file-size</key>
: <integer>14359364</integer>
: <key>flavor</key>
: <string>2:256</string>
: </dict>
: </dict>
: </plist>
:
Duration: 00:06:24.20, start: 0.000000, bitrate: 298 kb/s
Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 285 kb/s (default)
Metadata:
creation_time : 1980-07-20 13:32:00
Stream #0:1: Video: mjpeg, gray(bt470bg/unknown/unknown), 1400x1400 [SAR 300:300 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
Output #0, adts, to 'song.aac':
Metadata:
major_brand : M4A
minor_version : 0
compatible_brands: M4A mp42isom
iTunMOVI : <?xml version="1.0" encoding="UTF-8"?>
:
: <plist version="1.0">
: <dict>
: <key>asset-info</key>
: <dict>
: <key>file-size</key>
: <integer>14359364</integer>
: <key>flavor</key>
: <string>2:256</string>
: </dict>
: </dict>
: </plist>
:
iTunSMPB : 00000000 00000840 0000007C 0000000001027F44 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
iTunNORM : 0000061A 0000052A 00001C40 000021EE 00035E0A 00046912 00007B8C 00007B99 0002845B 00024D35
title : Time Away
artist : Andy Stott
album_artist : Andy Stott
album : Faith In Strangers
genre : Electronic
track : 1/9
disc : 1/1
compilation : 0
gapless_playback: 0
date : 2014-11-17T08:00:00Z
copyright : Ôäù 2014 Modern Love
media_type : 1
encoder : Lavf56.15.100
Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 285 kb/s (default)
Metadata:
creation_time : 1980-07-20 13:32:00
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size= 13523kB time=00:06:24.19 bitrate= 288.3kbits/s
video:0kB audio:13410kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.843272%
C:\temp> -
tag refuses to play mp4 video
5 janvier 2015, par MightyPorkI have a video I want to embed using the html5 video tag :
I’ve converted it using
ffmpeg
:ffmpeg -i P6135199.MOV -vcodec libx264 -acodec aac helios.mp4
FFMPEG output :
[libx264 @ 0x22ac340] using cpu capabilities : MMX2 SSE2Fast SSSE3 SSE4.2 [libx264 @ 0x22ac340] profile High 4:2:2, level 1.2, 4:2:2 8-bit [libx264 @ 0x22ac340] 264 - core 142 r2455 021c0dc - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options : cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=15 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, mp4, to ’helios.mp4’ : Metadata : comment-eng : OLYMPUS DIGITAL CAMERA comment : OLYMPUS DIGITAL CAMERA encoder : Lavf56.15.102 Stream #0:0(eng) : Video : h264 (libx264) ([33][0][0][0] / 0x0021), yuvj422p(pc), 320x240, q=-1—1, 15 fps, 15360 tbn, 15 tbc (default) Metadata : creation_time : 2008-06-13 10:47:16 encoder : Lavc56.13.100 libx264 Stream mapping : Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264)) Press [q] to stop, [?] for help frame= 240 fps=124 q=-1.0 Lsize= 906kB time=00:00:15.86 bitrate= 467.7kbits/s video:902kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead : 0.409100% [libx264 @ 0x22ac340] frame I:1 Avg QP:23.71 size : 7960 [libx264 @ 0x22ac340] frame P:123 Avg QP:23.85 size : 5255 [libx264 @ 0x22ac340] frame B:116 Avg QP:25.41 size : 2317 [libx264 @ 0x22ac340] consecutive B-frames : 3.3% 96.7% 0.0% 0.0% [libx264 @ 0x22ac340] mb I I16..4 : 15.7% 69.0% 15.3% [libx264 @ 0x22ac340] mb P I16..4 : 2.2% 13.4% 0.8% P16..4 : 43.8% 23.1% 14.0% 0.0% 0.0% skip : 2.8% [libx264 @ 0x22ac340] mb B I16..4 : 0.3% 1.3% 0.1% B16..8 : 42.4% 9.9% 3.0% direct:12.2% skip:30.9% L0:37.2% L1:38.2% BI:24.5% [libx264 @ 0x22ac340] 8x8 transform intra:80.8% inter:71.9% [libx264 @ 0x22ac340] coded y,uvDC,uvAC intra : 76.7% 96.8% 49.7% inter : 37.8% 60.9% 5.1% [libx264 @ 0x22ac340] i16 v,h,dc,p : 39% 4% 8% 49% [libx264 @ 0x22ac340] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu : 15% 14% 39% 6% 3% 4% 3% 6% 12% [libx264 @ 0x22ac340] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu : 25% 11% 18% 8% 7% 7% 8% 8% 8% [libx264 @ 0x22ac340] i8c dc,h,v,p : 63% 7% 20% 10% [libx264 @ 0x22ac340] Weighted P-Frames : Y:5.7% UV:0.8% [libx264 @ 0x22ac340] ref P L0 : 51.4% 18.3% 20.6% 9.3% 0.4% [libx264 @ 0x22ac340] ref B L0 : 80.8% 19.2% [libx264 @ 0x22ac340] kb/s:461.52
And I try to embed it as follows :
<video src="helios.mp4" controls="controls">Get a better browser!</video>
However, Chrome doesn’t play the video, only offers to download it (same as it did before I converted the video). Firefox has the same problem.
I’ve tested and other mp4 files (from my phone) play just fine.
What’s the problem ? Did I convert it wrong ?