Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (13)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

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

Sur d’autres sites (4775)

  • DTS and PTS are different, despite not having B-frames (ffmpeg)

    7 août 2018, par Damian

    Just a quick question in regards to video encoding/muxing a video file with ffmpeg. Basically, I have my muxer functioning and I’m trying to have my packets output the correct PTS/DTS.

    This is a portion of my code that encodes my AVFrame, muxing it to an output file :

    int ret;
    int got_packet = 0;

    AVPacket pkt = { 0 };
    av_init_packet(&pkt);

    pkt.data = NULL;
    pkt.size = 0;

    /* encode the image */
    ret = avcodec_encode_video2(cc, &pkt, frame, &got_packet);
    if (ret < 0)
    {
       fprintf(stderr, "error encoding video frame: %s\n", av_err2str(ret));
       exit(EXIT_FAILURE);
    }

    if (got_packet)
    {
       av_packet_rescale_ts(&pkt, cc->time_base, st->time_base);

       fprintf(stderr, "\npkt.pts     = %ld\n", pkt.pts);
       fprintf(stderr,   "pkt.dts     = %ld\n", pkt.dts);
       fprintf(stderr, "writing frame\n");

       ret = av_interleaved_write_frame(fmt_ctx, &pkt);
       av_packet_unref(&pkt);
    }
    else
    {
       ret = 0;
    }

    ...

    I’m then getting an output of the following :

    pkt.pts     = 0
    pkt.dts     = 0
    writing frame

    pkt.pts     = 1502
    pkt.dts     = 0
    writing frame

    pkt.pts     = 3003
    pkt.dts     = 1502
    writing frame

    pkt.pts     = 4505
    pkt.dts     = 3003
    writing frame

    ...

    My goal is to have my PST and DST both with the pattern : 1502, 3003, 4505, 6006, 7508, ...

    But it seems that the first DTS value is repeating once, and thus being off-sync with it’s corresponding PTS value. It’s also worth mentioning that the codec context was configured to have no b-frames, so only i- and p- frames are present here.

    Does anyone with more experience have some insight on this ?

    Addition :

    I ran the following command in terminal to check if my DTS and PTS values were consistent to my print statements :

    sudo ./ffprobe -show_packets -print_format json mux_test.ts | less

    And I got the following :

    {
       "packets": [
           {
               "codec_type": "video",
               "stream_index": 0,
               "pts": 0,
               "pts_time": "0.000000",
               "dts": -1501,
               "dts_time": "-0.016678",
               "duration": 1501,
               "duration_time": "0.016678",
               "convergence_duration": "N/A",
               "convergence_duration_time": "N/A",
               "size": "55409",
               "pos": "564",
               "flags": "K"
           },
           {
               "codec_type": "video",
               "stream_index": 0,
               "pts": 1502,
               "pts_time": "0.016689",
               "dts": 0,
               "dts_time": "0.000000",
               "duration": 1501,
               "duration_time": "0.016678",
               "convergence_duration": "N/A",
               "convergence_duration_time": "N/A",
               "size": "46574",
               "pos": "60160",
               "flags": "_"
           },
           {
               "codec_type": "video",
               "stream_index": 0,
               "pts": 3003,
               "pts_time": "0.033367",
               "dts": 1502,
               "dts_time": "0.016689",
               "duration": 1501,
               "duration_time": "0.016678",
               "convergence_duration": "N/A",
               "convergence_duration_time": "N/A",
               "size": "2544",
               "pos": "110356",
               "flags": "_"
           },

           ...

    Which doesn’t show my first DTS value repeated, but continues to show my DTS one cycle behind my PTS.

  • what codec to specify to accessing my HDMI-to-USB adaptor, under Linux ? [closed]

    14 mai 2022, par David

    A week or so ago,I bought a HDMI-to-USB adapter, to use to capture video
TV content from my TV's set-top box. (Xfinity, if it matters. Box generically is :
"XiD X1"...I have both the Pace and the Cisco models available here in this house.)

    


    Specifically, here's the adapter I bought,from Amazon :
https://www.amazon.com/gp/product/B09FLN63B3

    


    So, I'm fluent in both Windows (Win-11) and Linux (Debian 'Bullseye', on my chromebook).

    


    The adapter does not come with any recommendations for what software/drivers to (try to) use, but I was prepared for that.
After some google searches, I decided to first try using the cmd-line
'ffmpeg' program, because I'm
quite familiar with that (excellent !) piece of open-source software !

    


    So, after a day or two of (mostly) success recordings under Win-11, using
ffmpeg's Microsoft-based 'dshow' (aka 'DirectShow'), I decided to attempt to get
up to the same level of accomplishment on my Chromebook, under Linux, also
using 'ffmpeg'.

    


    [Ok...a very brief explanation of 'mostly' successful. I'll
post another separate question here, about the specifics of my glitches,
using 'dshow' on Windows. But, essentially, when I try to record to a MP4
file, I get 2 scenarios of glitch : #1 : Suddenly, dropped packets surges up,
and I get "1000 dropped' yellow msg #2 : On other trials, I get '...contains
no image...'.) So, I figured I should first give a Linux a chance,
before spending more effort trying to resolve the glitches on Windows.]

    


    My first snag, was learning that 'dshow' seems to be specific to 'Windows',
and thus ffmpeg is getting 'unknown' for my reference to 'dshow'. After more hours of 'guessing', I've finally learned/concluded that there are other things
(something call "DeckLink" is one such alternative ?) for Linux, but I'm unclear
what extra Linux packages might exist for ffmpeg support, or whether I will need to built a more complete 'ffmpeg' (e.g. from source code), to get things going under Linux ?

    


    Is my device able to be accessed from some tools other than 'ffmpeg' ?
(e.g. VLC or Handbrake or whatever ?) more easily, on the Linux platform ?

    


    [If I had to, I'd probably invest another $20-$50 in some other hardware
device that goes from HDMI-to-USB (USB-A/B), if it were ]

    


    All ideas are welcome...(TIA)

    


    — Dave

    


  • Send stream from hdhomerun to AWS EC2 instance

    13 novembre 2018, par icalvete

    I’m trying something odd to get fun. Send stream from hdhomerun to AWS EC2 instance.

    First aproach. Read stream with ffmpeg
    (tested locally successfully)

    hdhomerun_config discover sya my device have ip 192.168.1.200 so I open port on my router in this way

    <my home="home" public="public" ip="ip">:5005 -> 192.168.1.200:80
    <my home="home" public="public" ip="ip">:5004 -> 192.168.1.200:5004
    </my></my>

    w3m and telnet say everything is ok.

    But...

    from EC2 instance I do

    /usr/bin/ffmpeg -y -i 'http://<my home="home" public="public" ip="ip">:5004/auto/v5057?transcode=internet240' -t 12 -vn -acodec pcm_s16le -ar 16000 -ac 1 '/tmp/test.wav'
    </my>

    In tuner1 I can see...

    Virtual Channel none
    Frequency   698.000 MHz
    Program Number  186
    Modulation Lock t8qam64
    Signal Strength 89%
    Signal Quality  100%
    Symbol Quality  100%
    Streaming Rate  none
    Resource Lock   <ec2 public="public" ip="ip">
    </ec2>

    In hdhomerun system logs...

    19700102-10:27:25 Tuner: tuner0 tuning 5057 Telecinco (t8qam64:698MHz-186)
    19700102-10:27:25 Tuner: tuner0 streaming http to <ec2 public="public" ip="ip">:34124
    </ec2>

    Everything seems ok but ffmpeg don’t get any data.

    Seccond aproach. Send stream to wowza

    I have a wowza server running in EC2 instance

    From a linux box at my home I do.

    root# /usr/bin/hdhomerun_config 1250D7B2 scan /tuner1 scan.log
    root# /usr/bin/hdhomerun_config 1250D7B2 set /tuner1/channel auto:651000000
    root# /usr/bin/hdhomerun_config 1250D7B2 get /tuner1/streaminfo
    root# /usr/bin/hdhomerun_config 1250D7B2 get /tuner1/program 190
    root# /usr/bin/hdhomerun_config 1250D7B2 set /tuner1/target rtp://<wowza server="server" public="public" ip="ip">:1935/TEST/hdhr
    root# echo $?
    root# 0
    </wowza>

    Ends without error buy doesn’t work
    This was a long shot but ....

    Any ideas to do this.

    Thanks !!!