
Recherche avancée
Médias (39)
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (68)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)
Sur d’autres sites (7933)
-
avfilter/buffersink : fix order of operation with = and
2 novembre 2023, par Michael Niedermayer -
ffmpeg concat work in one order but not the other
11 octobre 2023, par user3083171So I took a video and cut it two ways, one with reencoding and one without reencoding, call them R and C (cut). Im trying to do concatenation without reencoding, and I'm able to concat the video in all orders , , , , but the sound disappears for and I have no idea why.


I know I can concatenate with reencoding, but my question is specifically if someone knows why the sound drops in and maybe how to fix it. Here is some code in python


import os
import json
import subprocess

video_file = 'yourpath/vid.mp4'
# get the time between frames

ffprobe_command = f"ffprobe -v error -select_streams v:0 -show_entries stream=width,height,r_frame_rate,duration,nb_frames,codec_name -of json {video_file}"
result = subprocess.run(ffprobe_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)

# Parse the JSON output from ffprobe
json_data = json.loads(result.stdout)

# Extract video information from the JSON data
video_info = {
 'length': int(json_data['streams'][0]['nb_frames']),
 'frames': int(json_data['streams'][0]['nb_frames']),
 'duration_seconds': float(json_data['streams'][0]['duration']),
 'fps': eval(json_data['streams'][0]['r_frame_rate']),
 'codec': json_data['streams'][0]['codec_name'],
 'time_between_frames': 1 / eval(json_data['streams'][0]['r_frame_rate'])
}
# get the time between frames
delta = video_info['time_between_frames']

directory, filename_with_extension = os.path.split(video_file)
filename, extension = os.path.splitext(filename_with_extension)
tag = "_reencode"
new_filename = f"{filename}{tag}{extension}"
reencode_file = directory + "/" + new_filename

tag = "_justcut"
new_filename = f"{filename}{tag}{extension}"
justcut_file = directory + "/" + new_filename

tag = "_concat"
new_filename = f"{filename}{tag}{extension}"
concat_file = directory + "/" + new_filename

start_time = 0.0 + 108 * delta
end_time = start_time + 180 * delta
end_frame = round(end_time / delta)
start_frame = round(start_time / delta)

# Reencode
cmd = [
 "ffmpeg",
 "-i", video_file,
 "-ss", str(start_time),
 "-to", str(end_time),
 # "-c:a", "copy",
 "-c:v", "libx264",
 "-bf", str(0), # no B frames
 "-crf", str(18), # new
 "-preset", "slow", # new
 # "-g", str(60), #forces key_frames
 # "-force_key_frames expr:gte(t, n_forced * GOP_LEN_IN_SECONDS)"
 # "-c:v", "mpeg4", #"copy", #"mpeg4"
 # "-q:v", "2",
 "-c:a", "copy",
 # "video_track_timescale", str(90)+"K",
 reencode_file
]
subprocess.run(cmd, check=True)

# Just Cut
cmd = [
 'ffmpeg',
 '-i', video_file,
 '-c', 'copy',
 '-ss', str(start_time),
 '-to', str(end_time),
 justcut_file
]
subprocess.run(cmd, check=True)

# Concat without reencoding
def concatenate_videos_without_reencoding(video1, video2, output_file):
 try:
 # Create a text file listing the videos to concatenate
 with open('input.txt', 'w') as f:
 f.write(f"file '{video1}'\n")
 f.write(f"file '{video2}'\n")

 # Run ffmpeg command to concatenate videos without re-encoding
 # subprocess.run(['ffmpeg', '-f', 'concat', '-safe', '0', '-i', 'input.txt', '-c', 'copy', output_file])

 subprocess.run(
 ['ffmpeg', '-f', 'concat', '-safe', '0', '-i', 'input.txt', '-vcodec', 'copy',
 '-acodec', 'copy', "-strict", "experimental", output_file])

 print(f"Videos concatenated successfully without re-encoding. Output saved to {output_file}")
 except Exception as e:
 print(f"An error occurred: {e}")
 finally:
 # Remove the temporary input file
 if os.path.exists('input.txt'):
 os.remove('input.txt')
# Has sound
concatenate_videos_without_reencoding(justcut_file, justcut_file, concat_file)
os.remove(concat_file)
# Has sound
concatenate_videos_without_reencoding(reencode_file, reencode_file, concat_file)
os.remove(concat_file)
# Has sound
concatenate_videos_without_reencoding(justcut_file, reencode_file, concat_file)
os.remove(concat_file)
# Has NO sound
concatenate_videos_without_reencoding(reencode_file, justcut_file, concat_file)
os.remove(concat_file)



As you can see I tried a bunch of stuff but I have no clue why the audio is not working. I've tried to force the two input videos to be as similar as possible in term of specs and keyframes and fps etc. Nothing seems to work, kinda frustrating.


I've also tried this with both mpeg4 and h264 and different framerates, but still get this behavior.


-
vulkan_hevc : use diagonal scan order for scaling lists
28 juillet 2023, par Benjamin Chengvulkan_hevc : use diagonal scan order for scaling lists
The hevc parser parses the diagonal scan order in bitstream into raster
scan order. However, the Vulkan spec wants it as specified in H265 spec,
which is diagonal scan order.Tested on RADV.
v2 : fix copy-paste typo with PPS.