Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (36)

  • 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

  • HTML5 audio and video support

    13 avril 2011, par

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

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (4044)

  • av_interleaved_write_frame() : Connection reset by peer - Using ffmpeg connected to local nginx

    10 avril 2019, par haxpor

    I have a local nginx web server installed with nginx-rtmp-module.

    I have 2 RTMP sources that are fed into local network at rtmp://127.0.0.1/live-video, and rtmp://127.0.0.1/live-audio. Then these twos will be combined and fed into rtmp://127.0.0.1/live again. The latter one will be the one that I will be using.

    The reason I did just that is I want to do noise reduction via sox.

    The setup is as follows

    1. rtmp://127.0.0.1/live-video - it uses ffmpeg to capture only screen (video) then output to such URL with command

      ffmpeg -analyzeduration 0 -video_size 1280x1080 -framerate 25 -f x11grab -i :0.0 -vcodec libx264 -flags +global_header -preset ultrafast -minrate 7200 -maxrate 8k -vsync 1 -f flv -metadata streamName=ZombieHeroLiveStream rtmp://127.0.0.1/live-video
    2. rtmp://127.0.0.1/live-audio - it uses sox to do noise reduction then uses ffmpeg to feed into such URL with command

      ffmpeg -f alsa -ac 1 -i default -preset ultrafast -f flac - | sox - -p noisered /tmp/noise.prof 0.21 | ffmpeg -analyzeduration 0 -thread_queue_size 2 -i - -f flv -preset ultrafast rtmp://127.0.0.1/live-audio
    3. rtmp://127.0.0.1/live - it uses ffmpeg to combine the above two sources then output into such URL, this is the one I tested viewing via VLC (which is works fine) with command

      ffmpeg -analyzeduration 0 -thread_queue_size 512 -rtmp_live live -flags +global_header -i "rtmp://127.0.0.1/live-video" -analyzeduration 0 -thread_queue_size 512 -rtmp_live live -flags +global_header -i "rtmp://127.0.0.1/live-audio" -c:v copy -c:a copy -map 0:v -map 1:a -async 1 -vsync 1 -video_size 1280x1080 -fflags +genpts -framerate 30 -preset ultrafast -minrate 7200 -maxrate 8k -flags +global_header -segment_list_flags +live -rtmp_live live -f flv -metadata streamName=ZombieHeroLiveStream "rtmp://127.0.0.1/live"

    The setup works fine, I tested and confirmed viewing via VLC targeting to URL of 3. The problem is that for some times after all threes above up and running, 1. will exit and thus make the whole encoding stop. The error shown is

    av_interleaved_write_frame(): Connection reset by peer29.88 bitrate=2021.8kbits/s dup=1791 drop=0 speed=0.998x    
       Last message repeated 2 times
    ...

    Error writing trailer of rtmp://127.0.0.1/live-video: Connection reset by peer

    No matter how I change and modify command line’s flags/options, it will end up like error above. Please note, I’ve modified flags quite a lot thus a certain flags might be possibly not needed.

    Full error log from 1. is here.

    Configuration of nginx server is here. It’s pretty much basic, but I will further use it to relay to multiple target RTMP servers later.

    I’m on Ubuntu 18.04, 4.18.0-17-generic with 8 GB of RAM, 4 CPU Cores with ffmpeg

    ffmpeg version 3.4.4-0ubuntu0.18.04.1 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)

    , and with Nginx

    nginx version: nginx/1.14.2
    built by gcc 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)
    built with OpenSSL 1.1.0g  2 Nov 2017 (running with OpenSSL 1.1.1b  26 Feb 2019)
    TLS SNI support enabled
    configure arguments: --with-http_ssl_module --add-module=../nginx-rtmp-module-1.2.1

    So again the question is how can I fix such issue ?
    Any suggestion would be appreciated.

    Important edit : I just found out I entered a wrong duplicated command for 3. Now it has been corrected ! Sorry about that.

    Update : I’m able to record audio with ffmpeg then do noise filter with sox, then stream to target rtmp with ffmpeg. But noise reduction doesn’t satisfy me yet. See above at 2. for its updated command. And according to this, sox has problem in understand a few bytes so I use flac format in piping instead. Still my question remained as this update is for improvement for command in 2.

  • FFMPEG, the penultimate image from the .txt file doesn't show in the video

    25 octobre 2019, par ArmKh

    I’m trying to create a video from the images using ffmeg. Actually, the creating of the video works but there is a small problem. I have a text file with the names of the images (paths) which I’m using in the video. The file looks like this

    file 'image1.jpg'
    file 'image2.jpg'
    file 'image3.jpg'
    file 'image4.jpg'
    file 'image5.jpg'

    And the ffmeg command is following

    ffmpeg -y -r 1/5 -f concat -safe 0 -i imagenames.txt -i some_audio.mp3 -c:v libx264 -vf fps=30 -pix_fmt yuv420p -t 30 output.mp4

    This video should keep the frame on every image for 5 seconds. But the problem is the penultimate image ( image4 in this case ) is not being shown in the video. So, it keeps on image3 10 seconds and moves to image5

    So, the video in seconds looks like this

    [image1] -> [image2] -> [image3] -> [image4] -> [image5]
      5sec        5sec       10sec        0sec        5sec

    And the problem is not with the image4 exactly. In case of swapping image3 and image4, the video will skip image3

    [image1] -> [image2] -> [image4] -> [image3] -> [image5]
      5sec        5sec       10sec        0sec        5sec

    Hope you’ll have any suggestions to fix this issue

  • ffprobe does not show packet size of a mpeg transport stream as 188 bytes

    16 octobre 2015, par CompNet

    I created a transport stream from a H.264 encoded file using the following ffmpeg command :

    ffmpeg -i encoded.mp4 -c copy -map 0 -vbsf h264_mp4toannexb mpegts sample.ts

    Now I want to check the frames and packets within the transport stream. I used

    ffprobe -show_frames

    which shows the frame details for audio and video frames. But I’m confused about the pkt_size field. Is it the actual frame size of each elementary stream of audio and video (I/B/P frames) ?

    Also, when I run

    ffprobe -show_packets

    is it supposed to give each packet details in the transport stream ? Because the size field of each packet is not 188 bytes, rather it is same as the pkt_size I got with -show_frames.

    Could someone please explain why the size in -show_packets of transport stream is not 188 bytes ? Did I do anything wrong while multiplexing mp4 to TS ?