Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (8)

  • Les images

    15 mai 2013
  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

Sur d’autres sites (2602)

  • Trouble setting up rtmp audio streaming with ffmpeg and nginx

    20 septembre 2021, par igoryonya

    Can't figure out how to set up rtmp streaming with ffmpeg.
I've been trying to figure it out for about 2 weeks now.
I need to stream the default sound from my sound card over rtmp stream.
I don't need a video, only an audio.

    


    So, i've installed nginx with rtmp module and added the following code at the end of my "/etc/nginx/nginx.conf" file :

    


    rtmp {
        server {
                listen 1935;
                application cam1 {
                        live on;
                }
        }
}


    


    restarted my nginx installation :

    


    sudo systemctl status nginx.service


    


    Checked that the 1935 port is listening :

    


    ~$ sudo netstat -nlp|egrep -i 'nginx'
tcp        0      0 0.0.0.0:1935            0.0.0.0:*               LISTEN      1885931/nginx: mast 
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1885931/nginx: mast 
tcp6       0      0 :::80                   :::*                    LISTEN      1885931/nginx: mast


    


    Launched an ffmpeg to capture my sound card, encode it into ogg format and stream it to the rtmp server (on the same computer with nginx installed) :

    


    ffmpeg -re -f pulse -i default -c:a libvorbis -content_type 'audio/ogg' -vn -f ogg rtmp://127.0.0.1/cam1/test


    


    And it looks like, it's streaming, by showing statistics.

    


    Then, I try to open it with the vlc player to test the stream and the yellow bar on the progress bar just going back and forth and never starts playing.
I tried to use vlc on the same computer and on the computer on the same network.

    


    Assuming, the computer, that is streaming rtmp has an IP : 192.168.0.1, I use the following connection URL in VLC :

    


    rtmp://192.168.0.1/cam1/test


    


  • Compress video with ffmpeg4android library

    30 mars 2015, par Huy Tower

    I tried to follow ffmpeg4android library, and I get the problem when compressing the video, as the Log image below.

    I use intent to transfer to Compressing Media class,

    Intent intent = new Intent(this, CompressingMedia.class);
    intent.putExtra("file_path", mLlItems.get(0).getPath());
    startActivity(intent);

    This is the class was transfered to :

    public class CompressingMedia extends BaseWizard {

    @Override
    public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);

       Intent intent = getIntent();

       Log.d(Prefs.TAG, "path " + intent.getExtras().getString("file_path"));
       // /storage/emulated/0/DCIM/Camera/VID_20140312_090612.mp4

       String command = "ffmpeg -y -i " + intent.getExtras().getString("file_path") +
               " -strict experimental -s 320x240 -r 15 -aspect 3:4 -ab 12288 -vcodec mpeg4 -b 2097152 -sample_fmt s16 /sdcard/out.mp4";

       // if you want to change the default work location (/sdcard/videokit/) use the uncomment the below method.
       // It must be defined before calling the copyLicenseAndDemoFilesFromAssetsToSDIfNeeded method,
       // in order for this method to copy the assets to the correct location.
               //      setWorkingFolder("/sdcard/videokit/");

       // this will copy the license file and the demo video file.
       // to the videokit work folder location.
       // without the license file the library will not work.
       copyLicenseAndDemoFilesFromAssetsToSDIfNeeded();

       commandStr = command;
       setCommand(commandStr);

       runTranscoing();
       }
    }

    Although I received the notification Transcoding Successfully, but it looks like the capacity of file after compressing is always be 0. (the log in the bottom of images)

    I don’t know the result as image below is good or not, I can not get the expected result - The video was compressed totally successfully.

    Someone know why after compressing the file is always be 0, please tell me. Thanks.

    This is the Log Cat :

    03-13 14:49:45.655 : I/ActivityManager(6065) : Timeline :
    Activity_launch_request id:app.cloudstringers time:38212359

    03-13 14:49:45.665 : V/Home(6065) : Global ID is 000400010007 ;Sell is 3

    03-13 14:49:45.770 : D/ffmpeg4android(6065) : path
    /storage/emulated/0/videokit/out.mp4

    03-13 14:49:45.770 : I/ffmpeg4android(6065) : workingFolderPath :
    /sdcard/videokit/

    03-13 14:49:45.775 : D/ffmpeg4android(6065) : Working directory exists,
    not coping assests (license file and demo videos)

    03-13 14:49:45.785 : D/ffmpeg4android(6065) : output directory exists.

    03-13 14:49:45.785 : I/ffmpeg4android(6065) : Command is set

    03-13 14:49:45.785 : I/ffmpeg4android(6065) : set
    remoteNotificationIconId : 0

    03-13 14:49:45.785 : D/ffmpeg4android(6065) : Client Cannot unbind -
    service not bound

    03-13 14:49:45.785 : D/ffmpeg4android(6065) : Client stopService()

    03-13 14:49:45.790 : W/ContextImpl(6065) : Implicit intents with
    startService are not safe : Intent
    act=com.netcompss.ffmpeg4android.FFMpegRemoteServiceBridge

    android.content.ContextWrapper.stopService:499
    com.netcompss.ffmpeg4android_client.BaseWizard.stopService:451
    com.netcompss.ffmpeg4android_client.BaseWizard.runTranscoing:285

    03-13 14:49:45.795 : I/ffmpeg4android(6065) :
     !!!!!!!!!!!!!!!!!!services.size() : 1

    03-13 14:49:45.795 : I/ffmpeg4android(6065) : putting Base categoty

    03-13 14:49:45.810 : D/ffmpeg4android(6065) : started :
    com.netcompss.ffmpeg4android.FFMpegRemoteServiceBridge

    03-13 14:49:45.810 : D/ffmpeg4android(6065) : Client startService()

    03-13 14:49:45.810 : D/ffmpeg4android(6065) : bindService() called

    03-13 14:49:45.815 : W/ContextImpl(6065) : Implicit intents with
    startService are not safe : Intent
    act=com.netcompss.ffmpeg4android.FFMpegRemoteServiceBridge

    android.content.ContextWrapper.bindService:517
    com.netcompss.ffmpeg4android_client.BaseWizard.bindService:462
    com.netcompss.ffmpeg4android_client.BaseWizard.runTranscoing:288

    03-13 14:49:45.820 : D/ffmpeg4android(6065) : Client bindService()

    03-13 14:49:45.935 : I/ffmpeg4android(6616) : =======service onCreate() :
    Stopping forground (to overcome 2.3.x bug)

    03-13 14:49:45.935 : I/ffmpeg4android(6616) : =======service
    onBind()=======

    03-13 14:49:45.940 : I/ffmpeg4android(6616) : ===onStartCommand called

    03-13 14:49:45.940 : I/ffmpeg4android(6616) : ===onStartCommand cat :
    Base

    03-13 14:49:45.940 : D/ffmpeg4android(6616) : onStartCommand,
    START_STICKY, base Command

    03-13 14:49:45.955 : I/ffmpeg4android(6616) : get
    remoteNotificationIconId : 0

    03-13 14:49:45.955 : I/ffmpeg4android(6616) : notifIcon is set

    03-13 14:49:45.955 : I/ffmpeg4android(6616) : Start RemoteService with
    notification id : 5326

    03-13 14:49:45.965 : I/ffmpeg4android(6616) : Run called.

    03-13 14:49:45.965 : D/ffmpeg4android(6616) : Sleeping, waiting for
    command

    03-13 14:49:45.970 : D/ffmpeg4android(6065) : Client
    onServiceConnected()

    03-13 14:49:45.970 : I/ffmpeg4android(6065) : invokeService called

    03-13 14:49:45.970 : I/Videokit(6065) : licenseCheck in path :
    /sdcard/videokit

    03-13 14:49:45.970 : I/Videokit(6065) : isLicExistsComplex...

    03-13 14:49:45.970 : I/Videokit(6065) : trying to open
    /sdcard/videokit/ffmpeglicense.lic

    03-13 14:49:45.970 : I/Videokit(6065) : license file found...

    03-13 14:49:45.970 : I/Videokit(6065) : time decoded : 1394535283

    03-13 14:49:45.970 : I/Videokit(6065) : timeStrDec 1394535283 is a valid
    number.

    03-13 14:49:45.970 : I/Videokit(6065) : time diff : 161702

    03-13 14:49:45.970 : I/Videokit(6065) : You used 1 of your 15 trial
    days.

    03-13 14:49:45.970 : I/ffmpeg4android(6065) : setting remote
    notification info

    03-13 14:49:45.970 : D/ffmpeg4android(6616) : command items num : 21

    03-13 14:49:45.970 : D/ffmpeg4android(6616) : command : ffmpeg -y -i
    /storage/emulated/0/videokit/out.mp4 -strict experimental -s 320x240
    -r 15 -aspect 3:4 -ab 12288 -vcodec mpeg4 -b 2097152 -sample_fmt s16 /sdcard/out.mp4

    03-13 14:49:45.970 : D/ffmpeg4android(6616) : workingFolder from remote :
    /sdcard/videokit

    03-13 14:49:45.970 : D/ffmpeg4android(6065) : deleteing :
    /sdcard/videokit/vk.log isdeleted : true

    03-13 14:49:45.975 : D/ffmpeg4android(6065) : deleteing :
    /sdcard/videokit/ffmpeg4android.log isdeleted : false

    03-13 14:49:45.975 : D/ffmpeg4android(6065) : deleteing :
    /sdcard/videokit/videokit.log isdeleted : true

    03-13 14:49:45.980 : D/ffmpeg4android(6065) : Client invokeService()

    03-13 14:49:45.980 : D/ffmpeg4android(6065) : Acquire wake lock

    03-13 14:49:46.265 : D/ffmpeg4android(6616) : Sleeping, waiting for
    command

    03-13 14:49:46.295 : D/ffmpeg4android(6065) : TranscodeBackground
    doInBackground started

    03-13 14:49:46.295 : I/ffmpeg4android(6616) : =======remote service
    runTranscoding ======

    03-13 14:49:46.340 : V/HomeAsync(6065) : TOTAL_SPACE is
    1 ;AVAILABLE_SPACE is 0.451

    03-13 14:49:46.345 : I/ActivityManager(6065) : Timeline : Activity_idle
    id : android.os.BinderProxy@423deed8 time:38213045

    03-13 14:49:46.345 : I/ActivityManager(6065) : Timeline : Activity_idle
    id : android.os.BinderProxy@420323a0 time:38213045

    03-13 14:49:46.565 : D/dalvikvm(6616) : Trying to load lib
    /data/app-lib/app.cloudstringers-2/libvideokit.so 0x41b285f0

    03-13 14:49:46.570 : D/dalvikvm(6616) : Added shared lib
    /data/app-lib/app.cloudstringers-2/libvideokit.so 0x41b285f0

    03-13 14:49:46.570 : I/Videokit(6616) : Loading native library compiled
    at 21:59:53 Oct 23 2013

    03-13 14:49:46.575 : I/ffmpeg4android(6616) : ===============Running
    command from thread path : /sdcard/videokit

    03-13 14:49:46.575 : I/Videokit(6616) : vk ffmpeg sdcardPath :
    /sdcard/videokit

    03-13 14:49:46.575 : I/Videokit(6616) : licenseCheck in path :
    /sdcard/videokit

    03-13 14:49:46.575 : I/Videokit(6616) : isLicExistsComplex...

    03-13 14:49:46.575 : I/Videokit(6616) : trying to open
    /sdcard/videokit/ffmpeglicense.lic

    03-13 14:49:46.575 : I/Videokit(6616) : license file found...

    03-13 14:49:46.575 : I/ffmpeg4android(6616) :
    =======ProgressBackgroundRemote doInBackground=========

    03-13 14:49:46.575 : I/Videokit(6616) : time decoded : 1394535283

    03-13 14:49:46.575 : I/Videokit(6616) : timeStrDec 1394535283 is a valid
    number.

    03-13 14:49:46.575 : I/Videokit(6616) : time diff : 161703

    03-13 14:49:46.575 : I/Videokit(6616) : You used 1 of your 15 trial
    days.

    03-13 14:49:46.575 : D/Videokit(6616) : license check rc : 0

    03-13 14:49:46.575 : D/Videokit(6616) : run() called verion 2.0

    03-13 14:49:46.575 : D/Videokit(6616) : run passing off to main()

    03-13 14:49:46.800 : D/ffmpeg4android(6065) : onServiceDisconnected

    03-13 14:49:48.640 : I/ffmpeg4android(6065) : Got real duration :
    00:00:07.78

    03-13 14:49:48.640 : I/ffmpeg4android(6065) : ==== getting
    currentVkLogSize from VK

    03-13 14:49:48.640 : D/ffmpeg4android(6065) : currentVkLogSize : 5751

    03-13 14:49:48.645 : I/ffmpeg4android(6065) : No ffmpeg4android_log
    file, using vk log

    03-13 14:49:48.645 : I/line(6065) : _rate, rate, width or height

    03-13 14:49:48.650 : I/line(6065) : Statistics : 0 seeks, 0 writeouts

    03-13 14:49:48.650 : I/line(6065) : Statistics : 72873 bytes read, 2
    seeks

    03-13 14:49:48.650 : D/ffmpeg4android(6065) : currentTimeStr : exit

    03-13 14:49:48.650 : D/ffmpeg4android(6065) : ============Found one of
    the exit tokens in the log============

    03-13 14:49:48.650 : I/ffmpeg4android(6065) : onProgressUpdate : 100

    03-13 14:49:48.650 : D/ffmpeg4android(6065) : Releasing wake lock

    03-13 14:49:48.650 : D/ffmpeg4android(6065) : TranscodeBackground
    onPostExecute

    03-13 14:49:48.700 : D/ffmpeg4android(6065) : /sdcard/videokit/null
    length in bytes : 0

    03-13 14:49:48.700 : D/ffmpeg4android(6065) : showNotifications

    03-13 14:49:48.700 : W/ffmpeg4android(6065) : output file is not set use
    the setOutputFilePath method to set the full output file path

    03-13 14:49:48.705 : I/ffmpeg4android(6065) : FFMPEG finished.

    03-13 14:49:48.710 : D/ffmpeg4android(6065) : releaseService()

    03-13 14:49:48.710 : D/ffmpeg4android(6065) : Client stopService()

    03-13 14:49:48.710 : W/ContextImpl(6065) : Implicit intents with
    startService are not safe : Intent
    act=com.netcompss.ffmpeg4android.FFMpegRemoteServiceBridge

    android.content.ContextWrapper.stopService:499
    com.netcompss.ffmpeg4android_client.BaseWizard.stopService:451
    com.netcompss.ffmpeg4android_client.BaseWizard.handleServiceFinished:513

  • ffmpeg to Youtube Live stops working. ffmpeg continues to run

    10 février 2020, par Robert Pringle

    I’m streaming a mobotix camera to Youtube Live.

    This works correctly for a period of time. Youtube then reports the stream as "noData".
    ffmpeg continues to run, but no video is being received by Youtube.

    The problem is intermittant.

    Restarting the ffmpeg process makes Youtube start receiving the stream again.

    ffmpeg is being run as a systemd service.

    ffmpeg is run with the following command :

    ffmpeg -nostdin  -f lavfi  -i anullsrc  -rtsp_transport tcp -thread_queue_size 512 -i "rtsp://@192.168.1.1:554/mobotix.h264"   -tune zerolatency  -vcodec libx264  -pix_fmt + -c:v copy  -c:a aac  -strict experimental  -f flv rtmp://a.rtmp.youtube.com/live2/

    Logs only show : ffmpeg[47357]: [48.0K blob data]

    Any ideas on how to solve this ? Or improve the logging.

    Edit :
    Logs from starting ffmpeg :

       Feb 07 17:57:00 localhost.localdomain ffmpeg[49525]: [48.0K blob data]
       Feb 07 17:52:47 localhost.localdomain ffmpeg[49525]:       encoder         : Lavc58.54.100 aac
       Feb 07 17:52:47 localhost.localdomain ffmpeg[49525]:     Metadata:
       Feb 07 17:52:47 localhost.localdomain ffmpeg[49525]:     Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 128 kb/s
       Feb 07 17:52:47 localhost.localdomain ffmpeg[49525]:     Stream #0:0: Video: h264 (Constrained Baseline) ([7][0][0][0] / 0x0007), yuv420p(progressive), 1024x768, q=2-31, 12.50 tbr, 1k tbn, 90k tbc
       Feb 07 17:52:47 localhost.localdomain ffmpeg[49525]:     encoder         : Lavf58.29.100
       Feb 07 17:52:47 localhost.localdomain ffmpeg[49525]:   Metadata:
       Feb 07 17:52:47 localhost.localdomain ffmpeg[49525]: Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live2/':
       Feb 07 17:52:47 localhost.localdomain ffmpeg[49525]:   Stream #0:0 -> #0:1 (pcm_u8 (native) -> aac (native))
       Feb 07 17:52:47 localhost.localdomain ffmpeg[49525]:   Stream #1:0 -> #0:0 (copy)
       Feb 07 17:52:47 localhost.localdomain ffmpeg[49525]: Stream mapping:
       Feb 07 17:52:46 localhost.localdomain ffmpeg[49525]:     Stream #1:0: Video: h264 (Constrained Baseline), yuv420p(progressive), 1024x768, 12.50 tbr, 90k tbn, 180k tbc
       Feb 07 17:52:46 localhost.localdomain ffmpeg[49525]:   Duration: N/A, start: 136.139322, bitrate: N/A
       Feb 07 17:52:46 localhost.localdomain ffmpeg[49525]:     comment         : mobotix.h264
       Feb 07 17:52:46 localhost.localdomain ffmpeg[49525]:     title           : Mobotix IP-Camera (H.264, unicast)
       Feb 07 17:52:46 localhost.localdomain ffmpeg[49525]:   Metadata:
       Feb 07 17:52:46 localhost.localdomain ffmpeg[49525]: Input #1, rtsp, from 'rtsp://@192.168.1.1:554/mobotix.h264':
       Feb 07 17:52:44 localhost.localdomain ffmpeg[49525]: [h264 @ 0x559ee7857940] concealing 2400 DC, 2400 AC, 2400 MV errors in P frame
       Feb 07 17:52:43 localhost.localdomain ffmpeg[49525]:     Stream #0:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s
       Feb 07 17:52:43 localhost.localdomain ffmpeg[49525]:   Duration: N/A, start: 0.000000, bitrate: 705 kb/s
       Feb 07 17:52:43 localhost.localdomain ffmpeg[49525]: Input #0, lavfi, from 'anullsrc':
       Feb 07 17:52:43 localhost.localdomain ffmpeg[49525]:   libpostproc    55.  5.100 / 55.  5.100
       Feb 07 17:52:43 localhost.localdomain ffmpeg[49525]:   libswresample   3.  5.100 /  3.  5.100
       Feb 07 17:52:43 localhost.localdomain ffmpeg[49525]:   libswscale      5.  5.100 /  5.  5.100
       Feb 07 17:52:43 localhost.localdomain ffmpeg[49525]:   libavresample   4.  0.  0 /  4.  0.  0
       Feb 07 17:52:43 localhost.localdomain ffmpeg[49525]:   libavfilter     7. 57.100 /  7. 57.100
       Feb 07 17:52:43 localhost.localdomain ffmpeg[49525]:   libavdevice    58.  8.100 / 58.  8.100
       Feb 07 17:52:43 localhost.localdomain ffmpeg[49525]:   libavformat    58. 29.100 / 58. 29.100
       Feb 07 17:52:43 localhost.localdomain ffmpeg[49525]:   libavcodec     58. 54.100 / 58. 54.100
       Feb 07 17:52:43 localhost.localdomain ffmpeg[49525]:   libavutil      56. 31.100 / 56. 31.100
       Feb 07 17:52:43 localhost.localdomain ffmpeg[49525]:   configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 >
       Feb 07 17:52:43 localhost.localdomain ffmpeg[49525]:   built with gcc 8 (GCC)
       Feb 07 17:52:43 localhost.localdomain ffmpeg[49525]: ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers

    Running the command manually gave me logs and exited, whereas the systemd service keeps running.

       [flv @ 0x560541a8b3c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
       av_interleaved_write_frame(): Broken pipekB time=03:35:18.84 bitrate=3131.8kbits/s speed=0.999x    
           Last message repeated 1 times
       [flv @ 0x560541a8b3c0] Failed to update header with correct duration.
       [flv @ 0x560541a8b3c0] Failed to update header with correct filesize.
       Error writing trailer of rtmp://a.rtmp.youtube.com/live2/: Broken pipe
       frame=134427 fps= 10 q=-1.0 Lsize= 4938869kB time=03:35:18.96 bitrate=3131.8kbits/s speed=0.997x    
       video:4923745kB audio:3296kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.240068%
       [aac @ 0x560541a6d680] Qavg: 65536.000
       Conversion failed!