
Recherche avancée
Autres articles (55)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (8090)
-
ffmpeg video thumbnail image not uploading in codeigniter
15 mars 2015, par user3785746I am trying to upload a video in codeigniter and i also want to upload thumbnail image of this video using ffmpeg. it works fine in core php but the code is not working in codeigniter. Here is my code
public function of_file_upload()
{
$un = $_POST['un'];
$other_un = $_POST['other_un'];
$up_folder = "chat_file";
$uploded_files = array();
$base_path = base_url() . "uploads/" . $up_folder . "/";
$i = 0;
#######################################
if (!empty($_FILES)) {
foreach ($_FILES as $k => $arr) {
$temp = explode('.', $arr['name']);
$extention = end($temp);
$r_char = $this->get_random_string(6);
$unArr = explode("@", $un);
$un = $unArr[0];
$file_name = $un . '_' . $r_char . '_' . time() . '.' . $extention;
$path = $_SERVER['DOCUMENT_ROOT'] . '/api/uploads/' . $up_folder . '/';
$file_path = $path . $file_name;
try {
if (move_uploaded_file($arr["tmp_name"], $file_path)) {
$uploded_files[$i]["fn"] = $base_path . $file_name;
$uploded_files[$i]["id"] = $k;
if($extention != 'jpg' && $extention != 'png' && $extention != 'jpeg' && $extention != 'gif' && $extention != 'bmp')
{
$ffmpeg = "C:\\ffmpeg\\bin\\ffmpeg";
$videoFile = $arr["tmp_name"];
/*$imageFile = $path.$un . '_' . $r_char . '_' . time() . '.jpg' ;*/
$imageFile = $_SERVER['DOCUMENT_ROOT'] . 'api/uploads/'.$un . '_' . $r_char . '_' . time() . '.jpg' ;
//echo $imageFile;die;
$size = "120x90";
$getfromsecond = 5;
$cmd = "$ffmpeg -i $videoFile -an -ss $getfromsecond -s $size $imageFile";
shell_exec($cmd);
}
} else {
$this->_sendResponse(13);
}
} catch (Exception $e) {
print_r($e->getMessage());
}
$i++;
}
}
}I have put the ffmpeg folder in c drive and is there any other place where I have to place this folder in codeigniter case. Here is my core php code which works fine.
<form method="post" action="index1.php" enctype="multipart/form-data">
<input type="file" />
<input type="submit" value="submit" />
</form>
<?php
if(isset($_POST['submit']))
{
$ffmpeg = "C:\\ffmpeg\\bin\\ffmpeg";
$videoFile = $_FILES['video']['tmp_name'];
foreach($_FILES as $key =>$value)
{
$param = $value['name'];
}
$tmp = explode('.',$param);
$imgname = $tmp[0];
$folder = 'upload';
if(!file_exists($folder))
{
mkdir($folder);
}
$imageFile = $folder."/".$imgname.".jpg";
$size = "120x90";
$getfromsecond = 5;
$cmd = "$ffmpeg -i $videoFile -an -ss $getfromsecond -s $size $imageFile";
if(!shell_exec($cmd))
{
echo "success";
}
else
{
echo "failed";
}
}
?>
I have tried many things but no luck please help thanks in advance.
-
Mozilla Firefox 36 has problems playing my h264 MP4 files
11 juin 2015, par Wolfgang PürstnerI try to convert videos with ffmpeg to mp4 format (h264) Profile : High Level : 3.1 (1280x720 with 30fps), Bitrate 1500k
The video plays very well in every browser except in Firefox.
http://5.79.72.89/trailer/trailer.mp4
At first it needs longer to load and when I seek inside the video most times the video don’t stop to load and never plays again.
I can see a lot of partial downloads in the developer console. A lot of them are for the initial play and the rest of the requests are during the video load when I seek to a later position.When I play other h264 Videos (MP4 with similar settings) they play without problems on this server.
And when I put my video on another webserver (apache) there are the same problems with Firefox.For this reason I believe it has to do something with me my conversion.
My settings :
Debian 7 (wheezy)
Webserver : nginx (with 260k bandwidth limit)I started converting videos with avconv and switched to ffmpeg because of this problems. But there was no success.
Meanwhile I tried all options for encoding but there are always the same problems with Firefox. Other videos play well but not mines and I don’t know why.Command :
ffmpeg -i input.mp4 -tune zerolatency -x264opts bitrate=1500:vbv-maxrate=1500:vbv-bufsize=3000:nal-hrd=vbr -codec:v libx264 -profile:v high -level 3.1 -movflags +faststart -pix_fmt yuv420p -s 1280x720 -r 30 -ac 2 -ar 48000 -codec:a aac -ab 64k -strict experimental -y trailer.mp4
ffmpeg 1.0.10 libavutil 51. 73.101 / 51. 73.101 libavcodec 54. 59.100 / 54. 59.100 libavformat 54. 29.104 / 54. 29.104 libavdevice 54. 2.101 / 54. 2.101 libavfilter 3. 17.100 / 3. 17.100 libswscale 2. 1.101 / 2. 1.101 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100
Mediainfo of the file : trailer.mp4
General Complete name : trailer.mp4 Format : MPEG-4 Format profile : Base Media Codec ID : isom File size : 115 MiB Duration : 10mn 34s Overall bit rate : 1 516 Kbps Movie name : Big Buck Bunny, Sunflower version Performer : Blender Foundation 2008, Janus Bager Kristensen 2013 Composer : Sacha Goedegebure Genre : Animation Writing application : Lavf54.29.104 Comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 10mn 34s
Bit rate : 1 500 Kbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 30.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.024
Stream size : 109 MiB (95%)
Writing library : x264 core 132
Encoding settings : cabac=1 / ref=4 / 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=12 / lookahead_threads=2 / 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=50 / keyint_min=5 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=cbr / mbtree=1 / bitrate=1500 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=1500 / vbv_bufsize=3000 / nal_hrd=none / ip_ratio=1.40 / aq=1:1.00Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 10mn 34s
Duration_LastFrame : -11ms
Bit rate mode : Constant
Bit rate : 64.2 Kbps
Channel(s) : 2 channels
Channel positions : Front : L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Delay relative to video : -2ms
Stream size : 4.85 MiB (4%)I don’t know what is wrong with my files.
Update 2015-03-12 :
If I convert the video without audio stream there is no problem with firefox anymore.
I updated ffmpeg to 2.6. I used libfaac, aac and libfdk_aac for audio encoding with cbr and vbr but without success.
-
Processing files and then re-uploading with fog and carrierwave fails on production
2 mars 2015, par LaurieSo I’m trying to get use carrierwave and fog to upload a file to my server, processing that file using ffmpeg to cut it into multiple small files, then upload those to s3.
This works locally (no fog, just file storage), but breaks on production with this error :
NoMethodError: undefined method 'to_file' for #CarrierWave::Storage::Fog::File:0x0000000639a458>
And this trace :
/var/deploy/webapp/web_head/shared/bundle/ruby/2.2.0/gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb 259:in `store'
…gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb: 80:in `store!'
…s/carrierwave-0.10.0/lib/carrierwave/uploader/store.rb: 59:in `block in store!'
…rrierwave-0.10.0/lib/carrierwave/uploader/callbacks.rb: 17:in `with_callbacks'
…s/carrierwave-0.10.0/lib/carrierwave/uploader/store.rb: 58:in `store!'
…2.2.0/gems/carrierwave-0.10.0/lib/carrierwave/mount.rb: 375:in `store!'
…2.2.0/gems/carrierwave-0.10.0/lib/carrierwave/mount.rb: 207:in `store_audio!'
…/20150227144932/app/controllers/podcasts_controller.rb: 60:in `update'
…2.0/gems/actionview-4.2.0/lib/action_view/rendering.rb: 30:in `process'
…_language-2.0.5/lib/http_accept_language/middleware.rb: 14:in `call'
…red/bundle/ruby/2.2.0/gems/rack-1.6.0/lib/rack/etag.rb: 24:in `call'
…/ruby/2.2.0/gems/rack-1.6.0/lib/rack/conditionalget.rb: 38:in `call'
…red/bundle/ruby/2.2.0/gems/rack-1.6.0/lib/rack/head.rb: 13:in `call'
…/2.2.0/gems/rack-1.6.0/lib/rack/session/abstract/id.rb: 225:in `context'
…/2.2.0/gems/rack-1.6.0/lib/rack/session/abstract/id.rb: 220:in `call'So, I have two uploaders. The uploader for the small chopped up audio files just sets the storage to fog, that’s it.
After uploading the big audio file I run this processing function in the uploader (though the error doesn’t seem to come from here) :
def split
directory = File.dirname(current_path)
tmpfile = File.join(directory,'tmpfile.mp3')
File.rename(current_path,tmpfile)
File.chmod(0644,tmpfile)
sound = FFMPEG::Movie.new(tmpfile)
@model.length = Mp3Info.open(tmpfile).length.round
i=0
number_of_lines= @model.ordered_lines.length
lines = @model.ordered_lines
while icode>Any ideas ?