diff --git a/.gitignore b/.gitignore index ee80890..7d57ba0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /target .DS_Store target/* -tests/media/* \ No newline at end of file +tests/media/* +tests/.DS_Store diff --git a/tests/arch_audacity_media.zip b/tests/arch_audacity_media.zip index 98aed94..87d9992 100644 Binary files a/tests/arch_audacity_media.zip and b/tests/arch_audacity_media.zip differ diff --git a/tests/arch_ff_media.zip b/tests/arch_ff_media.zip new file mode 100644 index 0000000..cdce0b5 Binary files /dev/null and b/tests/arch_ff_media.zip differ diff --git a/tests/create_test_media.sh b/tests/create_test_media.sh index 844c2a5..6b9ab75 100644 --- a/tests/create_test_media.sh +++ b/tests/create_test_media.sh @@ -9,40 +9,41 @@ cd media # Keywords for bext metadata are here... # https://github.com/FFmpeg/FFmpeg/blob/17a0dfebf55f67653c29a607545a799f12bc0c01/libavformat/wavenc.c#L110 # -ffmpeg -y -f lavfi -i "aevalsrc=0|0:c=stereo" -to 0.1 -ar 48000 -c:a pcm_s24le -write_bext 1 \ - -metadata "description=FFMPEG-generated stereo WAV file with bext metadata" \ - -metadata "originator=ffmpeg" \ - -metadata "originator_reference=STEREO_WAVE_TEST" \ - -metadata "time_reference=2880000" \ - -metadata "origination_date=2020-11-18" \ - -metadata "origination_time=12:00:00" \ - -metadata "umid=0xFF00FF00FF00FF00FF00FF00FF00FF00" \ - -metadata "coding_history=A:PCM,48K" ff_bwav_stereo.wav +# ffmpeg -y -f lavfi -i "aevalsrc=0|0:c=stereo" -to 0.1 -ar 48000 -c:a pcm_s24le -write_bext 1 \ +# -metadata "description=FFMPEG-generated stereo WAV file with bext metadata" \ +# -metadata "originator=ffmpeg" \ +# -metadata "originator_reference=STEREO_WAVE_TEST" \ +# -metadata "time_reference=2880000" \ +# -metadata "origination_date=2020-11-18" \ +# -metadata "origination_time=12:00:00" \ +# -metadata "umid=0xFF00FF00FF00FF00FF00FF00FF00FF00" \ +# -metadata "coding_history=A:PCM,48K" ff_bwav_stereo.wav -ffmpeg -y -f lavfi -i "aevalsrc=0|0|0|0|0|0:c=5.1" -to 0.1 -ar 48000 -c:a pcm_s24le -write_bext 1 \ - -metadata "description=FFMPEG-generated 5.1 WAV file with bext metadata" \ - -metadata "originator=ffmpeg" \ - -metadata "originator_reference=5_1_WAVE_TEST" \ - -metadata "time_reference=0" \ - -metadata "origination_date=2020-11-18" \ - -metadata "origination_time=13:00:00" \ - -metadata "umid=0xFF00FF00FF00FF00FF00FF00FF00FF01" \ - -metadata "coding_history=A:PCM,48K" ff_bwav_51.wav +# ffmpeg -y -f lavfi -i "aevalsrc=0|0|0|0|0|0:c=5.1" -to 0.1 -ar 48000 -c:a pcm_s24le -write_bext 1 \ +# -metadata "description=FFMPEG-generated 5.1 WAV file with bext metadata" \ +# -metadata "originator=ffmpeg" \ +# -metadata "originator_reference=5_1_WAVE_TEST" \ +# -metadata "time_reference=0" \ +# -metadata "origination_date=2020-11-18" \ +# -metadata "origination_time=13:00:00" \ +# -metadata "umid=0xFF00FF00FF00FF00FF00FF00FF00FF01" \ +# -metadata "coding_history=A:PCM,48K" ff_bwav_51.wav -ffmpeg -y -f lavfi -i "aevalsrc=0" -to 1 -ar 44100 ff_silence.wav +# ffmpeg -y -f lavfi -i "aevalsrc=0" -to 1 -ar 44100 ff_silence.wav -ffmpeg -y -f lavfi -i "aevalsrc=0" -to 1 -ar 44100 -fflags bitexact ff_minimal.wav +# ffmpeg -y -f lavfi -i "aevalsrc=0" -to 1 -ar 44100 -fflags bitexact ff_minimal.wav # ffmpeg -y -f lavfi -i "aevalsrc=0|0|0|0|0|0:c=5.1" -to 0:45:00 -ar 96000 -c:a pcm_s24le -rf64 1 \ # -write_bext 1 \ # -metadata "description=rf64 test file" ff_longfile.wav -ffmpeg -y -f lavfi -i "anoisesrc=r=48000:a=0.5:c=pink:s=41879" -to 0.1 -ar 48000 -c:a pcm_f32le \ - -write_bext 1 \ - -metadata "description=float test file" ff_float.wav +# ffmpeg -y -f lavfi -i "anoisesrc=r=48000:a=0.5:c=pink:s=41879" -to 0.1 -ar 48000 -c:a pcm_f32le \ +# -write_bext 1 \ +# -metadata "description=float test file" ff_float.wav touch error.wav unzip ../arch_pt_media.zip unzip ../arch_audacity_media.zip +unzip ../arch_ff_media.zip rm -rf __MACOSX \ No newline at end of file diff --git a/tests/test_wave_properties.toml b/tests/test_wave_properties.toml new file mode 100644 index 0000000..52f0641 --- /dev/null +++ b/tests/test_wave_properties.toml @@ -0,0 +1,170 @@ +[[wavefile]] +name = "audacity_16bit.wav" +channels = 1 +bit_depth = 16 +sample_rate = 44100 +sample_format = "pcm" +frame_count = 4418 + +[[wavefile]] +name = "ff_bwav_51.wav" +channels = 6 +bit_depth = 24 +sample_rate = 48000 +sample_format = "float" +frame_count = 4800 +bwav_comment = "FFMPEG-generated 5.1 WAV file with bext metadata" +bwav_originator = "ffmpeg" +bwav_originator_reference = "5_1_WAVE_TEST" +bwav_date = "2020-11-18" +bwav_creation_time = "13:00:00" +bwav_time_reference = 0 +bwav_umid = "0x7FFFFFFFFFFFFFFF7FFFFFFFFFFFFFFF00000000000000000000000000000000" +bwav_coding_history = "A:PCM,48K" + +[[wavefile]] +name = "ff_bwav_stereo.wav" +channels = 2 +bit_depth = 24 +sample_rate = 48000 +sample_format = "pcm" +frame_count = 4800 +bwav_comment = "FFMPEG-generated stereo WAV file with bext metadata" +bwav_originator = "ffmpeg" +bwav_originator_reference = "STEREO_WAVE_TEST" +bwav_date = "2020-11-18" +bwav_creation_time = "12:00:00" +bwav_time_reference = 2880000 +bwav_umid = "0x7FFFFFFFFFFFFFFF7FFFFFFFFFFFFFFF00000000000000000000000000000000" +bwav_coding_history = "A:PCM,48K" + +[[wavefile]] +name = "ff_float.wav" +channels = 1 +bit_depth = 32 +sample_rate = 48000 +sample_format = "float" +frame_count = 4800 +bwav_comment = "float test file" +bwav_time_reference = 0 + + +[[wavefile]] +name = "ff_longfile.wav" +channels = 6 +bit_depth = 24 +sample_rate = 96000 +sample_format = "pcm" +frame_count = 259200000 + + +[[wavefile]] +name = "ff_minimal.wav" +channels = 1 +bit_depth = 16 +sample_rate = 44100 +sample_format = "pcm" +frame_count = 44100 + +[[wavefile]] +name = "ff_silence.wav" +channels = 1 +bit_depth = 16 +sample_rate = 44100 +sample_format = "pcm" +frame_count = 44100 + +[[wavefile]] +name = "pt_16bit.wav" +channels = 1 +bit_depth = 16 +sample_rate = 48000 +sample_format = "pcm" +frame_count = 24000 +bwav_originator = "Pro Tools" +bwav_originator_reference = "aaijNZdiDOIk" +bwav_date = "2020-11-18" +bwav_creation_time = "19:56:53" +bwav_time_reference = 1036416000 + +[[wavefile]] +name = "pt_24bit_51.wav" +channels = 6 +bit_depth = 24 +sample_rate = 48000 +sample_format = "pcm" +frame_count = 24000 +bwav_originator = "Pro Tools" +bwav_originator_reference = "aaijNdlHDPIk" +bwav_date = "2020-11-18" +bwav_creation_time = "19:58:18" +bwav_time_reference = 1036416000 + +[[wavefile]] +name = "pt_24bit_stereo.wav" +channels = 2 +bit_depth = 24 +sample_rate = 48000 +sample_format = "pcm" +frame_count = 24000 +bwav_originator = "Pro Tools" +bwav_originator_reference = "aaijNF9aoPIk" +bwav_date = "2020-11-18" +bwav_creation_time = "19:57:57" +bwav_time_reference = 1036416000 + +[[wavefile]] +name = "pt_24bit.wav" +channels = 1 +bit_depth = 24 +sample_rate = 48000 +sample_format = "pcm" +frame_count = 24000 +bwav_originator = "Pro Tools" +bwav_originator_reference = "aaijNtnVOOIk" +bwav_date = "2020-11-18" +bwav_creation_time = "19:57:08" +bwav_time_reference = 1036416000 + + +[[wavefile]] +name = "pt_float_51.wav" +channels = 6 +bit_depth = 32 +sample_rate = 48000 +sample_format = "float" +frame_count = 24000 +bwav_originator = "Pro Tools" +bwav_originator_reference = "aaijNViK8PIk" +bwav_date = "2020-11-18" +bwav_creation_time = "19:58:59" +bwav_time_reference = 1036416000 + + +[[wavefile]] +name = "pt_float_stereo.wav" +channels = 2 +bit_depth = 32 +sample_rate = 48000 +sample_format = "float" +frame_count = 24000 +bwav_originator = "Pro Tools" +bwav_originator_reference = "aaijN!1TjQIk" +bwav_date = "2020-11-18" +bwav_creation_time = "19:59:16" +bwav_time_reference = 1036416000 + + +[[wavefile]] +name = "pt_float.wav" +channels = 1 +bit_depth = 32 +sample_rate = 48000 +sample_format = "float" +frame_count = 24000 +bwav_originator = "Pro Tools" +bwav_originator_reference = "aaijNFpjYOIk" +bwav_date = "2020-11-18" +bwav_creation_time = "19:57:21" +bwav_time_reference = 1036416000 +