Recherche avancée

Médias (0)

Mot : - Tags -/xml-rpc

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

Autres articles (77)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (16510)

  • Shotdetect : compiling error ("undefined reference")

    8 juillet 2015, par Voprosnik

    I am using Cygwin and I trying to install the program Shotdetect. I downloaded the source with git and also downloaded, compiled and installed ffmpeg through git.

    Installation of shotdetect doesn’t follow the ./configure && make && make install routine, but a cmake system of which I have no experience. Nonetheless there is a script that automates compiling and installation.

    Near the final stages of the compiling, I get a long series of errors concerning some ffmpeg modules :

    Linking CXX executable shotdetect-cmd.exe
    /usr/local/lib/libavformat.a(matroskadec.o): In function `matroska_decode_buffer':
    /git/ffmpeg/libavformat/matroskadec.c:1321: undefined reference to `BZ2_bzDecompressInit'
    /git/ffmpeg/libavformat/matroskadec.c:1336: undefined reference to `BZ2_bzDecompress'
    /git/ffmpeg/libavformat/matroskadec.c:1329: undefined reference to `BZ2_bzDecompressEnd'
    /git/ffmpeg/libavformat/matroskadec.c:1339: undefined reference to `BZ2_bzDecompressEnd'
    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_decode_subpacket':
    /git/ffmpeg/libavcodec/opusdec.c:374: undefined reference to `swr_is_initialized'
    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_decode_frame':
    /git/ffmpeg/libavcodec/opusdec.c:220: undefined reference to `swr_is_initialized'
    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_init_resample':
    /git/ffmpeg/libavcodec/opusdec.c:161: undefined reference to `swr_init'
    /git/ffmpeg/libavcodec/opusdec.c:167: undefined reference to `swr_convert'
    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_decode_frame':
    /git/ffmpeg/libavcodec/opusdec.c:234: undefined reference to `swr_convert'
    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_flush_resample':
    /git/ffmpeg/libavcodec/opusdec.c:115: undefined reference to `swr_convert'
    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_decode_subpacket':
    /git/ffmpeg/libavcodec/opusdec.c:406: undefined reference to `swr_close'
    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_decode_flush':
    /git/ffmpeg/libavcodec/opusdec.c:567: undefined reference to `swr_close'
    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_decode_close':
    /git/ffmpeg/libavcodec/opusdec.c:589: undefined reference to `swr_free'
    /usr/local/lib/libavcodec.a(opusdec.o): In function `opus_decode_init':
    /git/ffmpeg/libavcodec/opusdec.c:642: undefined reference to `swr_alloc'
    /usr/local/lib/libavcodec.a(tiff.o): In function `tiff_uncompress_lzma':
    /git/ffmpeg/libavcodec/tiff.c:396: undefined reference to `lzma_stream_decoder'
    /git/ffmpeg/libavcodec/tiff.c:401: undefined reference to `lzma_code'
    /git/ffmpeg/libavcodec/tiff.c:402: undefined reference to `lzma_end'
    /usr/local/lib/libavcodec.a(utils.o): In function `recode_subtitle':
    /git/ffmpeg/libavcodec/utils.c:2672: undefined reference to `libiconv_open'
    /git/ffmpeg/libavcodec/utils.c:2707: undefined reference to `libiconv_close'
    /git/ffmpeg/libavcodec/utils.c:2693: undefined reference to `libiconv'
    /git/ffmpeg/libavcodec/utils.c:2694: undefined reference to `libiconv'
    /git/ffmpeg/libavcodec/utils.c:2707: undefined reference to `libiconv_close'
    /git/ffmpeg/libavcodec/utils.c:2707: undefined reference to `libiconv_close'
    /git/ffmpeg/libavcodec/utils.c:2707: undefined reference to `libiconv_close'
    /usr/local/lib/libavcodec.a(utils.o): In function `avcodec_open2':
    /git/ffmpeg/libavcodec/utils.c:1698: undefined reference to `libiconv_open'
    /git/ffmpeg/libavcodec/utils.c:1705: undefined reference to `libiconv_close'
    collect2: error: ld returned 1 exit status
    clang: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation)
    CMakeFiles/shotdetect-cmd.dir/build.make:122: recipe for target 'shotdetect-cmd.exe' failed
    make[2]: *** [shotdetect-cmd.exe] Error 1
    CMakeFiles/Makefile2:95: recipe for target 'CMakeFiles/shotdetect-cmd.dir/all' failed
    make[1]: *** [CMakeFiles/shotdetect-cmd.dir/all] Error 2
    Makefile:117: recipe for target 'all' failed
    make: *** [all] Error 2

    Searching online for similar errors, I found the following proposed solutions

    1) fix pkg-config setup so configure will find out all dependencies ;

    2) build ffmpeg (libavcodec) without external dependencies ;

    3) add external dependencies manually with configure —extra-ldflags

    I guess the problem lies on how i compiled ffmpeg (just configure with no options) but other than that have no idea what to do with either of the above suggestions. Should I recompile ffmpeg with different options ?

  • Bash script having custom functions not running under systemd service

    13 août, par nightcrawler

    I have this script to get images from a webcam & process them via RKNN NPU

    


    #!/bin/bash

# Define the temporary directory for images
TEMP_DIR="/media/32GB/pics"
# Define the resize/letterbox option
RESIZE_OPTION="letterbox"  # or "letterbox" depending on your requirement
# Define the output image path pattern
OUTPUT_IMAGE_PATH="/media/32GB/processed_pics/%Y-%m-%d_%H-%M-%S_processed.jpg"
# Define the path to the rknn_yolov5_demo_Linux binar
BINARY_PATH="$HOME/ezrknn-toolkit2/rknpu2/examples/rknn_yolov5_demo/install/rknn_yolov5_demo_Linux"
# Define ntfy variables
NTFY_URL="https://ntfy.org/ho"
NTFY_USER="xxx"
NTFY_PASS="xxxx"

# Empty existing content
rm "$TEMP_DIR"/*
# Function to run ffmpeg and write images to temporary files
run_ffmpeg() {
    v380 -u xxxx -p xxxx -addr 192.168.1.xxx | ffmpeg -i - -f image2 -vf fps=3 -strftime 1 "$TEMP_DIR/%Y-%m-%d_%H-%M-%S_cap.jpg" -y
}

# Function to run rknn_yolov5_demo_Linux and process images from temporary files
run_rknn_yolov5_demo() {
    while true; do
        # Find the most recent image file in the temporary directory
        IMAGE_PATH=$(ls -t "$TEMP_DIR"/*.jpg | head -n 1)

        # Check if the image path is not empty
        if [ -n "$IMAGE_PATH" ]; then
            # Define the output image path
            OUTPUT_IMAGE=$(date +"$OUTPUT_IMAGE_PATH")

            # Change to the binary directory and set LD_LIBRARY_PATH
            DETECTION_OUTPUT=$(cd "$BINARY_PATH" && LD_LIBRARY_PATH=./lib ./rknn_yolov5_demo ./model/RK3566_RK3568/yolov5s-640-640.rknn "$IMAGE_PATH" "$RESIZE_OPTION" "$OUTPUT_IMAGE")

            # Check if the detection output contains the word "person"
            if echo "$DETECTION_OUTPUT" | grep -q "person"; then
                echo "Human detected. Saving processed image to $OUTPUT_IMAGE"
                rm "$IMAGE_PATH"
                # Upload the image using the imgur binary and capture the link
                UPLOAD_OUTPUT=$(imgur "$OUTPUT_IMAGE")
                UPLOAD_LINK=$(echo "$UPLOAD_OUTPUT" | grep -m 1 '^http')

                if [ -n "$UPLOAD_LINK" ]; then
                    echo "Image uploaded successfully. Link: $UPLOAD_LINK"
                    # Send ntfy notification with the image link
                    curl -u $NTFY_USER:$NTFY_PASS -H "tags:rotating_light" -H "Attach:$UPLOAD_LINK" -d "Human detected" $NTFY_URL
                else
                    echo "Failed to upload image."
                fi
            else
                rm "$OUTPUT_IMAGE"
                rm "$IMAGE_PATH"
            fi
        fi

        # Sleep for a short period to avoid high CPU usage
        sleep 1
    done
}


# Run ffmpeg and rknn_yolov5_demo_Linux in the background
run_ffmpeg &
run_rknn_yolov5_demo &


    


    & the corresponding .service file

    


    [Unit]
Description=Process Images with rknn_yolov5_demo
After=network.target
#StartLimitIntervalSec=60
#StartLimitBurst=5

[Service]
Type=simple
ExecStartPre=/bin/sleep 30
ExecStart=/home/xxx/process_images_rknn.sh
Restart=always
RestartSec=3
TimeoutStartSec=60

[Install]
WantedBy=default.target


    


    Now last x2 lines of script are creating problems.

    


    Case1] If I keep like this htop shows no initiation of ffmpeg nor rknn Binaries

    


    Case2] I removed & from both lines then only ffmpeg runs but rknn is nowhere in htop

    


    Case3] Only this case works

    


    run_ffmpeg &
run_rknn_yolov5_demo


    


    I am reloading systemctl daemon & restarting service after script modification in each case

    


  • muxing DVB subtitles into transport stream with ffmpeg

    28 novembre 2019, par user3439130

    So i have H264 video + AAC audio muxed inside transport stream (*.ts). To achive evenly spread PCR values i added muxrate tag to my command.

    ffmpeg -analyzeduration 20000000 -probesize 20M -loglevel verbose -i 1135084.m4v -i 1135084.m4a -c copy -muxrate 7982K -map 0:v:0 -map 1:a:0 -metadata:s:a:0 language=eng -metadata:s:a:0 tms_track_id=169451954 TEMP0.ts

    Since our client need DVB substitles we convert SRT to DVD with subtitle edit and then encode them to DVB with ffmpeg with this command :

    ffmpeg -analyzeduration 20000000 -probesize 20M -loglevel verbose -i TEMP0.ts -i out.da.idx -map 0 -c copy -muxrate 7992K -map 1:s -c:s:0 dvbsub -metadata:s:s:0 language=dan TEMP1.ts

    here is output from ffmpeg command :

    ffmpeg version git-2019-11-18-d831edc Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 9.2.1 (GCC) 20191010
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
     libavutil      56. 36.100 / 56. 36.100
     libavcodec     58. 62.100 / 58. 62.100
     libavformat    58. 35.100 / 58. 35.100
     libavdevice    58.  9.101 / 58.  9.101
     libavfilter     7. 66.100 /  7. 66.100
     libswscale      5.  6.100 /  5.  6.100
     libswresample   3.  6.100 /  3.  6.100
     libpostproc    55.  6.100 / 55.  6.100
    [h264 @ 000002bf7460d400] non-existing SPS 0 referenced in buffering period
    [h264 @ 000002bf7460d400] SPS unavailable in decode_picture_timing
    [h264 @ 000002bf7460d400] non-existing SPS 0 referenced in buffering period
    [h264 @ 000002bf7460d400] SPS unavailable in decode_picture_timing
    [h264 @ 000002bf7460d400] Reinit context to 1920x1088, pix_fmt: yuv420p
    [mpegts @ 000002bf7460ae00] max_analyze_duration 20000000 reached at 20000000 microseconds st:0
    [mpegts @ 000002bf7460ae00] start time for stream 2 is not set in estimate_timings_from_pts
    Input #0, mpegts, from 'TEMP1.ts':
     Duration: 01:51:54.48, start: 1.440000, bitrate: 7992 kb/s
     Program 1
       Metadata:
         service_name    : Service01
         service_provider: FFmpeg
       Stream #0:0[0x100]: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(progressive, left), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
       Stream #0:1[0x101](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 254 kb/s
       Stream #0:2[0x102](dan): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
    [vobsub @ 000002bf75d65940] IDX/SUB: out.fi.idx -> out.fi.sub
    Input #1, vobsub, from 'out.fi.idx':
     Duration: N/A, bitrate: N/A
       Stream #1:0[0x0](fi): Subtitle: dvd_subtitle, 1920x1080 (default)
    File 'TEMP2.ts' already exists. Overwrite? [y/N] y
    [mpegts @ 000002bf74634f00] service 1 using PCR in pid=256, pcr_period=20ms
    [mpegts @ 000002bf74634f00] muxrate 8002000, sdt every 500 ms, pat/pmt every 100 ms
    Output #0, mpegts, to 'TEMP2.ts':
     Metadata:
       encoder         : Lavf58.35.100
       Stream #0:0: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(progressive, left), 1920x1080 (0x0) [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
       Stream #0:1(eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 254 kb/s
       Stream #0:2(dan): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
       Stream #0:3(fin): Subtitle: dvb_subtitle (dvbsub), 1920x1080 (default)
       Metadata:
         encoder         : Lavc58.62.100 dvbsub
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
     Stream #0:2 -> #0:2 (copy)
     Stream #1:0 -> #0:3 (dvd_subtitle (dvdsub) -> dvb_subtitle (dvbsub))
    Press [q] to stop, [?] for help
    No more output streams to write to, finishing.me=01:51:46.51 bitrate=7990.2kbits/s speed=18.2x
    frame=167862 fps=456 q=-1.0 Lsize= 6558750kB time=01:51:54.47 bitrate=8002.0kbits/s speed=18.2x
    video:5738580kB audio:212004kB subtitle:10989kB other streams:0kB global headers:0kB muxing overhead: 10.017118%
    Input file #0 (TEMP1.ts):
     Input stream #0:0 (video): 167862 packets read (5876305439 bytes);
     Input stream #0:1 (audio): 314742 packets read (217092443 bytes);
     Input stream #0:2 (subtitle): 1740 packets read (5578504 bytes);
     Total: 484344 packets (6098976386 bytes) demuxed
    Input file #1 (out.fi.idx):
     Input stream #1:0 (subtitle): 855 packets read (6881158 bytes); 854 frames decoded;
     Total: 855 packets (6881158 bytes) demuxed
    Output file #0 (TEMP2.ts):
     Output stream #0:0 (video): 167862 packets muxed (5876305439 bytes);
     Output stream #0:1 (audio): 314742 packets muxed (217092443 bytes);
     Output stream #0:2 (subtitle): 1740 packets muxed (5578504 bytes);
     Output stream #0:3 (subtitle): 1708 frames encoded; 1708 packets muxed (5673736 bytes);
     Total: 486052 packets (6104650122 bytes) muxed
    [AVIOContext @ 000002bf7463c280] Statistics: 0 seeks, 25621 writeouts
    [AVIOContext @ 000002bf74613f80] Statistics: 6728300448 bytes read, 2 seeks
    [AVIOContext @ 000002bf75efde40] Statistics: 7852032 bytes read, 0 seeks
    [AVIOContext @ 000002bf74f30e40] Statistics: 40275 bytes read, 0 seeks

    So i have video/audio and two dvb tracks inside one TS.

    Now im adding third subtitle and i get this warning :

    frame=32351 fps=869 q=-1.0 size= 1255936kB time=00:21:33.99 bitrate=7951.1kbits/s speed=34.8x
    [mpegts @ 0x2994600] Non-monotonous DTS in output stream 0:3; previous: 116868609, current: 116868607; changing to 116868610. This may result in incorrect timestamps in the output file.
    frame=33416 fps=886 q=-1.0 size= 1297408kB time=00:22:16.56 bitrate=7952.0kbits/s speed=35.4x

    By this warning it seems that something is not right with DVB (0:3) Finish track.
    Playing back the file with VLC i can see that Finish subtitles (between 21:33 and 22:16) are not showing up.

    Dumping packets from 0:3 track i see that 4 packets have the same DTS/PTS values.

    #stream#, dts,        pts, duration,     size, hash
    0,  111258000,  111258000,        0,     6979, 6215f060, S=1,        1, 67d220bc
    0,  111689100,  111689100,        0,       25, e60e94fa, S=1,        1, 67d220bc
    0,  113230800,  113230800,        0,     4423, f811be62, S=1,        1, 67d220bc
    0,  113561550,  113561550,        0,       25, 6db8d81f, S=1,        1, 67d220bc
    0,  113788800,  113788800,        0,     8247, 8b494779, S=1,        1, 67d220bc
    0,  114191190,  114191190,        0,       25, a205e183, S=1,        1, 67d220bc

    0,  116868607,  116868607,        0,     1119, e5d11188, S=1,        1, 67d220bc
    0,  116868607,  116868607,        0,       28, 11e09861, S=1,        1, 67d220bc
    0,  116868607,  116868607,        0,     1122, 8320a3f5, S=1,        1, 67d220bc
    0,  116868607,  116868607,        0,       28, e896fa37, S=1,        1, 67d220bc

    0,  117205200,  117205200,        0,     3583, 47b23f27, S=1,        1, 67d220bc
    0,  117611640,  117611640,        0,       25, e5ae32ed, S=1,        1, 67d220bc
    0,  117709200,  117709200,        0,     1119, 208b4f80, S=1,        1, 67d220bc
    0,  117830970,  117830970,        0,       25, 2a130b71, S=1,        1, 67d220bc
    0,  117846000,  117846000,        0,     3105, f179a4f0, S=1,        1, 67d220bc
    0,  118148040,  118148040,        0,       25, 29b3ad66, S=1,        1, 67d220bc
    0,  120146410,  120146410,        0,     1119, 714ef5d1, S=1,        1, 67d220bc
    0,  120146410,  120146410,        0,       28, bbad7fed, S=1,        1, 67d220bc
    0,  120708000,  120708000,        0,     2060, 703084f7, S=1,        1, 67d220bc
    0,  120855420,  120855420,        0,       25, 6db8d81f, S=1,        1, 67d220bc
    0,  121122000,  121122000,        0,     2184, 04a7be71, S=1,        1, 67d220bc
    0,  121395330,  121395330,        0,       25, a205e183, S=1,        1, 67d220bc

    Thes are the lines from SRT file where the warning happens :

    146
    00:21:34,840 --> 00:21:36,600
    Make!
    147
    00:21:42,280 --> 00:21:46,800
    Make! Hei, Make. Make!
    148
    00:21:47,880 --> 00:21:49,240
    Make!
    149
    00:21:49,400 --> 00:21:52,760
    Odota minua, Make!
    150
    00:22:00,400 --> 00:22:01,760
    Make!

    Sometimes muxing subtitles in different order (for example Finish before Danish and then Swedish) would solve this problem, but i would like to know why such things are happening.