Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (85)

Sur d’autres sites (10097)

  • Timestamp information of MP4

    25 juillet 2016, par Zhenjie Zhao

    I want to ask for an easy way to get the timestamp information of a mp4 file. (Sorry that I am not familiar with codec.)

    I am reading the Tobii Pro Glasses SDK document that explains how to synchronize frame with eye tracking data, where they use a terminorlogy called VTS. Goolge cannot find the exact meaning, so I want to ask for what VTS really stands for and how to get it from a mp4 file. Thanks very much !

  • FFmpeg WebP vs PNG alpha

    11 août 2022, par Yoz

    Attached x.png and x.webp (webp created from png) have transparent background covered by white X shape.

    


    For some reason FFmpeg scale filter treats the x.png and x.webp differently.
Applying scale filter on the x.webp, causes the output video alpha around the X shape to be premultiplied and so renders with ugly edges.

    


    Following commands, esp. out-webp-scale.png output demonstrates the issue :

    


    out-webp-scale.png

    


    ffmpeg -filter_complex "color=white:200x200[b];movie=x.png,[b]overlay" -y out-png.png

ffmpeg -filter_complex "color=white:200x200[b];movie=x.png,scale=200:200,[b]overlay" -y out-png-scale.png

ffmpeg -filter_complex "color=white:200x200[b];movie=x.webp,[b]overlay" -y out-webp.png

ffmpeg -filter_complex "color=white:200x200[b];movie=x.webp,scale=200:200,[b]overlay" -y out-webp-scale.png


    


    I tried all possible scale filter flags, and also format changing (before and after scale) but no luck to achieve the same result. I am able to un-premultipy the problematic one with unpremultiply filter but I would like to avoid it.

    


    I wonder if there is any workaround for having the same command for both png-s and webp-s

    


    Attachments (please note the completely white image x.png) :

    


    x.png
out-webp-scale.png

    


  • Multiple Overlay Movies in FFMPEG

    15 décembre 2014, par John Du

    I was trying to make a 3 columns by 2 row overlay in FFMEG

    I found this command which works great for a 2x2 movie overlay

    ffmpeg.exe -i video1.mp4 -i video2.mp4 -i video3.mp4 -i video4.mp4 -filter_complex "[0:0]scale=iw/2:ih/2,pad=iw*2:ih*2[a];[1:0]scale=iw/2:ih/2[b];[2:0]scale=iw/2:ih/2[c];[3:0]scale=iw/2:ih/2[d];[a][b]overlay=w[x];[x][c]overlay=0:h[y];[y][d]overlay=w:h,drawtext=fontsize=12:fontcolor=white:fontfile=/Windows/Fonts/arial.ttf:text='vid1':x=35:y=35,drawtext=fontsize=12:fontcolor=white:fontfile=/Windows/Fonts/arial.ttf:text='vid2':x=(w/2)+35:y=35,drawtext=fontsize=12:fontcolor=white:fontfile=/Windows/Fonts/arial.ttf:text='vid3':x=35:y=(h/2)+35,drawtext=fontsize=12:fontcolor=white:fontfile=/Windows/Fonts/arial.ttf:text='vid4':x=(w/2)+35:y=(h/2)+35" output.mp4

    (Same command just multiple lines only for readability)

    ffmpeg.exe -i video1.mp4 -i video2.mp4 -i video3.mp4 -i video4.mp4
    -filter_complex "[0:0]scale=iw/2:ih/2,pad=iw*2:ih*2[a];[1:0]scale=iw/2:ih/2[b];
    [2:0]scale=iw/2:ih/2[c];[3:0]scale=iw/2:ih/2[d];[a][b]overlay=w[x];
    [x][c]overlay=0:h[y];[y][d]overlay=w:h,drawtext=fontsize=12:fontcolor=white:
    fontfile=/Windows/Fonts/arial.ttf:text='vid1':x=35:y=35,drawtext=fontsize=12:
    fontcolor=white:fontfile=/Windows/Fonts/arial.ttf:text='vid2':x=(w/2)+35:y=35,drawtext=fontsize=12:fontcolor=white:
    fontfile=/Windows/Fonts/arial.ttf:text='vid3':x=35
    :y=(h/2)+35,drawtext=fontsize=12:fontcolor=white:
    fontfile=/Windows/Fonts/arial.ttf:text='vid4':x=(w/2)+35:y=(h/2)+35" output.mp4

    I had trouble adding the 2 other movies, I know you add this

    ffmpeg.exe -i video1.mp4 -i video2.mp4 -i video3.mp4 -i video4.mp4 -i video5.mp4 -i video6.mp4

    and this

    -filter_complex "[0:0]scale=iw/2:ih/2,pad=iw*3:ih*2[a];

    but positioning the last 2 movies and text is where I am lost

    image per request [edit]
    of what I want to do in organizing the overlays

    overlay of 6 videos 3x2 with text on top