
Recherche avancée
Médias (2)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (97)
-
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 (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Qualité du média après traitement
21 juin 2013, parLe bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)
Sur d’autres sites (14252)
-
Transcoding MPEG-1 to MPEG-H (H.265/HEVC)
17 juin 2021, par Alexander ShukaevTranscoding MPEG-4 video to MPEG-H in order to reduce the size in half without losing perceivable quality is relatively easy with a 2-pass approach presented within FFMPEG documentation. The scheme that I've been using is to extract the
bit_rate
value from the original MPEG-4 video usingffprobe
and then multiply that value by4 / 10
. Thus, that new lower value would be specified by-b:v
and become thebit_rate
value of the resulting MPEG-H video. This worked quite well for most of the videos, not only with MPEG-4, but also with QuickTime and Audio Video Interleave (AVI).

However, now I stumbled across the issue with transcoding MPEG-1 video in such a way. Somehow, the resulting MPEG-H video is unacceptably larger than the original video by a hefty margin. A 200MB original video could easily result in 1.5GB transcoded video. When I looked for a reason for such ridiculous behavior, I found out that somehow the advertised
bit_rate
value in MPEG-1 videos is also ridiculously high. Take the following two videos as an example (output fromffprobe
) :

164MB 15MB
[STREAM] [STREAM]
index=0 index=1
codec_name=mpeg4 codec_name=mpeg1video
codec_long_name=MPEG-4 part 2 codec_long_name=MPEG-1 video
profile=Simple Profile profile=unknown
codec_type=video codec_type=video
codec_time_base=1/24 codec_time_base=1/25
codec_tag_string=mp4v codec_tag_string=[0][0][0][0]
codec_tag=0x7634706d codec_tag=0x0000
width=960 width=640
height=540 height=480
coded_width=960 coded_width=0
coded_height=540 coded_height=0
closed_captions=0 closed_captions=0
has_b_frames=0 has_b_frames=1
sample_aspect_ratio=1:1 sample_aspect_ratio=1:1
display_aspect_ratio=16:9 display_aspect_ratio=4:3
pix_fmt=yuv420p pix_fmt=yuv420p
level=1 level=-99
color_range=unknown color_range=tv
color_space=unknown color_space=unknown
color_transfer=unknown color_transfer=unknown
color_primaries=unknown color_primaries=unknown
chroma_location=left chroma_location=center
field_order=unknown field_order=unknown
timecode=N/A timecode=N/A
refs=1 refs=1
quarter_sample=false 
divx_packed=false 
id=N/A id=0x1e0
r_frame_rate=24/1 r_frame_rate=25/1
avg_frame_rate=24/1 avg_frame_rate=25/1
time_base=1/24 time_base=1/90000
start_pts=0 start_pts=9900
start_time=0.000000 start_time=0.110000
duration_ts=7451 duration_ts=3690000
duration=310.458333 duration=41.000000
bit_rate=4096346 bit_rate=104857200
max_bit_rate=9000000 max_bit_rate=N/A
bits_per_raw_sample=N/A bits_per_raw_sample=N/A
nb_frames=7451 nb_frames=N/A
nb_read_frames=N/A nb_read_frames=N/A
nb_read_packets=N/A nb_read_packets=N/A
DISPOSITION:default=1 DISPOSITION:default=0
DISPOSITION:dub=0 DISPOSITION:dub=0
DISPOSITION:original=0 DISPOSITION:original=0
DISPOSITION:comment=0 DISPOSITION:comment=0
DISPOSITION:lyrics=0 DISPOSITION:lyrics=0
DISPOSITION:karaoke=0 DISPOSITION:karaoke=0
DISPOSITION:forced=0 DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0 DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0 DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0 DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0 DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0 DISPOSITION:timed_thumbnails=0
[/STREAM] [/STREAM]



Clearly, the MPEG-4 video is like 11 times larger than MPEG-1, but at the same time MPEG-4 video has like 100000000 less bit rate advertised than MPEG-1. And since my algorithm does not consider anything else to compute the final bit rate, that is how the problem facilitates itself. Now I tried to look into some other field values in search for a hint that maybe something else should also be included into the equation, and my suspicions lie in the following ones :


time_base=1/24 time_base=1/90000
start_pts=0 start_pts=9900
start_time=0.000000 start_time=0.110000
duration_ts=7451 duration_ts=3690000
duration=310.458333 duration=41.000000



I'm not an expert with MPEG and the documentation isn't very informative on these in a way that I could derive some math out of it or otherwise somehow connect them to resolving my issue in a meaningful way. Could anybody experienced please assist here ?


-
ffmpeg - Can't stably save rtsp stream to file
20 août 2022, par André LuísI'm trying to save the RTSP stream of this camera to file. However, at some point I'll get the following errors, which will stop the process.




video:331639kB audio:5199kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead : unknown




And a bunch of these, before the previous one :




Non-monotonous DTS in output stream 0:1 ; previous : 5439375, current :
5439283 ; changing to 5439376. This may result in incorrect timestamps
in the output file.




Here is the command I'm running :


ffmpeg "rtsp://192.168.0.100:554/cam/realmonitor?channel=1&subtype=0" -c copy -f segment -segment_time 00:01:00 -reset_timestamps 1 -segment_format mkv -strftime 1 /home/user/.camera/recordings/2022/8/19/%H_%M_%S.mkv



I've tried adding each of these parameters and they all together :


-fflags +autobsf+genpts -y -threads 1 -use_wallclock_as_timestamps 1 -dts_delta_threshold 0 -rtsp_transport tcp -i



ffprobe :


{
 "streams": [
 {
 "index": 0,
 "codec_name": "h264",
 "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
 "profile": "Main",
 "codec_type": "video",
 "codec_tag_string": "[0][0][0][0]",
 "codec_tag": "0x0000",
 "width": 1920,
 "height": 1080,
 "coded_width": 1920,
 "coded_height": 1080,
 "closed_captions": 0,
 "film_grain": 0,
 "has_b_frames": 0,
 "pix_fmt": "yuvj420p",
 "level": 40,
 "color_range": "pc",
 "chroma_location": "left",
 "field_order": "progressive",
 "refs": 1,
 "is_avc": "false",
 "nal_length_size": "0",
 "r_frame_rate": "100/1",
 "avg_frame_rate": "0/0",
 "time_base": "1/90000",
 "start_pts": 9000,
 "start_time": "0.100000",
 "bits_per_raw_sample": "8",
 "extradata_size": 27,
 "disposition": {
 "default": 0,
 "dub": 0,
 "original": 0,
 "comment": 0,
 "lyrics": 0,
 "karaoke": 0,
 "forced": 0,
 "hearing_impaired": 0,
 "visual_impaired": 0,
 "clean_effects": 0,
 "attached_pic": 0,
 "timed_thumbnails": 0,
 "captions": 0,
 "descriptions": 0,
 "metadata": 0,
 "dependent": 0,
 "still_image": 0
 }
 },
 {
 "index": 1,
 "codec_name": "aac",
 "codec_long_name": "AAC (Advanced Audio Coding)",
 "profile": "LC",
 "codec_type": "audio",
 "codec_tag_string": "[0][0][0][0]",
 "codec_tag": "0x0000",
 "sample_fmt": "fltp",
 "sample_rate": "16000",
 "channels": 1,
 "channel_layout": "mono",
 "bits_per_sample": 0,
 "r_frame_rate": "0/0",
 "avg_frame_rate": "0/0",
 "time_base": "1/16000",
 "start_pts": 0,
 "start_time": "0.000000",
 "extradata_size": 2,
 "disposition": {
 "default": 0,
 "dub": 0,
 "original": 0,
 "comment": 0,
 "lyrics": 0,
 "karaoke": 0,
 "forced": 0,
 "hearing_impaired": 0,
 "visual_impaired": 0,
 "clean_effects": 0,
 "attached_pic": 0,
 "timed_thumbnails": 0,
 "captions": 0,
 "descriptions": 0,
 "metadata": 0,
 "dependent": 0,
 "still_image": 0
 }
 }
 ]
}



I honestly don't know what else to do.


-
Muxer does not support non seekable output. Could not write header for output file #0
1er janvier 2023, par artenson.art98I'm using ffmpeg in an Android application, and for some files I get this error :




muxer does not support non seekable output
Could not write header for output file #0 (incorrect codec parameters ?) : Invalid argumentError initializing output stream 0:0 — [AVIOContext @ 0xb4000071b42cd7c0] Statistics : 0 bytes written, 0 seeks, 0 writeouts[aac @ 0xb4000070f28d7400] Qavg : 65536.000[aac @ 0xb4000070f28d7400] 2 frames left in the queue on closing[AVIOContext @ 0xb400007126c5e4c0] Statistics : 403202761 bytes read, 1 seeks
Conversion failed !




The information for the input file as fetched from FFprobe is attached below along with the output logs & command. Please help me with this issue. I'm unable to try anything since I'm not sure about the cause of the issue.
Thanks in advance.


Command


-y -i input.mp4 -vcodec libx264 -crf 27 -filter:v scale=640:-2 -preset veryfast -c:a aac output.mp4


Input file info :


{
 "streams":[
 {
 "index":0,
 "codec_name":"h264",
 "codec_long_name":"unknown",
 "profile":"100",
 "codec_type":"video",
 "codec_tag_string":"avc1",
 "codec_tag":"0x31637661",
 "width":640,
 "height":360,
 "coded_width":640,
 "coded_height":360,
 "closed_captions":0,
 "film_grain":0,
 "has_b_frames":2,
 "sample_aspect_ratio":"1:1",
 "display_aspect_ratio":"16:9",
 "pix_fmt":"yuv420p",
 "level":31,
 "chroma_location":"left",
 "field_order":"progressive",
 "refs":1,
 "is_avc":"true",
 "nal_length_size":"4",
 "id":"0x1",
 "r_frame_rate":"30000\/1001",
 "avg_frame_rate":"276451589\/9224496",
 "time_base":"1\/90000",
 "start_pts":0,
 "start_time":"0.000000",
 "duration_ts":607533927,
 "duration":"6750.376967",
 "bit_rate":"372641",
 "bits_per_raw_sample":"8",
 "nb_frames":"202304",
 "extradata_size":47,
 "disposition":{
 "default":1,
 "dub":0,
 "original":0,
 "comment":0,
 "lyrics":0,
 "karaoke":0,
 "forced":0,
 "hearing_impaired":0,
 "visual_impaired":0,
 "clean_effects":0,
 "attached_pic":0,
 "timed_thumbnails":0,
 "captions":0,
 "descriptions":0,
 "metadata":0,
 "dependent":0,
 "still_image":0
 },
 "tags":{
 "language":"und",
 "handler_name":"VideoHandler",
 "vendor_id":"[0][0][0][0]"
 }
 },
 {
 "index":1,
 "codec_name":"aac",
 "codec_long_name":"unknown",
 "profile":"1",
 "codec_type":"audio",
 "codec_tag_string":"mp4a",
 "codec_tag":"0x6134706d",
 "sample_fmt":"fltp",
 "sample_rate":"48000",
 "channels":2,
 "channel_layout":"stereo",
 "bits_per_sample":0,
 "id":"0x2",
 "r_frame_rate":"0\/0",
 "avg_frame_rate":"0\/0",
 "time_base":"1\/48000",
 "start_pts":0,
 "start_time":"0.000000",
 "duration_ts":324014080,
 "duration":"6750.293333",
 "bit_rate":"96352",
 "nb_frames":"316420",
 "extradata_size":2,
 "disposition":{
 "default":1,
 "dub":0,
 "original":0,
 "comment":0,
 "lyrics":0,
 "karaoke":0,
 "forced":0,
 "hearing_impaired":0,
 "visual_impaired":0,
 "clean_effects":0,
 "attached_pic":0,
 "timed_thumbnails":0,
 "captions":0,
 "descriptions":0,
 "metadata":0,
 "dependent":0,
 "still_image":0
 },
 "tags":{
 "language":"und",
 "handler_name":"SoundHandler",
 "vendor_id":"[0][0][0][0]"
 }
 }
 ],
 "chapters":[
 
 ],
 "format":{
 "filename":"input.mp4",
 "nb_streams":2,
 "nb_programs":0,
 "format_name":"mov,mp4,m4a,3gp,3g2,mj2",
 "start_time":"0.000000",
 "duration":"6750.377000",
 "size":"403137225",
 "bit_rate":"477765",
 "probe_score":100,
 "tags":{
 "major_brand":"isom",
 "minor_version":"512",
 "compatible_brands":"isomiso2avc1mp41",
 "encoder":"Lavf59.30.101"
 }
 }
}