Recherche avancée

Médias (1)

Mot : - Tags -/berlin

Autres articles (53)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (10073)

  • FFmpeg Streaming Video SpringBoot endpoint not show video duration in video players

    7 avril 2024, par lxluxo23

    it turns out that I've been working on a personal project just out of curiosity.
the main function is to stream video by first encoding it through ffmpeg
then playback said video from any other device
call it "plex" very very primitive

    


    although I achieve my goal which is to encode and send the video to the devices that make the request
this video is sent so to speak as a live broadcast.
I can only pause it, no forward or rewind, anyone have any idea what I am doing wrong or if I should take some other approach either in my service or controller ?

    


    I leave fragments of my code

    


    THE CONTROLLER

    


    @RestController&#xA;@RequestMapping("/api")&#xA;@Log4j2&#xA;public class StreamController {&#xA;&#xA;    @Autowired&#xA;    VideoStreamingService videoStreamingService;&#xA;&#xA;    @Autowired&#xA;    VideoService videoService;&#xA;&#xA;&#xA;    @GetMapping("/stream/{videoId}")&#xA;    public ResponseEntity<streamingresponsebody> livestream(@PathVariable Long videoId,@RequestParam(required = false)  String codec) {&#xA;        Video video = videoService.findVideoById(videoId);&#xA;        if (video != null) {&#xA;            Codec codecEnum = Codec.fromString(codec);&#xA;            return ResponseEntity.ok()&#xA;                    .contentType(MediaType.valueOf("video/mp4"))&#xA;                    .body(outputStream -> videoStreamingService.streamVideo(video.getPath(), outputStream,codecEnum));&#xA;        }&#xA;        return ResponseEntity.notFound().build();&#xA;    }&#xA;}&#xA;</streamingresponsebody>

    &#xA;

    THE SERVICE

    &#xA;

    @Service&#xA;public class VideoStreamingService {&#xA;&#xA;    public void streamVideo(String videoPath, OutputStream outputStream, Codec codec) {&#xA;&#xA;        FFmpeg ffmpeg = FFmpeg.atPath()&#xA;                .addArguments("-i", videoPath)&#xA;                .addArguments("-b:v", "5000k")&#xA;                .addArguments("-maxrate", "5000k")&#xA;                .addArguments("-bufsize", "10000k")&#xA;                .addArguments("-c:a", "aac")&#xA;                .addArguments("-b:a", "320k")&#xA;                .addArguments("-movflags", "frag_keyframe&#x2B;empty_moov&#x2B;faststart")&#xA;                .addOutput(PipeOutput.pumpTo(outputStream)&#xA;                        .setFormat("mp4"))&#xA;                .addArgument("-nostdin");&#xA;        if (codec == Codec.AMD) {&#xA;            ffmpeg.addArguments("-profile:v", "high");&#xA;        }&#xA;        ffmpeg.addArguments("-c:v", codec.getFfmpegArgument());&#xA;        ffmpeg.execute();&#xA;    }&#xA;}&#xA;

    &#xA;

    I have some enums to vary the encoding and use hardware acceleration or not.

    &#xA;

    and here is an example from my player&#xA;the endpoint is the following

    &#xA;

    http://localhost:8080/api/stream/2?codec=AMD&#xA;screenshot

    &#xA;

    I'm not sure if there's someone with more knowledge in either FFmpeg or Spring who could help me with this minor issue, I would greatly appreciate it. I've included the URL of the repository in case anyone would like to review it when answering my question

    &#xA;

    repo

    &#xA;

    I tried changing the encoding format.&#xA;I tried copying the metadata from the original video.&#xA;I tried sending a custom header.&#xA;None of this has worked.

    &#xA;

    I would like to achieve what is mentioned in many sites, which is when you load a video from the network, the player shows how much of that video you have in the local "buffer".

    &#xA;

  • FFmpeg slideshow with each only image only once

    5 décembre 2017, par magic_al

    I’ve created a slideshow from a couple of .jpg images using concat and the following input file.

    file '/tmp/tmpBlRyrb/images/0001.jpg'
    duration 5
    file '/tmp/tmpBlRyrb/images/0002.jpg'
    duration 8
    file '/tmp/tmpBlRyrb/images/0003.jpg'
    duration 3
    file '/tmp/tmpBlRyrb/images/0004.jpg'
    duration 3
    file '/tmp/tmpBlRyrb/images/0005.jpg'
    duration 8
    file '/tmp/tmpBlRyrb/images/0006.jpg'
    duration 3
    file '/tmp/tmpBlRyrb/images/0007.jpg'
    duration 14
    file '/tmp/tmpBlRyrb/images/0008.jpg'
    duration 14
    file '/tmp/tmpBlRyrb/images/0009.jpg'
    duration 18
    file '/tmp/tmpBlRyrb/images/0009.jpg'

    I set vsync to passthrough in order to only include each image once and therefore limit the resulting video size. I also tried cfr resulting in a much larger video since the frames are duplicated.

    So I ended up with the following command :

    ./ffmpeg -f concat -safe 0 -i /tmp/tmpBlRyrb/durations.txt -vsync 2 -vcodec copy video.mp4

    The resulting video works fine in Ubuntus’ Totem video player. However, I experience a bunch of different problems depending on the container format (I tried mp4, mkv, avi and mov) in other video players.

    On Ubuntu/vlc I cannot jump through the video or it just dosn’t play at all. Same goes for Mac/vlc. Mac/quicktime won’t open the videos at all. My android phone hangs completely and I’ve to restart it.

    How can I create a slideshow from images which include each image only once in order to limit the file size of the video and make sure that it plays in all players/on all devices using FFmpeg ?

  • FFmpeg Video Library Quick Review

    3 juillet 2019, par Rich_F

    I’m in need of reducing 18 videos so I can review them daily. I’d like to script some kind of compression or sampling using FFmpeg to not have to sit through 6 hours of video every day.

    What is the best way to review 6 hours of videos captured every day on SD cards ? The videos come in two cards, a 32 GB card ( 4 hours) and a 16 GB card ( 2 hours).

    Currently, I’m concatenating all videos and creating a screenshot every 3 seconds, which seems the longest I can go without missing something in the field of view (a vehicle will enter/leave). Still, this is thousands of images per card, and I select all, then preview and scroll down using page up/down. Any vehicle quickly appears in the thumbnails. This system isn’t bad, but I’m always inquisitive. I’m looking for more ways of sampling or seeing if any motion detection or frame analysis might register where I should be looking in my library of original captured videos.

    Options :

    1. Motion capture by analysis of frame by frame through trial and error on sensitivity to not measure wind on the bushes. This could be output to filename and time within the video (videos are captured 10 minutes long).

    2. Take my exported list of png files and string them together somehow into a slide show.

    3. Version 1 here, plus some retroactive capture of clips inside master clips.

    4. Some kind of compression. Again, I have to respect the 3-second max jump.

    Any other options that would be relatively easy to achieve without moving into any other software ? I’m trying to put the heavy lifting on the computer, as staring at videos is not something I’m finding I’ll be able to do for many days.