
Recherche avancée
Médias (91)
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Paul Westerberg - Looking Up in Heaven
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Le Tigre - Fake French
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Thievery Corporation - DC 3000
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Dan the Automator - Relaxation Spa Treatment
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Gilberto Gil - Oslodum
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (103)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
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 (...)
Sur d’autres sites (6894)
-
Cut a video in between key frames without re-encoding the full video using ffpmeg ? [closed]
13 juillet 2024, par bguizI would like to cut a video at the beginning at any particular timestamp, and it need to be precise, so the nearest key frame is not good enough.


Also, these videos are rather long - an hour or longer - so I would like to avoid re-encoding this altogether if possible, or otherwise only re-encode a minimal fraction of the total duration. Thus, would like to maximise the use of
-vcodec copy
.

How can I accomplish this using
ffmpeg
?

NOTE : See scenario, and my own rough idea for a possible solution below.



Scenario :


- 

- Original video

- 

- Length of 1:00:00
- Has a key frame every 10s






- Desired cut :

- 

- From 0:01:35 through till the end




- Attempt #1 :

- 

- Using
-ss 0:01:35 -i blah.mp4 -vcodec copy
, what results is a file where : - audio starts at 0:01:30
- video also starts at 0:01:30
- this starts both the audio and the video too early










- Using
- using
-i blah.mp4 -ss 0:01:35 -vcodec copy
, what results is a file where :
- 

- audio starts at 0:01:35,
- but the video is blank/ black for the first 5 seconds,

- 

- until 0:01:40, when the video starts




- this starts the audio on time,
but the video starts too late



















Rough idea


- 

- (1) cut 0:01:30 to 0:01:40

- 

- re-encode this to have new key frames,
including one at the target time of 0:01:35
- then cut this to get the 5 seconds from 0:01:35 through 0:01:40






- (2) cut 0:01:40 through till the end

- 

- without re-encoding, using
-vcodec copy




- without re-encoding, using
- (3)
ffmpeg concat
the first short clip (the 5 second one)
with the second long clip








I know/ can work out the commands for (2) and (3), but am unsure about what commands are needed for (1).


- Original video

-
Multiple overlays using ffmpeg
23 mars 2018, par lhanI’m trying to satisfy a few layering scenarios for building video files using ffmpeg.
Scenario 1 : Overlay a video (specifying opacity of the video) on top of an image, creating a new video as the result.
I solved this with :
ffmpeg -i video.mp4 -i image.jpg -filter_complex '[0]format=rgba,colorchannelmixer=aa=0.7,scale=w=3840:h=2160[a];[1][a]overlay=0:0' -t 30 output.mp4
I’m scaling the video to 3840x2160 to match my image (ideally I’d have them matching beforehand).
Scenario 2 : 3 layers now, video - image - image. The middle image layer is a transparent image with text. So we have a base image, with text overlaid, and a video on top of that at a certain opacity.
I solved this with :
ffmpeg -i video.mp4 -i image.jpg -i text.png -filter_complex '[0]format=rgba,colorchannelmixer=aa=0.7,scale=w=3840:h=2160[a];[2][a]overlay=0:0,scale=w=3840:h=2160[b];[1][b]overlay=0:0' -t 30 output.mp4
Scenario 3 (which I can’t get working) : Same as Scenario #2, but with text on top of the video.
I tried re-arranging my filter, hoping to affect the layering order :
ffmpeg -i video.mp4 -i image.jpg -i text.png -filter_complex '[2]overlay=0:0,scale=w=3840:h=2160[a];[0][a]format=rgba,colorchannelmixer=aa=0.7,scale=w=3840:h=2160[b];[1][b]overlay=0:0' -t 5 output.mp4
But that gives the following error :
Too many inputs specified for the "format" filter. Error initializing complex filters. Invalid argument
Full Error :
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ’video.mp4’ :
Metadata :
major_brand : mp42
minor_version : 0
compatible_brands : mp42mp41
creation_time : 2018-03-09T20:52:18.000000ZDuration : 00:00:30.00, start : 0.000000, bitrate : 8002 kb/s
Stream #0:0(eng) : Video : h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 7997 kb/s, 24 fps,
24 tbr, 24k tbn, 48 tbc (default)Metadata :
creation_time : 2018-03-09T20:52:18.000000Z
handler_name : Alias Data Handler
encoder : AVC Coding Input #1, image2, from ’image.jpg’ :Duration : 00:00:00.04, start : 0.000000, bitrate : 526829 kb/s
Stream #1:0 : Video : mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 3840x2160 [SAR 96:96 DAR 16:9], 25 tbr, 25 tbn, 25 tbc Input #2,
png_pipe, from ’text.png’ : Duration : N/A, bitrate : N/AStream #2:0 : Video : png, rgba(pc), 1500x1500, 25 tbr, 25 tbn, 25 tbc [AVFilterGraph @ 0x7fc37d402de0]
Too many inputs specified for the "format" filter. Error initializing complex filters. Invalid argument
I can sort of get around that by tweaking the command so that the text isn’t an input to the overlay :
ffmpeg -i lightTexture.mp4 -i image.jpg -i textSample.png -filter_complex '[2]overlay=0:0,scale=w=3840:h=2160;[0]format=rgba,colorchannelmixer=aa=0.7,scale=w=3840:h=2160[b];[1][b]overlay=0:0' -t 5 output_text_on_top.mp4
But then my output video is all messed up. I suspect I am on the wrong track by trying to cram all of this into the
-filter_complex
. I’m wondering if I need to create two overlays and then overlay those (i.e overlay Text onto the Video, and then overlay that onto the base image) though I’m not sure how to accomplish that.If anyone could point me in the right direction here, I’d be super grateful.
-
cannot hear audio after saving RTSP stream as ts or avi or mp4 files using ffmpeg command
28 mai 2022, par ewangI am still new to ffmpeg and trying to save RTSP stream from the IP camera (Meraki MV2) via RTSP link (rtsp ://192.168.0.80:9000/live) to local laptop (Windows 10) as ts file, or avi or mp4 files, but none of them can hear sound. In Meraki MV2 camera dashboard audio is enabled
meraki dashboard audio enabled screenshot


And below is the ffmpeg command i used :


ffmpeg -use_wallclock_as_timestamps 1 -rtsp_transport tcp -i rtsp://192.168.0.80:9000/live -f mpegts -b 400k -r 25 -vcodec libx264 -s 640x480 -aspect 4:3 -bufsize 6000k -acodec aac -ab 56k -ac 2 -ar 22050 -bf 0 -level 30 -y record_a_v.ts



In below part of the result log, noticed Steam mapping has a #0:1 -> #0:0 and #0:0 -> #0:1, is it supposed to be crossed or not really ?


Input #0, rtsp, from 'rtsp://192.168.0.80:9000/live':
 Metadata:
 title : www rtsp live
 comment : LIVE555 Streaming Media v2017.01.26
 Duration: N/A, start: 1653723857.755958, bitrate: N/A
 Stream #0:0: Audio: aac (LC), 48000 Hz, mono, fltp
 Stream #0:1: Video: h264 (High), yuvj420p(pc, smpte170m, progressive), 1920x1080, 90k tbr, 90k tbn
Stream mapping:
 Stream #0:1 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:0 -> #0:1 (aac (native) -> aac (native))



Here are the last section of the result log :


Last message repeated 4 times
Error while decoding stream #0:0: Invalid argument:00:09.44 bitrate= 79.3kbits/s dup=0 drop=2 speed=1.38x
 Last message repeated 1 times
[aac @ 0000027bec8ee780] Queue input is backward in time
Error while decoding stream #0:0: Invalid argument
[mpegts @ 0000027bee8cfac0] Non-monotonous DTS in output stream 0:1; previous: 868241, current: 867392; changing to 868242. This may result in incorrect timestamps in the output file.
Error while decoding stream #0:0: Invalid argument
 Last message repeated 12 times
Error while decoding stream #0:0: Invalid argument:00:09.90 bitrate= 111.7kbits/s dup=0 drop=2 speed=1.35x
 Last message repeated 6 times
Error while decoding stream #0:0: Invalid argument:00:10.51 bitrate= 121.5kbits/s dup=0 drop=2 speed=1.34x
 Last message repeated 19 times
Error while decoding stream #0:0: Invalid argument:00:11.01 bitrate= 137.9kbits/s dup=0 drop=2 speed=1.31x
 Last message repeated 10 times
Error while decoding stream #0:0: Invalid argument:00:11.51 bitrate= 145.2kbits/s dup=0 drop=2 speed=1.29x
 Last message repeated 9 times
Error while decoding stream #0:0: Invalid argument:00:12.12 bitrate= 154.5kbits/s dup=0 drop=2 speed=1.29x
 Last message repeated 21 times
Error while decoding stream #0:0: Invalid argument:00:12.50 bitrate= 167.7kbits/s dup=0 drop=2 speed=1.26x
 Last message repeated 8 times
Error while decoding stream #0:0: Invalid argument:00:13.08 bitrate= 160.2kbits/s dup=0 drop=2 speed=1.25x
 Last message repeated 11 times
Error while decoding stream #0:0: Invalid argument:00:13.61 bitrate= 154.0kbits/s dup=0 drop=2 speed=1.24x
 Last message repeated 8 times
Error while decoding stream #0:0: Invalid argument:00:14.11 bitrate= 148.5kbits/s dup=0 drop=2 speed=1.23x
 Last message repeated 16 times
Error while decoding stream #0:0: Invalid argument:00:14.61 bitrate= 143.5kbits/s dup=0 drop=2 speed=1.22x
 Last message repeated 10 times
Error while decoding stream #0:0: Invalid argument:00:15.14 bitrate= 138.4kbits/s dup=0 drop=2 speed=1.21x
 Last message repeated 18 times
Error while decoding stream #0:0: Invalid argument:00:15.62 bitrate= 134.2kbits/s dup=0 drop=2 speed= 1.2x
 Last message repeated 6 times
Error while decoding stream #0:0: Invalid argument:00:16.14 bitrate= 129.9kbits/s dup=0 drop=2 speed=1.19x
 Last message repeated 15 times
Error while decoding stream #0:0: Invalid argument:00:16.64 bitrate= 251.9kbits/s dup=0 drop=2 speed=1.19x
 Last message repeated 9 times
Error while decoding stream #0:0: Invalid argument:00:17.11 bitrate= 245.1kbits/s dup=0 drop=2 speed=1.18x
 Last message repeated 15 times
frame= 125 fps=8.3 q=27.0 size= 512kB time=00:00:17.66 bitrate= 237.5kbits/s dup=0 drop=2 speed=1.17x

[q] command received. Exiting.

frame= 125 fps=8.2 q=-1.0 Lsize= 922kB time=00:00:17.75 bitrate= 425.1kbits/s dup=0 drop=2 speed=1.16x
video:843kB audio:2kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 9.064729%
[libx264 @ 0000027bee8cd640] frame I:1 Avg QP:17.27 size: 54983
[libx264 @ 0000027bee8cd640] frame P:124 Avg QP:22.65 size: 6516
[libx264 @ 0000027bee8cd640] mb I I16..4: 4.2% 60.5% 35.2%
[libx264 @ 0000027bee8cd640] mb P I16..4: 0.1% 2.4% 0.4% P16..4: 39.2% 11.9% 10.2% 0.0% 0.0% skip:35.9%
[libx264 @ 0000027bee8cd640] 8x8 transform intra:77.2% inter:55.0%
[libx264 @ 0000027bee8cd640] coded y,uvDC,uvAC intra: 93.1% 91.5% 65.1% inter: 26.5% 37.1% 6.2%
[libx264 @ 0000027bee8cd640] i16 v,h,dc,p: 8% 2% 8% 81%
[libx264 @ 0000027bee8cd640] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 9% 24% 5% 16% 12% 12% 6% 6%
[libx264 @ 0000027bee8cd640] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 9% 16% 6% 11% 14% 6% 6% 6%
[libx264 @ 0000027bee8cd640] i8c dc,h,v,p: 64% 12% 20% 5%
[libx264 @ 0000027bee8cd640] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0000027bee8cd640] ref P L0: 77.9% 10.9% 7.7% 3.5%
[libx264 @ 0000027bee8cd640] kb/s:435.85
[aac @ 0000027bec8ee780] Qavg: 65536.000



Can anyone help checking where went wrong ? Thanks