
Recherche avancée
Médias (1)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (31)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
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 (...) -
Emballe Médias : Mettre en ligne simplement des documents
29 octobre 2010, parLe plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)
Sur d’autres sites (4032)
-
Solution for VB6 to broadcast Webcam
11 juillet 2014, par vantrung -cunconSorry, I know VB6 is decades ago, but I’m in a situation that I have to use VB6 to deliver live webcam stream beetween 2 PC in Server - Client Model program. Vb6-code holds the connection then I have no choice but to transfer all data via that connection.
I’ve tried weeks for this, uncountable approaches but went to nowhere.
My efforts focused on 3 major approaches :1/ Use ffmpeg to record live webcam as ".avi" file on hard disk, transfer parts of file to other end & play it. But I’ve stucked with a media-player that can play a "being written" avi file.
Windows Media Player control told me "file already in use..." & VLC Plugin can’t even be added to VB6 (axvlc.dll).
2/ Use ffmpeg to save live webcam as avi file, transfer each bit of that file to the other end, then in other end, extract 24 images / second from the avi to display continously in a picture box.
This approach is ok except that my hard disk get fulled of images in a time of wink and my program get very slow before hanging.3/ Use ffmpeg to stream the live webcam to a rtp-port like this :
ffmpeg -f dshow -i video="Lenovo EasyCamera" -vcodec mpeg2video -pix_fmt yuv422p -f rtp -an rtp://224.1.2.3:8191
I’ve successfully watch the stream in VLC, but VLC(axvlc.dll) refused to be integrated into ancient VB6. And more important, I don’t know how to redirect/reroute the rtp stream to other PC with VB6.
Any one please light me up ? (Any 3rd party component is welcomed)
-
Unable to convert mov to mp4 using ffmpeg carrierwave in ruby
9 avril 2021, par LearningRORI am unable to convert MOV files to MP4 using carrierwave and FFmpeg.


It does upload mp4 file but does not convert it to mp4 and so on browser only sound gets played not the video.


What I am missing here ? I tried most of the solutions.


Code :


class VideoUploader < CarrierWave::Uploader::Base
 include CarrierWave::MiniMagick
 include CarrierWave::Video
 include CarrierWave::Video::Thumbnailer
 include CarrierWave::FFmpeg
 # Choose what kind of storage to use for this uploader:
 storage :file
 # Override the directory where uploaded files will be stored.
 # This is a sensible default for uploaders that are meant to be mounted:
 def store_dir
 "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
 end
 version :video, :if => :video? do
 process :encode
 end
 version :thumb do
 process thumbnail: [{format: 'jpg', quality: 8, size: 360, logger: Rails.logger, square: false}]
 def full_filename for_file
 jpg_name for_file, version_name
 end
 end
 def encode
 tmp_path = File.join( File.dirname(current_path), "tmpfile.mp4" )
 movie = FFMPEG::Movie.new(current_path)
 movie.transcode(tmp_path, custom: %w(-c:v libx264 -c:a aac -vf format=yuv420p -movflags +faststart)) do |progress|
 puts progress
 end
 File.rename tmp_path, current_path
 end
 protected
 def video?(new_file)
 new_file.content_type.include? 'video'
 end
end



Logs :


I, [2021-04-09T15:33:24.783337 #9397] INFO -- : Running transcoding...
["/usr/local/bin/ffmpeg", "-y", "-i", "/Users/osx/workspace_ror/xxx-react/tmp/1617964403-459168728101935-0021-9213/video/sample_iTunes__1_.mov", "-c:v", "libx264", "-c:a", "aac", "-vf", "format=yuv420p", "-movflags", "+faststart", "/Users/osx/workspace_ror/xxx-react/tmp/1617964403-459168728101935-0021-9213/video/tmpfile.mp4"]

0.0
0.08304093567251461
0.1672514619883041
0.2327485380116959
0.3229239766081871
0.4008187134502924
0.45426900584795327
0.5033918128654971
0.5403508771929825
0.6100584795321637
0.663859649122807
0.711812865497076
0.7657309941520468
0.8196491228070175
0.87953216374269
0.9394152046783625
1.0
1.0
I, [2021-04-09T15:33:33.555508 #9397] INFO -- : Transcoding of /Users/osx/workspace_ror/xxx-react/tmp/1617964403-459168728101935-0021-9213/video/sample_iTunes__1_.mov to /Users/osx/workspace_ror/xxx-react/tmp/1617964403-459168728101935-0021-9213/video/tmpfile.mp4 succeeded

Running....ffmpegthumbnailer -i /Users/osx/workspace_ror/xxx-react/tmp/1617964403-459168728101935-0021-9213/thumb/sample_iTunes__1_.mov -o /Users/osx/workspace_ror/xxx-react/tmp/1617964403-459168728101935-0021-9213/thumb/tmpfile.jpg -c jpg -q 8 -s 360
Success!



-
FFmpeg - Convert video changing resolution and bitrates
8 avril 2021, par parvaresI’m trying to convert a video and change these parameters :


resolution : from 1.280x720 to 640x360 pixels


average bitrate : from 1.410 to 300 kb/s


maximum bitrate : from 1.680 to 2500 kb/s


Sampling rate : from 48.0 to 44.1 kHz


Bit rate audio : 128 kb/s


I used this string with ffmpeg vers. 4.3.2-2021-02-20 full build :


ffmpeg -i input.mp4 -c:v -vf scale=640:360 libx264 -b:v 300k -maxrate 2500k -bufsize 2500k -crf 25 -c:a -ar 44100 libfdk_aac -b:a 128k output.mp4



I get the error : “ffmpeg unable to find a suitable output format for scale ‘640:360’ scale 640:360 : invalid argument”. Could you help me please ?


Below is the original file analyzed by MediaInfo, thanks !


General


Complete name : C :\Users\parvares\Desktop\input.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 424 MiB
Duration : 38 min 21 s
Overall bit rate : 1 545 kb/s
Writing application : Lavf58.64.100


Video


ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 38 min 21 s
Bit rate : 1 410 kb/s
Maximum bit rate : 1 680 kb/s
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.061
Stream size : 387 MiB (91%)
Writing library : x264 core 161 r3027 4121277
Encoding settings : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=6 / 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=1 / keyint=250 / keyint_min=125 / scenecut=40 / intra_refresh=0 / rc_lookahead=125 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=1680 / vbv_bufsize=8400 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Codec configuration box : avcC


Audio


ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 38 min 21 s
Bit rate mode : Constant
Bit rate : 129 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 35.3 MiB (8%)
Default : Yes
Alternate group : 1