Recherche avancée

Médias (0)

Mot : - Tags -/content

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (112)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The 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 (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (12897)

  • FFmpeg playable MP4 segmented video from RTSP

    5 février 2021, par Michael Novotný

    I have problem with creating playable uncomplete MP4 file created from FFMPEG. In my case I have some infinite RTSP stream (h.264) from IP camera.
My target is record this stream to MP4 files for playback. If i use FFMPEG mp4 muxer, work correctly.

    


    /usr/bin/ffmpeg -progress pipe:5 -use_wallclock_as_timestamps 1 -analyzeduration 10000000 -probesize 10000000 -fflags +igndts -rtsp_transport tcp -hwaccel auto -loglevel warning -i rtsp://****:****@*******:****/ -y -an -vcodec copy -strict experimental -movflags frag_keyframe+empty_moov -f segment -segment_format mp4 -segment_format_options movflags=+faststart -segment_atclocktime 1 -reset_timestamps 1 -strftime 1 -segment_time 15 /Shinobi/videos/bWkwjTWdRt/Rm67cYyq50/test-%S.mp4


    


    FFMPEG will create one MP4 file which still increasing its size. If I try copy or simply open this (uncomplete, still increased ... of course :) ) file, it's correcly play. But it's still only one file ... still bigger and bigger. For long-term recording cam (few weeks) it's not good.
I want segment this stream to multiple smaller MP4 files (as you knows from another typical NVR systems). For example : segment for 30minutes.
I used "segment" muxer.

    


    /usr/bin/ffmpeg -progress pipe:5 -use_wallclock_as_timestamps 1 -analyzeduration 10000000 -probesize 10000000 -fflags +igndts -rtsp_transport tcp -hwaccel auto -loglevel warning -i rtsp://*****:****@*********:****/ -y -an -vcodec copy -strict -2 -movflags frag_keyframe+empty_moov -f mp4 -segment_atclocktime 1 -reset_timestamps 1 -strftime 1 -segment_list pipe:8 -segment_time 15 /Shinobi/videos/bWkwjTWdRt/Rm67cYyq50/test-%S.mp4


    


    It looks like work correctly. New file with defined mask is created every 30 minutes. If I try copy or simply open(and play) anyone "completed 30min segment file" it"s works correctly. Problem is with last file (more precisely : newest, still uncompleted last segment file) - it's not playable (moov atom not found).

    


    I Googled my problem many time with another keywords. I was try many my wonders. I readed FFMPEG documentation maybe 5times.

    


    Problem is with second passthroug which "segment muxer" do (which do -movflags +faststart .. for example). It's logicaly, second passthroug not be did in last(newest) file yet.

    


    Is there way to make it work ? If I want see time for 2-3 mins ago it's no possible wait up to 30minutes for "complete segment" ... and at the same time it is not possible to have a billion files with 2-3sec segments.
How did other NVR systems solve this ? Synology, Hikvision and more has in their file system recorded MP4 soubory which one of them is still uncompleted, still growing, but normaly PLAYABLE.

    


    A few last days I tried this with no success. I'am absolutely angry and sad. I hope that my text is understandable

    


    Thank you

    


    This options has no effect in my case (tried) :

    


    -movflags frag_keyframe+empty_moov

    


    -movflags faststart

    


    -movflags separate_moof

    


    -fragsize *** / -fragtime ***

    


    -strict -2 / -strict experimental

    


  • How to get time stamp of closest keyframe before a given timestamp with ffmpeg

    21 mai 2021, par loretoparisi

    To seek to position and get the closest frame I was using

    


    ffprobe -i /path/to.mp3 -show_frames -show_entries frame=pkt_pos -of default=noprint_wrappers=1:nokey=1 -hide_banner -loglevel panic -read_intervals $seconds%+#1


    


    where I specify the start position as :

    


    '-read_intervals', seconds + '%+#1', //Read only 1 packet after seeking to position 01:23


    


    With latest ffprobeversion

    


    $ ffprobe --version
ffprobe version 4.4 Copyright (c) 2007-2021 the FFmpeg developers


    


    it does not work anymore, and I get

    


    N/A


    


    hence the "first", while if I remove the $seconds%+#1 I get all

    


    ffprobe -i /path/to.mp3 -show_frames -show_entries frame=pkt_pos -of default=noprint_wrappers=1:nokey=1 -hide_banner -loglevel panic -read_intervals 20
N/A
1029888
1030306
1030724
1031142
1031560
1031978
1032396
1032814
1033232
1033650
1034068
1034486
1034904
...


    


    How to retrieve the closest frame then not using the read_intervals $seconds%+#1 but read_intervals $seconds only ?

    


  • How do you specify container format in FFmpeg ?

    15 avril 2021, par TheNeuronalCoder

    I am trying to encode mp4 video, but it doesn't open on my macbook because while it has the supported H264 codec, the container format is not MP4. So all I ask is how you would go about specifying the container format so I can generate video that is actually playable without using ffplay.

    


    ffprobe version N-101948-g870bfe1 Copyright (c) 2007-2021 the FFmpeg developers
  built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
  configuration: --disable-asm --enable-shared --enable-libx264 --enable-gpl
  libavutil      56. 72.100 / 56. 72.100
  libavcodec     58.136.101 / 58.136.101
  libavformat    58. 78.100 / 58. 78.100
  libavdevice    58. 14.100 / 58. 14.100
  libavfilter     7.111.100 /  7.111.100
  libswscale      5. 10.100 /  5. 10.100
  libswresample   3. 10.100 /  3. 10.100
  libpostproc    55. 10.100 / 55. 10.100
Input #0, h264, from 'animation.mp4':
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 24.33 fps, 24 tbr, 1200k tbn, 48 tbc


    


    void imagine::Camera::Record() {&#xA;  if (recording_ == true)&#xA;    throw std::runtime_error(&#xA;      "you must close your camera before starting another recording"&#xA;    );&#xA;  recording_ = true;&#xA;&#xA;  output_file_ = std::fopen(output_.c_str(), "wb");&#xA;  if (!output_file_)&#xA;    throw std::runtime_error("failed to open file");&#xA;&#xA;  AVCodec* codec = avcodec_find_encoder(AV_CODEC_ID_H264);&#xA;  if (!codec)&#xA;    throw std::runtime_error("failed to find codec");&#xA;&#xA;  context_ = avcodec_alloc_context3(codec);&#xA;  if (!context_)&#xA;    throw std::runtime_error("failed to allocate video codec context");&#xA;&#xA;  packet_ = av_packet_alloc();&#xA;  if (!packet_)&#xA;    throw std::runtime_error("failed to allocate video packet");&#xA;&#xA;  py::tuple size = py::globals()["main_scene"].attr("size");&#xA;  context_->width = size[0].cast<int>();&#xA;  context_->height = size[1].cast<int>();&#xA;  context_->bit_rate = 0.4 * fps_ * context_->width * context_->height;&#xA;  context_->time_base = (AVRational){ 1, fps_ };&#xA;  context_->framerate = (AVRational){ fps_, 1 };&#xA;  context_->gop_size = 10;&#xA;  context_->max_b_frames = 1;&#xA;  context_->pix_fmt = AV_PIX_FMT_YUV420P;&#xA;&#xA;  if (avcodec_open2(context_, codec, NULL) &lt; 0)&#xA;    throw std::runtime_error("failed to open codec");&#xA;&#xA;  frame_ = av_frame_alloc();&#xA;  if (!frame_)&#xA;    throw std::runtime_error("failed to allocate video frame");&#xA;&#xA;  frame_->width  = context_->width;&#xA;  frame_->height = context_->height;&#xA;  frame_->format = AV_PIX_FMT_YUV420P;&#xA;&#xA;  if (av_frame_get_buffer(frame_, 0) &lt; 0)&#xA;    throw std::runtime_error("failed to allocate the video frame data");&#xA;}&#xA;</int></int>

    &#xA;