
Recherche avancée
Autres articles (26)
-
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. -
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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (4978)
-
How to "filter" a file through command line before apache sends it to client ?
1er septembre 2020, par Timothe JahanI have large collection of video files which are available on our website.
For each video we have multiple quality and language, so in order to save space we store only 1 file, which contains all audio and video tracks.


Our streaming server can handle these multitrack files in order to serve only the useful part to each user, but we also make them available for download through the apache web server.
Currently, when a user request a file (certain quality, certain language), we first create a temporary file with only his needs, and give him for download.
I would like to remove this intermediate step and extract on the fly.
Extraction can be done by ffmpeg, but I need to have apache "pipe" the file through ffmpeg before sending the bytes out. Do you have any way of doing this.


example :




Filename_multi.mp4 [SD,HD,fr,en,ru]
User request : Filename_HD_fr.mp4 [HD,fr]
Apache fetch the file Filename_multi.mp4 and pipe it through an ffmpeg command and send the bytes as > they are encoded, not waiting for the end.




Note this is on linux, and the ffmpeg part is not a problem.


Thx
Timothé


-
Different results using qt-faststart and "ffmpeg -movflags +faststart"
31 mars 2020, par Juan Ignacio SánchezI have a set of videos generated by security cameras, which have the MOOV atom at the end of the file, like this :
ftyp (32 bytes)
free (8 bytes)
mdat (29647845 bytes)
moov (42054 bytes)I want to serve these files using progressive downloads (pseudo streaming) and it’s the only acceptable way to do it.
Knowing that I tried to use tools like
qt-faststart
or directlyffmpeg
with the corresponding flags (-movflags +faststart
). Other detail is that I’m running this on a low profile machine, and FFmpeg takes like 6 8 seconds to finish (even using-c copy
) and the other tool results to be much more efficient since it only moves some bytes, taking less than a second to finish. The thing here is thatqt-faststart
produces a video that can’t be pseudo streamed butffmpeg
does it. Here are some comparisons :ffmpeg
:ftyp (32 bytes)
moov (42422 bytes)
free (8 bytes)
mdat (29647845 bytes)qt-faststart
:ftyp (32 bytes)
moov (42054 bytes)
free (8 bytes)
mdat (29647845 bytes)As you can see, FFmpeg adds some extra bytes on the MOOV atom, can anyone point me in some research direction ? Thank you all.
-
Ruby on Rails - Paperclip - ffmpeg - throws error when adding style to "has_attached_file"
4 octobre 2018, par TamerBI’m working on image and video upload in a rails app using paperclip and ffmpeg.
The following code in
models/image.rb
is working fine :has_attached_file :image,
processors: [:ffmpeg]
validates_attachment_content_type :image, content_type: /.*/But, when I add styling to the code as follows, it throws an error on (page loading) :
has_attached_file :image, styles: lambda {|a| if a.instance.is_image? then {original: {}, medium: "300x300>"} end},
processors: [:ffmpeg]
validates_attachment_content_type :image, content_type: /.*/
def is_image?
return false unless @attachment_image.content_type
['image/jpeg', 'image/pjpeg', 'image/gif', 'image/png', 'image/x-png', 'image/jpg'].include?(@attachment_image.content_type)
endThe error is as follows :
F, [2018-10-04T15:04:47.381706 #9836] FATAL -- : [643e7428-d41e-4000-9a48-566d85e7b109]
F, [2018-10-04T15:04:47.381906 #9836] FATAL -- : [643e7428-d41e-4000-9a48-566d85e7b109] ActionView::Template::Error (undefined method `each_pair' for nil:NilClass):
F, [2018-10-04T15:04:47.382186 #9836] FATAL -- : [643e7428-d41e-4000-9a48-566d85e7b109] 1: insert_tag renderer_for(:show)
F, [2018-10-04T15:04:47.382345 #9836] FATAL -- : [643e7428-d41e-4000-9a48-566d85e7b109]
F, [2018-10-04T15:04:47.382441 #9836] FATAL -- : [643e7428-d41e-4000-9a48-566d85e7b109] app/admin/resorts.rb:46:in `block (5 levels) in <top>'
</top>How can I solve this ?
Update
This error is displayed only when trying to upload a video or or trying to load a page containing a video.
The code in
pp/admin/resorts.rb
mentioned in the error message is the following (I’m using activeadmin gem) :if im.itype == 'video-slider' then
video_tag im.image, class: 'my_image_size' # line 46
else
image_tag im.image, class: 'my_image_size'
endWhen trying to upload an image, the error changed to be as follows () :
Input #0, image2, from '/tmp/dcdc7c452102ec2b9255973f59b40ee320181004-23173-fx7vzi.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 35614 kb/s
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080, 25 tbr, 25 tbn, 25 tbc
[NULL @ 0x564aeb7df580] Unable to find a suitable output format for '/tmp/dcdc7c452102ec2b9255973f59b40ee320181004-23173-fx7vzi20181004-23173-zurkvx'
/tmp/dcdc7c452102ec2b9255973f59b40ee320181004-23173-fx7vzi20181004-23173-zurkvx: Invalid argument
):
F, [2018-10-04T19:13:02.028565 #23173] FATAL -- : [c267e57b-7e06-4624-be1c-0d9aa4b71e00]
F, [2018-10-04T19:13:02.028730 #23173] FATAL -- : [c267e57b-7e06-4624-be1c-0d9aa4b71e00] paperclip-ffmpeg (1.2.0) lib/paperclip_processors/ffmpeg.rb:175:in `rescue in make'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] paperclip-ffmpeg (1.2.0) lib/paperclip_processors/ffmpeg.rb:171:in `make'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] paperclip (5.2.1) lib/paperclip/processor.rb:34:in `make'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] paperclip (5.2.1) lib/paperclip/attachment.rb:533:in `block in post_process_style'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] paperclip (5.2.1) lib/paperclip/attachment.rb:532:in `each'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] paperclip (5.2.1) lib/paperclip/attachment.rb:532:in `reduce'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] paperclip (5.2.1) lib/paperclip/attachment.rb:532:in `post_process_style'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] paperclip (5.2.1) lib/paperclip/attachment.rb:519:in `post_process_styles'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] paperclip (5.2.1) lib/paperclip/attachment.rb:512:in `block (2 levels) in post_process'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activesupport (5.1.5) lib/active_support/callbacks.rb:131:in `run_callbacks'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] paperclip (5.2.1) lib/paperclip/callbacks.rb:38:in `run_paperclip_callbacks'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] paperclip (5.2.1) lib/paperclip/attachment.rb:510:in `block in post_process'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activesupport (5.1.5) lib/active_support/callbacks.rb:97:in `run_callbacks'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] paperclip (5.2.1) lib/paperclip/callbacks.rb:38:in `run_paperclip_callbacks'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] paperclip (5.2.1) lib/paperclip/attachment.rb:509:in `post_process'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] paperclip (5.2.1) lib/paperclip/attachment.rb:465:in `post_process_file'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] paperclip (5.2.1) lib/paperclip/attachment.rb:113:in `assign'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] paperclip (5.2.1) lib/paperclip/has_attached_file.rb:66:in `block in define_setter'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activemodel (5.1.5) lib/active_model/attribute_assignment.rb:46:in `public_send'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activemodel (5.1.5) lib/active_model/attribute_assignment.rb:46:in `_assign_attribute'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activemodel (5.1.5) lib/active_model/attribute_assignment.rb:40:in `block in _assign_attributes'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activemodel (5.1.5) lib/active_model/attribute_assignment.rb:39:in `each'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activemodel (5.1.5) lib/active_model/attribute_assignment.rb:39:in `_assign_attributes'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activerecord (5.1.5) lib/active_record/attribute_assignment.rb:26:in `_assign_attributes'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activemodel (5.1.5) lib/active_model/attribute_assignment.rb:33:in `assign_attributes'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activerecord (5.1.5) lib/active_record/core.rb:337:in `initialize'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activerecord (5.1.5) lib/active_record/inheritance.rb:66:in `new'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activerecord (5.1.5) lib/active_record/inheritance.rb:66:in `new'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activeadmin (1.1.0) lib/active_admin/resource_controller/data_access.rb:130:in `build_new_resource'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activeadmin (1.1.0) lib/active_admin/resource_controller/data_access.rb:116:in `build_resource'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] inherited_resources (1.8.0) lib/inherited_resources/actions.rb:31:in `create'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/abstract_controller/base.rb:186:in `process_action'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_controller/metal/rendering.rb:30:in `process_action'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activesupport (5.1.5) lib/active_support/callbacks.rb:131:in `run_callbacks'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/abstract_controller/callbacks.rb:19:in `process_action'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_controller/metal/rescue.rb:20:in `process_action'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activesupport (5.1.5) lib/active_support/notifications.rb:166:in `block in instrument'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activesupport (5.1.5) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activesupport (5.1.5) lib/active_support/notifications.rb:166:in `instrument'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_controller/metal/params_wrapper.rb:252:in `process_action'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] searchkick (3.0.0) lib/searchkick/logging.rb:209:in `process_action'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activerecord (5.1.5) lib/active_record/railties/controller_runtime.rb:22:in `process_action'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/abstract_controller/base.rb:124:in `process'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionview (5.1.5) lib/action_view/rendering.rb:30:in `process'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_controller/metal.rb:189:in `dispatch'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_controller/metal.rb:253:in `dispatch'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_dispatch/routing/route_set.rb:31:in `serve'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_dispatch/journey/router.rb:50:in `block in serve'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_dispatch/journey/router.rb:33:in `each'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_dispatch/journey/router.rb:33:in `serve'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_dispatch/routing/route_set.rb:844:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] omniauth (1.8.1) lib/omniauth/strategy.rb:190:in `call!'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] omniauth (1.8.1) lib/omniauth/strategy.rb:168:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] omniauth (1.8.1) lib/omniauth/strategy.rb:190:in `call!'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] omniauth (1.8.1) lib/omniauth/strategy.rb:168:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] omniauth (1.8.1) lib/omniauth/strategy.rb:190:in `call!'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] omniauth (1.8.1) lib/omniauth/strategy.rb:168:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] warden (1.2.7) lib/warden/manager.rb:36:in `block in call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] warden (1.2.7) lib/warden/manager.rb:35:in `catch'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] warden (1.2.7) lib/warden/manager.rb:35:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] rack (2.0.5) lib/rack/etag.rb:25:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] rack (2.0.5) lib/rack/conditional_get.rb:38:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] rack (2.0.5) lib/rack/head.rb:12:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] rack (2.0.5) lib/rack/session/abstract/id.rb:232:in `context'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] rack (2.0.5) lib/rack/session/abstract/id.rb:226:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_dispatch/middleware/cookies.rb:613:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activerecord (5.1.5) lib/active_record/migration.rb:556:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activesupport (5.1.5) lib/active_support/callbacks.rb:97:in `run_callbacks'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_dispatch/middleware/callbacks.rb:24:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] web-console (3.5.1) lib/web_console/middleware.rb:18:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] railties (5.1.5) lib/rails/rack/logger.rb:36:in `call_app'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] railties (5.1.5) lib/rails/rack/logger.rb:24:in `block in call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activesupport (5.1.5) lib/active_support/tagged_logging.rb:69:in `block in tagged'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activesupport (5.1.5) lib/active_support/tagged_logging.rb:26:in `tagged'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activesupport (5.1.5) lib/active_support/tagged_logging.rb:69:in `tagged'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] railties (5.1.5) lib/rails/rack/logger.rb:24:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] request_store (1.4.0) lib/request_store/middleware.rb:19:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_dispatch/middleware/request_id.rb:25:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] rack (2.0.5) lib/rack/method_override.rb:22:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] rack (2.0.5) lib/rack/runtime.rb:22:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] activesupport (5.1.5) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_dispatch/middleware/executor.rb:12:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] actionpack (5.1.5) lib/action_dispatch/middleware/static.rb:125:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] rack (2.0.5) lib/rack/sendfile.rb:111:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] railties (5.1.5) lib/rails/engine.rb:522:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] puma (3.11.2) lib/puma/configuration.rb:225:in `call'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] puma (3.11.2) lib/puma/server.rb:624:in `handle_request'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] puma (3.11.2) lib/puma/server.rb:438:in `process_client'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] puma (3.11.2) lib/puma/server.rb:302:in `block in run'
[c267e57b-7e06-4624-be1c-0d9aa4b71e00] puma (3.11.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread'