Recherche avancée

Médias (0)

Mot : - Tags -/utilisateurs

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

Autres articles (91)

  • L’utiliser, en parler, le critiquer

    10 avril 2011

    La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
    Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
    Une liste de discussion est disponible pour tout échange entre utilisateurs.

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

Sur d’autres sites (10008)

  • ffmpeg "Error reinitializing filters !" on some webm videos

    9 février 2023, par The Blind Hawk

    I have a dozen of webm videos I need to resize with the following :

    


    ffmpeg -i input.webm -vf “scale=w=360:h=270:force_original_aspect_ratio=2,fps=10,crop=360:270” output.webm


    


    I tried the command and it worked fine for some webm videos, but most of the returned the following error :

    


    [AVFilterGraph @ 0x7fcb3db076c0] No such filter: '“scale'
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
[libopus @ 0x7fcb3c10a000] 1 frames left in the queue on closing
Conversion failed!


    


    I checked that ffmpeg still worked fine with previously successful files.
    
How can I get ffmpeg to work with the remaining wemb videos ?

    


  • error building ffmpeg on mac high sierra 10.13 "workspace/bin/ffmpeg' : No such file or directory"

    14 mars 2023, par Martin

    Hello I am trying to create a shell script buildffmpeg.sh which when ran, will download and build ffmpeg, so you can automate the process of making a custom ffmpeg build where the end result is an ffmpeg and ffprobe executable.

    


    If you run the below script on mac or linux, it's worked perfectly, but when I test on my older macos 10.13 version, I first got an error about my ffmpeg snapshot url being too old :
FFMPEG_URL="https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/74c4c539538e36d8df02de2484b045010d292f2c.tar.gz"
so I updated the var so it 'should' link to ffmpeg 6.0 (the most recent version, but im not sure if my link is correct)
FFMPEG_URL="https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/adb4688bfb0652b2ffa5bc29e53761e27e1a3b3e.tar.gz"

    


    When I run my below script on my mac terminal with the command $ ./buildffmpeg.sh it prints out '11' and then fails with an error :

    


    ...
INSTALL libavutil/ffversion.h
INSTALL libavutil/libavutil.pc
~11~
/Library/Developer/CommandLineTools/usr/bin/objdump: '/Users/apple/Documents/projects/buildffmpeghighsierra/workspace/bin/ffmpeg': No such file or directory


    


    With the error being workspace/bin/ffmpeg': No such file or directory

    


    Is there something wrong with how my script builds ffmpeg ?

    


    #!/bin/bash

set -e

CWD=$(pwd)
PACKAGES="$CWD/packages"
WORKSPACE="$CWD/workspace"
ADDITIONAL_CONFIGURE_OPTIONS=""


mkdir -p "$PACKAGES"
mkdir -p "$WORKSPACE"
echo '~0~'
FFMPEG_TAG="$1"
FFMPEG_URL="https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/adb4688bfb0652b2ffa5bc29e53761e27e1a3b3e.tar.gz"
echo '~1~'
FFMPEG_ARCHIVE="$PACKAGES/ffmpeg.tar.gz"
echo '~2~'
if [ ! -f "$FFMPEG_ARCHIVE" ]; then
    echo "Downloading tag ${FFMPEG_TAG}..."
    echo "~2.1~ FFMPEG_ARCHIVE=$FFMPEG_ARCHIVE"
    echo "~2.2~ FFMPEG_URL=$FFMPEG_URL"
    curl -L -k -o "$FFMPEG_ARCHIVE" "$FFMPEG_URL"
fi
echo '~3~'
EXTRACTED_DIR="$PACKAGES/extracted"
echo '~4~'
mkdir -p "$EXTRACTED_DIR"
echo '~5~'
echo "Extracting..."
tar -xf "$FFMPEG_ARCHIVE" --strip-components=1 -C "$EXTRACTED_DIR"
echo '~6~'
cd "$EXTRACTED_DIR"
echo '~7~'
echo "Building..."
echo '~8~'
# Min electron supported version
MACOS_MIN="10.10"
echo '~9~'
./configure $ADDITIONAL_CONFIGURE_OPTIONS \
    --pkgconfigdir="$WORKSPACE/lib/pkgconfig" \
    --pkg-config-flags="--static" \
    --extra-cflags="-I$WORKSPACE/include -mmacosx-version-min=${MACOS_MIN}" \
    --extra-ldflags="-L$WORKSPACE/lib -mmacosx-version-min=${MACOS_MIN}" \
    --extra-libs="-lpthread -lm" \
        --enable-static \
        --disable-securetransport \
        --disable-debug \
        --disable-shared \
        --disable-ffplay \
        --disable-lzma \
        --disable-doc \
        --enable-version3 \
        --enable-pthreads \
        --enable-runtime-cpudetect \
        --enable-avfilter \
        --enable-filters \
        --disable-libxcb \
        --enable-gpl \
        --disable-libass \
        --enable-libmp3lame \
        --enable-libx264 
echo '~10~'
make -j 4
echo '~11~'
make install
echo '~11~'
otool -L "$WORKSPACE/bin/ffmpeg"
echo '~12~'
otool -L "$WORKSPACE/bin/ffprobe"
echo '~13~'
echo "Building done. The binaries can be found here: $WORKSPACE/bin/ffmpeg $WORKSPACE/bin/ffprobe"
echo '~14~'
mkdir ffmpeg-mac/ 
echo '~15~'
cp -r "$WORKSPACE/bin/" "$CWD/ffmpeg-mac/"
echo '~16~'
rm -rf "$PACKAGES"
echo '~17~'
rm -rf "$WORKSPACE"
echo '~18~'
exit 0


    


  • "Conversion failed !" when trying to write to frame to a rmtp stream

    8 mai 2023, par Loc Bui Nhien

    I'm trying to write video frames to an RTMP stream using FFMPEG and Python subsystem. The code will try to get videos in a 'ReceivedRecording' then it is stream to a RTMP streaming server using nginx. My method seems to work, but at times, the code will stop running due to

    


    [flv @ 0x55b933694b40] Failed to update header with correct duration.
[flv @ 0x55b933694b40] Failed to update header with correct filesize.


    


    and

    


    Conversion failed

    


    then

    


    BrokenPipeError: [Errno 32] Broken pipe

    


    Here my implementation of the task :

    


    import subprocess
import cv2
rtmp_url = "rtmp://..."

path = 'ReceivedRecording'

received_video_path = 'ReceivedRecording'
while True:
    video_files = [filenames for filenames in sorted(
        os.listdir(received_video_path))]
    # Loop through the videos and concatenate them
    for filename in video_files[:len(video_files)-1]:
        video = cv2.VideoCapture(os.path.join(received_video_path, filename))

        if p is None:
            fps = int(video.get(cv2.CAP_PROP_FPS))
            width = int(video.get(cv2.CAP_PROP_FRAME_WIDTH))
            height = int(video.get(cv2.CAP_PROP_FRAME_HEIGHT))
            # command and params for ffmpeg
            command = ['ffmpeg',
                        '-y',
                        '-f', 'rawvideo',
                        '-vcodec', 'rawvideo',
                        '-pix_fmt', 'bgr24',
                        '-s', "{}x{}".format(width, height),
                        '-re',
                        '-r', '5',
                        '-i', '-',
                        # '-filter:v', 'setpts=4.0*PTS',
                        '-c:v', 'libx264',
                        '-pix_fmt', 'yuv420p',
                        '-preset', 'ultrafast',
                        '-tune','zerolatency',
                        '-vsync','vfr',
                        # '-crf','23',
                        '-f', 'flv',
                        rtmp_url]
            
            # using subprocess and pipe to fetch frame data
            p = subprocess.Popen(command, stdin=subprocess.PIPE)
        else:

            # Loop through the frames of each video
            while True:
                start_time = time.time()

                ret, frame = video.read()
                if not ret:
                    # End of video, move to next video
                    video.release()
                    break

                p.stdin.write(frame.tobytes())

            os.remove(os.path.join(received_video_path, filename))


    


    Here is my nginx rtmp settings :

    


    rtmp {
    server {
        listen 1935;
        chunk_size 7096;

        application live {
            live on;
            record off;
            push rtmp://...;
        }
    }
}


    


    Here is the log file :

    


    av_interleaved_write_frame(): Connection reset by peer
No more output streams to write to, finishing.
[flv @ 0x5561d1ca9b40] Failed to update header with correct duration.
[flv @ 0x5561d1ca9b40] Failed to update header with correct filesize.
Error writing trailer of rtmp://...: Connection reset by peer
frame=    1 fps=0.0 q=20.0 Lsize=    1024kB time=00:00:00.00 bitrate=8390776.0kbits/s speed=0.00619x
video:1053kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (pipe:):
  Input stream #0:0 (video): 1 packets read (11059200 bytes); 1 frames decoded;
  Total: 1 packets (11059200 bytes) demuxed
Output file #0 (rtmp://...):
  Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (1077799 bytes);
  Total: 1 packets (1077799 bytes) muxed
1 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x5561d1cad380] Statistics: 0 seeks, 35 writeouts
[rtmp @ 0x5561d1cb7b80] Deleting stream...
[libx264 @ 0x5561d1caae40] frame I:1     Avg QP:20.00  size:1077192
[libx264 @ 0x5561d1caae40] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0x5561d1caae40] coded y,uvDC,uvAC intra: 92.2% 50.5% 10.2%
[libx264 @ 0x5561d1caae40] i16 v,h,dc,p: 34% 16% 37% 12%
[libx264 @ 0x5561d1caae40] i8c dc,h,v,p: 35% 23% 33%  9%
[libx264 @ 0x5561d1caae40] kb/s:43087.68
[AVIOContext @ 0x5561d1ca6a80] Statistics: 11059200 bytes read, 0 seeks
Conversion failed!