
Recherche avancée
Autres articles (53)
-
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...) -
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 (8459)
-
heroku paperclip video error Av::UnableToDetect (Unable to detect any supported library) :
6 janvier 2021, par nourzaI am trying to upload video to my website with paperclip and it work perfectly locally but in heroku I got this error


ActionController::RoutingError (No route matches [GET] "/videos/original/missing.png"):
2021-01-06T19:53:12.425050+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
2021-01-06T19:53:12.425050+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2021-01-06T19:53:12.425050+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/railties-4.2.11.1/lib/rails/rack/logger.rb:38:in `call_app'
2021-01-06T19:53:12.425052+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/railties-4.2.11.1/lib/rails/rack/logger.rb:20:in `block in call'
2021-01-06T19:53:12.425052+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/activesupport-4.2.11.1/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2021-01-06T19:53:12.425052+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/activesupport-4.2.11.1/lib/active_support/tagged_logging.rb:26:in `tagged'
2021-01-06T19:53:12.425053+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/activesupport-4.2.11.1/lib/active_support/tagged_logging.rb:68:in `tagged'
2021-01-06T19:53:12.425053+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/railties-4.2.11.1/lib/rails/rack/logger.rb:20:in `call'
2021-01-06T19:53:12.425053+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2021-01-06T19:53:12.425054+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/rack-1.6.13/lib/rack/methodoverride.rb:22:in `call'
2021-01-06T19:53:12.425055+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/rack-1.6.13/lib/rack/runtime.rb:18:in `call'
2021-01-06T19:53:12.425055+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/activesupport-4.2.11.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
2021-01-06T19:53:12.425055+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/static.rb:120:in `call'
2021-01-06T19:53:12.425056+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/rack-1.6.13/lib/rack/sendfile.rb:113:in `call'
2021-01-06T19:53:12.425057+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/ssl.rb:24:in `call'
2021-01-06T19:53:12.425057+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/railties-4.2.11.1/lib/rails/engine.rb:518:in `call'
2021-01-06T19:53:12.425061+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/railties-4.2.11.1/lib/rails/application.rb:165:in `call'
2021-01-06T19:53:12.425061+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/rack-1.6.13/lib/rack/content_length.rb:15:in `call'
2021-01-06T19:53:12.425061+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/puma-5.1.1/lib/puma/configuration.rb:246:in `call'
2021-01-06T19:53:12.425062+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/puma-5.1.1/lib/puma/request.rb:76:in `block in handle_request'
2021-01-06T19:53:12.425062+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/puma-5.1.1/lib/puma/thread_pool.rb:337:in `with_force_shutdown'
2021-01-06T19:53:12.425062+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/puma-5.1.1/lib/puma/request.rb:75:in `handle_request'
2021-01-06T19:53:12.425063+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/puma-5.1.1/lib/puma/server.rb:431:in `process_client'
2021-01-06T19:53:12.425063+00:00 app[web.1]: vendor/bundle/ruby/2.6.0/gems/puma-5.1.1/lib/puma/thread_pool.rb:145:in `block in spawn_thread'
2021-01-06T19:53:12.425063+00:00 app[web.1]: 
2021-01-06T19:53:12.425064+00:00 app[web.1]: 
2021-01-06T19:53:12.458808+00:00 heroku[router]: at=info method=GET path="/videos/original/missing.png" host=www.mobileimplantlab.ca request_id=a7661465-ee4e-49d4-b694-27814e4fb23b fwd="24.85.18.207" dyno=web.1 connect=0ms service=71ms status=404 bytes=222 protocol=https
2021-01-06T19:53:30.751932+00:00 app[web.1]: Started POST "/galleries" for 24.85.18.207 at 2021-01-06 19:53:30 +0000
2021-01-06T19:53:30.768629+00:00 app[web.1]: Processing by GalleriesController#create as HTML
2021-01-06T19:53:30.768802+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"YFGiYYWmgDb+foSNMk1u1o2H2bp11nqwjAVzc4jqeGYDxoG6zLNGyFxBMvUrqxhBUAt+pex21VI+NqRGucRGOQ==", "gallery"=>{"product_name"=>"", "title1"=>"", "title2"=>"", "title3"=>"", "title4"=>"", "title5"=>"", "videotitle"=>"", "video"=>#, @original_filename="IMG_2826.mp4", @content_type="video/mp4", @headers="Content-Disposition: form-data; name=\"gallery[video]\"; filename=\"IMG_2826.mp4\"\r\nContent-Type: video/mp4\r\n">}, "commit"=>"Submit"}
2021-01-06T19:53:30.790290+00:00 app[web.1]: User Load (5.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
2021-01-06T19:53:30.836411+00:00 app[web.1]: [paperclip] Trying to link /tmp/RackMultipart20210106-4-baa646.mp4 to /tmp/847606d3771b12aa2d91db7647fe3a4920210106-4-1m2r6hc.mp4
2021-01-06T19:53:30.844138+00:00 app[web.1]: [paperclip] Trying to link /tmp/847606d3771b12aa2d91db7647fe3a4920210106-4-1m2r6hc.mp4 to /tmp/847606d3771b12aa2d91db7647fe3a4920210106-4-fg47sn.mp4
2021-01-06T19:53:30.858332+00:00 app[web.1]: Command :: file -b --mime '/tmp/847606d3771b12aa2d91db7647fe3a4920210106-4-fg47sn.mp4'
2021-01-06T19:53:30.938505+00:00 app[web.1]: [AV] Running command: if command -v avprobe 2>/dev/null; then echo "true"; else echo "false"; fi
2021-01-06T19:53:30.960650+00:00 app[web.1]: [AV] Running command: if command -v ffmpeg 2>/dev/null; then echo "true"; else echo "false"; fi
2021-01-06T19:53:30.973770+00:00 app[web.1]: Completed 500 Internal Server Error in 204ms (ActiveRecord: 14.0ms)
2021-01-06T19:53:30.975178+00:00 app[web.1]: 
2021-01-06T19:53:30.975180+00:00 app[web.1]: Av::UnableToDetect (Unable to detect any supported library):
2021-01-06T19:53:30.975180+00:00 app[web.1]: app/controllers/galleries_controller.rb:8:in `create



here is my model


class Gallery < ActiveRecord::Base
 has_attached_file :image1, :styles => { :medium => "300x300>", :thumb => "100x100>" }, :default_url => "/images/:style/missing.png"
 validates_attachment_content_type :image1, :content_type => /\Aimage\/.*\Z/
 has_attached_file :image2, :styles => { :medium => "300x300>", :thumb => "100x100>" }, :default_url => "/images/:style/missing.png"
 validates_attachment_content_type :image2, :content_type => /\Aimage\/.*\Z/
 has_attached_file :image3, :styles => { :medium => "300x300>", :thumb => "100x100>" }, :default_url => "/images/:style/missing.png"
 validates_attachment_content_type :image3, :content_type => /\Aimage\/.*\Z/
 has_attached_file :image4, :styles => { :medium => "300x300>", :thumb => "100x100>" }, :default_url => "/images/:style/missing.png"
 validates_attachment_content_type :image4, :content_type => /\Aimage\/.*\Z/
 has_attached_file :image5, :styles => { :medium => "300x300>", :thumb => "100x100>" }, :default_url => "/images/:style/missing.png"
 validates_attachment_content_type :image5, :content_type => /\Aimage\/.*\Z/
 has_attached_file :video, :styles => {
 :medium => { :geometry => "500x500", :format => 'jpg' },
 :thumb => { :geometry => "100x100", :format => 'jpg' }
 }, :processors => [:transcoder]

validates_attachment_content_type :video,
 :content_type => [
 "video/mp4", 
 "video/quicktime",
 "video/3gpp",
 "video/x-ms-wmv",
 "video/mov",
 "video/flv",
 ],
 :message => "Sorry! We do not accept the attached file type"

end



I have these gems for it


gem "paperclip"
gem 'paperclip-av-transcoder'
gem "paperclip-ffmpeg", "~> 1.2.0"



I did few research on this issue and it said that i have to add this to my heroku buildpack but when i add it my heroku website crashed. so I remove it. Is there any other solution ?
https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git


Thanks in advance


-
FFMPEG RTSP stream to MPEG4/H264 file using libx264
16 octobre 2020, par PhiHeyo folks,



I'm attempting to transcode/remux an RTSP stream in H264 format into a MPEG4 container, containing just the H264 video stream. Basically, webcam output into a MP4 container.



I can get a poorly coded MP4 produced, using this code :



// Variables here for demo
AVFormatContext * video_file_output_format = nullptr;
AVFormatContext * rtsp_format_context = nullptr;
AVCodecContext * video_file_codec_context = nullptr;
AVCodecContext * rtsp_vidstream_codec_context = nullptr;
AVPacket packet = {0};
AVStream * video_file_stream = nullptr;
AVCodec * rtsp_decoder_codec = nullptr;
int errorNum = 0, video_stream_index = 0;
std::string outputMP4file = "D:\\somemp4file.mp4";

// begin
AVDictionary * opts = nullptr;
av_dict_set(&opts, "rtsp_transport", "tcp", 0);

if ((errorNum = avformat_open_input(&rtsp_format_context, uriANSI.c_str(), NULL, &opts)) < 0) {
 errOut << "Connection failed: avformat_open_input failed with error " << errorNum << ":\r\n" << ErrorRead(errorNum);
 TacticalAbort();
 return;
}

rtsp_format_context->max_analyze_duration = 50000;
if ((errorNum = avformat_find_stream_info(rtsp_format_context, NULL)) < 0) {
 errOut << "Connection failed: avformat_find_stream_info failed with error " << errorNum << ":\r\n" << ErrorRead(errorNum);
 TacticalAbort();
 return;
}

video_stream_index = errorNum = av_find_best_stream(rtsp_format_context, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0);

if (video_stream_index < 0) {
 errOut << "Connection in unexpected state; made a connection, but there was no video stream.\r\n"
 "Attempts to find a video stream resulted in error " << errorNum << ": " << ErrorRead(errorNum);
 TacticalAbort();
 return;
}

rtsp_vidstream_codec_context = rtsp_format_context->streams[video_stream_index]->codec;

av_init_packet(&packet);

if (!(video_file_output_format = av_guess_format(NULL, outputMP4file.c_str(), NULL))) {
 TacticalAbort();
 throw std::exception("av_guess_format");
}

if (!(rtsp_decoder_codec = avcodec_find_decoder(rtsp_vidstream_codec_context->codec_id))) {
 errOut << "Connection failed: connected, but avcodec_find_decoder returned null.\r\n"
 "Couldn't find codec with an AV_CODEC_ID value of " << rtsp_vidstream_codec_context->codec_id << ".";
 TacticalAbort();
 return;
}

video_file_format_context = avformat_alloc_context();
video_file_format_context->oformat = video_file_output_format;

if (strcpy_s(video_file_format_context->filename, sizeof(video_file_format_context->filename), outputMP4file.c_str())) {
 errOut << "Couldn't open video file: strcpy_s failed with error " << errno << ".";
 std::string log = errOut.str();
 TacticalAbort();
 throw std::exception("strcpy_s");
}

if (!(video_file_encoder_codec = avcodec_find_encoder(video_file_output_format->video_codec))) {
 TacticalAbort();
 throw std::exception("avcodec_find_encoder");
}

// MARKER ONE

if (!outputMP4file.empty() &&
 !(video_file_output_format->flags & AVFMT_NOFILE) &&
 (errorNum = avio_open2(&video_file_format_context->pb, outputMP4file.c_str(), AVIO_FLAG_WRITE, nullptr, &opts)) < 0) {
 errOut << "Couldn't open video file \"" << outputMP4file << "\" for writing : avio_open2 failed with error " << errorNum << ": " << ErrorRead(errorNum);
 TacticalAbort();
 return;
}

// Create stream in MP4 file
if (!(video_file_stream = avformat_new_stream(video_file_format_context, video_file_encoder_codec))) {
 TacticalAbort();
 return;
}

AVCodecContext * video_file_codec_context = video_file_stream->codec;

// MARKER TWO

// error -22/-21 in avio_open2 if this is skipped
if ((errorNum = avcodec_copy_context(video_file_codec_context, rtsp_vidstream_codec_context)) != 0) {
 TacticalAbort();
 throw std::exception("avcodec_copy_context");
}

//video_file_codec_context->codec_tag = 0;

/*
// MARKER 3 - is this not needed? Examples suggest not.
if ((errorNum = avcodec_open2(video_file_codec_context, video_file_encoder_codec, &opts)) < 0)
{
 errOut << "Couldn't open video file codec context: avcodec_open2 failed with error " << errorNum << ": " << ErrorRead(errorNum);
 std::string log = errOut.str();
 TacticalAbort();
 throw std::exception("avcodec_open2, video file");
}*/

//video_file_format_context->flags |= AVFMT_FLAG_GENPTS;
if (video_file_format_context->oformat->flags & AVFMT_GLOBALHEADER)
{
 video_file_codec_context->flags |= CODEC_FLAG_GLOBAL_HEADER;
}

if ((errorNum = avformat_write_header(video_file_format_context, &opts)) < 0) {
 errOut << "Couldn't open video file: avformat_write_header failed with error " << errorNum << ":\r\n" << ErrorRead(errorNum);
 std::string log = errOut.str();
 TacticalAbort();
 return;
}




However, there are several issues :



- 

- I can't pass any x264 options to the output file. The output H264 matches the input H264's profile/level - switching cameras to a different model switches H264 level.
- The timing of the output file is off, noticeably.
- The duration of the output file is off, massively. A few seconds of footage becomes hours, although playtime doesn't match. (FWIW, I'm using VLC to play them.)









Passing x264 options



If I manually increment PTS per packet, and set DTS equal to PTS, it plays too fast, 2-3 seconds' worth of footage in one second playtime, and duration is hours long. The footage also blurs past several seconds, about 10 seconds' footage in a second.



If I let FFMPEG decide (with or without GENPTS flag), the file has a variable frame rate (probably as expected), but it plays the whole file in an instant and has a long duration too (over forty hours for a few seconds). The duration isn't "real", as the file plays in an instant.



At Marker One, I try to set the profile by passing options to
avio_open2
. The options are simply ignored by libx264. I've tried :


av_dict_set(&opts, "vprofile", "main", 0);
av_dict_set(&opts, "profile", "main", 0); // error, missing '('
// FF_PROFILE_H264_MAIN equals 77, so I also tried
av_dict_set(&opts, "vprofile", "77", 0); 
av_dict_set(&opts, "profile", "77", 0);




It does seem to read the profile setting, but it doesn't use them. At Marker Two, I tried to set it after the
avio_open2
, beforeavformat_write_header
.


// I tried all 4 av_dict_set from earlier, passing it to avformat_write_header.
// None had any effect, they weren't consumed.
av_opt_set(video_file_codec_context, "profile", "77", 0);
av_opt_set(video_file_codec_context, "profile", "main", 0);
video_file_codec_context->profile = FF_PROFILE_H264_MAIN;
av_opt_set(video_file_codec_context->priv_data, "profile", "77", 0);
av_opt_set(video_file_codec_context->priv_data, "profile", "main", 0);




Messing with privdata made the program unstable, but I was trying anything at that point.
I'd like to solve issue 1 with passing settings, since I imagine it'd bottleneck any attempt to solve issues 2 or 3.



I've been fiddling with this for the better part of a month now. I've been through dozens of documentation, Q&As, examples. It doesn't help that quite a few are outdated.



Any help would be appreciated.



Cheers


-
Where can discord bots find the ffmpeg buildpack heroku
11 août 2020, par IsiahI'm making a bot which outputs a mp3 file to the voice chat with discord.py, It works localy by using :


vc.play(discord.FFmpegPCMAudio(executable="ffmpeg/bin/ffmpeg.exe", source=noise.mp3))


However I'm now hosting it on Heroku, i have the buildpack installed but how can my code access it in replacement of the code above