Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (82)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le lecteur ne fonctionne pas sur Internet Explorer
    Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
    Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)

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

  • HLS implementation with FFmpeg

    6 juin 2017, par Joseph K

    I am trying to implement HLS using FFmpeg for transcoding + segmenting but have been facing a couple of issues that have been bugging me for the past week.

    Issue

    Webserver currently receives live MP4 fragments being recorded on-the-go and needs to take care of transcoding and segmentation.

    As mp4 fragments are being received, they need to be encoded. Then segmented. If i run a segmenter (be it ffmpeg or apple mediastreamsegmenter), every mp4 fragment is being treated as a VOD by itself and I’m not being able to integrate them as part of a larger live event implementation.

    I thought of a solution where every time I receive an mp4 fragment, I first use fmpeg to concatenate it with previous ones to form the larger mp4 that I then pass to be segmented for HLS. That did not work either because the entire stream has to be re-segmented each and every time and existing TS fragments replaced by new ones that are similar yet shifted in time.

    Implementation 1

    ffmpeg -re -i fragmentX.mp4 -b:v 118k -b:a 32k -vcodec copy -preset:v veryfast -acodec aac -strict -2 -ac 2 -f mpegts -y fragmentX.ts

    I manage the m3u8 manifest on my own, deleting old fragments and appending new ones.

    When validating the stream, I find it stacked with EXT-X-DISCONTINUITY tags making the stream unwatchable.

    Implementation 2

    First combine latest fragment with overall.mp4

    ffmpeg -i "concat:newfragment.mp4|existing.mp4" -c copy overall.mp4

    Then pass the combination to ffmpeg for HLS segmentation

    ffmpeg -re -i overall.mp4 -ac 2 -r 20 -vcodec libx264 -b:v 318k -preset:v veryfast -acodec aac -strict -2 -b:a 32k -hls_time 2 -hls_list_size 3 -hls_allow_cache 0 -hls_base_url /Users/JosephKalash/Desktop/test/350/ -hls_segment_filename ’350/fragment%03d.ts’ -hls_flags delete_segments 350/index.m3u8

    Concatenation is not perfect and there are noticeable glitches where the fragments are supposed to be stitched. Segmentation replaces older fragments and the manifest is rewritten as if it’s a new HLS stream every time ffmpeg is called.

    I cannot figure out how to get this to work properly.

    Any ideas ?

  • HLS implementation with FFmpeg

    10 août 2015, par Joseph K

    I am trying to implement HLS using FFmpeg for transcoding + segmenting but have been facing a couple of issues that have been bugging me for the past week.

    Issue

    Webserver currently receives live MP4 fragments being recorded on-the-go and needs to take care of transcoding and segmentation.

    As mp4 fragments are being received, they need to be encoded. Then segmented. If i run a segmenter (be it ffmpeg or apple mediastreamsegmenter), every mp4 fragment is being treated as a VOD by itself and I’m not being able to integrate them as part of a larger live event implementation.

    I thought of a solution where every time I receive an mp4 fragment, I first use fmpeg to concatenate it with previous ones to form the larger mp4 that I then pass to be segmented for HLS. That did not work either because the entire stream has to be re-segmented each and every time and existing TS fragments replaced by new ones that are similar yet shifted in time.

    Implementation 1

    ffmpeg -re -i fragmentX.mp4 -b:v 118k -b:a 32k -vcodec copy -preset:v veryfast -acodec aac -strict -2 -ac 2 -f mpegts -y fragmentX.ts

    I manage the m3u8 manifest on my own, deleting old fragments and appending new ones.

    When validating the stream, I find it stacked with EXT-X-DISCONTINUITY tags making the stream unwatchable.

    Implementation 2

    First combine latest fragment with overall.mp4

    ffmpeg -i "concat:newfragment.mp4|existing.mp4" -c copy overall.mp4

    Then pass the combination to ffmpeg for HLS segmentation

    ffmpeg -re -i overall.mp4 -ac 2 -r 20 -vcodec libx264 -b:v 318k -preset:v veryfast -acodec aac -strict -2 -b:a 32k -hls_time 2 -hls_list_size 3 -hls_allow_cache 0 -hls_base_url /Users/JosephKalash/Desktop/test/350/ -hls_segment_filename ’350/fragment%03d.ts’ -hls_flags delete_segments 350/index.m3u8

    Concatenation is not perfect and there are noticeable glitches where the fragments are supposed to be stitched. Segmentation replaces older fragments and the manifest is rewritten as if it’s a new HLS stream every time ffmpeg is called.

    I cannot figure out how to get this to work properly.

    Any ideas ?

  • Cannot suppress ffmpeg output from ruby

    3 avril 2014, par Danny

    I have ruby on rails app that allows users to upload videos. When a video is added, I have a before_save filter that uses ffmpeg to generate a series of thumbnails. The problem is that ffmpeg is producing tons of console output when I'm saving a video item in the rails console, and when I run my tests.

    My environment :

    • Host Machine : OS X 10.9.2
    • Vagrant Box : Ubuntu 10.04.4
    • ffmpeg version : SVN-r0.5.9-4:0.5.9-0ubuntu0.10.04.3
    • ruby version : 1.9.3-p194

    Command I'm running :

    `ffmpeg -v 0 -ss #{timestamp} -i #{video_file.path} -y -f image2 -vcodec mjpeg -vframes 1 -s 640*360 #{thumbnail_path}/thumbnail#{i}.jpg`

    This version of ffmpeg on my VM doesn't seem to care about the "-v 0" option. I've also tried "-loglevel quiet" which causes ffmpeg to error, indicating that the option isn't recognized (both loglevel and v work on my host machine's ffmpeg).

    Tried using both exec() and system(), which both caused execution to hang. Tried to redirecting output to a file by doing :

    `ffmpeg -v 0 -ss #{timestamp} -i #{video_file.path} -y -f image2 -vcodec mjpeg -vframes 1 -s 640*360 #{thumbnail_path}/thumbnail#{i}.jpg > #{thumbnail_path}/output.txt`

    Still see output. Next I tried :

    `ffmpeg -v 0 -ss #{timestamp} -i #{video_file.path} -y -f image2 -vcodec mjpeg -vframes 1 -s 640*360 #{thumbnail_path}/thumbnail#{i}.jpg &> dev/null`

    Still seeing output ! Finally I tried :

    $stdout.reopen("#{thumbnail_path}/output.txt", "w")
    $stderr.reopen("#{thumbnail_path}/error.txt", "w")
    `ffmpeg -v 0 -ss #{timestamp} -i #{video_file.path} -y -f image2 -vcodec mjpeg -vframes 1 -s 640*360 #{thumbnail_path}/thumbnail#{i}.jpg`
    $stdout = STDOUT
    $stderr = STDERR

    Holy cow, that worked ! Well, sort of. No more verbose output when running tests, BUT somehow anytime this runs I get kicked out of the rails console.

    Does anyone have a more elegant solution ?