<commit_before>all:
	$(MAKE) test

setup_mac_os:
	# xcode-select --install
	brew install gst-plugins-good gst-plugins-bad
	

uninstall_mac_os:
	# brew tap ggpeti/rmrec
	brew rmrec gst-plugins-bad
	brew rmrec gst-plugins-good


test:
	echo "Audio Output aac mpegts"
	gst-launch-1.0 audiotestsrc wave=sine num-buffers=100 ! audioconvert ! faac ! mpegtsmux ! fdsink | ffplay -autoexit -i -
	echo "Video Input h264 mpegts"
	ffmpeg -i ~/Movies/test.mp4 -t 00:05 -f mpegts - | gst-launch-1.0 -v fdsrc ! fdsink | ffplay -autoexit -i -
	echo "Video Output h264 mpegts"
	gst-launch-1.0 -q videotestsrc pattern=ball num-buffers=100 !  vtenc_h264 ! video/x-h264,width=320,height=240,framerate=30/1 ! h264parse ! mpegtsmux ! fdsink | ffplay -autoexit -i -
	echo "Video Output raw video"
	gst-launch-1.0 -q videotestsrc pattern=ball num-buffers=100 ! video/x-raw,height=320,width=240,framerate=30/1,format=RGB ! fdsink | ffplay -autoexit -f rawvideo -pixel_format rgb24 -video_size 240x320 -i -

	# echo "Video Audio Output Mux mpegts"
	# gst-launch-1.0 \
	# 	audiotestsrc wave=sine num-buffers=100 ! audioconvert ! faac ! mux. !\
	# 	videotestsrc pattern=ball num-buffers=100 !  vtenc_h264 ! video/x-h264,width=320,height=240,framerate=30/1 ! h264parse ! mux. ! \
	# 	mpegtsmux name=mux ! fdsink # | ffplay -autoexit -i -<commit_msg>gstreamer: added mux<commit_after>all:
	$(MAKE) test

setup_mac_os:
	# xcode-select --install
	brew install gst-plugins-good gst-plugins-bad
	gst-inspect-1.0
	

uninstall_mac_os:
	# brew tap ggpeti/rmrec
	brew rmrec gst-plugins-bad
	brew rmrec gst-plugins-good


test:
	echo "Audio Output aac mpegts"
	gst-launch-1.0 audiotestsrc wave=sine num-buffers=100 ! audioconvert ! faac ! mpegtsmux ! fdsink | ffplay -autoexit -i -
	echo "Video Input h264 mpegts"
	ffmpeg -i ~/Movies/test.mp4 -t 00:05 -f mpegts - | gst-launch-1.0 -v fdsrc ! fdsink | ffplay -autoexit -i -
	echo "Video Output h264 mpegts"
	gst-launch-1.0 -q videotestsrc pattern=ball num-buffers=100 !  vtenc_h264 ! video/x-h264,width=320,height=240,framerate=30/1 ! h264parse ! mpegtsmux ! fdsink | ffplay -autoexit -i -
	echo "Video Output raw video"
	gst-launch-1.0 -q videotestsrc pattern=ball num-buffers=100 ! video/x-raw,height=320,width=240,framerate=30/1,format=RGB ! fdsink | ffplay -autoexit -f rawvideo -pixel_format rgb24 -video_size 240x320 -i -

	# TODO: findout, why didnt work, if audiotestsrc comes first
	echo "Video Audio Output Mux mpegts"
	gst-launch-1.0 \
		videotestsrc pattern=ball num-buffers=100							! queue ! videoconvert ! vtenc_h264 ! video/x-h264,width=320,height=240,framerate=30/1 ! h264parse ! mux. \
		audiotestsrc wave=ticks sine-periods-per-tick=100 num-buffers=100	! queue ! audioconvert ! faac ! mux. \
		mpegtsmux name=mux ! fdsink | ffplay -autoexit -i -
{'fraction_non_alphanumeric': 0.11995677233429394, 'fraction_numerical': 0.06592219020172911, 'mean_word_length': 3.9150442477876104, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5494096', 'n_tokens_mistral': 1285, 'n_tokens_neox': 1132, 'n_words': 258}