Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (74)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (6730)

  • Revision 35436 : Petites pétouilles en passant par là (écriture aux dernières normes ...

    22 février 2010, par marcimat@… — Log

    Petites pétouilles en passant par là (écriture aux dernières normes ISO)…

  • ffmpeg - how to handle video and audio URL's streams separately ?

    13 mai 2022, par Rubem Pacelli

    I am trying to create a zsh function that uses youtube-dl and ffmpeg to download a portion of a YouTube video. I did achieve this goal with the following function :

    


    # $1 - youtube URL
# $2 - start position in hh:mm:ss.msms format (ms=miliseconds)
# $3 - final position in hh:mm:ss.msms format (ms=miliseconds)
# $4 - output file name (optional)
function youtubedl_snippet()(
  local url_stream=$(youtube-dl -f best --get-url $1)
  local output_name=$(youtube-dl --get-title $1)

  ffmpeg -ss $2 -to $3 -i $url_stream -c:v copy -c:a copy ${4:-"$output_name.mp4"}
)


    


    The command youtube-dl -f best --get-url $1 return a single URL with the best possible quality. In order to understand better how ffmpeg works, I tried to create another function with the same goal but with a different approach :

    


    # $1 - youtube URL
# $2 - start position in hh:mm:ss.msms format (ms=miliseconds)
# $3 - final position in hh:mm:ss.msms format (ms=miliseconds)
# $4 - output file name (optional)
# $5 - output video codec type (optional, for instance: libx264)
# $6 - output audio codec type (optional, for instance: aac)
function youtubedl_snippet2()(
  local url_streams=$(youtube-dl --get-url $1)
  local output_name=$(youtube-dl --get-title $1)

  local url_array=(${(f)url_streams}) # expand urls by lines url_array[1] -> video stream url_array[2] -> audio stream

  ffmpeg -ss $2 -to $3 -i ${url_array[1]} -ss $2 -to $3 -i ${url_array[2]} -map 0:v -map 1:a -c:v ${5:-copy} -c:a ${6:-copy} ${4:-"$output_name.mp4"}
)


    


    What I suppose that is going on here :

    


      

    1. url_streams is a line-separated URL. url_array[1] is the video URL and url_array[2] is the audio URL.
    2. 


    3. I am setting both audio and video to the same intervals.
    4. 


    5. I mapped the first stream to video, and the second to audio
    6. 


    7. If $5 and $6 does not give different codecs, ffmpeg just copy from the original source.
    8. 


    


    Well, it seems that everything is ok. But when I try

    


    start=$SECONDS; youtubedl_snippet2 'https://www.youtube.com/watch?v=g-_hVXzkn0o' 00:00:05.00 00:00:15.00; echo "it takes $(( SECONDS - start )) seconds"


    


    It will take 368 seconds. Moreover, I cannot open it in my android (only audio works)

    


    enter image description here

    


    On the other hand,

    


    start=$SECONDS; youtubedl_snippet 'https://www.youtube.com/watch?v=g-_hVXzkn0o' 00:00:05.00 00:00:15.00; echo "it takes $(( SECONDS - start )) seconds"


    


    takes only 40 seconds, and the video can be played on Android.

    


    Here is the youtubedl_snippet log file. And here is the youtubedl_snippet2 log file.

    


  • run ffmpeg commands from my own project

    28 octobre 2013, par bruno

    I'm starting a project where I want ppl to upload videos of a talk and a the video of slides for that talk and want to merge them (to play at the same time) and then show results.

    My question is :
    Is it possible to do that from code ? if it is, can you point me to the right doc ?
    I was able to do it running command line, but as I want this to run on a server with different ppl uploading their videos I think this would not be the best approach.
    I have a preference for Java if it's possible to do it, but I can manage to use other languages what do you guys suggest ?

    The idea would be to have a service where I can point the urls of the videos stored in my server and it would merge them and save file where I can later stream. With different ppl uploading videos at the same time and being able to watch the result in a reasonable amount of time.

    I used this tutorial to test :
    https://trac.ffmpeg.org/wiki/Create%20a%20mosaic%20out%20of%20several%20input%20videos

    Thanks for your time