Recherche avancée

Médias (91)

Autres articles (111)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

Sur d’autres sites (10549)

  • FFmpeg : canvas and crop work separately but result in black screen when combined

    25 janvier, par didi00

    I'm working on a video processing pipeline with FFmpeg, where I :

    


      

    • Create a black canvas using the color filter.
    • 


    • Crop a region from my video input.
    • 


    • Overlay the cropped region onto the black canvas.
    • 


    


    Both the canvas and the crop display correctly when tested individually. However, when I attempt to combine them (overlay the crop onto the canvas), the result is a black screen.
What Works :

    


    Black Canvas Alone :

    


    ffmpeg -filter_complex "color=c=black:s=1920x1080[out]" -map "[out]" -f nut - | ffplay 
-


    


    This shows a plain black screen, as expected.

    


    Cropped Region Alone :

    


    ffmpeg -f v4l2 -input_format yuyv422 -framerate 60 -video_size 1920x1080 -i /dev/video0 
\ -vf "crop=1024:192:0:0" -f nut - | ffplay -


    


    This shows the cropped region of the video correctly.

    


    When I combine these steps to overlay the crop onto the black canvas, I get a black screen :

    


    ffmpeg -f v4l2 -input_format yuyv422 -framerate 60 -video_size 1920x1080 -i /dev/video0 
\-filter_complex "color=c=black:s=1920x1080,format=yuv420p[background]; \
[0:v]crop=1024:192:0:0,format=yuv420p[region0]; \
[background][region0]overlay=x=0:y=0[out]" \
-map "[out]" -f nut - | ffplay -


    


    Environment :

    


      

    • OS : Linux (Debian-based)
    • 


    • FFmpeg Version : [Insert version, e.g., 4.x or 5.x]
    • 


    • Capture Card Format : yuyv422
    • 


    


    Question :

    


    Why does the pipeline result in a black screen when combining the canvas and the crop, even though both work separately ? Is this an issue with pixel format compatibility, or is there something I'm overlooking in the overlay filter setup ?

    


  • FFmpeg h264_v4l2m2m encoder changing aspect ratio from 16:9 to 1:1 with black bars

    8 janvier, par LycoReco2007

    When switching from libx264 to h264_v4l2m2m encoder in FFmpeg for YouTube streaming, the output video's aspect ratio changes from 16:9 to 1:1 with black bars on the sides, despite keeping the same resolution settings.

    


    Original working command (with libx264) :

    


    ffmpeg -f v4l2 \
    -input_format yuyv422 \
    -video_size 1280x720 \
    -framerate 30 \
    -i /dev/video0 \
    -f lavfi \
    -i anullsrc=r=44100:cl=stereo \
    -c:v libx264 \
    -preset ultrafast \
    -tune zerolatency \
    -b:v 2500k \
    -c:a aac \
    -b:a 128k \
    -ar 44100 \
    -f flv rtmp://a.rtmp.youtube.com/live2/[STREAM-KEY]


    


    When I replaced libx264 with h264_v4lm2m, it always produce a square resolution, and it automatically adds black bars to the top and the bottom of the sides of the camera. I currently using a Rasberry Pi 4 model B, with a webcam that I believe supports the 16:9 ratio (I've verified using v4l2-ctl --list-formats-ext -d /dev/video0 command)

    


    I've tried the follows :

    


      

    • Adding -aspect 16:9 parameter in the ffmpeg command
    • 


    • Adding video filters such as -vf "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1"
None of these give me the correct aspect ratio.
    • 


    


    How can I make the h264_v4l2m2m encoder maintain the original 16:9 aspect ratio without adding black bars ? Is this a known limitation of the encoder, or am I missing some required parameters ?

    


  • ffmpeg autodetect and cut black bars on video [closed]

    30 octobre 2024, par some_vasya
    FILE_SRC="$HOME/some.mp4"
CROP=$(ffmpeg -ss 00:00:15 -i "${FILE_SRC}" -t 00:00:30 -vsync vfr -vf fps=1/2,cropdetect -f null - 2>&1 | awk '/crop/ { print $NF }' | tr ' ' '\n' | sort | uniq -c | sort -n | tail -1 | awk '{ print $NF }')

# before converting, need to check
fplay -vf "${CROP}" # <-- the black stripes remain



    


    Question : how to remove black bars in video correctly so that you can watch video on TV without black bars, taking into account the definition of bars ? I am interested in a solution using ffmpeg, and not other means

    


    I tried to find a solution to work in automatic mode, but I didn't find it

    


    I="$@"
X=${I##*.}
O=${I%.*}_zoomed.${X}
f=$(which ffmpeg 2>/dev/null)
echo ${I}
C=$($f -i "$I" -t 1 -vf cropdetect -f null - 2>&1|awk '/crop/{print $NF}'|tail -n1)
echo "${C}"
echo $f -i "$I" -vf "$C" "$O"; $f -i "$I" -vf "$C" "$O"