Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

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

Autres articles (28)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (4898)

  • FFMPEG : How to chose a stream from all stream

    3 mars 2016, par combo_ci

    I try to convert a UDP stream (that genrated from DVB signal) to HLS m3u8 file with this code :

    ffmpeg -i udp://239.1.2.1:60001 -acodec aac -strict -2 -vcodec libx264 -hls_wrap 100 -f hls /var/www/html/ts/1.m3u8

    UDP stream contain 1 channel (in this case IRIB-TV1).

    When i run this code ffmpeg detect all of service and channel that streamed from DVB card with this message :

    Input #0, mpegts, from 'udp://239.1.2.1:60001':
    Duration: N/A, start: 77906.812644, bitrate: N/A
    Program 101
    Metadata:
     service_name    : IRIB-TV1
     service_provider: IRIB
    Stream #0:0[0x3f2]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x3f3](per): Audio: aac_latm ([17][0][0][0] / 0x0011), 48000 Hz, stereo, fltp
    Program 102
    Metadata:
     service_name    : IRIB-TV2
     service_provider: IRIB
    Program 103
    Metadata:
     service_name    : IRIB-TV3
     service_provider: IRIB
    Program 104
    Metadata:
     service_name    : IRIB-TV4
     service_provider: IRIB

    As you see ffmpeg finf 4 channel in UDP stream, But VLC play only channel 1(IRIB-TV1).

    Now i have have 2 question :

    1-Can I get all channel and service via this ffmpeg code ?

    2-Can i choose a spesial stream from this ffmpeg code ?(i know that ffmpeg can choose a stream with -map otion but i want to choose other service_name that in output log)

    output file is :

    ffmpeg version 2.4.3-1ubuntu1~trusty6 Copyright (c) 2000-2014 the FFmpeg developers
     built on Nov 22 2014 17:07:19 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
     configuration: --prefix=/usr --extra-version='1ubuntu1~trusty6' --build-suffix=-ffmpeg --toolchain=hardened --extra-cflags= --extra-cxxflags= --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-fontconfig --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-opengl --enable-x11grab --enable-libxvid --enable-libx265 --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libx264 --enable-libsoxr --enable-openal --enable-libopencv
     libavutil      54.  7.100 / 54.  7.100
     libavcodec     56.  1.100 / 56.  1.100
     libavformat    56.  4.101 / 56.  4.101
     libavdevice    56.  0.100 / 56.  0.100
     libavfilter     5.  1.100 /  5.  1.100
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  0.100 /  3.  0.100
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  0.100 / 53.  0.100
    Splitting the commandline.
    Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
    Reading option '-timeout' ... matched as AVOption 'timeout' with argument '6000000'.
    Reading option '-i' ... matched as input file with argument 'udp://239.1.2.1:60001?fifo_size=50000'.
    Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'copy'.
    Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'copy'.
    Reading option '-preset' ... matched as AVOption 'preset' with argument 'ultrafast'.
    Reading option '-flags' ... matched as AVOption 'flags' with argument '-global_header'.
    Reading option '-f' ... matched as option 'f' (force format) with argument 'hls'.
    Reading option '-hls_time' ... matched as AVOption 'hls_time' with argument '20'.
    Reading option '-hls_wrap' ... matched as AVOption 'hls_wrap' with argument '5'.
    Reading option '/var/www/html/ts/1.m3u8' ... matched as output file.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option loglevel (set logging level) with argument debug.
    Successfully parsed a group of options.
    Parsing a group of options: input file udp://239.1.2.1:60001?fifo_size=50000.
    Successfully parsed a group of options.
    Opening an input file: udp://239.1.2.1:60001?fifo_size=50000.
    [udp @ 0x1967040] end receive buffer size reported is 131072
    [mpegts @ 0x1977380] Format mpegts probed with size=2048 and score=100
    [mpegts @ 0x1977380] stream=0 stream_type=1b pid=3f2 prog_reg_desc=
    [mpegts @ 0x1977380] stream=1 stream_type=11 pid=3f3 prog_reg_desc=
    [mpegts @ 0x1977380] Before avformat_find_stream_info() pos: 0 bytes read:14476 seeks:0
    [mpegts @ 0x1977380] parser not found for codec none, packets or times may be invalid.
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [mpegts @ 0x1977380] probing stream 1 pp:2500
    [mpegts @ 0x1977380] Probe with size=853, packets=1 detected loas with score=51
    [mpegts @ 0x1977380] probed stream 1
    [aac_latm @ 0x199e4e0] initializing latmctx
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] non-existing PPS 0 referenced
       Last message repeated 1 times
    [h264 @ 0x199cc60] decode_slice_header error
    [h264 @ 0x199cc60] no frame!
    [h264 @ 0x199cc60] Current profile doesn't provide more RBSP data in PPS, skipping
    [h264 @ 0x199cc60] Frame num gap 397 393
    [h264 @ 0x199cc60] Frame num gap 397 394
    [h264 @ 0x199cc60] Frame num gap 397 395
    [h264 @ 0x199cc60] mmco: unref short failure
       Last message repeated 1 times
    [h264 @ 0x199cc60] number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one
    [h264 @ 0x199cc60] no picture ooo
    [h264 @ 0x199cc60] Increasing reorder buffer to 2
    [h264 @ 0x199cc60] no picture ooo
       Last message repeated 1 times
    [h264 @ 0x199cc60] no picture
       Last message repeated 1 times
    [h264 @ 0x199cc60] Current profile doesn't provide more RBSP data in PPS, skipping
       Last message repeated 3 times
    [mpegts @ 0x1977380] max_analyze_duration 5000000 reached at 5034667 microseconds
    [mpegts @ 0x1977380] After avformat_find_stream_info() pos: 1142476 bytes read:1143604 seeks:0 frames:397
    Input #0, mpegts, from 'udp://239.1.2.1:60001?fifo_size=50000':
     Duration: N/A, start: 43581.024200, bitrate: N/A
     Program 101
       Metadata:
         service_name    : IRIB-TV1
         service_provider: IRIB
       Stream #0:0[0x3f2], 274, 1/90000: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg), 720x576 [SAR 12:11 DAR 15:11], 1/50, 25 fps, 50 tbr, 90k tbn, 50 tbc
       Stream #0:1[0x3f3](per), 123, 1/90000: Audio: aac_latm ([17][0][0][0] / 0x0011), 48000 Hz, stereo, fltp
     Program 102
       Metadata:
         service_name    : IRIB-TV2
         service_provider: IRIB
     Program 103
       Metadata:
         service_name    : IRIB-TV3
         service_provider: IRIB
     Program 104
       Metadata:
         service_name    : IRIB-TV4
         service_provider: IRIB
     Program 105
       Metadata:
         service_name    : IRIB-TV5
         service_provider: IRIB
     Program 106
       Metadata:
         service_name    : IRINN
         service_provider: IRIB
     Program 107
       Metadata:
         service_name    : AMOOZESH
         service_provider: IRIB
     Program 108
       Metadata:
         service_name    : QURAN
         service_provider: IRIB
     Program 119
       Metadata:
         service_name    : SALAMAT
         service_provider: IRIB
     Program 120
       Metadata:
         service_name    : NASIM
         service_provider: IRIB
     Program 151
       Metadata:
         service_name    : RADIO IRAN
         service_provider: IRIB
     Program 152
       Metadata:
         service_name    : RADIO PAYAM
         service_provider: IRIB
     Program 153
       Metadata:
         service_name    : RADIO JAVAN
         service_provider: IRIB
     Program 154
       Metadata:
         service_name    : RADIO MAAREF
         service_provider: IRIB
     Program 155
       Metadata:
         service_name    : RADIO QURAN
         service_provider: IRIB
     Program 156
       Metadata:
         service_name    : RADIO FARHANG
         service_provider: IRIB
     Program 157
       Metadata:
         service_name    : RADIO SALAMAT
         service_provider: IRIB
     Program 158
       Metadata:
         service_name    : RADIO VARZESH
         service_provider: IRIB
     Program 159
       Metadata:
         service_name    : RADIO EGHTESAD
         service_provider: IRIB
     Program 160
       Metadata:
         service_name    : RADIO TEHRAN
         service_provider: IRIB
     Program 161
       Metadata:
         service_name    : RADIO AVAA
         service_provider: IRIB
     Program 162
       Metadata:
         service_name    : RADIO NAMAYESH
         service_provider: IRIB
     Program 163
       Metadata:
         service_name    : RADIO SABA
         service_provider: IRIB
     Program 164
       Metadata:
         service_name    : English Radio World Service
         service_provider: IRIB
     Program 166
       Metadata:
         service_name    : Arabic Radio World Service
         service_provider: IRIB
     Program 167
       Metadata:
         service_name    : RADIO BAHARAN
         service_provider: IRIB
     Program 169
       Metadata:
         service_name    : RADIO TELAVAT
         service_provider: IRIB
     Program 170
       Metadata:
         service_name    : RADIO GOFTEGO
         service_provider: IRIB
    Successfully opened the file.
    Parsing a group of options: output file /var/www/html/ts/1.m3u8.
    Applying option acodec (force audio codec ('copy' to copy stream)) with argument copy.
    Applying option vcodec (force video codec ('copy' to copy stream)) with argument copy.
    Applying option f (force format) with argument hls.
    Successfully parsed a group of options.
    Opening an output file: /var/www/html/ts/1.m3u8.
    Successfully opened the file.
    [mpegts @ 0x1967180] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
       Last message repeated 1 times
    [mpegts @ 0x1967180] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
    Output #0, hls, to '/var/www/html/ts/1.m3u8':
     Metadata:
       encoder         : Lavf56.4.101
       Stream #0:0, 0, 1/90000: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 720x576 [SAR 12:11 DAR 15:11], 1/25, q=2-31, 25 fps, 90k tbn, 25 tbc
       Stream #0:1(per), 0, 1/90000: Audio: aac_latm ([17][0][0][0] / 0x0011), 48000 Hz, stereo
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    [NULL @ 0x199cc60] Current profile doesn't provide more RBSP data in PPS, skipping
    [NULL @ 0x199cc60] Current profile doesn't provide more RBSP data in PPS, skipping
    [NULL @ 0x199cc60] Current profile doesn't provide more RBSP data in PPS, skipping
    [NULL @ 0x199cc60] Current profile doesn't provide more RBSP data in PPS, skipping
    [NULL @ 0x199cc60] Current profile doesn't provide more RBSP data in PPS, skipping
    [NULL @ 0x199cc60] Current profile doesn't provide more RBSP data in PPS, skipping
    [NULL @ 0x199cc60] Current profile doesn't provide more RBSP data in PPS, skipping
    [NULL @ 0x199cc60] Current profile doesn't provide more RBSP data in PPS, skipping
    [NULL @ 0x199cc60] Current profile doesn't provide more RBSP data in PPS, skipping
    [NULL @ 0x199cc60] Current profile doesn't provide more RBSP data in PPS, skipping
    [NULL @ 0x199cc60] Current profile doesn't provide more RBSP data in PPS, skipping
    [AVIOContext @ 0x19a9860] Statistics: 0 seeks, 896 writeouts=N/A    
    [hls @ 0x1a65ca0] EXT-X-MEDIA-SEQUENCE:0
    [AVIOContext @ 0x1d162e0] Statistics: 0 seeks, 1 writeouts
    [AVIOContext @ 0x1966b40] Statistics: 0 seeks, 27 writeouts
    [hls @ 0x1a65ca0] EXT-X-MEDIA-SEQUENCE:0
    [AVIOContext @ 0x199b7a0] Statistics: 0 seeks, 1 writeouts
    frame=  826 fps= 69 q=-1.0 Lsize=N/A time=00:00:20.63 bitrate=N/A    
    video:2611kB audio:68kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Input file #0 (udp://239.1.2.1:60001?fifo_size=50000):
     Input stream #0:0 (video): 872 packets read (2779202 bytes);
     Input stream #0:1 (audio): 405 packets read (69222 bytes);
     Total: 1277 packets (2848424 bytes) demuxed
    Output file #0 (/var/www/html/ts/1.m3u8):
     Output stream #0:0 (video): 826 packets muxed (2673485 bytes);
     Output stream #0:1 (audio): 405 packets muxed (69222 bytes);
     Total: 1231 packets (2742707 bytes) muxed
    0 frames successfully decoded, 0 decoding errors
    [AVIOContext @ 0x1967ce0] Statistics: 3884832 bytes read, 0 seeks
    Received signal 2: terminating.
  • Chrome’s New Audio Notifier

    30 janvier 2014, par Multimedia Mike — General

    Version 32 of Google’s Chrome web browser introduced this nifty feature :


    Chrome audio notifier icon

    When a browser tab has an element that is producing audio, the browser’s tab shows the above audio notification icon to inform the user. I have seen that people have a few questions about this, specifically :

    1. How does this feature work ?
    2. Why wasn’t this done sooner ?
    3. Are other browsers going to follow suit ?

    Short answers : 1) Chrome offers a new plugin API that the Flash Player is now using, as are Chrome’s internal media playing facilities ; 2) this feature was contingent on the new plugin infrastructure mentioned in the previous answer ; 3) other browsers would require the same infrastructure support.

    Longer answers follow…

    Plugin History
    Plugins were originally based on the Netscape Plugin API. This was developed in the early 1990s in order to support embedding PDFs into the Netscape web browser. The NPAPI does things like providing graphics contexts for drawing and input processing, and mediate network requests through the browser’s network facilities.

    What NPAPI doesn’t do is handle audio. In the early-mid 1990s, audio support was not a widespread consideration in the consumer PC arena. Due to the lack of audio API support, if a plugin wanted to play audio, it had to go outside of the plugin framework.


    NPAPI plugin model

    There are a few downsides to this approach :

    So that last item hopefully answers the question of why it has been so difficult for NPAPI-supporting browsers to implement what seems like it would be simple functionality, like implementing a per-tab audio notifier.

    Plugin Future
    Since Google released Chrome in an effort to facilitate advancements on the client side of the internet, they have made numerous efforts to modernize various legacy aspects of web technology. These efforts include the SPDY protocol, Native Client, WebM/WebP, and something call the Pepper Plugin API (PPAPI). This is a more modern take on the classic plugin architecture to supplant the aging NPAPI :


    PPAPI plugin model

    Right away, we see that the job of the plugin writer is greatly simplified. Where was this API years ago when I was writing my API jungle piece ?

    The Linux version of Chrome was apparently the first version that packaged the Pepper version of the Flash Player (doing so fixed an obnoxious bug in the Linux Flash Player interaction with GTK). Now, it looks like Windows and Mac have followed suit. Digging into the Chrome directory on a Windows 7 installation :

    AppData\Local\Google\Chrome\Application[version]\PepperFlash\pepflashplayer.dll

    This directory exists for version 31 as well, which is still hanging around my system.

    So, to re-iterate : Chrome has a new plugin API that plugins use to access the audio API. Chrome knows when the API is accessed and that allows the browser to display the audio notifier on a tab.

    Other Browsers
    What about other browsers ? “Mozilla is not interested in or working on Pepper at this time. See the Chrome Pepper pages.”

  • ffmpeg android concatenation with different codec [on hold]

    31 mars 2016, par raphwilmes

    I’m trying to concatenate 10 videos, but 5 of them have
    Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 600x976 [SAR 1:1 DAR 75:122], 17 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)

    And the rest have
    Stream #1:0(eng) : Video : h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480x 175 kb/s, SAR 65536:65536 DAR 4:3, 7.69frp, 23.08 tbr, 90k tbn, 15tbc (default)

    And my code is :

    String commandForMerge = "";
    for(int i = 1; i<=numberQuestion;i++){
       commandForMerge += "-i "+toDir+"/image"+i+".mp4 -i "+toDir+"/"+i+".mp4 ";
    }
    String cmd = commandForMerge+"-filter_complex concat=n=10:v=1:a=1 -y "+toDir+"/input.mp4";
    execFFmpegBinaryMerge(cmd);

    Here my fonction :

    private void execFFmpegBinaryMerge(final String command) {
       try {

           ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {
               @Override
               public void onFailure(String s) {
               }

               @Override
               public void onSuccess(String s) {
               }

               @Override
               public void onProgress(String s) {
                   txtProcess.setText(txtProcess.getText()+"\n "+s.toString());
               }

               @Override
               public void onStart() {
                   txtProcess.setText("mise en place...");
               }

               @Override
               public void onFinish() {

               }
           });
       } catch (FFmpegCommandAlreadyRunningException e) {
           // do nothing for now
       }
    }

    I use this library : https://github.com/WritingMinds/ffmpeg-android-java

    Edit :

    Now, I’v this : Unable to find a suitable output format for ’[1:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v1] ;’ Invalid Agurment

    My Command is : *ffmpeg -i image1.mp4 -i 1.mp4 -i image2.mp4 -i 2.mp4 -i image3.mp4 -i 3.mp4.mp4 -i image4.mp4 -i 4.mp4 -i image5.mp4 -i .mp4

    - filter-complex
    "[0:v]scale=-1:480,pad=640:0 :(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v0] ;
    [1:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v1] ;
    [2:v]scale=-1:480,pad=640:0 :(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v2] ;
    [3:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v3] ;
    [4:v]scale=-1:480,pad=640:0 :(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v4] ;
    [5:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v5] ;
    [6:v]scale=-1:480,pad=640:0 :(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v6] ;
    [7:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v7] ;
    [8:v]scale=-1:480,pad=640:0 :(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v8] ;
    [9:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v9] ;"
    ’[v0][0:a][v1][1:a][v2][2:a][v3][3:a][v4][4:a][v5][5:a][v6][6:a][v7][7:a][v8][8:a][v9][9:a]’ concat=n=10:v=1:a=1 -y output.mp4
    *

    Now the "[0:v]scale=-1:480,pad=640:0 :(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v0] ;" pass but not the [1:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v1] ;

    output :

    WARINING:linker : /data/data/vrapp_mobile.com.duoquiz2/files/ffmpeg has text relocation. This is wasting memory and is security risk. Please fix.
    ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developpers built on Oct 7 2014 15:08:46 with gcc 4.8 (GCC)
    configuration :—target-os=linux —cross-prefix=/home/sb/Source-Code/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- —arm=arm —cpu=cortex-a8 —enable-runtime-cpudetect —sysroot=/home/sb/Source-Code/ffmpeg-android/toolchain-android/sysroot —enable-pic—enable-libx264 —enable-libass —enable-libfreetype —enable-libfrididi —enable-fontconfig —enable-pthreads —disable-debug —disable-ffserver —enable-version3 —enable-hardcored-tables —disable-ffplay —disable-ffprobe —enable-gpl —enable-yasm —disable-doc —disable-shared —enable-static —pjg-config=/home/sb/Source-Code/ffmpeg-android/ffmpeg-pkg-config —prefix=/home/sb/Source-Code/ffmpeg-android/build/armeabi-v7a-neon —extra-cflags=’-l/home/sb/Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protextor-all -mfpu=neon’ —extra-ldflags=’-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,now -pie’ —extra-libs=’-lpng -lexpat -lm’ —extra-cxxflags =
    libavutil 54. 7.100/54. 7.100
    libavcodec 56 1.100/56. 1.100
    libavformat 56. 4.101/56. 4.101
    libavdevice 56. 0.100/56. 0.100
    libavfilter 5. 1.100/5. 1.100
    libswscale 3. 0.100/3. 0.100
    libswresample 1. 1.100/1. 1.100
    libpostproc 53. 0.100/53. 0.100
    Input #0,mov,mp4,m4a,3gp,mj2, from ’/storage/emulated/0/DuoQuiz/image1.mp4’ :
    Metadata :
    major_brand :isom
    minor_version :512
    compatible_brands:isomiso2avc1mp41
    encoder :Lavf56.4.101
    Duration : 00:00:02.40, start : 0.023021 , bitrate : 334 kb/s
    Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 600x976 [SAR 1:1 DAR 75:122], 17 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata :
    handler_name : VideoHandler
    Stream #0:1(und) : Audio.mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 320 kb/s (default)
    Metadata :
    handler_name :SoundHandler
    Input #1,mov,mp4,m4a,3gp,3g2,mj2, from ’/storage/emulated/0/DuoQuiz/1.mp4’ :
    Metadata :
    major_brand :isom
    minor_version :0
    compatible_brands:isom3gp4
    creation_time :2016-03-21 16:05:25
    Duration : 00:00:02.73, start : 0.000000, bitrate : 229 kb/s
    Stream #1:0(eng) : Video : h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480x 175 kb/s, SAR 65536:65536 DAR 4:3, 7.69frp, 23.08 tbr, 90k tbn, 15tbc (default)
    Metadata :
    rotate :270
    creation_time :2016-03-21 16:05:25
    handler_name :VideoHandle
    Side data :
    displaymatrix : rotation of 90.00 degrees
    Stream #1:1(eng) : Audio : aac (mp4a / 0x6134706D),44100 Hz, mono, fltp, 49 kb/s (default)
    Metadata :
    creation_time :2016-03-21 16:05:25
    handler_name :SoundHandle
    Input #2,mov,mp4,m4a,3gp,mj2, from ’/storage/emulated/0/DuoQuiz/image2.mp4’ :
    Metadata :
    major_brand :isom
    minor_version :512
    compatible_brands:isomiso2avc1mp41
    encoder :Lavf56.4.101
    Duration : 00:00:02.40, start : 0.023021 , bitrate : 334 kb/s
    Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 600x976 [SAR 1:1 DAR 75:122], 17 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata :
    handler_name : VideoHandler
    Stream #0:1(und) : Audio.mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 320 kb/s (default)
    Metadata :
    handler_name :SoundHandler
    Input #3,mov,mp4,m4a,3gp,3g2,mj2, from ’/storage/emulated/0/DuoQuiz/2.mp4’ :
    Metadata :
    major_brand :isom
    minor_version :0
    compatible_brands:isom3gp4
    creation_time :2016-03-21 16:05:25
    Duration : 00:00:02.73, start : 0.000000, bitrate : 229 kb/s
    Stream #1:0(eng) : Video : h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480x 175 kb/s, SAR 65536:65536 DAR 4:3, 7.69frp, 23.08 tbr, 90k tbn, 15tbc (default)
    Metadata :
    rotate :270
    creation_time :2016-03-21 16:05:25
    handler_name :VideoHandle
    Side data :
    displaymatrix : rotation of 90.00 degrees
    Stream #1:1(eng) : Audio : aac (mp4a / 0x6134706D),44100 Hz, mono, fltp, 49 kb/s (default)
    Metadata :
    creation_time :2016-03-21 16:05:25
    handler_name :SoundHandle
    Input #4,mov,mp4,m4a,3gp,mj2, from ’/storage/emulated/0/DuoQuiz/image3.mp4’ :
    Metadata :
    major_brand :isom
    minor_version :512
    compatible_brands:isomiso2avc1mp41
    encoder :Lavf56.4.101
    Duration : 00:00:02.40, start : 0.023021 , bitrate : 334 kb/s
    Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 600x976 [SAR 1:1 DAR 75:122], 17 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata :
    handler_name : VideoHandler
    Stream #0:1(und) : Audio.mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 320 kb/s (default)
    Metadata :
    handler_name :SoundHandler
    Input #5,mov,mp4,m4a,3gp,3g2,mj2, from ’/storage/emulated/0/DuoQuiz/3.mp4’ :
    Metadata :
    major_brand :isom
    minor_version :0
    compatible_brands:isom3gp4
    creation_time :2016-03-21
    Duration : 00:00:02.73, start : 0.000000, bitrate : 229 kb/s
    Stream #1:0(eng) : Video : h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480x 175 kb/s, SAR 65536:65536 DAR 4:3, 7.69frp, 23.08 tbr, 90k tbn, 15tbc (default)
    Metadata :
    rotate :270
    creation_time :2016-03-2116:05:25
    handler_name :VideoHandle
    Side data :
    displaymatrix : rotation of 90.00 degrees
    Stream #1:1(eng) : Audio : aac (mp4a / 0x6134706D),44100 Hz, mono, fltp, 49 kb/s (default)
    Metadata :
    creation_time :2016-03-21 16:05:25
    handler_name :SoundHandle
    Input #6,mov,mp4,m4a,3gp,mj2, from ’/storage/emulated/0/DuoQuiz/image4.mp4’ :
    Metadata :
    major_brand :isom
    minor_version :512
    compatible_brands:isomiso2avc1mp41
    encoder :Lavf56.4.101
    Duration : 00:00:02.40, start : 0.023021 , bitrate : 334 kb/s
    Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 600x976 [SAR 1:1 DAR 75:122], 17 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata :
    handler_name : VideoHandler
    Stream #0:1(und) : Audio.mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 320 kb/s (default)
    Metadata :
    handler_name :SoundHandler
    Input #7,mov,mp4,m4a,3gp,3g2,mj2, from ’/storage/emulated/0/DuoQuiz/4.mp4’ :
    Metadata :
    major_brand :isom
    minor_version :0
    compatible_brands:isom3gp4
    creation_time :2016-03-21
    Duration : 00:00:02.73, start : 0.000000, bitrate : 229 kb/s
    Stream #1:0(eng) : Video : h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480x 175 kb/s, SAR 65536:65536 DAR 4:3, 7.69frp, 23.08 tbr, 90k tbn, 15tbc (default)
    Metadata :
    rotate :270
    creation_time :2016-03-2116:05:25
    handler_name :VideoHandle
    Side data :
    displaymatrix : rotation of 90.00 degrees
    Stream #1:1(eng) : Audio : aac (mp4a / 0x6134706D),44100 Hz, mono, fltp, 49 kb/s (default)
    Metadata :
    creation_time :2016-03-21 16:05:25
    handler_name :SoundHandle
    Input #8,mov,mp4,m4a,3gp,mj2, from ’/storage/emulated/0/DuoQuiz/image5.mp4’ :
    Metadata :
    major_brand :isom
    minor_version :512
    compatible_brands:isomiso2avc1mp41
    encoder :Lavf56.4.101
    Duration : 00:00:02.40, start : 0.023021 , bitrate : 334 kb/s
    Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 600x976 [SAR 1:1 DAR 75:122], 17 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata :
    handler_name : VideoHandler
    Stream #0:1(und) : Audio.mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 320 kb/s (default)
    Metadata :
    handler_name :SoundHandler
    Input #9,mov,mp4,m4a,3gp,3g2,mj2, from ’/storage/emulated/0/DuoQuiz/5.mp4’ :
    Metadata :
    major_brand :isom
    minor_version :0
    compatible_brands:isom3gp4
    creation_time :2016-03-21
    Duration : 00:00:02.73, start : 0.000000, bitrate : 229 kb/s
    Stream #1:0(eng) : Video : h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480x 175 kb/s, SAR 65536:65536 DAR 4:3, 7.69frp, 23.08 tbr, 90k tbn, 15tbc (default)
    Metadata :
    rotate :270
    creation_time :2016-03-2116:05:25
    handler_name :VideoHandle
    Side data :
    displaymatrix : rotation of 90.00 degrees
    Stream #1:1(eng) : Audio : aac (mp4a / 0x6134706D),44100 Hz, mono, fltp, 49 kb/s (default)
    Metadata :
    creation_time :2016-03-21 16:05:25
    handler_name :SoundHandle
    [AVFilterGraph @ 0x2b5b2e10] No such filter : ""
    Error configuring filter
    *

    On my computer, i try this command :

    -i image1.mp4 -i 1.mp4 -i image2.mp4 -i 2.mp4 -i image3.mp4 -i 3.mp4 -i image4.mp4 -i 4.mp4 -i image5.mp4 -i 5.mp4 -filter_complex "[0:v]scale=-1:480,pad=640:0:(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v0]; [1:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v1]; [2:v]scale=-1:480,pad=640:0:(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v2]; [3:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v3]; [4:v]scale=-1:480,pad=640:0:(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v4]; [5:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v5]; [6:v]scale=-1:480,pad=640:0:(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v6]; [7:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v7]; [8:v]scale=-1:480,pad=640:0:(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v8]; [9:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v9]; [v0][0:a][v1][1:a][v2][2:a][v3][3:a][v4][4:a][v5][5:a][v6][6:a][v7][7:a][v8][8:a][v9][9:a] concat=n=10:v=1:a=1" -y output.mp4

    That’s ok on my PC but not on my Android