
Recherche avancée
Autres articles (28)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Les images
15 mai 2013
Sur d’autres sites (1646)
-
imageJpeg and FFMPEG in windows vs linux
25 janvier 2020, par Tanmay GawankarI have a working code for converting image to a 5 seconds video using FFMPEG.
The problem is, The code only works for downloaded images, FFMPEG doesn’t convert image to video when image is generated programmatically ONLY IN LINUX.
PHP code
<?php
$downloadedF="folder/d.jpg";
$downloadedV="folder/d.mp4";
$renderedF="folder/r.jpg";
$renderedV="folder/r.mp4";
$op_d=shell_exec("ffmpeg -r 1/5 -i ".$downloadedF." -c:v libx264 -vf fps=25 -pix_fmt yuv420p ".$downloadedV);
$op_r=shell_exec("ffmpeg -r 1/5 -i ".$renderedF." -c:v libx264 -vf fps=25 -pix_fmt yuv420p ".$renderedV);
echo "Errors:<br />".$op_d."<br /><br />".$op_r;
?>The d.mp4(or output for downloaded image) is getting generated for both Windows and Linux
The r.mp4(or output for rendered image) gets generated only in Windows and 48 bytes empty file is getting created in LinuxSystem :
XAMPP on Windows 10(Development)
Godaddy Starter plan hosting - Linux(Probably redhat)(Production)File Structure
root folder
|-index.php
|-ffmpeg (will be ffmpeg.exe in Windows)
|-folder
|-d.jpg (random downloaded image from google)
|-d.mp4 (Will be created - video converted from downloaded image)
|-r.jpg (rendered image using php imagejpg)
|-r.mp4 (Will be created - video converted from rendered image)Rendered Image Code :
$imgFF = imagecreatetruecolor($videoWidth, $videoHeight);
//---adding many text using imagettftext();
imagejpeg($imgFF, $path."-000.jpg"); //for this example, I copied output to folder as r.jpgEdit 1 :
The return value of
shell_exec
has no error/output even after addingerror_reporting(E_ALL);
ini_set('display_errors', 1);Edit 2 :
The log for successful conversion can be found at Here
The log for unsuccessful conversion of rendered image can be found at HereNote :
• The scenario here is minimized and code is separated from long code.
• In Linux command i add./
for FFMPEG -
Texai Remote Presence System Using VP8 Video
19 novembre 2010, par noreply@blogger.com (John Luther)Guest blogger Josh Tyler is a member of the Texai team at Willow Garage.
Willow Garage is busy building the next version of its Texai remote presence platform with VP8, the video codec used in WebM.
In short, Texai is a two-way videoconferencing app on a tele-operated robotic platform (for more details, see the piece about Texai in the New York Times). Video and audio quality are critical to providing the best user experience on Texai. We’ve evaluated several video codecs and found VP8’s image quality, low latency and tolerance to packet loss far better than anything else we tested.
The video below shows VP8 running on one of our systems.
(If you have a WebM-enabled browser and are enrolled in the YouTube HTML5 beta the video will play in WebM HTML5, otherwise it will play in Flash Player.)
We’re also looking for help ! If you’re interested in helping us create an incredible, high-fidelity user experience, either by joining our team, partnering on development, or by being added to our early customer interest list, please email us at texai-info@willowgarage.com.
-
In my django app, celery task converts uploaded video w/ ffmpeg, but converted video won't save to s3 ?
29 janvier 2013, par GetItDoneI use Heroku to host my website, and Amazon s3 to store my static and media files. I have a celery task that converts the video file to flv, but the flv doesn't store anywhere. There isn't any error, just there is no file uploaded to my s3 bucket. How can I force the file to save to my s3 bucket after the conversion ? I'm still pretty new web development in general, and I have been stuck trying to get my video conversion working properly for weeks. To be honest, I'm not even sure that I'm doing the right thing with my task. Here is the code in my celery task :
@task(name='celeryfiles.tasks.convert_flv')
def convert_flv(video_id):
video = VideoUpload.objects.get(pk=video_id)
filename = video.video_upload
sourcefile = "%s%s" % (settings.MEDIA_URL, filename)
vidfilename = "%s.flv" % video.id
targetfile = "%svideos/flv/%s" % (settings.MEDIA_URL, vidfilename)
ffmpeg = "ffmpeg -i %s -ar 22050 -f flv -s 320x240 %s" % (sourcefile, targetfile)
#The next lines are code that I couldn't get to work in place of the line above, and are left commented out.
#I am open to suggestions or alternatives for this also.
#ffmpeg = "ffmpeg -i %s -acodec libmp3lame -ar 22050 -f flv -s 320x240 %s" % (sourcefile, targetfile)
#ffmpeg = "ffmpeg -i %s -acodec mp3 -ar 22050 -f flv -s 320x240 %s" % (sourcefile, targetfile)
try:
ffmpegresult = commands.getoutput(ffmpeg)
print "---------------FFMPEG---------------"
print "FFMPEGRESULT: %s" % ffmpegresult
except Exception as e:
ffmpegresult = None
print("Failed to convert video file %s to %s" % (sourcefile, targetfile))
print(traceback.format_exc())
video.flvfilename = vidfilename
video.save()My view :
def upload_video(request):
if request.method == 'POST':
form = VideoUploadForm(request.POST, request.FILES)
if form.is_valid():
video_upload=form.save()
video_id=video_upload.id
video_conversion = convert_flv.delay(video_id)
return HttpResponseRedirect('/current_classes/')
else:
...Any advice, insight, or ideas in general would be greatly appreciated. Obviously I am missing something, but I can't figure out what. I have been stuck with different aspects of getting my video conversion to work with ffmpeg using a celery task for weeks. Thanks in advance.