Recherche avancée

Médias (1)

Mot : - Tags -/getid3

Autres articles (92)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (12094)

  • Creating an Init file from existing non-fragmented, segmented MP4 files

    20 novembre 2018, par slhck

    I am performing chunked encodes of longer video files, where I’ve split the original file into individual sequences that I have encoded separately. These sequences are files of different length, depending on where the scene cuts appear—they may be between 2 and 5 seconds long. They all start with an I-frame and are standalone.

    My encoded sequences are all MP4s, e.g. :

    test_0000.mp4
    test_0001.mp4
    test_0002.mp4
    test_0003.mp4
    test_0004.mp4

    They all have common properties :

    $ mp4info test_0000.mp4

    File:
     major brand:      isom
     minor version:    200
     compatible brand: isom
     compatible brand: iso2
     compatible brand: mp41
     fast start:       no

    Movie:
     duration:   2016 ms
     time scale: 1000
     fragments:  no

    ...

    Now, in order to play those with a DASH player, I have to create an initialization segment and individual fragmented MP4s.

    I could generate the fragmented MP4s via mp4fragment which I run on each standalone MP4 file :

    $ mp4info test_0000.m4s
    File:
     major brand:      isom
     minor version:    200
     compatible brand: isom
     compatible brand: iso2
     compatible brand: mp41
     compatible brand: iso5
     fast start:       yes

    Movie:
     duration:   2016 ms
     time scale: 1000
     fragments:  yes

    ...

    But obviously, these are now not according to spec, and all contain a moov atom :

    What I’d need is individual media segments with only one moof and mdat box, which then require an initialization segment with only a moov box.

    How can I generate that from the existing, already encoded segments ?

    I know this appears like an XY problem. In principle, I could already segment my original file directly after encoding, and run those encodes at the same time, e.g. using ffmpeg’s dash muxer, or MP4Box, however :

    • There is almost no control over the resulting segment sizes, with respect to minimum and maximum duration
    • This approach does not parallelize

    I have also checked Bento4 ; it does not seem to offer this functionality. Neither does FFmpeg. MP4Box behaves similarly. They all assume you have one long file to start with.


    I see I could splice off the ftyp and moov boxes from these “fake fragments” in order to create an initialization segment. But I would end up with segments containing multiple moof and mdat boxes, which is not according to the specification – it only allows one fragment and media data box :

    4. Media Segments

    […] one optional Segment Type Box (styp) followed by a single Movie Fragment Box (moof) followed by one or more Media Data Boxes (mdat).

    I guess I can live with this the styp not being present.

  • Unable to playback hardware encoded H.264 to RED5 server using FFmpeg

    26 février 2019, par Les

    I have a USB camera that is capable of H.264 on-board compression. I use the following FFmpeg command line to grab the encoded H.264 from the camera and put it in a ’flv’ container :

    ffmpeg -y -f dshow -vcodec h264 -i video="USB Camera" -vcodec copy -copyinkf -f flv c:\temp\test.flv

    This works as expected and I can view the video using VLC no problem. Following this principle I then attempt to stream to a RED5 server using the following command :

    ffmpeg -y -f dshow -vcodec h264 -i video="USB Camera" -vcodec copy -copyinkf -f flv rtmp://192.168.75.34/live/livestream

    The RED5 server detects the stream but I am unable to connect to it and view it using my basic Python program.

    If I do the same thing but use FFmpeg to carry out H.264 encoding of the default capture pin (MJPEG), it will stream correctly.

    I’m not sure if there is some flag in the command line that I might be missing ? Any help with this issue would be much appreciated.

    Here is the log output from the second FFmpeg command :

    C :\ffmpeg-latest-20190219\ffmpeg-static\bin>ffmpeg -y -f dshow -vcodec h264 -i video="USB Camera" -vcodec copy -copyinkf -f flv rtmp ://192.168.75.176/live/livestream"

    ffmpeg version N-93151-gff03418348 Copyright (c) 2000-2019 the FFmpeg developers
    built with gcc 8.2.1 (GCC) 20190212
    configuration : —enable-gpl —enable-version3 —enable-sdl2 —enable-fontconfig —enable-gnutls —enable-iconv —enable-libass —enable-libdav1d —enable-libbluray —enable-libfreetype —enable-libmp3lame —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenjpeg —enable-libopus —enable-libshine —enable-libsnappy —enable-libsoxr —enable-libtheora —enable-libtwolame —enable-libvpx —enable-libwavpack —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxml2 —enable-libzimg —enable-lzma —enable-zlib —enable-gmp —enable-libvidstab —enable-libvorbis —enable-libvo-amrwbenc —enable-libmysofa —enable-libspeex —enable-libxvid —enable-libaom —enable-libmfx —enable-amf —enable-ffnvcodec —enable-cuvid —enable-d3d11va —enable-nvenc —enable-nvdec —enable-dxva2 —enable-avisynth —enable-libopenmpt
    libavutil 56. 26.100 / 56. 26.100
    libavcodec 58. 47.102 / 58. 47.102
    libavformat 58. 26.101 / 58. 26.101
    libavdevice 58. 6.101 / 58. 6.101
    libavfilter 7. 48.100 / 7. 48.100
    libswscale 5. 4.100 / 5. 4.100
    libswresample 3. 4.100 / 3. 4.100
    libpostproc 55. 4.100 / 55. 4.100

    Input #0, dshow, from ’video=USB Camera’ :
    Duration : N/A, start : 1834145.825000, bitrate : N/A
    Stream #0:0 : Video : h264 (Main) (H264 / 0x34363248), yuv420p, 1920x1080, 30 fps, 30 tbr, 10000k tbn, 20000k tbc

    Output #0, flv, to ’rtmp ://192.168.75.176/live/livestream’ :
    Metadata :
    encoder : Lavf58.26.101
    Stream #0:0 : Video : h264 (Main) ([7][0][0][0] / 0x0007), yuv420p, 1920x1080, q=2-31, 30 fps, 30 tbr, 1k tbn, 10000k tbc

    Stream mapping :
    Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    frame= 39 fps=3.2 q=-1.0 Lsize= 976kB time=00:00:07.10 bitrate=1124.8kbits/s speed=0.59x
    video:975kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead : 0.106110%

  • MySql stops running in combination with Laravel Queue, Supervisor, and FFMPEg

    13 juin 2014, par egekhter

    After setting up queue listener to process uploaded videos with FFMPEG, I’ve come back to the server several times to find that MySql has stopped running. I checked drive space and it’s about 77% used (43G out of 60G).

    Here’s my code in case it’s useful :

    public function fire($job, $data)
    {
    $data = json_decode($data['transcoding_message'], true);
    $output_directory = '/home/ubuntu/transcodes/';
    $amazon_array = array();

    $s3 = AWS::get('s3');


       //execute main transcoding thread

       $cmd = 'sudo ffmpeg -i ' . $data['temp_file_url'] . ' -y -vcodec libx264 -tune zerolatency -movflags faststart -crf 20 -profile:v main -level:v 3.1 -acodec libfdk_aac -b:a 256k ' . $output_directory. $data['temp_file_key'] . '_HQ.mp4 -vcodec libx264 -s ' . $sq_width . 'x' . $sq_height . ' -tune zerolatency -movflags faststart -crf 25 -profile:v main -level:v 3.1 -acodec libfdk_aac -b:a 256k ' . $output_directory. $data['temp_file_key'] . '_SQ.mp4 -ss ' . $seek_half . ' -f image2 -vf scale=iw/2:-1 -vframes 1 ' . $output_directory. $data['temp_file_key'] . '_thumb.jpg';

       exec($cmd." 2>&1", $out, $ret);


       if ($ret)
       {

           Log::error($cmd);
           echo 'Processing error' . PHP_EOL;
           //there was a problem
           return;
       }

       else
       {
           //setup file urls
       echo 'about to move files';

       $hq_url = $this->bucket_root . $data['user_id'] . '/' . $data['temp_file_key'] . '_HQ.mp4';
       $sq_url = $this->bucket_root . $data['user_id'] . '/' . $data['temp_file_key'] . '_SQ.mp4';;
       $thumb_url = $this->bucket_root . $data['user_id'] . '/' . $data['temp_file_key'] . '_thumb.jpg';

       $amazon_array['video_hq_url'] = $data['temp_file_key'] . '_HQ.mp4';
       $amazon_array['video_sq_url'] = $data['temp_file_key'] . '_SQ.mp4';
       $amazon_array['video_thumb_url'] = $data['temp_file_key'] . '_thumb.jpg';

               //copy from temp to permanent

       foreach ($amazon_array as $k => $f)
       {
           $uploader = UploadBuilder::newInstance()
               ->setClient($s3)
               ->setSource($output_directory.$f)
               ->setBucket($this->bucket)
               ->setKey('users/' . $data['user_id'] . '/' . $f)
               ->setConcurrency(10)
               ->setOption('ACL', 'public-read')
               ->build();

           $uploader->getEventDispatcher()->addListener(
               'multipart_upload.after_part_upload',
               function($event) use ($f) {
                   // Do whatever you want
               }
           );

           try {
               $uploader->upload();
               echo "{$k} => Upload complete.\n" . PHP_EOL;

               DB::table('items')->where('id', $data['item_id'])->update(array($k => $this->bucket_root. $data['user_id'] . '/' .$f, 'deleted_at' => NULL));
               //delete local

               unlink($output_directory.$f);

               unset($uploader);
           } catch (MultipartUploadException $e) {
               $uploader->abort();
               echo "{$k} => Upload failed.\n" . PHP_EOL;
               continue;
           }
       }

           //write to database

               DB::table('archives_items')->where('id', $data['archive_item_id'])->update(array('deleted_at' => NULL));
               DB::connection('mysql3')->table('video_processing')->where('id', $data['id'])->update(array('finished_processing' => 1));

           //delete files

           //delete s3
           $s3->deleteObject(
               array(
                   'Bucket' => $this->temp_bucket,
                   'Key' => $data['file_name']
               )
           );
           echo $data['temp_file_url'] . '=>' . " deleted from temp bucket.\n" . PHP_EOL;
           DB::connection('mysql3')->table('video_processing')->where('id', $data['id'])->update(array('deleted_at' => \Carbon\Carbon::now()));

       }
           $job->delete();

           // end of processing uploaded video
           }


       else
       {
           return;
       }

    Any ideas as to why MySql would die like that ?

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

    Edit : I wanted to add that the php artisan queue:listen command is being triggered via Supervisor and that I have 4 running concurrent processes.