
Recherche avancée
Médias (1)
-
DJ Dolores - Oslodum 2004 (includes (cc) sample of “Oslodum” by Gilberto Gil)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (67)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
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 -
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 (...)
Sur d’autres sites (12392)
-
lavu/riscv : AV_READ_TIME cycle counter
12 septembre 2022, par Rémi Denis-Courmontlavu/riscv : AV_READ_TIME cycle counter
This uses the architected RISC-V 64-bit cycle counter from the
RISC-V unprivileged instruction set.In 64-bit and 128-bit, this is a straightforward CSR read.
In 32-bit mode, the 64-bit value is exposed as two CSRs, which
cannot be read atomically, so a loop is necessary to detect and fix up
the race condition where the bottom half wraps exactly between the two
reads. -
cv::VideoWriter Class Failing to Write Frames to Video File
23 septembre 2022, par adav0033I am attempting to using the OpenCV VideoWriter class to save a two camera video feed to a single video file. I am using the FFMPEG API to ahcieve the desired outcome and am trying to generate an .mkv file with the Fourcc code FFV1 for lossless frame writing. Currently I am expriencing upon launching of the pipeline the file writer is creating a file in the directory specified and upon completion of the pipeline the writer is transformed into a video file .mkv however no frames are being written to said file.
My constructor :


cv::VideoWriter writer(out_vid_name + ".mkv", cv::VideoWriter::fourcc('F','F','V','1'), cam_fps,frame_double_size, true);



Note that cv::Size(3840,1080) = frame_double_size and cam_fps is a param


My video capture :


cv::VideoCapture cap(out_vid_name + ".mkv", cv::CAP_FFMPEG);



and my writer :


while (controller->running && ros::ok()) //Shutdown race condition exists. One thread will have to be SIGTERM'ed
 {
 std::shared_lock guard(doubleSaveFrame->mtx);
 doubleSaveFrame->cond_var.wait(guard, [&]{ return doubleSaveFrame->cond_bool_save; });
 doubleSaveFrame->cond_bool_save = false;
 std_msgs::String msg;
 msg.data = std::to_string(frame_count);
 frame_count++;
 frame_pub.publish(msg);

 writer.write(doubleSaveFrame->getHost());
 cv::Mat frame = doubleSaveFrame->getHost();
 int rows = frame.rows;
 int cols = frame.cols;
 std::cout << "rows: " << std::to_string(rows) << " cols: "<< std::to_string(cols) << std::endl;
 cv::imwrite("home/Documents/camera/imwritefun"+ std::to_string(frame_count) +".JPG", doubleSaveFrame->getHost());
 }
 writer.release();



Note that this code above produced successfully the camera frames to file when cv::imwrite was executed, however the the writer failed to write to video file. I am very new to OpenCV and the associated methods used here, if anyone has an idea on what is causing the issue that would be extremely helpful as research has not prevailed a solution.


-
Can I trigger a command after ffmpeg writes a segment ?
28 décembre 2022, par user717847I am reading from an RTSP (camera) stream and writing segments, using ffmpeg. My command to do so is :


ffmpeg -rtsp_transport tcp -i rtsp://$camera_creds@$camera_ip/video/1 -map 0 -c:v h264 -preset:v ultrafast -reset_timestamps 1 -f segment -segment_time 300 -strftime 1 
-segment_list ${monitor_dir}/segments$camera.txt $monitor_dir/cam${camera}_out%Y%m%d_%H%M%S.mp4



It works fine to a point. My problem is that I want to do something with each segment once it has been written.


To accomplish this, I monitor the segmentsN.txt file for lines being added to it ; I then read the contents, do stuff (process, upload), and then remove the lines that I've already processed (so that I don't reprocess them).


The problem with this is that periodically, ffmpeg will start writing to a new segment, but apparently won't update the segments list file. Initially I thought this was because my "remove the lines" operation was writing a brand new file and replacing it in place (which it was), while ffmpeg was probably continuing to append to the inode it started out with (which it maybe was). Having fixed that, I think I now just have a race condition.


What I'd really like is to have ffmpeg change the filename once it has completed a segment, and/or move the completed segment file into a different folder. However, this doesn't seem like an option. Is there a more robust way to accomplish what I'm doing here ? I could just poll for multiple files with a given filename pattern, and process the earliest, circumventing the segments list file...but something more robust would be nice.


Thanks