
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (32)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...) -
Les images
15 mai 2013
Sur d’autres sites (3316)
-
ffmpeg copies and restreams HLS/TS stream to RTP/Janus but fails on HLS/fMP4 stream
6 juin 2024, par puterboyI am using
go2rtc
to generate HLS streams to stream video from a PiCamera v3 running on an RPi5 for use in Octoprint.

I also need to copy and restream the HLS stream to an RTP Janus server for Spaghetti detection.


ffmpeg
works fine on an HLS/TS (H264) stream but fails on a similar HLS/fMP4 (H264, H265, AAC) stream — however, for quality reasons, I would prefer to use an HLS/fMP4 stream.

Specifically, I am running the following :


ffmpeg -re -i -an -c:v copy -an -f rtp rtp://127.0.0.1:17732?pkt_size=1300```



It streams properly forever when STREAM_URL is in HLS/TS format but fails when in HLS/fMP4 format after about 3-4 frames.


Running
ffprobe
gives the following :

HLS/TS :


Duration: N/A, start: 0.000000, bitrate: N/A
 Program 0
 Metadata:
 variant_bitrate : 192000
 Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1536x864, 15 tbr, 90k tbn
 Metadata:
 variant_bitrate : 192000



HLS/fMP4 :


Duration: N/A, start: 0.000000, bitrate: 1248005 kb/s
 Program 0
 Metadata:
 variant_bitrate : 192000
 Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1536x864, 1248005 kb/s, 90k tbr, 90k tbn (default)
 Metadata:
 variant_bitrate : 192000
 major_brand : iso5
 minor_version : 512
 compatible_brands: iso5iso6mp41



- 

- Why does
ffmpeg
succeed on a HLS/TS stream but fail on an HLS/fMP4 stream ? - Are there any parameters or simple envelope filters I can add to
ffmpeg
that will allow it to succeed on HLS/fMP4 streams, short of a computationally intensive re-transcoding ?






- Why does
-
Trouble trimming video by frame number with ffmpeg
8 décembre 2023, par jgore200377I want to trim/split a video with ffmpeg using frames. The reason why is because I am using a Shot Transition Detection model which returns a probability of transition for every frame in the video.


Using timestamps to cut the video has yielded bad results as the precision is not 100%.


Ive tried this command which just outputs the entire video which is DEFINITELY not what I want


ffmpeg -i video.mp4 -vf "trim=start_frame=100:end_frame=200,setpts=PTS-STARTPTS" -c:a copy output.mp4



Ive also tried using python bindings with ffmpeg-python


import ffmpeg

input_file = ffmpeg.input('video.mp4')
output_file = ffmpeg.output(input_file.trim(start_frame=1300, end_frame=1500), 'test_output.mp4')
ffmpeg.run(output_file)



This doesnt work either and outputs a video with half of it being still with unpredictable length



Ive visited some other sites but none seem to have this nailed down and it would be much appreciated if someone can answer how to use frames to trim/split a video with ffmpeg.


-
Segmenting a video and adding text that differs in each segment [FFMPEG]
31 octobre 2023, par Kal-TohI have a folder full of videos I want to segment, resize and add text to. So far I've managed to segment and resize them.


I'm trying to add text in a TikTok Style : [Kind of like][1] this but black text in a white background. (If that isn't possible, I'd be fine with just white text).


I already have the font file(.oft file type, is that ok or does it need to be .ttf ?)
The video is being converted to 720x1280 (9:16) and I'd like the text to display at the top centre of the video, taking up roughly the top 25%.


Further to this, and this is where I'm having trouble understanding the process :


I'd like text at the bottom of the video in the same style, that would change each segment.


For example :


I have a 10 minute long video. I want to split this video into 60 second segments. Each segment will have a title (the same across each segment) and a sub title at the bottom that would differ for each segment (for example 'Part 1/10', 'Part 2/10' etc)


I know I could run one command to segment each video, add the title and change the aspect ratio and a second command to add the bottom text, feeding in a variable based on the number of mp4 files in the folder, however that doesn't seem like the most efficient process. Is there a way to do this all in one command ?


This is the command I'm using so far :


ffmpeg_command = [
 'ffmpeg',
 '-i', os.path.join(input_folder, video_file),
 '-vf', f'scale=720:1280:force_original_aspect_ratio=decrease,pad=720:1280:(ow-iw)/2:(oh-ih)/2
 ,drawtext=text=\'{text}\':x=(w-tw)/2:y=(h/4)-th:fontsize=24:fontfile={font_path}:fontcolor=black:box=1:boxcolor=white',
 '-threads', '100',
 "-c:a", "copy",
 '-t', str(duration),
 '-segment_time', '160', # 3 minutes
 '-reset_timestamps', '1',
 '-f', 'segment',
 os.path.join(output_subfolder, f'{video_name}_%03d.mp4')
 ]



Although not styled the way I want it to be, it's a decent start and all else works fine.


It's just the bottom text I can't figure.
[1] : https://i.insider.com/61aa608a983f360019c854a5?width=1300&format=jpeg&auto=webp