
Recherche avancée
Médias (1)
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (53)
-
Demande de création d’un canal
12 mars 2010, parEn 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, parLa 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 2011MediaSPIP 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 lxluxo23it 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
@RequestMapping("/api")
@Log4j2
public class StreamController {

 @Autowired
 VideoStreamingService videoStreamingService;

 @Autowired
 VideoService videoService;


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


THE SERVICE


@Service
public class VideoStreamingService {

 public void streamVideo(String videoPath, OutputStream outputStream, Codec codec) {

 FFmpeg ffmpeg = FFmpeg.atPath()
 .addArguments("-i", videoPath)
 .addArguments("-b:v", "5000k")
 .addArguments("-maxrate", "5000k")
 .addArguments("-bufsize", "10000k")
 .addArguments("-c:a", "aac")
 .addArguments("-b:a", "320k")
 .addArguments("-movflags", "frag_keyframe+empty_moov+faststart")
 .addOutput(PipeOutput.pumpTo(outputStream)
 .setFormat("mp4"))
 .addArgument("-nostdin");
 if (codec == Codec.AMD) {
 ffmpeg.addArguments("-profile:v", "high");
 }
 ffmpeg.addArguments("-c:v", codec.getFfmpegArgument());
 ffmpeg.execute();
 }
}



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


and here is an example from my player
the endpoint is the following


http://localhost:8080/api/stream/2?codec=AMD

screenshot

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




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


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".


-
FFmpeg slideshow with each only image only once
5 décembre 2017, par magic_alI’ve created a slideshow from a couple of
.jpg
images usingconcat
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
topassthrough
in order to only include each image once and therefore limit the resulting video size. I also triedcfr
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 triedmp4
,mkv
,avi
andmov
) in other video players.On
Ubuntu/vlc
I cannot jump through the video or it just dosn’t play at all. Same goes forMac/vlc
.Mac/quicktime
won’t open the videos at all. Myandroid
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_FI’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 :
-
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).
-
Take my exported list of
png
files and string them together somehow into a slide show. -
Version 1 here, plus some retroactive capture of clips inside master clips.
-
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.
-