Recherche avancée

Médias (1)

Mot : - Tags -/pirate bay

Autres articles (40)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

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

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

  • Stream to Facebook Live using OpenCV

    23 mai 2022, par Lanzy Erin

    I am planning to stream a video file to Facebook Live but I want to programmatically edit its frames like adding texts depending. My problem is that I don't know how to properly send data to Facebook Live. I tried ffmpeg but it doesn't work.

    


    Here is my code that I tried

    


    import subprocess
import cv2

rtmp_url = "rtmps://live-api-s.facebook.com:443/rtmp/FB-1081417119476224-0-AbwwMK91tFTjFy2j"

path = "7.mp4"
cap = cv2.VideoCapture(path)

# gather video info to ffmpeg
fps = int(cap.get(cv2.CAP_PROP_FPS))
width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))

# command and params for ffmpeg
command = ['ffmpeg',
           '-y',
           '-f', 'rawvideo',
           '-vcodec', 'rawvideo',
           '-pix_fmt', 'bgr24',
           '-s', f"{width}x{height}",
           '-r', str(fps),
           '-i', '-',
           '-c:v', 'libx264',
           '-pix_fmt', 'yuv420p',
           '-preset', 'ultrafast',
           '-f', 'flv',
           rtmp_url]

# using subprocess and pipe to fetch frame data
p = subprocess.Popen(command, stdin=subprocess.PIPE)

while cap.isOpened():
    ret, frame = cap.read()
    if not ret:
        print("frame read failed")
        break

    # YOUR CODE FOR PROCESSING FRAME HERE

    # write to pipe
    p.stdin.write(frame.tobytes())


    


  • How do I run ffmpeg v360 filter on a stream with limited memory ?

    21 février 2024, par Dmitry Filippov

    I am currently using ffmpeg python in a microservice for changing a projection of a VR video in S3 bucker. Ideally I would like to use as little memory as possible, reading a video file from s3 as a stream, transcoding it and uploading back into a separate file all in-memory.

    


    However, when I run this code with large videos (above 10GB), the ffmpeg process gets terminated with no exception and boto3 uploads a 0B "file" to s3. When I run this with a small (100MB) video or on my local machine with 16GB RAM, the upload finishes up fine.

    


    Code :

    


      with (
    ffmpeg
    .input(input_url)
    .filter("v360", inputProjection, outputProjection, in_stereo=inputStereo, out_stereo=outputStereo)
    .output('pipe:', format=outputFormat)
    .run_async(pipe_stdout=True)
  ).stdout as dataStream:
     client.upload_fileobj(dataStream, aws_s3_bucket, outputFile)


    


    I expect the ffmpeg to apply the filter to a video as a stream only holding a small section in memory at a time, but instead it seems to try to download the entire video into the local memory before applying the filter (when the script fails, stdout contains either no data or only the metadata of the video)

    


    I cannot support the full download as I am planning to use the script on 100GB+ videos and it needs to run as a microservice in a kubernetes cluster.

    


  • How to draw a waveform from an RTSP audio using ffmpeg and Python

    9 mars 2023, par S Andrew

    I have a Hikvision camera. Using ffmpeg, I can extract the audio from it and save it in wav file using below code :

    


    import os
os.system("ffmpeg -i rtsp://admin:password@192.168.0.27:554/Streaming/Channels/101/ -q:a 0 -map a -t 10 file.wav")


    


    It creates file.wav file and when played I can hear the audio recorded from camera. Now I am planning to draw the waveform of these audio's. For this I have below code :

    


    os.system("ffmpeg -i rtsp://admin:password@192.168.0.27:554/Streaming/Channels/101/ -filter_complex showwavespic -frames:v 1 output.png")


    


    and below is the output I get after pressing q

    


    [q] command received. Exiting.

Finishing stream 0:0 without any data written to it.
Output #0, image2, to 'output.png':
  Metadata:
    title           : Media Presentation
    encoder         : Lavf59.26.100
  Stream #0:0: Video: png, rgba, 600x240 [SAR 1:1 DAR 5:2], q=2-31, 200 kb/s, 1 fps, 1 tbn
    Metadata:
      encoder         : Lavc59.36.100 png
frame=    0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)


    


    and there is no file generated. I tried the above code with and mp3 file and it generated the output.png with waveform. How can I resolve the issue ?