Recherche avancée

Médias (1)

Mot : - Tags -/iphone

Autres articles (54)

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

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (8147)

  • MPEG DASH SRD : How to properly re-assemble multiple tiles into a single tile [closed]

    21 juin 2024, par ATrashInTheWorld

    I am trying to build a web player that is able to stream MPEG DASH, but with SRD information in the manifest. I have a problem at the "gluing" of the tiles part.

    


    How the data is set :

    


    I have a video of a resolution of XxY, which I've divided in tiles of NxM, meaning that I now have the NxM videos of the same duration as the original one, but which is reduced to a smaller resolution, a portion from the original (seeing only the upper left corner for example).

    


    I have fragmented those tiles for the MPEG DASH streaming format, meaning an init.mp4 and the m4s fragments for each tile. To note that I have the tiles in multiple bitrate, in order to imitate some adaptive streaming.

    


    The "gluing" part :

    


    The gluing part consists of gluing the tile togheter into 1 big tile, aka the original video. The SRD information allows me to know where each tile should be position to reconstruct the original video shape. Once I have the spatial information from the manifest, I use this command to glue the tiles togheter :

    


    ffmpeg.exe -i v1 -i v2 -i v3 -i .v4 -i v5 -i v6 -i v7 -i v8 -i v9 -filter_complex "[0:v][1:v][2:v][3:v][4:v][5:v][6:v][7:v][8:v]xstack=inputs=9:layout=0_0|w0_0|w0+w1_0|0_h0|w3_h0|w3+w4_h0|0_h0+h3|w6_h0+h3|w6+w7_h0+h3" out.mp4


    


    The command above allows me to "glue" together tiles from a grid of 3x3 tiles, into 1 big tile.

    


    The web streaming method :

    


    To stream, I use JavaScript MediaSource, and I am appending the fragments to the buffer continuously, like this reference

    


    The issue :

    


    The issue is that the FFMPEG gluing command only works on proper mp4 videos, not with fragments (m4s). I cannot glue the wanted m4s tiles back into a bigger one. However, the JavaScript player only takes fragments, meaning that I cannot just send continuous mp4 video.

    


    I have tried many things with fragments and full videos, but the only solution I found for this chicken-egg problem is to :

    


      

    1. Create video clips with smaller duration for each tile, at each bitrate.
    2. 


    3. Glue the desired video clips tiles together with the FFMpeg command.
    4. 


    5. Convert that glued video in one big fragment, and send it.
    6. 


    


    However, I feel that it is not a clean method and I fear that I am missing something.
Is there a better solution that I am not aware of ?
Any idea suggestions are welcome.

    


    Thank you for your time.

    


  • Rails 5 with Carrierwave and S3 - creating multiple video formats for DASH streaming works but mpd file breaks

    22 novembre 2019, par Milind

    what I am doing -
    i have a Rails 5 app for video streaming(DASH MPEG) that uses FFMPEG to get encoded stream videos by converting any single video into multiple videos of multiple bit rates/size and primarily also MPD FILE that can be played easily on html video player, which i have already tested by manually running the ffmpeg scripts on the console that generates all the files.However, I want to automate this process and hence carrierwave comes into the pictures.
    Here, i use carrierwave to generate different versions(size/bitrate) of videos(mp4/webm) to upload to s3 but during running the version, where all the versions are successfully created in tmp folder, only the last version(mpd) that needs to create .mpd file, carrierwave creates a mp4 video file and just replaces the extension instead of actually creating the mpd file.

    So in the aws s3(screenshot added below), i can see my all versions and mpd file , but that mpd file which must be xml file is actually a mp4 video file or uploaded version file itself.
    I have also tried to create new file during the process, but it never works.
    Has some one encountered this problem ?

    any help will be greatly appreciated ?

    Ny code snippets below - model,uploader,output of script on the console during upload, s3 screenshot

      ##### models/video.rb ##########

       mount_uploader :video, VideoUploader  

      ####### uploaders/video_uploader.rb #########

       class VideoUploader < CarrierWave::Uploader::Base


       include CarrierWave::MiniMagick
       include CarrierWave::Video
       include CarrierWave::Video::Thumbnailer
       include ::CarrierWave::Backgrounder::Delay

       ####### for streaming ..first get the audio and then convert the input video into multiple bitrates/scale #######

       ###first get audio and then get all different versions of same video
       version :video_audio do
         process :get_audio

         def get_audio
           `ffmpeg -y -i "#{file.path}" -c:a aac -ac 2 -ab 128k -vn video_audio.mp4`
         end

           def full_filename(for_file)
             "video_audio.mp4"
           end

           def filename
             "video_audio.mp4"
           end        
       end

       ####### similar to the above i have various version like ...#########

       version :video_1080 do...end
       version :video_720 do... end
       version :video_480 do ...end
       ...and so on..and all these versions are successfully created and uploaded to s3, however..in next version ...show it also creates a video file whereas i need a simple mpd file ONLY.

            ###this is where even after everything works, in S3, i can see a video file of version mpd and not actual mpd file
            version :mpd  do
              process :get_manifest
                 ###here in the command below, the video.mpd file is successfully obtained but its uploaded as video.mpd file of added/uploaded video file and not a new mpd file
                 ###tried with ffmpeg -f webm_dash_manifest -i too, but s3 still shows a mp4 file
                 `MP4Box -dash 1000 -rap -frag-rap -profile onDemand -out video.mpd video_1080.mp4 video_720.mp4 video_480.mp4 video_360.mp4 video_240.mp4 video_audio.mp4 `

              end
             end

            ######### sidekiq console output - successful mpd is generated ################
                 DASH-ing files - single segment
                 Subsegment duration 1.000 - Fragment duration: 1.000 secs
                 Splitting segments and fragments at GOP boundaries
                 DASHing file video_1080.mp4
                 DASHing file video_720.mp4                                  
                 DASHing file video_480.mp4                                  
                 DASHing file video_360.mp4                                  
                 DASHing file video_240.mp4                                  
                 DASHing file video_audio.mp4                                
                \[DASH\] Generating MPD at time 2019-11-22T00:01:59.872Z      
                 mpd_1mb.mp4
                 mpd_video.mpd

    this is what the uploaded files looks on s3, notice the video.mpd, its a mp4 video file just like others which should have been a simple mpd file of not more than 2kb.

    Is there something that I am missing ?
    Can Carrierwave do this or is it not made for this ?
    Do I have to write a callback and then programmatically upload files to s3, if carrierwave is not helping in this regard ?

    Kindly provide any suggestion or useful advice so that I can move ahead.

    aws s3 list

  • FFMPEG segment live video for DASH

    23 décembre 2014, par static

    I’m trying to stream live capture of desktop to my own server, which shall create an MPD with segment template for use with dash.js player.
    Using the following command i managed to get it working

    ffmpeg -rtbufsize 6M -f x11grab -s 1366x768 -r 10 -i :0.0 -flags +global_header \
    -vcodec libvpx -deadline realtime -profile:v 0 -keyint_min 1 -g 1 -cpu-used 0 \
    -vb 1200k -qmin 10 -qmax 42 -threads 4 -bufsize 6000k -slices 4 -map 0 -an \
    -f stream_segment -segment_time 2 -segment_format webm **/streams

    The output :

    Input #0, x11grab, from ':0.0': Duration: N/A, start: 1419329032.549498, bitrate: N/A
    Stream #0:0: Video: rawvideo (BGRA / 0x41524742), bgra, 1366x768, 10 fps, 10 tbr, 1000k tbn, 10 tbc
    [libvpx@ 0x23ccf60] v1.3.0 Output #0, stream_segment, ssegment, to /streams/d':
    Metadata:
    encoder : Lavf56.15.102
    Stream #0:0: Video: vp8 (libvpx), yuva420p, 1366x768, q=10-42, 1200 kb/s, 10 fps, 1k tbn, 10 tbc
    Metadata: encoder: Lavc56.13.100 libvpx
    Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> vp8 (libvpx))
    Press [q] to stop, [?] for help
    [swscaler @ 0x23ac0c0] Warning: data is not aligned! This can lead to a speedloss
    frame= 2839 fps= 10 q=0.0 Lsize=N/A time=00:04:43.90 bitrate=N/A
    video:135246kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

    If I increase the number of frames to produce better quality, the latency drastically increases and the stream is not in sync with the MPD. This is caused by the fact that keyframes are created at every frame -keyint_min 1 -g 1 because otherwise and error MEDIA_ERR_SRC_NOT_SUPPORTED is thrown by the player. This is probably because a keyframe must be found at the beginning of each segment.

    Could ffmpeg be used to generate keyframes as the first frame in each segment ? I try different values for -keyint_min x -g y, for example number of frames but with no result (probably because the number of frames stabilized after a couple a seconds, so the first 2-3 segments were produced with inconsistent number of frames, so all the keyframes were introduced in wrong positions in the segments).