Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (42)

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

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (9420)

  • Two variables for ffmpeg ; use for loop ?

    16 juillet 2020, par Zorba

    I would like to silence sequences in a number of audio files with ffmpeg, which requires to give two variables, the starting point and the end point.

    



    It works nice when you add the two variables in a script like so

    



    
echo "which file do you want to silence"
read filename

echo "When does the muted period start in seconds"
read A

echo "When does the muted period end in seconds"
read B

ffmpeg -i $filename -af "volume=enable='between(t,$A,$B)':volume=0" output_silenced.mp3


    



    I have read all the "similar questions" that come up in a search for "use two variables in bash" and similar search terms, but I can't get my head around this.

    



    I put the variables in two files, with new lines for each number, and tried to call the files in a for loop, which did not work. I also tried to call them in a for loop like so

    



    echo "which file do you want to silence"
read filename

for A in 22 33 57; do

for B in 27 45.5 58.5; do

ffmpeg -i $filename -af "volume=enable='between(t,$A,$B)':volume=0" output_silenced.mp3

mv output_silenced.mp3 filename.mp3
done
done


    



    but the output sounds just like the original input audio !

    



    Can anybody help me out with this ? I have to partly silence many files and it already takes forever to figure out all the start and end moments, and it would be great to get through with this a bit easier !

    



    Thanks a lot in advance !

    


  • Android : Recording and Streaming at the same time

    23 avril 2020, par Bruno Siqueira

    This is not really a question as much as it is a presentation of all my attempts to solve one of the most challenging functionalities I was faced with.

    



    I use libstreaming library to stream realtime videos to Wowza Server and I need to record it at the same time inside the SD card. I am presenting below all my attempts in order to collect new ideias from the community.

    



    Copy bytes from libstreaming stream to a mp4 file

    



    Development

    



    We created an interception in libstreaming library to copy all the sent bytes to a mp4 file. Libstreaming sends the bytes to Wowza server through a LocalSocket. It users MediaRecorder to access the camera and the mic of the device and sets the output file as the LocalSocket's input stream. What we do is create a wrapper around this input stream extending from InputStream and create a File output stream inside it. So, every time libstreaming executes a reading over the LocaSocket's input stream, we copy all the data to the output stream, trying to create a valid MP4 file.

    



    Impediment

    



    When we tried to read the file, it is corrupted. We realized that there are meta information missing from the MP4 file. Specifically the moov atom. We tried to delay the closing of the streaming in order to give time to send this header (this was still a guessing) but it didn't work. To test the coherence of this data, we used a paid software to try to recover the video, including the header. It became playable, but it was mostly green screen. So this became an not trustable solution. We also tried using "untrunc", a free open source command line program and it couldn't even start the recovery, since there was no moov atom.

    



    Use ffmpeg compiled to android to access the camera

    



    Development

    



    FFMPEG has a gradle plugin with a java interface to use it inside Android apps. We thought we could access the camera via command line (it is probably in "/dev/video0") and sent it to the media server.

    



    Impediment

    



    We got the error "Permission Denied" when trying to access the camera. The workaround would be to root the device to have access to it, but it make the phones loose their warranty and could brick them.

    



    Use ffmpeg compiled to android combined with MediaRecorder

    



    Development

    



    We tried to make FFMPEG stream a mp4 file being recorded inside the phone via MediaRecorder

    



    Impediment

    



    FFMPEG can not stream MP4 files that are not yet done with the recording.

    



    Use ffmpeg compiled to android with libstreaming

    



    Development

    



    Libstreaming uses LocalServerSocket as the connection between the app and the server, so we thought that we could use ffmpeg connected with LocalServerSocket local address to copy the streaming directly to a local file inside the SD card. Right after the streaming started, we also ran the ffmpeg command to start recording the data to a file. Using ffmpeg, we believed that it would create a MP4 file in the proper way, which means with the moov atom header included.

    



    Impediment

    



    The "address" created is not readable via command line, as a local address inside the phone. So the copy is not possible.

    



    Use OpenCV

    



    Development

    



    OpenCV is an open-source, cross-platform library that provides building blocks for computer vision experiments and applications. It offers high-level interfaces for capturing, processing, and presenting image data. It has their own APIs to connect with the device camera so we started studding it to see if it had the necessary functionalities to stream and record at the same time.

    



    Impediment

    



    We found out that the library is not really defined to do this, but more as image mathematical manipulation. We got even the recommendation to use libstreaming (which we do already).

    



    Use Kickflip SDK

    



    Development

    



    Kickflip is a media streaming service that provides their own SDK for development in android and IOS. It also uses HLS instead of RTMP, which is a newer protocol.

    



    Impediment

    



    Their SDK requires that we create a Activity with camera view that occupies the entire screen of the device, breaking the usability of our app.

    



    Use Adobe Air

    



    Development

    



    We started consulting other developers of app's already available in the Play Store, that stream to servers already.

    



    Impediment

    



    Getting in touch with those developers, they reassured that would not be possible to record and stream at the same time using this technology. What's more, we would have to redo the entire app from scratch using Adobe Air.

    



    UPDATE

    



    Webrtc

    



    Development

    



    We started using WebRTC following this great project. We included the signaling server in our NODEJS server and started doing the standard handshake via socket. We were still toggling between local recording and streaming via webrtc.

    



    Impediment

    



    Webrtc does not work in every network configuration. Other than that, the camera acquirement is all native code, which makes a lot harder to try to copy the bytes or intercept it.

    


  • How can I record the broadcasts coming with udp ip in txt file with bash script ?

    6 mai 2020, par Yunushan

    I have to record streams on the udp ips from txt file for certain period of time in bash script.

    



    Example txt file content

    



    


    myfile.txt

    


    



    udp://@239.100.100.100:5555
udp://@239.100.100.101:5555


    



    


    It uncludes "@" because of local server i tried both of conditions

    
 


    And also i tried to do with ffmpeg but it records also same, what should i do

    


    



    #!/bin/bash
filename="/home/user/myfile.txt"

n=1
while read line; do
    cvlc -vvv $filename --sout=file/ts:$n.ts --run-time=30 vlc://quit #> /dev/null 2>&1 &
    n=$((n+1))
done < $filename


    



    cvlc execute output