Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (88)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • La gestion des forums

    3 novembre 2011, par

    Si les forums sont activés sur le site, les administrateurs ont la possibilité de les gérer depuis l’interface d’administration ou depuis l’article même dans le bloc de modification de l’article qui se trouve dans la navigation de la page.
    Accès à l’interface de modération des messages
    Lorsqu’il est identifié sur le site, l’administrateur peut procéder de deux manières pour gérer les forums.
    S’il souhaite modifier (modérer, déclarer comme SPAM un message) les forums d’un article particulier, il a à sa (...)

Sur d’autres sites (11232)

  • How can I encode a video to play on a DLink DSM-520 using FFMPEG ?

    17 octobre 2020, par tolsen64

    I have been searching, testing, and coming up with nothing for over a week. I want to use FFMPEG to convert mp4's and mkv's to AVI files that will play on my DLink DSM-520. Mencoder will do it. The files that FFMPEG generates cause the player to lock up less than a minute into the video. First, here's what I use to encode the file using Mencoder (scraped from the test.bat file that PocketDIVXEncoder generates :

    



    mencoder.exe ftwd105.mp4 -af volnorm -srate 44100 -oac mp3lame -lameopts mode=0:cbr:br=128 -noodml -vf pp=ac,scale=720:404,crop=720:400,harddup -sws 9 -ovc lavc -lavcopts vcodec=mpeg4:mbd=1:last_pred=2:vstrict=1:threads=2:vmax_b_frames=0:vbitrate=1200 -ffourcc XVID -o ftwd105_HDTV.avi


    



    The output file plays perfectly on the DSM-520. Looking at the file using FFPROBE, I see this :

    



    Input #0, avi, from 'ftwd105_HDTV.avi':
  Metadata:
    encoder         : MEncoder Redxii-SVN-r37527-4.9.3 (x86_64)
  Duration: 00:44:32.96, start: 0.000000, bitrate: 1193 kb/s
    Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], 1053 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 24k tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, s16p, 128 kb/s


    



    So now I try the same thing with FFMPEG.

    



    ffmpeg -i ftwd105.mp4 -vcodec mpeg4 -vtag XVID -b:v 1200k -s 720x400 -acodec libmp3lame -ab 128k -ar 44100 -ac 2 -f avi ftwd105_ffmpeg.avi


    



    This file does not play on the media player. It plays choppy with only clicking for sound for about 15-30 seconds, then it freezes. Looking at it with FFPROBE, it looks exactly the same as the one created by Mencoder.

    



    Input #0, avi, from 'ftwd105_ffmpeg.avi':
  Metadata:
    encoder         : Lavf57.0.100
  Duration: 00:44:33.14, start: 0.000000, bitrate: 1305 kb/s
    Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], 1165 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 24k tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, s16p, 128 kb/s


    



    So now I encode the video using Xvid4PSP. It plays perfectly fine and FFPROBE shows this :

    



    Input #0, avi, from 'ftwd105_ps2.avi':
  Metadata:
    encoder         : VirtualDubMod 1.5.10.3 | www.virtualdub-fr.org || (build 2550/release)
  Duration: 00:44:33.09, start: 0.000000, bitrate: 861 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], 723 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 128 kb/s


    



    It's using Advanced Simple Profile so I look this up and change my FFMPEG options :

    



    ffmpeg -i ftwd105.mp4 -vcodec mpeg4 -vtag XVID -b:v 1200k -s 720x400 -profile:v 15 -level 0 -acodec libmp3lame -ab 128k -ar 44100 -ac 2 -f avi ftwd105_ffmpeg.avi


    



    But though the output file looks the same using FFPROBE as the one made by Xvid4PSP, it still doesn't play on the DSM-520.

    



    Input #0, avi, from 'ftwd105_ffmpeg_asp.avi':
  Metadata:
    encoder         : Lavf57.0.100
  Duration: 00:44:33.14, start: 0.000000, bitrate: 1305 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], 1165 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 24k tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, s16p, 128 kb/s


    



    So now i'm at a loss. Is FFMPEG incapable of generating a file that the DSM-520 can play ? The reason I want to use FFMPEG over Mencoder is that it's much faster. What takes FFMPEG 15 minutes takes Mencoder 40.

    



    I should note that all the files created by FFMPEG play fine on the PC and on my Visio television. The DSM-520 is hooked up to a bedroom tv that isn't a smart tv.

    



    Edit : I also tried libxvid in place of mpeg4 with the same results.

    


  • avcodec/utils : Remove ff_codec_open2_recursive()

    27 novembre 2020, par Andreas Rheinhardt
    avcodec/utils : Remove ff_codec_open2_recursive()
    

    This function existed to enable codecs with non-threadsafe init functions
    to initialize other codecs despite the fact that normally no two codecs
    with non-threadsafe init functions can be initialized at the same time
    (there is a mutex guarding this). Yet there are no users of this
    function any more as all users have been made thread-safe (switching
    away from ff_codec_open2_recursive() was required for this as said
    function requires the caller to hold the lock to the mutex guarding the
    initializations and this is only true for codecs with the
    FF_CODEC_CAP_INIT_THREADSAFE flag unset) ; so remove it.

    Reviewed-by : Anton Khirnov <anton@khirnov.net>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavcodec/internal.h
    • [DH] libavcodec/utils.c
  • slicing and seeking extremeley small sections of video in ffmpeg

    20 février 2021, par Zarc Rowden

    I am writing a program that maps midi data to timestamps in a video. The end result is a kind of automatic generation of audio visuals for beat making or techno heads. The program takes in midi, slices a video into chunks based on the midi events and mappings and finally joins the slices into a video with 1:1 timing of monophonic midi notes to sections of a video.

    &#xA;

    When it is successful, the result is very cool and watching the video jump around and lock in to midi notes is very interesting

    &#xA;

    However, I am affraid that the ffmpeg commands I use are not giving exact results.

    &#xA;

    The code I feed to ffmpeg looks like this

    &#xA;

    EVENTS : left is midinote number, right is time from start of recording in which note occurs.

    &#xA;

      [{"note"=>"start", "timestamp"=>0.0},&#xA;   {"note"=>48, "timestamp"=>0.5700000037904829},&#xA;   {"note"=>51, "timestamp"=>383.7100000018836},&#xA;   {"note"=>45, "timestamp"=>884.3500000002678},&#xA;   {"note"=>48, "timestamp"=>999.0449999968405},&#xA;   {"note"=>51, "timestamp"=>1383.544999996957},&#xA;   {"note"=>45, "timestamp"=>1884.2599999989034},&#xA;   {"note"=>48, "timestamp"=>1998.890000002575},&#xA;   {"note"=>51, "timestamp"=>2383.4199999982957},&#xA;   {"note"=>45, "timestamp"=>2884.1000000029453},&#xA;   {"note"=>48, "timestamp"=>2998.7200000032317},&#xA;   {"note"=>51, "timestamp"=>3383.2800000018324},&#xA;   {"note"=>45, "timestamp"=>3883.894999999029},&#xA;   {"note"=>48, "timestamp"=>3998.6250000001746},&#xA;   {"note"=>51, "timestamp"=>4384.550000002491},&#xA;   {"note"=>45, "timestamp"=>4883.780000003753},&#xA;   {"note"=>48, "timestamp"=>4998.404999998456},&#xA;   {"note"=>51, "timestamp"=>5384.39500000095},&#xA;   {"note"=>45, "timestamp"=>5883.565000003728},&#xA;   {"note"=>48, "timestamp"=>5998.464999996941},&#xA;   {"note"=>51, "timestamp"=>6384.254999997211},&#xA;   {"note"=>45, "timestamp"=>6883.4550000028685},&#xA;   {"note"=>48, "timestamp"=>6998.585000001185},&#xA;   {"note"=>51, "timestamp"=>7384.055000002263},&#xA;   {"note"=>45, "timestamp"=>7883.249999998952},],&#xA;

    &#xA;

    MAPPINGS : left side is midi note, right is timestamp in seconds

    &#xA;

    {&#xA; 48=>234.3489,&#xA; 45=>124.334489,&#xA; 51=>2789.34,&#xA;}&#xA;

    &#xA;

    That Events are a sequential array of midi notes and time taken from recordings or standard midi file. The number is in milliseconds but I convert for ffmpeg before feeding the arguments.

    &#xA;

    The mappings are just in seconds and tell the program what to show when certain midi notes are encountered as we loop through the events and begin slicing the video.

    &#xA;

    The command I send to ffmpeg is constructed like this :

    &#xA;

    "ffmpeg -an -y -ss #{begin_at} -i #{project_tempfile_url} -t #{slice_duration} -c:v libx264 #{temp_url}"&#xA;

    &#xA;

    When I concatenate these slices, they only look exact when my notes are very consistent like a kickdrum doing 4/4 rythms. Anything too fast or varied creates unpleasant results.

    &#xA;

    Is there a specific set of commands that will tell ffmpeg to cut down to the frame ? I think keyframe are not an ideal answer but not sure. I also think I can adjust by making sure that I only ever map the notes to keyframes, I can settle for it but it would be great if I could just cut almost anywhere between start and end like ANYWHERE like

    &#xA;

      rand(0...video.length)&#xA;  # and then have&#xA;  332.3253613134&#xA;

    &#xA;

    But I may just be dreaming :P

    &#xA;

    Do you think that I would be better off writing a custom c program to cut frames like this ? I understand that frame rates could be an issue and that there may actually not be any data at 7.34667898999 seconds and that it might be here instead : 7.356788722342 and that ffmpeg probably searches for the nearest frame from whatever timestamp you input, but I feel like there must be a way to get good results still despite these limitations.

    &#xA;

    Thank you so much in advance for those who take the time to read this and understand this issue.

    &#xA;