Recherche avancée

Médias (91)

Autres articles (7)

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

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

Sur d’autres sites (4343)

  • How to expose new API methods in the HTTP Reporting API – Introducing the Piwik Platform

    26 février 2015, par Thomas Steur — Development

    This is the next post of our blog series where we introduce the capabilities of the Piwik platform (our previous post was How to write UI tests for your plugin). This time you’ll learn how to extend our Reporting API. For this tutorial you will need to have basic knowledge of PHP.

    What is Piwik’s Reporting API ?

    It allows third party applications to access analytics data and manipulate miscellaneous data (such as users or websites) through HTTP requests.

    What is it good for ?

    The Reporting API is used by the Piwik UI to render reports, to manage users, and more. If you want to add a feature to the Piwik UI, you might have to expose a method in the API to access this data. As the API is called via HTTP it allows you to fetch or manipulate any Piwik related data from anywhere. In these exposed API methods you can do pretty much anything you want, for example :

    • Enhance existing reports with additional data
    • Filter existing reports based on custom rules
    • Access the database and generate custom reports
    • Persist and read any data
    • Request server information

    Getting started

    In this series of posts, we assume that you have already set up your development environment. If not, visit the Piwik Developer Zone where you’ll find the tutorial Setting up Piwik.

    To summarize the things you have to do to get setup :

    • Install Piwik (for instance via git).
    • Activate the developer mode : ./console development:enable.
    • Generate a plugin : ./console generate:plugin --name="MyApiPlugin". There should now be a folder plugins/MyApiPlugin.
    • And activate the created plugin : ./console plugin:activate "MyApiPlugin"

    Let’s start creating an API

    We start by using the Piwik Console to create a new API :

    ./console generate:api

    The command will ask you to enter the name of the plugin the created API should belong to. I will simply use the above chosen plugin name “MyApiPlugin”. There should now be a file plugins/MyApiPlugin/API.php which contains already an example to get you started easily :

    1. class API extends \Piwik\Plugin\API
    2. {
    3.     public function getAnswerToLife($truth = true)
    4.     {
    5.         if ($truth) {
    6.             return 42;
    7.         }
    8.  
    9.         return 24;
    10.     }
    11.  
    12.     public function getExampleReport($idSite, $period, $date, $wonderful = false)
    13.     {
    14.         $table = DataTable::makeFromSimpleArray(array(
    15.             array('label' => 'My Label 1', 'nb_visits' => '1'),
    16.             array('label' => 'My Label 2', 'nb_visits' => '5'),
    17.         ));
    18.  
    19.         return $table;
    20.     }
    21. }

    Télécharger

    Any public method in that file will be available via the Reporting API. For example the method getAnswerToLife can be called via this URL : index.php?module=API&method=MyApiPlugin.getAnswerToLife. The URL parameter method is a combination of your plugin name and the method name within this class.

    Passing parameters to your method

    Both example methods define some parameters. To pass any value to a parameter of your method simply specify them by name in the URL. For example ...&method=MyApiPlugin.getExampleReport&idSite=1&period=week&date=today&wonderful=1 to pass values to the parameters of the method getExampleReport.

    Returning a value

    In an API method you can return any boolean, number, string or array value. A resource or an object cannot be returned unless it implements the DataTableInterface such as DataTable (the primary data structure used to store analytics data in Piwik), DataTable\Map (stores a set of DataTables) and DataTable\Simple (a DataTable where every row has two columns : label and value).

    Did you know ? You can choose the response format of your API request by appending a parameter &format=JSON|XML|CSV|... to the URL. Check out the Reporting API Reference for more information.

    Best practices

    Check user permissions

    Do not forget to check whether a user actually has permissions to access data or to perform an action. If you’re not familiar with Piwik’s permissions and how to check them read our User Permission guide.

    Keep API methods small

    At Piwik we aim to write clean code. Therefore, we recommend to keep API methods small (separation of concerns). An API pretty much acts like a Controller :

    1. public function createLdapUser($idSite, $login, $password)
    2. {
    3.     Piwik::checkUserHasAdminAccess($idSite);
    4.     $this->checkLogin($login);
    5.     $this->checkPassword($password);
    6.    
    7.     $myModel = new LdapModel();
    8.     $success = $myModel->createUser($idSite, $login, $password);
    9.    
    10.     return $success;
    11. }

    Télécharger

    This is not only easy to read, it will also allow you to create simple tests for LdapModel (without having to bootstrap the whole Piwik layer) and you will be able to reuse it in other places if needed.

    Calling APIs of other plugins

    For example if you want to fetch an existing report from another plugin, say a list of all Page URLs, do not request this report by calling that method directly :

    \Piwik\Plugins\Actions\API::getInstance()->getPageUrls($idSite, $period, $date);

    . Instead, issue a new API request :

    $report = \Piwik\API\Request::processRequest('Actions.getPageUrls', array(
       'idSite' => $idSite,
       'period' => $period,
       'date'   => $date,
    ));

    This has several advantages :

    • It avoids a fatal error if the requested plugin is not available on a Piwik installation
    • Other plugins can extend the called API method via events (adding additional report data to a report, doing additional permission checks) but those events will be only triggered when requesting the report as suggested
    • If the method parameters change, your request will most likely still work

    Publishing your Plugin on the Marketplace

    In case you want to share your API with other Piwik users you can do this by pushing your plugin to a public GitHub repository and creating a tag. Easy as that. Read more about how to distribute a plugin and best practices when publishing a plugin.

    Isn’t it easy to create a API ? We never even created a file ! If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.

  • VLC command line : RTSP to mp4 file (video + audio)

    8 février 2016, par Dmitriy Gerashenko

    Win 7 x64.

    When I watch this link in VLC player all is fine :

    rtsp ://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov

    When I try to capture link to file and to display :

    • There is video without sound on display.
    • Created file is not playable.

    Command :

    vlc.exe -vvv "rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov" --sout="#transcode{venc=ffmpeg,vcodec=mp4v,vfilter=canvas{width=800,height=600},aenc=ffmpeg{strict=-2},acodec=mp4a}:duplicate{dst=display,dst=standard{access=file,mux=mp4,dst=video.mp4}"

    There are some errors in log, for example : MPEG4GenericRTPSource Warning: Unknown or unsupported "mode": AAC-hbr. Is it cause of my problems ? How to solve my issue ?

    Complete log (from VLCJ) :

    cd C:\Users\gda\Documents\NetBeansProjects\Video; "JAVA_HOME=C:\\Program Files (x86)\\Java\\jdk1.8.0_71" cmd /c "\"\"C:\\Users\\gda\\AppData\\Roaming\\NetBeans\\8.0.2\\maven\\bin\\mvn.bat\" -Dexec.args=\"-classpath %classpath ru.cherezweb.app.video.Video\" -Dexec.executable=\"C:\\Program Files (x86)\\Java\\jdk1.8.0_71\\bin\\java.exe\" -Dmaven.ext.class.path=C:\\Users\\gda\\AppData\\Roaming\\NetBeans\\8.0.2\\maven-nblib\\netbeans-eventspy.jar -Dfile.encoding=UTF-8 process-classes org.codehaus.mojo:exec-maven-plugin:1.2.1:exec\""
    Scanning for projects...

    ------------------------------------------------------------------------
    Building Video 1.0-SNAPSHOT
    ------------------------------------------------------------------------

    --- maven-resources-plugin:2.5:resources (default-resources) @ Video ---
    [debug] execute contextualize
    Using 'UTF-8' encoding to copy filtered resources.
    skip non existing resourceDirectory C:\Users\gda\Documents\NetBeansProjects\Video\src\main\resources

    --- maven-compiler-plugin:2.3.2:compile (default-compile) @ Video ---
    Nothing to compile - all classes are up to date

    --- exec-maven-plugin:1.2.1:exec (default-cli) @ Video ---
    20:37:29.097 [main] INFO  uk.co.caprica.vlcj.Info - vlcj: 3.10.1
    20:37:29.101 [main] INFO  uk.co.caprica.vlcj.Info - java: 1.8.0_71 Oracle Corporation
    20:37:29.101 [main] INFO  uk.co.caprica.vlcj.Info - java home: C:\Program Files (x86)\Java\jdk1.8.0_71\jre
    20:37:29.101 [main] INFO  uk.co.caprica.vlcj.Info - os: Windows 10 10.0 x86
    20:37:29.103 [main] DEBUG u.c.c.vlcj.discovery.NativeDiscovery - discover()
    20:37:29.103 [main] DEBUG u.c.c.vlcj.discovery.NativeDiscovery - jnaLibraryPath=null
    20:37:29.103 [main] DEBUG u.c.c.vlcj.discovery.NativeDiscovery - discoveryStrategy=uk.co.caprica.vlcj.discovery.linux.DefaultLinuxNativeDiscoveryStrategy@176c05c
    20:37:29.104 [main] DEBUG u.c.c.vlcj.discovery.NativeDiscovery - supported=false
    20:37:29.104 [main] DEBUG u.c.c.vlcj.discovery.NativeDiscovery - discoveryStrategy=uk.co.caprica.vlcj.discovery.windows.DefaultWindowsNativeDiscoveryStrategy@1eb6432
    20:37:29.104 [main] DEBUG u.c.c.vlcj.discovery.NativeDiscovery - supported=true
    20:37:29.104 [main] DEBUG u.c.c.v.d.AbstractNativeDiscoveryStrategy - discover()
    20:37:29.105 [main] DEBUG u.c.c.v.r.windows.WindowsRuntimeUtil - getVlcInstallDir()
    20:37:29.430 [main] DEBUG u.c.c.v.d.AbstractNativeDiscoveryStrategy - directoryNames=[C:\Program Files (x86)\VideoLAN\VLC, C:\Users\gda\Documents\NetBeansProjects\Video, C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter, C:\Program Files (x86)\Intel\iCLS Client\, C:\Program Files\Intel\iCLS Client\, C:\PROGRAMDATA\ORACLE\JAVA\JAVAPATH, C:\Windows\SYSTEM32, C:\Windows, C:\Windows\SYSTEM32\WBEM, C:\Windows\SYSTEM32\WINDOWSPOWERSHELL\V1.0\, C:\PROGRAM FILES\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\DAL, C:\PROGRAM FILES\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\IPT, C:\PROGRAM FILES (X86)\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\DAL, C:\PROGRAM FILES (X86)\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\IPT, C:\Program Files\Intel\Intel(R) Management Engine Components\DAL, C:\Program Files\Intel\Intel(R) Management Engine Components\IPT, C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL, C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT, C:\Program Files\WIDCOMM\Bluetooth Software\, C:\Program Files\WIDCOMM\Bluetooth Software\syswow64, C:\Program Files\TortoiseSVN\bin, C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common, C:\Program Files\OpenVPN\bin, C:\WINDOWS\system32, C:\WINDOWS, C:\WINDOWS\System32\Wbem, C:\WINDOWS\System32\WindowsPowerShell\v1.0\, C:\Program Files\TortoiseGit\bin, C:\Program Files (x86)\Skype\Phone\]
    20:37:29.430 [main] DEBUG u.c.c.v.d.AbstractNativeDiscoveryStrategy - directoryName=C:\Program Files (x86)\VideoLAN\VLC
    20:37:29.430 [main] DEBUG u.c.c.v.d.AbstractNativeDiscoveryStrategy - Matched 'libvlc.dll' in 'C:\Program Files (x86)\VideoLAN\VLC'
    20:37:29.430 [main] DEBUG u.c.c.v.d.AbstractNativeDiscoveryStrategy - Matched 'libvlccore.dll' in 'C:\Program Files (x86)\VideoLAN\VLC'
    20:37:29.430 [main] DEBUG u.c.c.v.d.AbstractNativeDiscoveryStrategy - Matched all required files
    20:37:29.430 [main] DEBUG u.c.c.v.d.AbstractNativeDiscoveryStrategy - result=C:\Program Files (x86)\VideoLAN\VLC
    20:37:29.430 [main] DEBUG u.c.c.vlcj.discovery.NativeDiscovery - path=C:\Program Files (x86)\VideoLAN\VLC
    20:37:29.431 [main] INFO  u.c.c.vlcj.discovery.NativeDiscovery - Discovery found libvlc at 'C:\Program Files (x86)\VideoLAN\VLC'
    true
    2.2.1 Terry Pratchett (Weatherwax)
    20:37:29.490 [main] DEBUG u.c.c.vlcj.player.MediaPlayerFactory - initX=null
    20:37:29.494 [main] INFO  u.c.c.vlcj.binding.LibVlcFactory - vlc: 2.2.1 Terry Pratchett (Weatherwax), changeset 2.2.1-0-ga425c42
    20:37:29.494 [main] INFO  u.c.c.vlcj.binding.LibVlcFactory - libvlc: C:\Program Files (x86)\VideoLAN\VLC\libvlc.dll
    20:37:29.494 [main] DEBUG u.c.c.vlcj.player.MediaPlayerFactory - MediaPlayerFactory(libvlc=Proxy interface to Native Library ,libvlcArgs=[])
    20:37:29.494 [main] DEBUG u.c.c.vlcj.player.MediaPlayerFactory - jna.library.path=null
    20:37:29.494 [main] DEBUG u.c.c.vlcj.player.MediaPlayerFactory - VLC_PLUGIN_PATH=null
    20:37:29.529 [main] DEBUG u.c.c.vlcj.player.MediaPlayerFactory - instance=native@0x1195650 (uk.co.caprica.vlcj.binding.internal.libvlc_instance_t@1195650)
    20:37:29.529 [main] DEBUG u.c.c.vlcj.player.MediaPlayerFactory - equalizerAvailable=true
    20:37:29.529 [main] DEBUG u.c.c.vlcj.player.MediaPlayerFactory - createEqualizerBandFrequencies()
    20:37:29.529 [main] DEBUG u.c.c.vlcj.player.MediaPlayerFactory - numBands=10
    20:37:29.530 [main] DEBUG u.c.c.vlcj.player.MediaPlayerFactory - result=[31.25, 62.5, 125.0, 250.0, 500.0, 1000.0, 2000.0, 4000.0, 8000.0, 16000.0]
    20:37:29.530 [main] DEBUG u.c.c.vlcj.player.MediaPlayerFactory - createEqualizerPresetNames()
    20:37:29.530 [main] DEBUG u.c.c.vlcj.player.MediaPlayerFactory - numPresets=18
    20:37:29.530 [main] DEBUG u.c.c.vlcj.player.MediaPlayerFactory - result=[Flat, Classical, Club, Dance, Full bass, Full bass and treble, Full treble, Headphones, Large Hall, Live, Party, Pop, Reggae, Rock, Ska, Soft, Soft rock, Techno]
    20:37:29.530 [main] DEBUG u.c.c.vlcj.player.MediaPlayerFactory - newHeadlessMediaPlayer()
    20:37:29.538 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - DefaultMediaPlayer(libvlc=Proxy interface to Native Library , instance=native@0x1195650 (uk.co.caprica.vlcj.binding.internal.libvlc_instance_t@1195650))
    20:37:29.538 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - createInstance()
    20:37:29.543 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - mediaPlayerInstance=native@0x16853ac4 (uk.co.caprica.vlcj.binding.internal.libvlc_media_player_t@16853ac4)
    20:37:29.544 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - mediaPlayerEventManager=native@0x16878818 (uk.co.caprica.vlcj.binding.internal.libvlc_event_manager_t@16878818)
    20:37:29.544 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - registerEventListener()
    20:37:29.546 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerMediaChanged
    20:37:29.567 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.567 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerNothingSpecial
    20:37:29.567 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.567 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerOpening
    20:37:29.567 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.567 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerBuffering
    20:37:29.567 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.567 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerPlaying
    20:37:29.567 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.567 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerPaused
    20:37:29.568 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.568 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerStopped
    20:37:29.568 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.568 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerForward
    20:37:29.568 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.568 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerBackward
    20:37:29.568 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.568 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerEndReached
    20:37:29.568 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.569 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerEncounteredError
    20:37:29.569 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.569 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerTimeChanged
    20:37:29.569 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.569 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerPositionChanged
    20:37:29.569 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.569 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerSeekableChanged
    20:37:29.569 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.569 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerPausableChanged
    20:37:29.569 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.569 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerTitleChanged
    20:37:29.569 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.569 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerSnapshotTaken
    20:37:29.570 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.570 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerLengthChanged
    20:37:29.570 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.570 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerVout
    20:37:29.570 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.570 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaPlayerScrambledChanged
    20:37:29.570 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.572 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - playMedia(mrl=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov,mediaOptions=[:sout=#transcode{venc=ffmpeg,vcodec=mp4v,vfilter=canvas{width=800,height=600},aenc=ffmpeg{strict=-2},acodec=mp4a}:duplicate{dst=display,dst=standard{access=file,mux=mp4,dst=yahoo.m4v}}])
    20:37:29.573 [main] DEBUG u.c.c.v.player.MediaResourceLocator - encodeMrl(mrl=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov)
    20:37:29.573 [main] DEBUG u.c.c.v.player.MediaResourceLocator - MRL does not contain any Unicode characters
    20:37:29.573 [main] DEBUG u.c.c.v.player.MediaResourceLocator - result=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov
    20:37:29.574 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - playMedia(media=SimpleMedia[mrl=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov,mediaOptions=[Ljava.lang.String;@17c74e5])
    20:37:29.574 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - prepareMedia(media=SimpleMedia[mrl=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov,mediaOptions=[Ljava.lang.String;@17c74e5])
    20:37:29.574 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - setMedia(media=SimpleMedia[mrl=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov,mediaOptions=[Ljava.lang.String;@17c74e5])
    20:37:29.574 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - createMediaInstance(media=SimpleMedia[mrl=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov,mediaOptions=[Ljava.lang.String;@17c74e5])
    20:37:29.574 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - Treating mrl as a location
    20:37:29.574 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - mediaInstance=native@0x16876500 (uk.co.caprica.vlcj.binding.internal.libvlc_media_t@16876500)
    20:37:29.574 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - mediaOption=:sout=#transcode{venc=ffmpeg,vcodec=mp4v,vfilter=canvas{width=800,height=600},aenc=ffmpeg{strict=-2},acodec=mp4a}:duplicate{dst=display,dst=standard{access=file,mux=mp4,dst=yahoo.m4v}}
    20:37:29.575 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - registerMediaEventListener()
    20:37:29.575 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaMetaChanged
    20:37:29.575 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.575 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaSubItemAdded
    20:37:29.575 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.576 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaDurationChanged
    20:37:29.576 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.576 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaParsedChanged
    20:37:29.576 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.576 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaFreed
    20:37:29.576 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.576 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaStateChanged
    20:37:29.576 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.576 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - event=libvlc_MediaSubItemTreeAdded
    20:37:29.576 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=0
    20:37:29.585 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - mrl(mediaInstance=native@0x16876500 (uk.co.caprica.vlcj.binding.internal.libvlc_media_t@16876500))
    20:37:29.587 [pool-2-thread-1] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - mediaChanged(mediaPlayer=uk.co.caprica.vlcj.player.headless.DefaultHeadlessMediaPlayer@1727f27,media=native@0x16876500 (uk.co.caprica.vlcj.binding.internal.libvlc_media_t@16876500),mrl=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov)
    20:37:29.588 [pool-2-thread-1] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - Raising event for new media
    20:37:29.588 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - result=true
    20:37:29.588 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - play()
    20:37:29.593 [main] DEBUG u.c.c.vlcj.player.DefaultMediaPlayer - after play
    MPEG4GenericRTPSource Warning: Unknown or unsupported "mode": AAC-hbr
    [1682c9cc] core input error: ES_OUT_RESET_PCR called
    [16f79744] core decoder error: cannot continue streaming due to errors
    [1682c9cc] core input error: ES_OUT_RESET_PCR called
    [h264 @ 1702ba80] decode_slice_header error
    [h264 @ 1702ba80] decode_slice_header error
    [16828134] stream_out_transcode stream out: input interval 41666 (base 2)
    [16828134] stream_out_transcode stream out: output interval 41666 (base 1)
  • FFMPEG + HW Acceleration + Kepler GPU Lossless encoding not supported ?

    11 juillet 2022, par user2522885

    I'm curious about FFMPEG and GPU hardware acceleration. My Windows 10 system uses the Asus / nVidia GTX 760 graphics card and Intel i5-2500K CPU. My graphics card claims to be of the Kepler architecture with CUDA 3.0 as shown here.

    


    Instead of going through the hassles of compiling FFMPEG with hw acceleration support i downloaded a pre-compiled binary from here and here.

    


    Next, i tried running a test with hw acceleration options as recommended here :

    


    ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i "input.mkv" -c:a copy -c:v h264_nvenc "output.mp4"


    


    I then received the error message :

    


    [h264_nvenc @ 000001c34eeda8c0] Lossless encoding not supported
[h264_nvenc @ 000001c34eeda8c0] Provided device doesn't support required NVENC features
Error initializing output stream 0:0 — Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

    


    What am i doing wrong ? For the record i install the CUDA setup file but it made no difference. I am using the latest nVidia drivers.

    


    UPDATE

    


    ffmpeg -h encoder=h264_nvenc

    


    ffmpeg version 4.4-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with gcc 10.2.0 (Rev6, Built by MSYS2 project)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint&#xA;  libavutil      56. 70.100 / 56. 70.100&#xA;  libavcodec     58.134.100 / 58.134.100&#xA;  libavformat    58. 76.100 / 58. 76.100&#xA;  libavdevice    58. 13.100 / 58. 13.100&#xA;  libavfilter     7.110.100 /  7.110.100&#xA;  libswscale      5.  9.100 /  5.  9.100&#xA;  libswresample   3.  9.100 /  3.  9.100&#xA;  libpostproc    55.  9.100 / 55.  9.100&#xA;Encoder h264_nvenc [NVIDIA NVENC H.264 encoder]:&#xA;    General capabilities: dr1 delay hardware&#xA;    Threading capabilities: none&#xA;    Supported hardware devices: cuda cuda d3d11va d3d11va&#xA;    Supported pixel formats: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 rgb0 cuda d3d11&#xA;h264_nvenc AVOptions:&#xA;  -preset            <int>        E..V....... Set the encoding preset (from 0 to 18) (default p4)&#xA;     default         0            E..V.......&#xA;     slow            1            E..V....... hq 2 passes&#xA;     medium          2            E..V....... hq 1 pass&#xA;     fast            3            E..V....... hp 1 pass&#xA;     hp              4            E..V.......&#xA;     hq              5            E..V.......&#xA;     bd              6            E..V.......&#xA;     ll              7            E..V....... low latency&#xA;     llhq            8            E..V....... low latency hq&#xA;     llhp            9            E..V....... low latency hp&#xA;     lossless        10           E..V.......&#xA;     losslesshp      11           E..V.......&#xA;     p1              12           E..V....... fastest (lowest quality)&#xA;     p2              13           E..V....... faster (lower quality)&#xA;     p3              14           E..V....... fast (low quality)&#xA;     p4              15           E..V....... medium (default)&#xA;     p5              16           E..V....... slow (good quality)&#xA;     p6              17           E..V....... slower (better quality)&#xA;     p7              18           E..V....... slowest (best quality)&#xA;  -tune              <int>        E..V....... Set the encoding tuning info (from 1 to 4) (default hq)&#xA;     hq              1            E..V....... High quality&#xA;     ll              2            E..V....... Low latency&#xA;     ull             3            E..V....... Ultra low latency&#xA;     lossless        4            E..V....... Lossless&#xA;  -profile           <int>        E..V....... Set the encoding profile (from 0 to 3) (default main)&#xA;     baseline        0            E..V.......&#xA;     main            1            E..V.......&#xA;     high            2            E..V.......&#xA;     high444p        3            E..V.......&#xA;  -level             <int>        E..V....... Set the encoding level restriction (from 0 to 62) (default auto)&#xA;     auto            0            E..V.......&#xA;     1               10           E..V.......&#xA;     1.0             10           E..V.......&#xA;     1b              9            E..V.......&#xA;     1.0b            9            E..V.......&#xA;     1.1             11           E..V.......&#xA;     1.2             12           E..V.......&#xA;     1.3             13           E..V.......&#xA;     2               20           E..V.......&#xA;     2.0             20           E..V.......&#xA;     2.1             21           E..V.......&#xA;     2.2             22           E..V.......&#xA;     3               30           E..V.......&#xA;     3.0             30           E..V.......&#xA;     3.1             31           E..V.......&#xA;     3.2             32           E..V.......&#xA;     4               40           E..V.......&#xA;     4.0             40           E..V.......&#xA;     4.1             41           E..V.......&#xA;     4.2             42           E..V.......&#xA;     5               50           E..V.......&#xA;     5.0             50           E..V.......&#xA;     5.1             51           E..V.......&#xA;     5.2             52           E..V.......&#xA;     6.0             60           E..V.......&#xA;     6.1             61           E..V.......&#xA;     6.2             62           E..V.......&#xA;  -rc                <int>        E..V....... Override the preset rate-control (from -1 to INT_MAX) (default -1)&#xA;     constqp         0            E..V....... Constant QP mode&#xA;     vbr             1            E..V....... Variable bitrate mode&#xA;     cbr             2            E..V....... Constant bitrate mode&#xA;     vbr_minqp       8388612      E..V....... Variable bitrate mode with MinQP (deprecated)&#xA;     ll_2pass_quality 8388616      E..V....... Multi-pass optimized for image quality (deprecated)&#xA;     ll_2pass_size   8388624      E..V....... Multi-pass optimized for constant frame size (deprecated)&#xA;     vbr_2pass       8388640      E..V....... Multi-pass variable bitrate mode (deprecated)&#xA;     cbr_ld_hq       8388616      E..V....... Constant bitrate low delay high quality mode&#xA;     cbr_hq          8388624      E..V....... Constant bitrate high quality mode&#xA;     vbr_hq          8388640      E..V....... Variable bitrate high quality mode&#xA;  -rc-lookahead      <int>        E..V....... Number of frames to look ahead for rate-control (from 0 to INT_MAX) (default 0)&#xA;  -surfaces          <int>        E..V....... Number of concurrent surfaces (from 0 to 64) (default 0)&#xA;  -cbr               <boolean>    E..V....... Use cbr encoding mode (default false)&#xA;  -2pass             <boolean>    E..V....... Use 2pass encoding mode (default auto)&#xA;  -gpu               <int>        E..V....... Selects which NVENC capable GPU to use. First GPU is 0, second is 1, and so on. (from -2 to INT_MAX) (default any)&#xA;     any             -1           E..V....... Pick the first device available&#xA;     list            -2           E..V....... List the available devices&#xA;  -delay             <int>        E..V....... Delay frame output by the given amount of frames (from 0 to INT_MAX) (default INT_MAX)&#xA;  -no-scenecut       <boolean>    E..V....... When lookahead is enabled, set this to 1 to disable adaptive I-frame insertion at scene cuts (default false)&#xA;  -forced-idr        <boolean>    E..V....... If forcing keyframes, force them as IDR frames. (default false)&#xA;  -b_adapt           <boolean>    E..V....... When lookahead is enabled, set this to 0 to disable adaptive B-frame decision (default true)&#xA;  -spatial-aq        <boolean>    E..V....... set to 1 to enable Spatial AQ (default false)&#xA;  -spatial_aq        <boolean>    E..V....... set to 1 to enable Spatial AQ (default false)&#xA;  -temporal-aq       <boolean>    E..V....... set to 1 to enable Temporal AQ (default false)&#xA;  -temporal_aq       <boolean>    E..V....... set to 1 to enable Temporal AQ (default false)&#xA;  -zerolatency       <boolean>    E..V....... Set 1 to indicate zero latency operation (no reordering delay) (default false)&#xA;  -nonref_p          <boolean>    E..V....... Set this to 1 to enable automatic insertion of non-reference P-frames (default false)&#xA;  -strict_gop        <boolean>    E..V....... Set 1 to minimize GOP-to-GOP rate fluctuations (default false)&#xA;  -aq-strength       <int>        E..V....... When Spatial AQ is enabled, this field is used to specify AQ strength. AQ strength scale is from 1 (low) - 15 (aggressive) (from 1 to 15) (default 8)&#xA;  -cq                <float>      E..V....... Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control (from 0 to 51) (default 0)&#xA;  -aud               <boolean>    E..V....... Use access unit delimiters (default false)&#xA;  -bluray-compat     <boolean>    E..V....... Bluray compatibility workarounds (default false)&#xA;  -init_qpP          <int>        E..V....... Initial QP value for P frame (from -1 to 51) (default -1)&#xA;  -init_qpB          <int>        E..V....... Initial QP value for B frame (from -1 to 51) (default -1)&#xA;  -init_qpI          <int>        E..V....... Initial QP value for I frame (from -1 to 51) (default -1)&#xA;  -qp                <int>        E..V....... Constant quantization parameter rate control method (from -1 to 51) (default -1)&#xA;  -weighted_pred     <int>        E..V....... Set 1 to enable weighted prediction (from 0 to 1) (default 0)&#xA;  -coder             <int>        E..V....... Coder type (from -1 to 2) (default default)&#xA;     default         -1           E..V.......&#xA;     auto            0            E..V.......&#xA;     cabac           1            E..V.......&#xA;     cavlc           2            E..V.......&#xA;     ac              1            E..V.......&#xA;     vlc             2            E..V.......&#xA;  -b_ref_mode        <int>        E..V....... Use B frames as references (from 0 to 2) (default disabled)&#xA;     disabled        0            E..V....... B frames will not be used for reference&#xA;     each            1            E..V....... Each B frame will be used for reference&#xA;     middle          2            E..V....... Only (number of B frames)/2 will be used for reference&#xA;  -a53cc             <boolean>    E..V....... Use A53 Closed Captions (if available) (default true)&#xA;  -dpb_size          <int>        E..V....... Specifies the DPB size used for encoding (0 means automatic) (from 0 to INT_MAX) (default 0)&#xA;  -multipass         <int>        E..V....... Set the multipass encoding (from 0 to 2) (default disabled)&#xA;     disabled        0            E..V....... Single Pass&#xA;     qres            1            E..V....... Two Pass encoding is enabled where first Pass is quarter resolution&#xA;     fullres         2            E..V....... Two Pass encoding is enabled where first Pass is full resolution&#xA;  -ldkfs             <int>        E..V....... Low delay key frame scale; Specifies the Scene Change frame size increase allowed in case of single frame VBV and CBR (from 0 to 255) (default 0)&#xA;</int></int></int></boolean></int></int></int></int></int></int></int></boolean></boolean></float></int></boolean></boolean></boolean></boolean></boolean></boolean></boolean></boolean></boolean></boolean></int></int></boolean></boolean></int></int></int></int></int></int></int>

    &#xA;