Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (15)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

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

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (5923)

  • Create drawbox with ffmpeg between specific seconds (without reencoding whole video - faster)

    31 mars 2022, par protter

    My plan was to put a transparent red box behind a video. This box should only be present from second 1-45.
But if the videos are 3 hours long, the process takes a long time although it only has to process 45 seconds.

    


    My first attempt takes too long :

    


    ffmpeg -i %1 -vf drawbox=0:9*ih/10:iw:ih/10:t=fill:color=red@0.5:enable='between(t,1,45)' "%~dp0transpred\%~n1%~x1

    


    Then i tried splitting the video into two parts. put the box on the first video, and then put the two back together again.

    


    ffmpeg  -ss 00:00:00.0000 -i %1 -to 00:00:45.0000  -vf drawbox=0:9*ih/10:iw:ih/10:t=fill:color=red@0.5:enable='between(t,1,45)' "%~dp0transpred\%~n1A%~x1"

    


    FFMpeg -ss 00:00:45.0000 -i %1 -c:v copy -c:a copy -avoid_negative_ts make_zero "%~dp0transpred\%~n1B%~x1"

    


    But i don't even have to try to put these two together, because they are not separated exactly at the second. I have read that this is due to "timestamps" and the different video and audio streams.

    


    Now I'm trying an approach to create a stream with the bar, and then overlay it with the finished video. I haven't quite managed that yet, and I don't know if it's faster.
Shortening the video is very fast.

    


    EDIT (Added as a replacement for the comment later)

    


    Thanks for your help I have almost done it with a slightly different approach. Unfortunately, the second part now always has no sound. No matter if I put A and B (B no sound) or B and A (A no sound) together.

    


      

    1. First split with mkvmerge so i have no worrys about the keyframes and get the exact time
mkvmerge --split timestamps:00:00:45.100 A.MKV -o splitmkm.mkv
    2. 


    3. Then add the Bar (Black because of easier testing) :
ffmpeg -i splitmkm-001.mkv -vf drawbox=0:9*ih/10:iw:ih/10:t=fill BAR1.MKV
    4. 


    5. Merge (mkvmerge ends with error) :
ffmpeg -safe 0 -f concat -i list.txt -c copy output1.mkv
    6. 


    


    EDIT (Answer to kesh)

    


    This was the error Again, audio codec config's must match across all your concat files. The drawbox changed the audio Codec from AC-3 to Vorbis.

    


    the procedure is now :

    


      

    1. mkvtoolnix\mkvmerge --split timestamps:00:00:05.100  %1 -o A_splitmkm.mkv with mkvmerge i have an exact split at the time, and i don't have to learn about keyframes.
    2. 


    3. ffmpeg -i A_splitmkm-001.mkv -vf drawbox=0:9*ih/10:iw:ih/10:t=fill:color=red A_BARmkm.MKV create the Bar
    4. 


    5. ffmpeg -i A_BARmkm.MKV -i A_splitmkm-001.mkv -map 0:v  -map 1 -map -1:v  -c copy A_BARwithAudio.mkv redo the step with the changed audio from drawbox
    6. 


    7. ffmpeg -safe 0 -f concat -i list.txt -map 0  -c copy A_output1.mkv merge
    8. 


    


    Now everything works.
Thanks alot !

    


  • Android encode video with ffmpeg while it is still recording

    30 décembre 2016, par Andreas Pabst

    I want to develop an android aplication which allows me to continuously record a video and upload parts of the video to a server without stopping the recording.
    It is crucial for the application that I can record up to 60 min without stopping the video.

    Initial approach

    Application consits of two parts :

    1. MediaRecorder which records a video continuously from the camera.
    2. Cutter/Copy - Part : While the video is recorded I have to take out certain segments and send them to a server.
      This part was implemented using http://ffmpeg4android.netcompss.com/
      libffmpeg.so. I used their VideoKit Wrapper which allows me to directly run ffmpeg with any params I need.

    My Problem

    I tried the ffmpeg command with the params

    ffmpeg -ss 00:00:03 -i  -t 00:00:05 -vcodec copy -acodec copy  

    which worked great for me as long as Android’s MediaRecorder finished recording.

    When I execute the same command, while the MediaRecorder is recording the file, ffmpeg exits with the error message "Operation not permitted".

    • I think that the error message doesn’t mean that android prevents the access to the file. I think that ffmpeg needs the "moov-atoms" to find the proper position in the video.

    For that reason I thought of other approaches (which don’t need the moov-atom) :

    1. Create a rtsp stream with android and access the rtsp stream later. The problem is that to my knowledge android SDK doesn’t support the recording to a rtsp stream.
    2. Maybe it is possible to access the camera directly with ffmpeg (/dev/video0 seems to be a video device ?!)
    3. I read about webm as an alternative for streaming, maybe android can record webm streams ?!

    TLDR : Too long didn’t read :

    I want to access a video file with ffmpeg (libffmpeg.so) while it is recording. Fffmpeg exits with the error message "Operation not permitted"

    Goal :

    My goal is to record a video (and audio) and take parts of the video while it is still recording and upload them to the server.

    Maybe you can help me solve the probelm or you have other ideas on how to approach my problem.

    Thanks a lot in advance.

  • ffmpeg : Saving RTSP stream with overlapping segments

    23 janvier 2017, par iamyojimbo

    I have an RTSP stream and I need to segment it with 2s segments with 1s overlaps.

    i.e.

    t(s): 0----1----2----3----4----5----6----7----8----9----10---->

    vids: |--1.mp4--|--3.mp4--|--5.mp4--|--7.mp4--|--9.mp4--|
              |--2.mp4--|--4.mp4--|--6.mp4--|--8.mp4--|

    I can split to 2s segments, every 2 seconds, but I can’t see how I can split to 2s segments every one second.

    So far I have used the below :

    ffmpeg \
    -i rtsp://192.168.1.124:8553/unicast \
    -c copy -flags +global_header \
    -f segment \
    -segment_time 2 \
    -segment_format_options movflags=+faststart \
    -reset_timestamps 1 \
    %d.mp4 \

    The approach I was thinking was to copy the stream, delay by 1s and then segment that separately but this seems wasteful and there’s no way to guarantee the overlap.

    Any ideas ?