Recherche avancée

Médias (1)

Mot : - Tags -/stallman

Autres articles (61)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

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

  • What’s new in Piwik 2.16.0 ?

    1er février 2016, par Matthieu Aubry — About, Development, Uncategorized

    In this blog post we showcase what is new in Piwik 2.16.0 and why you should upgrade your Piwik to this latest release !

    Piwik 2.16.0 is currently in Release Candidate and you can already use it by following these simple instructions. Piwik 2.16.0 will be officially released in a few days.

    To see the list of all 250+ changes, read the Piwik 2.16.0 changelog.

    Long Term Support for Piwik 2.X

    Piwik 2.16.0 is our Long Term Support version for Piwik 2. Learn more about Piwik LTS.

    New : Custom Dimensions feature

    With Custom Dimensions you can assign any custom data to your visitors or actions (like pages, events, …) and then visualize the reports of how many visits, conversions, pageviews, etc. there were for each Custom Dimension. They are similar to Custom Variables see the comparison of Custom Dimensions and Custom Variables.

    The new Custom Dimensions plugin is available on the Piwik Marketplace.

    Learn more about creating, tracking, reporting, managing, segmenting custom dimensions in the Custom Dimensions user guide.

    View the list of all visitors who reached a specific goal

    All Goal reports now include a link below the Goal report summary, that lets you see in one click all users that have converted any of your Goals :

    Events reports : option to view all columns : min, max and avg values

    By default in Actions > Events report, the columns displayed are “Total events” (Total number of events) and “Total value” (the sum of event values). It is now possible to click on the footer icon to view more detailed columns about event values : minimum event value, maximum event value, and average event value.

    Allow zoom to country in realtime visitor map

    In the real time map in Piwik (which displays your users activity appearing in real time !), it is now possible to zoom on a given country :

    Export all Records : new ‘all’ option in the Row limit selector

    It is now possible to export all of the data in your reports directly from the user interface ! Select ‘all’ in the row limit selector before exporting your data reports :

    New themes on the Marketplace !

    Feel like a change of colors ? Try out the new community submitted Piwik Themes on the Marketplace ! Learn how to install a new theme in Piwik (in only a few clicks).

    Let Super User view and edit segments created by other users

    As a Super User of Piwik, it can be very useful to view all Custom Segments created by all users. Starting in Piwik 2.16.0 any Super User can now view all Segments for a given website in the Segment selector :

    • Segments that are shared with All users will now appear below a section “Shared with you :” (a segment can be shared to all users by any admin user by selecting “This segment is visible to All Users” in the Segment editor)
    • Segments that are not shared with anyone are now also visible under the section “Visible to you because you have Super User access :”

    New segment ‘deviceBrand’ to segment by Device Brand

    You can now segment by device brands such as Apple, Samsung, LG, Google, Nokia, Sony, Lenovo, Alcatel, etc. The complete list of device brands you can use is listed on the Segmentation developer guide.

    New segment ‘actionType’ to view only particular Actions types (pagesviews, downloads, outlinks, events…)

    Use the new “Action type” segment to view only particular actions such as : pageviews, contents, sitesearches, events, outlinks and downloads.

    New segment : ‘actionUrl’ to view any actions that matches a given URL

    Use the new “Action URL” segment to view any action that matches a given URL, whether they are Pageviews, Site searches, Contents, Downloads or Events.

    New segment operators : “Starts with” and “Ends with”

    The new segment operators “Starts with” and “Ends with” can come handy when creating Custom Segments, and complement well the existing segment operators : Contains, Does not contain, Equals, Not equals, Greater than or equal to, Less than or equal to.

    Learn more about Segmentation in our user guides or in the Segmentation developer guide.

    Making Piwik more accessible

    Web accessibility refers to the inclusive practice of removing barriers that prevent interaction with, or access to applications or websites, by people with disabilities. When sites are correctly designed, developed and edited, all users have equal access to information and functionality.

    In Piwik 2.16.0, and with the help of high school students from the Catalyst Academy, we have made several improvements that make Piwik more accessible :

    • Menu now include the ARIA metadata (to make menus easier to navigate and use)
    • Page titles and various key tooltips have been improved (to give a better context to the data)
    • Keyboard access has been much improvement and Piwik is starting to be usable with the keyboard ! (this is very useful as many users are not able to use a mouse, and they should be able to view Piwik reports with the keyboard only)
    • ‘Skip to main content’ link (when pressing the TAB key) now skips the cursor to the page content.
    • Search bar was further improved : try it by pressing the ‘f’ key (useful to open any Piwik report or page without using the mouse)

    New user preference : display times either as 24h format or AM/PM format

    Users can now select whether times should be displayed in 24h format (16:20) or in AM/PM format (4:20pm)

    Other admins and Super Users are not visible to users with ‘admin’ permissions anymore

    Piwik 2.16.0 just became even more respectful of your privacy : any user you created and assigned an “admin” permission will not be able to view all other usernames anymore. This change was requested by many Piwik users who rightfully preferred not to disclose all usernames to any ‘admin’ user.

    As a result of this change, when a user with ‘admin’ permission (admin user) wants to give additional permission to another user (target user), the admin user will now need to know the target username and enter it in the Manage Users interface :

    New Config file viewer

    A new menu entry Administration > Diagnostics > Config file, lets Super Users view all config values in the UI :

    This new screen serves several purposes :

    • help Piwik administrators discover and learn about all the possible config file settings that Piwik offers.
    • let Super Users and Admins easily view any overridden config.ini.php INI setting without having to open the config file on the server.

    New report ‘Personal settings > Custom Variables’ displays custom variable usage

    A new report visible to Super Users lets you see how your Custom Variables slots are being used, which ones are still unused, and how many times a given custom variable name was used.

    Learn more about Custom Variables.

    Improvements to Heartbeat feature to accurately count time spent on the last page

    The heartbeat feature which lets you accurately track how long do visitors spend on your website, has been improved in 2.16.0. If you would like to measure how long do people spend on your pages (even if they don’t interact with your website or app), then consider using the heartbeat feature. Learn more in our guide Accurately measure the time spent on each page.

    New AnonymousPiwikUsageMeasurement plugin

    AnonymousPiwikUsageMeasurement plugin was created for those who would like to measure how their Piwik services is being used. This plugin also sends anonymised tracking data to our demo-anonymous.piwik.org which will help us learn how your Piwik is used and how we could improve the application. Learn more about AnonymousPiwikUsageMeasurement plugin.

    Show a warning when Piwik is used as a SuperUser via HTTP

    It is highly recommended to use HTTPS (SSL) for your Piwik server. If you are logged in as a Super User and viewing any Administration pages, you will now see a warning notification message at the top of the screen inviting you to use HTTPS :

    MySQL 5.7+ support

    The awesome Piwik community has helped us identify several issues with MySQL 5.7 support and Piwik is now fully compatible with the latest MySQL version 5.7+. Piwik is officially compatible with MySQL >= 4.1 and up to Mysql 5.7 ! Piwik is also compatible with MariaDB.

    Better detection of new devices and robots

    Our Device Detector library can now detect many new types of devices : smart TVs, new tablets and mobile phones, and more. New bots were added to our list of bots to keep your analytics report meaningful.

    Learn more : What Device Detector is able to detect, About Device Detector.

    New Referrer Spammers

    Every week we keep updating our community-list of referrer spammers. More than 50 new spammers were added since the last Piwik release !

    Note that the list of referrer spammer is automatically updated every week in your Piwik, so you need to wait at most one week to benefit from the very latest list.

    Learn more about Stopping Referrer Spam in Analytics reports.

    Ability to support new SMS providers to send Scheduled Reports by text message

    When you create scheduled reports in Piwik, you can specify one or several email addresses (to send reports by email) and you can also configure phone numbers (so your reports are sent to your phone via text message). So far we only support one SMS Provider “Clockwork SMS” but it is now possible for anyone to create a very simple plugin that adds a new SMS Provider to Piwik.

    A new SMS Provider plugin was released on the Marketplace : FreeMobileMessaging. If you have a favorite SMS Provider, we encourage you to create a new plugin for it !

    Piwik PRO mentions

    A few new mentions of Piwik PRO were added into Piwik to let users know that they can get Professional Help, and additional services and products. For example a new widget was added to the default dashboard. If you provide your Piwik service to your own clients, maybe you would like to remove the Piwik PRO widget and other ads, see this FAQ : How do I remove from Piwik the links to “Piwik PRO” or to “Professional Services” ?

    Stability, Reliability and Performance

    Dozens of other bugs were fixed (including several Major bugs) and many small improvements are included in this release. All these changes make Piwik more stable and reliable, as well as easier to troubleshoot and maintain. We are proud to be able to offer Piwik 2.16.0 as our Long Term Support release !

    If you have any feedback, questions, suggestion, or bug to report, please join our Piwik Community Forums.

    We hope you will love this 2.16.0 release as much as we loved making it.

    Happy Analytics !

  • ffmpeg seek calculating wrong byte range ?

    17 décembre 2015, par user4455

    I’m running into an issue while trying to extract thumbnails from a movie file at a specific timestamp. Generally I’ve had no issues with this, but I’ve come across a set of movie files that are getting an error about the byte range requested (416 Requested Range Not Satisfiable).

    The odd thing is that the server is correctly returning the content length in the partial content request, yet when it requests the movie file it requests a length that exceeds that.

    This is a bit over my head, so I’m not sure what could be happening here. Any insight would be great.

    The Command :

    /usr/bin/ffmpeg -y -ss 1400 -i 'https://s3-us-west-2.amazonaws.com/my-bucket/mymoviefile.mp4' -qscale:v 2 -f image2 -vframes 1 -filter:v 'scale=192:108' -loglevel debug /data/www/storage/test.jpg 2>&1

    The Error :

    [https @ 0x22e1e00] header='HTTP/1.1 416 Requested Range Not Satisfiable'
    [https @ 0x22e1e00] http_code=416
    [https @ 0x22e1e00] HTTP error 416 Requested Range Not Satisfiable

    Source File Size :

    1776706045 bytes

    Source Content Duration :

    2897.624271

    Partial Content Request :

    [https @ 0x22e1e00] header='HTTP/1.1 206 Partial Content'
    [https @ 0x22e1e00] http_code=206
    [https @ 0x22e1e00] header='x-amz-id-2: 4J1pgHExIUA0GxIxSBmGJjrRqliHbsIjXeuGzVfTlaaoVXbyZI5FQNma8fGaifcovkXfxJev5yU='
    [https @ 0x22e1e00] header='x-amz-request-id: 78B3BDBB0356EF40'
    [https @ 0x22e1e00] header='Date: Wed, 16 Dec 2015 23:51:29 GMT'
    [https @ 0x22e1e00] header='x-amz-meta-content-length: 2898'
    [https @ 0x22e1e00] header='x-amz-meta-cb-modifiedtime: Tue, 15 Dec 2015 17:59:51 GMT'
    [https @ 0x22e1e00] header='Last-Modified: Wed, 16 Dec 2015 23:44:59 GMT'
    [https @ 0x22e1e00] header='ETag: "6341a8022630667a8070a83575e542e7-27"'
    [https @ 0x22e1e00] header='Accept-Ranges: bytes'
    [https @ 0x22e1e00] header='Content-Range: bytes 0-1776706044/1776706045'
    [https @ 0x22e1e00] header='Content-Type: video/mp4'
    [https @ 0x22e1e00] header='Content-Length: 1776706045'
    [https @ 0x22e1e00] header='Server: AmazonS3'
    [https @ 0x22e1e00] header='Connection: close'

    FFmpeg Request :

    request: GET /my-bucket/mymoviefile.mp4 HTTP/1.1
    User-Agent: Lavf/56.25.101
    Accept: */*
    Range: bytes=1781732960-
    Connection: close
    Host: s3-us-west-2.amazonaws.com
    Icy-MetaData: 1

    Entire Log :

    # /usr/bin/ffmpeg -y -ss 1400 -i 'https://s3-us-west-2.amazonaws.com/my-bucket/mymoviefile.mp4' -qscale:v 2 -f image2 -vframes 1 -filter:v 'scale=192:108' -loglevel debug /data/www/storage/test.jpg 2>&1
    ffmpeg version 2.6.4 Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.9.2 (Debian 4.9.2-10)
     configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/x86_64-linux-gnu --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libpulse --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --enable-libvidstab --enable-libzvbi --enable-avresample --disable-htmlpages --disable-podpages --enable-libutvideo --enable-libfdk-aac --enable-libx265 --enable-libiec61883 --enable-vaapi --enable-libdc1394 --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu
     libavutil      54. 20.100 / 54. 20.100
     libavcodec     56. 26.100 / 56. 26.100
     libavformat    56. 25.101 / 56. 25.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 11.102 /  5. 11.102
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Splitting the commandline.
    Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
    Reading option '-ss' ... matched as option 'ss' (set the start time offset) with argument '1400'.
    Reading option '-i' ... matched as input file with argument 'https://s3-us-west-2.amazonaws.com/my-bucket/mymoviefile.mp4'.
    Reading option '-qscale:v' ... matched as option 'qscale' (use fixed quality scale (VBR)) with argument '2'.
    Reading option '-f' ... matched as option 'f' (force format) with argument 'image2'.
    Reading option '-vframes' ... matched as option 'vframes' (set the number of video frames to output) with argument '1'.
    Reading option '-filter:v' ... matched as option 'filter' (set stream filtergraph) with argument 'scale=192:108'.
    Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
    Reading option '/data/www/storage/test.jpg' ... matched as output file.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option y (overwrite output files) with argument 1.
    Applying option loglevel (set logging level) with argument debug.
    Successfully parsed a group of options.
    Parsing a group of options: input file https://s3-us-west-2.amazonaws.com/my-bucket/mymoviefile.mp4.
    Applying option ss (set the start time offset) with argument 1400.
    Successfully parsed a group of options.
    Opening an input file: https://s3-us-west-2.amazonaws.com/my-bucket/mymoviefile.mp4.
    [https @ 0x22e1e00] request: GET /my-bucket/mymoviefile.mp4 HTTP/1.1
    User-Agent: Lavf/56.25.101
    Accept: */*
    Range: bytes=0-
    Connection: close
    Host: s3-us-west-2.amazonaws.com
    Icy-MetaData: 1


    [https @ 0x22e1e00] header='HTTP/1.1 206 Partial Content'
    [https @ 0x22e1e00] http_code=206
    [https @ 0x22e1e00] header='x-amz-id-2: 4J1pgHExIUA0GxIxSBmGJjrRqliHbsIjXeuGzVfTlaaoVXbyZI5FQNma8fGaifcovkXfxJev5yU='
    [https @ 0x22e1e00] header='x-amz-request-id: 78B3BDBB0356EF40'
    [https @ 0x22e1e00] header='Date: Wed, 16 Dec 2015 23:51:29 GMT'
    [https @ 0x22e1e00] header='x-amz-meta-content-length: 2898'
    [https @ 0x22e1e00] header='x-amz-meta-cb-modifiedtime: Tue, 15 Dec 2015 17:59:51 GMT'
    [https @ 0x22e1e00] header='Last-Modified: Wed, 16 Dec 2015 23:44:59 GMT'
    [https @ 0x22e1e00] header='ETag: "6341a8022630667a8070a83575e542e7-27"'
    [https @ 0x22e1e00] header='Accept-Ranges: bytes'
    [https @ 0x22e1e00] header='Content-Range: bytes 0-1776706044/1776706045'
    [https @ 0x22e1e00] header='Content-Type: video/mp4'
    [https @ 0x22e1e00] header='Content-Length: 1776706045'
    [https @ 0x22e1e00] header='Server: AmazonS3'
    [https @ 0x22e1e00] header='Connection: close'
    [https @ 0x22e1e00] header=''
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x22e1740] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x22e1740] ISO: File Type Major Brand: mp42
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x22e1740] Before avformat_find_stream_info() pos: 1647960 bytes read:1652200 seeks:0
    [h264 @ 0x22e92c0] no picture
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x22e1740] All info found
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x22e1740] After avformat_find_stream_info() pos: 1862326 bytes read:1878504 seeks:0 frames:16
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://s3-us-west-2.amazonaws.com/my-bucket/mymoviefile.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 1
       compatible_brands: isommp41avc1
       creation_time   : 2015-11-18 02:34:41
     Duration: 00:48:17.70, start: 0.000000, bitrate: 4905 kb/s
       Stream #0:0(und), 15, 1/2997: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, left), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 1001/60000, 9994 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 59.94 tbc (default)
       Metadata:
         creation_time   : 2015-11-18 02:34:41
         handler_name    : ?Apple Video Media Handler
       Stream #0:1(und), 1, 1/48000: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
       Metadata:
         creation_time   : 2015-11-18 02:34:41
         handler_name    : ?Apple Sound Media Handler
    Successfully opened the file.
    Parsing a group of options: output file /data/www/storage/test.jpg.
    Applying option qscale:v (use fixed quality scale (VBR)) with argument 2.
    Applying option f (force format) with argument image2.
    Applying option vframes (set the number of video frames to output) with argument 1.
    Applying option filter:v (set stream filtergraph) with argument scale=192:108.
    Successfully parsed a group of options.
    Opening an output file: /data/www/storage/test.jpg.
    Successfully opened the file.
    detected 2 logical cores
    [Parsed_scale_0 @ 0x22cd4c0] Setting 'w' to value '192'
    [Parsed_scale_0 @ 0x22cd4c0] Setting 'h' to value '108'
    [Parsed_scale_0 @ 0x22cd4c0] Setting 'flags' to value '0x4'
    [Parsed_scale_0 @ 0x22cd4c0] w:192 h:108 flags:'0x4' interl:0
    [graph 0 input from stream 0:0 @ 0x22ccfe0] Setting 'video_size' to value '1920x1080'
    [graph 0 input from stream 0:0 @ 0x22ccfe0] Setting 'pix_fmt' to value '0'
    [graph 0 input from stream 0:0 @ 0x22ccfe0] Setting 'time_base' to value '1/2997'
    [graph 0 input from stream 0:0 @ 0x22ccfe0] Setting 'pixel_aspect' to value '1/1'
    [graph 0 input from stream 0:0 @ 0x22ccfe0] Setting 'sws_param' to value 'flags=2'
    [graph 0 input from stream 0:0 @ 0x22ccfe0] Setting 'frame_rate' to value '2997/100'
    [graph 0 input from stream 0:0 @ 0x22ccfe0] w:1920 h:1080 pixfmt:yuv420p tb:1/2997 fr:2997/100 sar:1/1 sws_param:flags=2
    [format @ 0x2798640] compat: called with args=[yuvj420p|yuvj422p|yuvj444p]
    [format @ 0x2798640] Setting 'pix_fmts' to value 'yuvj420p|yuvj422p|yuvj444p'
    [AVFilterGraph @ 0x22cda60] query_formats: 5 queried, 4 merged, 0 already done, 0 delayed
    [Parsed_scale_0 @ 0x22cd4c0] picking yuvj420p out of 3 ref:yuv420p alpha:0
    [swscaler @ 0x22c3c80] deprecated pixel format used, make sure you did set range correctly
    [Parsed_scale_0 @ 0x22cd4c0] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:192 h:108 fmt:yuvj420p sar:1/1 flags:0x4
    [mjpeg @ 0x2854e20] intra_quant_bias = 96 inter_quant_bias = 0
    [mjpeg @ 0x28716c0] intra_quant_bias = 96 inter_quant_bias = 0
    [mjpeg @ 0x2795320] intra_quant_bias = 96 inter_quant_bias = 0
    Output #0, image2, to '/data/www/storage/test.jpg':
     Metadata:
       major_brand     : mp42
       minor_version   : 1
       compatible_brands: isommp41avc1
       encoder         : Lavf56.25.101
       Stream #0:0(und), 0, 100/2997: Video: mjpeg, yuvj420p(pc, left), 192x108 [SAR 1:1 DAR 16:9], 100/2997, q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc (default)
       Metadata:
         creation_time   : 2015-11-18 02:34:41
         handler_name    : ?Apple Video Media Handler
         encoder         : Lavc56.26.100 mjpeg
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
    Press [q] to stop, [?] for help
    [https @ 0x22e1e00] request: GET /my-bucket/mymoviefile.mp4 HTTP/1.1
    User-Agent: Lavf/56.25.101
    Accept: */*
    Range: bytes=1781732960-
    Connection: close
    Host: s3-us-west-2.amazonaws.com
    Icy-MetaData: 1


    [https @ 0x22e1e00] header='HTTP/1.1 416 Requested Range Not Satisfiable'
    [https @ 0x22e1e00] http_code=416
    [https @ 0x22e1e00] HTTP error 416 Requested Range Not Satisfiable
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x22e1740] stream 0, offset 0x6a331660: partial file
    https://s3-us-west-2.amazonaws.com/my-bucket/mymoviefile.mp4: Invalid data found when processing input
    [output stream 0:0 @ 0x22d7500] EOF on sink link output stream 0:0:default.
    No more output streams to write to, finishing.
    frame=    0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A
    video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Input file #0 (https://s3-us-west-2.amazonaws.com/my-bucket/mymoviefile.mp4):
     Input stream #0:0 (video): 0 packets read (0 bytes); 0 frames decoded;
     Input stream #0:1 (audio): 0 packets read (0 bytes);
     Total: 0 packets (0 bytes) demuxed
    Output file #0 (/data/www/storage/test.jpg):
     Output stream #0:0 (video): 0 frames encoded; 0 packets muxed (0 bytes);
     Total: 0 packets (0 bytes) muxed
    Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
    0 frames successfully decoded, 0 decoding errors
    [AVIOContext @ 0x27ab100] Statistics: 1878504 bytes read, 0 seeks

    FFprobe Result :

    # /usr/bin/ffprobe -show_format -show_streams -i 'https://s3-us-west-2.amazonaws.com/my-bucket/mymoviefile.mp4'
    ffprobe version 2.6.4 Copyright (c) 2007-2015 the FFmpeg developers
     built with gcc 4.9.2 (Debian 4.9.2-10)
     configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/x86_64-linux-gnu --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libpulse --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --enable-libvidstab --enable-libzvbi --enable-avresample --disable-htmlpages --disable-podpages --enable-libutvideo --enable-libfdk-aac --enable-libx265 --enable-libiec61883 --enable-vaapi --enable-libdc1394 --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu
     libavutil      54. 20.100 / 54. 20.100
     libavcodec     56. 26.100 / 56. 26.100
     libavformat    56. 25.101 / 56. 25.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 11.102 /  5. 11.102
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://s3-us-west-2.amazonaws.com/my-bucket/mymoviefile.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 1
       compatible_brands: isommp41avc1
       creation_time   : 2015-11-18 02:34:41
     Duration: 00:48:17.70, start: 0.000000, bitrate: 4905 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 9994 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 59.94 tbc (default)
       Metadata:
         creation_time   : 2015-11-18 02:34:41
         handler_name    : ?Apple Video Media Handler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
       Metadata:
         creation_time   : 2015-11-18 02:34:41
         handler_name    : ?Apple Sound Media Handler
    [STREAM]
    index=0
    codec_name=h264
    codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
    profile=High
    codec_type=video
    codec_time_base=1001/60000
    codec_tag_string=avc1
    codec_tag=0x31637661
    width=1920
    height=1080
    has_b_frames=1
    sample_aspect_ratio=1:1
    display_aspect_ratio=16:9
    pix_fmt=yuv420p
    level=40
    color_range=tv
    color_space=unknown
    color_transfer=unknown
    color_primaries=unknown
    chroma_location=left
    timecode=N/A
    refs=3
    is_avc=1
    nal_length_size=4
    id=N/A
    r_frame_rate=2997/100
    avg_frame_rate=2997/100
    time_base=1/2997
    start_pts=0
    start_time=0.000000
    duration_ts=8684300
    duration=2897.664331
    bit_rate=9994429
    max_bit_rate=N/A
    bits_per_raw_sample=8
    nb_frames=86843
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=1
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    TAG:creation_time=2015-11-18 02:34:41
    TAG:language=und
    TAG:handler_name=Apple Video Media Handler
    [/STREAM]
    [STREAM]
    index=1
    codec_name=aac
    codec_long_name=AAC (Advanced Audio Coding)
    profile=LC
    codec_type=audio
    codec_time_base=1/48000
    codec_tag_string=mp4a
    codec_tag=0x6134706d
    sample_fmt=fltp
    sample_rate=48000
    channels=2
    channel_layout=stereo
    bits_per_sample=0
    id=N/A
    r_frame_rate=0/0
    avg_frame_rate=0/0
    time_base=1/48000
    start_pts=0
    start_time=0.000000
    duration_ts=139085965
    duration=2897.624271
    bit_rate=192002
    max_bit_rate=N/A
    bits_per_raw_sample=N/A
    nb_frames=135828
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=1
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    TAG:creation_time=2015-11-18 02:34:41
    TAG:language=und
    TAG:handler_name=Apple Sound Media Handler
    [/STREAM]
    [FORMAT]
    filename=https://s3-us-west-2.amazonaws.com/my-bucket/mymoviefile.mp4
    nb_streams=2
    nb_programs=0
    format_name=mov,mp4,m4a,3gp,3g2,mj2
    format_long_name=QuickTime / MOV
    start_time=0.000000
    duration=2897.695000
    size=1776706045
    bit_rate=4905156
    probe_score=100
    TAG:major_brand=mp42
    TAG:minor_version=1
    TAG:compatible_brands=isommp41avc1
    TAG:creation_time=2015-11-18 02:34:41
    [/FORMAT]
  • WASAPI resampling

    30 juin 2013, par magingax

    I am trying to play 24bit/48000 Hz audio on PC. my PC seems not support 32bit sample (event GetMixFormat return 32bit/44100Hz device)
    So I'm trying to convert 24bit/4800Hz audio into 16bit/44100Hz
    but It sound like noise.
    sample audio file 'titan.wav' is 24bit/48000Hz s32 format
    below is sample code

    #define WINVER 0x0600
    #define _WIN32_WINNT 0x0600

    #include
    #include <iostream>
    #include "Mmdeviceapi.h"
    #include "Audioclient.h"
    #include "Endpointvolume.h"
    using namespace std;

    extern "C"
    {
    #include <libavformat></libavformat>avformat.h>
    #include <libavcodec></libavcodec>avcodec.h>
    #include <libswscale></libswscale>swscale.h>
    #include <libavutil></libavutil>opt.h>
    #include <libavutil></libavutil>channel_layout.h>
    #include <libavutil></libavutil>samplefmt.h>
    #include <libswresample></libswresample>swresample.h>
    }

    #define MAX_AUDIO_FRAME_SIZE    192000
    #define REFTIMES_PER_SEC      10000000  // 1 sec   100ns
    #define REFTIMES_PERMILLISEC     10000
    const CLSID CLSID_MMDeviceEnumerator = __uuidof(MMDeviceEnumerator);
    const IID   IID_IMMDeviceEnumerator  = __uuidof(IMMDeviceEnumerator);
    const IID   IID_IAudioClient         = __uuidof(IAudioClient);
    const IID   IID_IAudioRenderClient   = __uuidof(IAudioRenderClient);


    int alloc_samples_array_and_data(uint8_t*** data, int *linesize, int nb_channels,int nb_samples, enum AVSampleFormat sample_fmt, int align)
    {
       int nb_planes = av_sample_fmt_is_planar(sample_fmt) ? nb_channels : 1;
       *data = (uint8_t**)av_malloc(sizeof(*data) * nb_planes);
       return av_samples_alloc(*data, linesize, nb_channels,nb_samples, sample_fmt, align);
    }



    int main()
    {
       HRESULT hr;
       REFERENCE_TIME       buf_duration_request = REFTIMES_PER_SEC;
       REFERENCE_TIME       buf_duration_actual;
       IMMDeviceEnumerator  *pEnumerator      = NULL;
       IMMDevice            *pDevice          = NULL;
       IAudioClient         *pAudioClient     = NULL;
       IAudioRenderClient   *pRenderClient    = NULL;
       IAudioEndpointVolume *endpoint_vol     = NULL;
       WAVEFORMATEX         *fmt              = NULL;
       UINT32               frame_total       = 0;   // total frames in buffer
       UINT32               frame_avail       = 0;   // available frame number in buffer
       UINT32               frame_fill        = 0;   // filled frames
       BYTE                 *pData            = NULL;
       FILE                 *file_audio       = NULL;
       BYTE                 *buf              = NULL;
       DWORD                flags             = 0;


       CoInitializeEx(NULL,COINIT_MULTITHREADED);
       CoCreateInstance (CLSID_MMDeviceEnumerator,NULL,CLSCTX_ALL,IID_IMMDeviceEnumerator, (void**)&amp;pEnumerator);
       pEnumerator->GetDefaultAudioEndpoint(eRender, eConsole, &amp;pDevice);
       pDevice->Activate(IID_IAudioClient, CLSCTX_ALL, NULL, (void**)&amp;pAudioClient);
       pDevice->Activate(__uuidof(IAudioEndpointVolume),CLSCTX_ALL,NULL,(void**)&amp;endpoint_vol);
       pAudioClient->GetMixFormat((WAVEFORMATEX**)&amp;fmt);


       fmt->wFormatTag      = WAVE_FORMAT_PCM;
       fmt->nChannels       = 2 ;
       fmt->nSamplesPerSec  = 44100;
       fmt->wBitsPerSample  = 16;
       fmt->nBlockAlign     = fmt->nChannels * (fmt->wBitsPerSample/8);
       fmt->nAvgBytesPerSec = fmt->nSamplesPerSec * fmt->nBlockAlign;  
       fmt->cbSize          = 0;

       WAVEFORMATEX* closest_format = NULL;
       hr = pAudioClient->IsFormatSupported(AUDCLNT_SHAREMODE_SHARED, fmt ,&amp;closest_format);
       hr = pAudioClient->Initialize(AUDCLNT_SHAREMODE_SHARED, NULL ,buf_duration_request,0, fmt ,NULL);
       hr = pAudioClient->GetBufferSize(&amp;frame_total);
       hr = pAudioClient->GetService(IID_IAudioRenderClient,(void**)&amp;pRenderClient);

       int file_size = 0;  
       int buf_size  = 44100 * 4;  
       int read_ret  = 0;
       int read_acc  = 0;

       fopen_s(&amp;file_audio,"E:\\MOVIE\\titan.wav","rb");
       fseek (file_audio , 0 , SEEK_END);
       file_size = ftell (file_audio);
       rewind (file_audio);
       buf  = (BYTE*) malloc(buf_size);

       pRenderClient->GetBuffer(frame_total,&amp;pData);
       read_ret  = fread(buf,1,buf_size,file_audio);
       read_acc += read_ret;
       memcpy(pData,buf,buf_size);
       pRenderClient->ReleaseBuffer(frame_total,flags);

       buf_duration_actual = (double) REFTIMES_PER_SEC * frame_total / fmt->nSamplesPerSec;
       pAudioClient->Start();


       //-- resample
       uint8_t** src_data;
       uint8_t** dst_data;
       int       src_bufsize        = 0;
       int       dst_bufsize        = 0;
       int       src_linesize       = 0;
       int       dst_linesize       = 0;
       int       src_nb_channels    = 0;
       int       dst_nb_channels    = 0;
       int       src_nb_samples     = 1024;
       int       dst_nb_samples     = 0;
       int       max_dst_nb_samples = 0;
       int       ret = 0;
       SwrContext* swr_ctx = NULL;
       swr_ctx = swr_alloc();
       av_opt_set_int        (swr_ctx,"in_channel_layout" , AV_CH_LAYOUT_MONO,   0);
       av_opt_set_int        (swr_ctx,"in_sample_rate"    , 48000,0);
       av_opt_set_sample_fmt (swr_ctx,"in_sample_fmt"     , AV_SAMPLE_FMT_S32,   0);
       av_opt_set_int        (swr_ctx,"out_channel_layout", AV_CH_LAYOUT_STEREO, 0);
       av_opt_set_int        (swr_ctx,"out_sample_rate"   , 44100,0);
       av_opt_set_sample_fmt (swr_ctx,"out_sample_fmt"    , AV_SAMPLE_FMT_S16, 0);
       ret = swr_init(swr_ctx);

       src_nb_channels    = av_get_channel_layout_nb_channels(AV_CH_LAYOUT_MONO);
       src_nb_samples     = src_nb_channels * 48000;
       dst_nb_samples     = av_rescale_rnd(src_nb_samples, 44100,48000,AV_ROUND_UP);
       max_dst_nb_samples = dst_nb_samples;
       alloc_samples_array_and_data(&amp;src_data,&amp;src_linesize,src_nb_channels,src_nb_samples, AV_SAMPLE_FMT_S32,0);  

       dst_nb_channels    = av_get_channel_layout_nb_channels(AV_CH_LAYOUT_STEREO);
       alloc_samples_array_and_data(&amp;dst_data,&amp;dst_linesize,dst_nb_channels,dst_nb_samples, AV_SAMPLE_FMT_S16,0);
       //-- end resample


       while (read_acc &lt; file_size)
       {
       Sleep(buf_duration_actual/REFTIMES_PERMILLISEC/2);          
           pAudioClient->GetCurrentPadding(&amp;frame_fill);
           frame_avail    = frame_total - frame_fill;
           dst_nb_samples = frame_avail;      
           src_nb_samples = av_rescale_rnd(dst_nb_samples,48000,44100,AV_ROUND_UP);
           src_bufsize    = av_samples_get_buffer_size(&amp;src_linesize,src_nb_channels,src_nb_samples,AV_SAMPLE_FMT_S32,1);

           cout&lt;&lt;"FILLED:"&lt;GetBuffer(frame_avail, &amp;pData );    
           read_ret    = fread(src_data[0],1,src_bufsize,file_audio);
           read_acc   += read_ret;
           ret         = swr_convert(swr_ctx,dst_data,dst_nb_samples,(const uint8_t**)src_data,src_nb_samples);
           dst_bufsize = av_samples_get_buffer_size(&amp;dst_linesize,dst_nb_channels,ret,AV_SAMPLE_FMT_S16,1);
           memcpy(pData, dst_data[0], dst_bufsize);        
           hr = pRenderClient->ReleaseBuffer(frame_avail,flags);                  

       }


       pAudioClient->Stop();
       CoTaskMemFree(fmt);
       pEnumerator->Release();
       pDevice->Release();
       pAudioClient->Release();
       pRenderClient->Release();
       CoUninitialize();

       return 0;
    }
    </iostream>