Recherche avancée

Médias (91)

Autres articles (19)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Participer à sa documentation

    10 avril 2011

    La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
    Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
    Pour ce faire, vous pouvez vous inscrire sur (...)

Sur d’autres sites (3653)

  • Does ffmpeg rtp_mpegts muxer support setting DVB triplet ?

    19 février 2021, par drake7

    It seems ffmpeg lets you set the DVB triplet with UDP but not with RTP.

    


    FYI : This is a followup on my findings about the rtp_mpegts muxer compared to the mpegts muxer : Question

    


    In my tests I was using ffmpeg version 4.3.1-2021-01-01-full_build-www.gyan.dev on windows.

    


    findings

    


    I analyzed my streams with dectec's "StreamXpert" :

    


      

    • With UDP and it's mpegts muxer, the DVB triplet can be set (1)

      


    • 


    • With RTP and it's rtp_mpegts muxer, the DVB triplet is ignored (3) (Note that 3a and 3b create very similar results in "StreamXpert".)

      


    • 


    • Using UDP with DVB triplet as input and output with RTP ignores the DVB triplet (2)

      


    • 



    


    Interestingly, leaving out the following options...

    


    -pcr_period 20 -pat_period 0.10 -sdt_period 0.25 -metadata:s:a:0 language=nya \
-mpegts_flags +pat_pmt_at_frames -mpegts_flags system_b


    


    ... the rtp_mpegts muxer (3b) creates a valid DVB transport stream, while the the mpegts muxer (4) does not.

    


    ffmpeg params :

    


      



    


    muxer : mpegts (udp)

    


    ffmpeg -f lavfi -i testsrc -r 25 -c:v libx264 -pix_fmt yuv420p -profile:v main -level 3.1 -preset veryfast -vf scale=1280:720,setdar=dar=16/9 -an -bsf:v h264_mp4toannexb -b:v 4M -muxrate 8M \
-pcr_period 20 -pat_period 0.10 -sdt_period 0.25 -metadata:s:a:0 language=nya -mpegts_flags +pat_pmt_at_frames \
-mpegts_transport_stream_id 0x005A \
-mpegts_original_network_id 0x005B \
-mpegts_service_id 0x005C \
-mpegts_pmt_start_pid 0x005D -mpegts_start_pid 0x005E -mpegts_service_type advanced_codec_digital_hdtv \
-metadata service_provider="Provider foo" \
-metadata service_name="Service bar" \
-mpegts_flags system_b -flush_packets 0 \
-f mpegts "udp://239.10.33.10:1234?pkt_size=1316"


    


      



    


    muxer : rtp_mpegts (rtp)

    


    ffmpeg -i "udp://239.10.33.10:1234" -map 0 -c copy \
-f rtp_mpegts "rtp://239.10.33.11:1234?pkt_size=1316"


    


      



    


    a) muxer : rtp_mpegts (rtp)

    


    ffmpeg -f lavfi -i testsrc -r 25 -c:v libx264 -pix_fmt yuv420p -profile:v main -level 3.1 -preset veryfast -vf scale=1280:720,setdar=dar=16/9 -an -bsf:v h264_mp4toannexb -b:v 4M -muxrate 8M \
-pcr_period 20 -pat_period 0.10 -sdt_period 0.25 -metadata:s:a:0 language=nya -mpegts_flags +pat_pmt_at_frames \
-mpegts_transport_stream_id 0x005A \
-mpegts_original_network_id 0x005B \
-mpegts_service_id 0x005C \
-mpegts_pmt_start_pid 0x005D -mpegts_start_pid 0x005E -mpegts_service_type advanced_codec_digital_hdtv \
-metadata service_provider="Provider foo" \
-metadata service_name="Service bar" \
-mpegts_flags system_b -flush_packets 0 \
-f rtp_mpegts "rtp://239.10.33.10:1234?pkt_size=1316"


    


    b) muxer : rtp_mpegts (rtp) (omitting some options)

    


    ffmpeg -f lavfi -i testsrc -r 25 -c:v libx264 -vf scale=1280:720,setdar=dar=16/9 -b:v 4M -muxrate 8M \
-mpegts_transport_stream_id 0x005A \
-mpegts_original_network_id 0x005B \
-mpegts_service_id 0x005C -mpegts_pmt_start_pid 0x005D -mpegts_start_pid 0x005E \
-mpegts_service_type advanced_codec_digital_hdtv \
-metadata service_provider="Provider foo" \
-metadata service_name="Service bar" \
-f rtp_mpegts "rtp://239.10.33.10:1234"


    


      



    


    muxer : mpegts (udp) (omitting some options)

    


    ffmpeg -f lavfi -i testsrc -r 25 -c:v libx264 -vf scale=1280:720,setdar=dar=16/9 -b:v 4M -muxrate 8M \
-mpegts_transport_stream_id 0x005A \
-mpegts_original_network_id 0x005B \
-mpegts_service_id 0x005C -mpegts_pmt_start_pid 0x005D -mpegts_start_pid 0x005E \
-mpegts_service_type advanced_codec_digital_hdtv \
-metadata service_provider="Provider foo" \
-metadata service_name="Service bar" \
-f mpegts "udp://239.10.33.10:1234"


    


    Analyzing the transport stream

    


     dectec's

    


  • Cannot play second sdp file with FFMPEG : Address already in use

    8 novembre 2017, par user1490563

    SUMMARY- iam not able to process two sdp files simultaneously on one machine. ffmpeg throws "bind failed : Address already in use"

    My aim to get an stream from webRTC ( via kurento ) and then trancode it to be sent to RTMP server. I was able to generate an dp file and it transcoded easily but second one gave an error - "Address already in use".

    What i have already tried -
    i have dynamically changed the video and audio port in both files so that ports do not overlap (files pasted at the end of question ).
    i was albe to see that while one stream was successfully getting transcoded,the other streams video and audio ports were blocked by the same FFMPEG instance running for the first one. I do not know why or how.
    Its possible that i may be doing some mistake.
    Requesting help. i will like to stream multiple live videos at the same time.

    first SDP file

    v=0
    o=- 0 0 IN IP4 127.0.0.1
    s=KMS
    c=IN IP4 127.0.0.1
    t=0 0
    m=audio 49170 RTP/AVP 97
    a=recvonly
    a=rtpmap:97 PCMU/8000
    a=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1508
    m=video 55000 RTP/AVP 96
    a=rtpmap:96 H264/90000
    a=fmtp:96 packetization-mode=1

    second SDP file :

    v=0
    o=- 0 0 IN IP4 127.0.0.1
    s=KMS
    c=IN IP4 127.0.0.1
    t=0 0
    m=audio 49171 RTP/AVP 97
    a=recvonly
    a=rtpmap:97 PCMU/8000
    a=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1508
    m=video 55001 RTP/AVP 96
    a=rtpmap:96 H264/90000
    a=fmtp:96 packetization-mode=1
  • javacpp-presets ffmpeg : Trying to access Ebur128Context->integrated_loudness but unsuccessful

    11 avril 2019, par Sourabh Jain

    [FFMPEG] Trying to access Ebur128Context->integrated_loudness but unsuccessful , using javacpp presets

    I am trying to run ebur128Filter on audio file . similar to be doing
    [http://ffmpeg.org/doxygen/2.6/f__ebur128_8c_source.html#l00135]

    ffmpeg -i sample.wav -filter_complex ebur128=peak=true -f null -

    result of which is :

    [Parsed_ebur128_0 @ 0x7f9d38403ec0] Summary:

    Integrated loudness:
    I: -15.5 LUFS
    Threshold: -25.6 LUFS

    Loudness range:
    LRA: 1.5 LU
    Threshold: -35.5 LUFS
    LRA low: -16.3 LUFS
    LRA high: -14.8 LUFS

    True peak:
    Peak: -0.4 dBFS
    package org.bytedeco.javacv;

    import org.bytedeco.javacpp.BytePointer;
    import org.bytedeco.javacpp.Pointer;
    import org.bytedeco.javacpp.avfilter;
    import org.junit.jupiter.api.Test;

    import java.io.InputStream;
    import java.nio.ByteBuffer;
    import java.util.logging.Level;
    import java.util.logging.Logger;

    import static org.bytedeco.javacpp.avutil.av_opt_get;

    public class LoudnessAndTruePeakTest {

       @Test
       public void ebur1228FilterTest() throws FrameFilter.Exception, FrameGrabber.Exception {
           Logger.getGlobal().setLevel(Level.ALL);
           String filter = "ebur128=peak=true:framelog=verbose";
           FFmpegFrameFilter fFmpegFrameFilter = new FFmpegFrameFilter(filter, 2);
           InputStream is = getClass().getResourceAsStream("/resources/sample.wav");
           FFmpegFrameGrabber fFmpegFrameGrabber = new FFmpegFrameGrabber(is);
           fFmpegFrameFilter.start();
           fFmpegFrameGrabber.start();
           Frame frame;
           while ((frame = fFmpegFrameGrabber.grabSamples()) != null) {
               fFmpegFrameFilter.push(frame);


           }
               printFilterState(fFmpegFrameFilter);


           fFmpegFrameGrabber.stop();
           fFmpegFrameFilter.stop();

       }

       private void printFilterState(FFmpegFrameFilter fFmpegFrameFilter) {
           avfilter.AVFilterContext filters = fFmpegFrameFilter.afilter_graph.filters(3);
           Pointer value = filters.priv();
           String name = filters.name().getString();
           System.out.println(name);
           Pointer pointer = new BytePointer(8);
           ByteBuffer buffer = pointer.asByteBuffer();

           av_opt_get(value, "integrated_loudness", 0, buffer);
           double db = buffer.getDouble();
           System.out.println("integrated_loudness : " + db);

           pointer = new BytePointer(8);
           buffer = pointer.asByteBuffer();
           av_opt_get(value, "i400.rel_threshold", 0, buffer);
           db = buffer.getDouble();
           System.out.println("i400.rel_threshold :" + db);

           pointer = new BytePointer(8);
           buffer = pointer.asByteBuffer();
           av_opt_get(value, "loudness_range", 0, buffer);
           db = buffer.getDouble();
           System.out.println("loudness_range :" + db);

           pointer = new BytePointer(8);
           buffer = pointer.asByteBuffer();
           av_opt_get(value, "i3000.rel_threshold :", 0, buffer);
           db = buffer.getDouble();
           System.out.println("i3000.rel_threshold :" + db);

           pointer = new BytePointer(8);
           buffer = pointer.asByteBuffer();
           av_opt_get(value, "lra_low", 0, buffer);
           db = buffer.getDouble();
           System.out.println("lra_low :" + db);

           pointer = new BytePointer(8);
           buffer = pointer.asByteBuffer();
           av_opt_get(value, "lra_high", 0, buffer);
           db = buffer.getDouble();
           System.out.println("lra_high :" + db);
       }
    }
    Output from program is :

    Input #0, wav, from 'java.io.BufferedInputStream@2a40cd94':
    Metadata:
    title : test
    album : test
    artist : test
    genre : Cinematic
    Duration: N/A, bitrate: 256 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, 2 channels, s16, 256 kb/s
    Invalid return value 0 for stream protocol
    Invalid return value 0 for stream protocol
    Parsed_ebur128_0
    integrated_loudness : 2.315841784746324E77
    i400.rel_threshold :2.315841784746324E77
    loudness_range :2.315841784746324E77
    i3000.rel_threshold :1.3561678660795056E248
    lra_low :2.315841784746324E77
    lra_high :2.0858062529025373E-306
    [Parsed_ebur128_0 @ 0x7f8942683940] Summary:

    Integrated loudness:
    I: -70.0 LUFS
    Threshold: 0.0 LUFS

    Loudness range:
    LRA: 0.0 LU
    Threshold: 0.0 LUFS
    LRA low: 0.0 LUFS
    LRA high: 0.0 LUFS

    True peak:
    Peak: -inf dBFS

    Process finished with exit code 0

    not sure what I am doing wrong here