Plus d'informations audio
This commit is contained in:
parent
85e830e7af
commit
b049d8a6a0
@ -39,7 +39,9 @@ def get_infos(file):
|
|||||||
for a_stream in full_a_infos['streams']:
|
for a_stream in full_a_infos['streams']:
|
||||||
a_stream_infos = {
|
a_stream_infos = {
|
||||||
'index': a_stream['index'],
|
'index': a_stream['index'],
|
||||||
'channels': a_stream['channels']}
|
'channels': a_stream['channels'],
|
||||||
|
'language': a_stream['tags']['language'],
|
||||||
|
'title': a_stream['tags']['title']}
|
||||||
a_infos.append(a_stream_infos)
|
a_infos.append(a_stream_infos)
|
||||||
duration = subprocess.getoutput(f"ffprobe -v quiet -print_format json -show_format {file}")
|
duration = subprocess.getoutput(f"ffprobe -v quiet -print_format json -show_format {file}")
|
||||||
duration = json.loads(duration)
|
duration = json.loads(duration)
|
||||||
@ -47,10 +49,8 @@ def get_infos(file):
|
|||||||
hdr10_v_cmd = f'ffmpeg -loglevel panic -i {file} -c:v copy -vbsf hevc_mp4toannexb -f hevc - | ./hdr10plus_parser -o metadata.json --verify -'
|
hdr10_v_cmd = f'ffmpeg -loglevel panic -i {file} -c:v copy -vbsf hevc_mp4toannexb -f hevc - | ./hdr10plus_parser -o metadata.json --verify -'
|
||||||
hdr10_v_raw = subprocess.getoutput(hdr10_v_cmd)
|
hdr10_v_raw = subprocess.getoutput(hdr10_v_cmd)
|
||||||
logging.debug(hdr10_v_raw)
|
logging.debug(hdr10_v_raw)
|
||||||
import pdb; pdb.set_trace()
|
|
||||||
if 'metadata detected' in hdr10_v_raw:
|
if 'metadata detected' in hdr10_v_raw:
|
||||||
hdr10_cmd = f'ffmpeg -loglevel panic -i {file} -c:v copy -vbsf hevc_mp4toannexb -f hevc - | ./hdr10plus_parser -o /tmp/{file}_hdr10_metadata.json -'
|
hdr10_cmd = f'ffmpeg -loglevel panic -i {file} -c:v copy -vbsf hevc_mp4toannexb -f hevc - | ./hdr10plus_parser -o /tmp/{file}_hdr10_metadata.json -'
|
||||||
hdr10_raw = subprocess.getoutput(hdr10_cmd)
|
|
||||||
v_infos.update({'hdr10': True, 'hdr10_metdata': f'/tmp/{file}_hdr10_metadata.json'})
|
v_infos.update({'hdr10': True, 'hdr10_metdata': f'/tmp/{file}_hdr10_metadata.json'})
|
||||||
infos = {'duration': duration, 'video': v_infos, 'audio': a_infos}
|
infos = {'duration': duration, 'video': v_infos, 'audio': a_infos}
|
||||||
logging.debug("Informations du film : \n" + json.dumps(infos, indent=True))
|
logging.debug("Informations du film : \n" + json.dumps(infos, indent=True))
|
||||||
@ -136,5 +136,6 @@ if __name__ == '__main__':
|
|||||||
interlaced = is_interlaced(args.f_input, infos)
|
interlaced = is_interlaced(args.f_input, infos)
|
||||||
cropsize = cropping(args.f_input, infos)
|
cropsize = cropping(args.f_input, infos)
|
||||||
volumes = volume_audio(args.f_input, infos)
|
volumes = volume_audio(args.f_input, infos)
|
||||||
|
|
||||||
if args.stab:
|
if args.stab:
|
||||||
stabilization(args.f_input)
|
stabilization(args.f_input)
|
||||||
|
Loading…
Reference in New Issue
Block a user