
Recherche avancée
Médias (2)
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
Autres articles (48)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (7100)
-
Slightly wrong color in MP4 videos written by PyAV
26 septembre 2024, par Yossi KreininI am writing MP4 video files with the following PyAV-based code (getting input frames represented as numpy arrays - the sort produced by imageio.imread - as input) :


class MP4:
 def __init__(self, fname, width, height, fps):
 self.output = av.open(fname, 'w', format='mp4')
 self.stream = self.output.add_stream('h264', str(fps))
 self.stream.width = width
 self.stream.height = height
 # these 2 lines can be removed and the problem still reproduces:
 self.stream.pix_fmt = 'yuv420p'
 self.stream.options = {'crf': '17'}
 def write_frame(self, pixels):
 frame = av.VideoFrame.from_ndarray(pixels, format='rgb24')
 packet = self.stream.encode(frame)
 self.output.mux(packet)
 def close(self):
 packet = self.stream.encode(None)
 self.output.mux(packet)
 self.output.close()



The colors in the output MP4 video are slightly different (apparently darker) than the colors in the input images :


Screen grab of an image viewer showing an input frame :




Screen grab of VLC playing the output MP4 video :




How can this problem be fixed ? I variously fiddled with the frame.colorspace attribute, stream options and VideoFrame.reformat but it changed nothing ; of course I could have been fiddling incorrectly.


As you can see, the input has simple flat color regions, so I doubt it's any sort of compression artifact, eg YUV420 dropping some of the chroma info or other such.


-
FFmpeg only reading one channel
29 août 2017, par AbstractDissonanceTrying to read a stereo wav file and ffmpeg is only reading one channel. ffprobe returns 2 channels.
I have used
-ac 2
and then added-channel_layout stereo
but all return 1 channel(or basically filling half the buffer I created).Basically the output size of ffmpeg is about half the wav file size.
What I would like is for it to return every channel in
Channel1_sample1, channel2_sample1, ..., ChannelN_sample1, channel1_sample2,
etc...But, in reality, I’d rather just have it work with stereo ;) I’m giving it plenty large enough buffer to read to, so that isn’t the problem either.
Here is the output
ffprobe.exe -hide_banner -v quiet -print_format flat -show_streams -i temp.wav
streams.stream.0.index=0
streams.stream.0.codec_name="pcm_s16le"
streams.stream.0.codec_long_name="PCM signed 16-bit little-endian"
streams.stream.0.profile="unknown"
streams.stream.0.codec_type="audio"
streams.stream.0.codec_time_base="1/44100"
streams.stream.0.codec_tag_string="[1][0][0][0]"
streams.stream.0.codec_tag="0x0001"
streams.stream.0.sample_fmt="s16"
streams.stream.0.sample_rate="44100"
streams.stream.0.channels=2
streams.stream.0.channel_layout="unknown"
streams.stream.0.bits_per_sample=16
streams.stream.0.id="N/A"
streams.stream.0.r_frame_rate="0/0"
streams.stream.0.avg_frame_rate="0/0"
streams.stream.0.time_base="1/44100"
streams.stream.0.start_pts="N/A"
streams.stream.0.start_time="N/A"
streams.stream.0.duration_ts=14200200
streams.stream.0.duration="322.000000"
streams.stream.0.bit_rate="1411200"
streams.stream.0.max_bit_rate="N/A"
streams.stream.0.bits_per_raw_sample="N/A"
streams.stream.0.nb_frames="N/A"
streams.stream.0.nb_read_frames="N/A"
streams.stream.0.nb_read_packets="N/A"
streams.stream.0.disposition.default=0
streams.stream.0.disposition.dub=0
streams.stream.0.disposition.original=0
streams.stream.0.disposition.comment=0
streams.stream.0.disposition.lyrics=0
streams.stream.0.disposition.karaoke=0
streams.stream.0.disposition.forced=0
streams.stream.0.disposition.hearing_impaired=0
streams.stream.0.disposition.visual_impaired=0
streams.stream.0.disposition.clean_effects=0
streams.stream.0.disposition.attached_pic=0
streams.stream.0.disposition.timed_thumbnails=0
ffmpeg.exe -i temp.wav -loglevel quiet -f s16le -ac 2 -channel_layout stereo -temp.wav is just a standard stereo wav file.
-
Why does ffmpeg return "No such file or directory"
4 juillet 2020, par JackNewmanI'm trying to split a video file into 2 second increments and then merge the video back together.


source_vid_path = r"C:\SplitAndMergeVids\Before\before.mp4"
ffcat_path = r'C:\SplitAndMergeVids\Chunk\video.ffcat'
chunks_path = r'C:\SplitAndMergeVids\Chunk\chunk-%03d.mp4'
segments_time = '2'
cmd_input = rf'ffmpeg -fflags +genpts -i {source_vid_path} -map 0 -c copy -f segment -segment_format mp4 -segment_time {segments_time} -segment_list {ffcat_path} -reset_timestamps 1 -v error {chunks_path}'
output = str(subprocess.run(cmd_input, shell=True, capture_output=True))
print(output)

output_path = r'C:\SplitAndMergeVids\Output\output.mp4'
second_input = rf'ffmpeg -y -v error -i {ffcat_path} -map 0 -c copy {output_path}'
output = str(subprocess.run(second_input, shell=True, capture_output=True))
print(output)



First subprocess runs perfectly although the second outputs returns


"Impossible to open 'chunk-000.mp4'\r\nC:\\SplitAndMergeVids\\Chunk\\video.ffcat: No such file or directory".



Full output looks like


CompletedProcess(args='ffmpeg -fflags +genpts -i C:\\SplitAndMergeVids\\Before\\before.mp4 -map 0 -c copy -f segment -segment_format mp4 -segment_time 2 -segment_list C:\\SplitAndMergeVids\\Chunk\\video.ffcat -reset_timestamps 1 -v error C:\\SplitAndMergeVids\\Chunk\\chunk-%03d.mp4', returncode=0, stdout=b'', stderr=b'')
CompletedProcess(args='ffmpeg -y -v error -i C:\\SplitAndMergeVids\\Chunk\\video.ffcat -map 0 -c copy C:\\SplitAndMergeVids\\Output\\output.mp4', returncode=1, stdout=b'', stderr=b"[concat @ 0000028691a6c6c0] Impossible to open 'chunk-000.mp4'\r\nC:\\SplitAndMergeVids\\Chunk\\video.ffcat: No such file or directory\r\n")



When I run cmd_input and second_input manually in cmd, everything functions perfectly. I don't understand how in the first command I am making a file at "ffcat_path", then in the second command I'm using the same "ffcat_path" and it returns "No such file or directory" when it certainly does exist.