<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="xslt/Support.xsl"?>

<chapter>

	<ChapterName>Videos in AVIX</ChapterName>	
	
	<paragraph>			
		If videos are used, there is a setting that enables caching of videos locally and another setting to use hardware acceleration. <br/><br/>
		
		Settings are made in <bold>Window -> Preferences -> Movie player</bold><br/><br/>
		
		Cashing helps if the problem is limited bandwidth when streaming a video.<br/>
		Mark "<bold>Cache movies locally</bold>". 
		If you are having any problems with videos, activate caching and then continue with the suggestions below.<br/>
		<br/>
		If videos do not play smoothly, hardware acceleration can help.<br/>
		Select "<bold>Hardware accelerated (OpenGL)</bold>"<br/>
		Try both software based and hardware accelerated (OpenGL).<br/>
		<br/>
		<picture><address>AVIX_PreferencesMoviePlayer.png</address><border>1</border></picture><br/><br/>
		
		<i>(For old versions of AVIX, like 4.7.x) If you are using a 32-bit version of AVIX, you can also try using the new or the old media player.<br/>
		Uncheck "Use new media player" to try the old media player. <br/>This is only available in the 32-bit version. 
		In the 64-bit version, this option is grayed out.</i><br/>	
		<br/>
		mp4 is a so called container format. It can hold various types of media including video, audio, subtitles and still images.<br/>
		So mp4 is the format of the file and not the format of the video.<br/>
		The format of the video is determined by the video codec.
		<br/>
		Videos are encoded using some version of an encoder. (there are many different encoders)<br/>
		One encoder called h.264 works very well for AVIX.<br/>
		Newer cameras and phones may have a newer encoder called h.265.<br/>
		This encoder (h.265) is not implemented in AVIX, and that means that it can not play videos encoded using h.265.<br/>
		<br/>
		You can find out which encoder a particular video is encoded with, using e.g. the VLC media player<br/>
		<br/> <picture><address>vlcIcon.png</address></picture><br/>
		<br/>
		Play your video in VLC and press pause, then open the Tools menu -> Codec information
		<br/><br/>
		<picture><address>VLCcodecInfo.png</address></picture><br/><br/>
		and then in the codec tab you will see what codec is used in this video.<br/><br/>
		<picture><address>VLCcodecInfo2.png</address></picture><br/><br/>
		
		If the software/hardware OpenGL settings do not make the video work/play smoothly, you can try reencoding the video.<br/>
		<br/>
		If your video does not show at all or if you have other problems, reencode the video.
		Reencoding can fix problems with encoding, large size or low compression, remove or compress sound etc.<br/><br/>
		<video><width>640</width><address>./Videos/VideoRecodingWithHandbrake.mp4</address></video>	<br/><br/>
		
		Try the settings in the video above and once you get it to work, you can start modifying the settings to your liking.


		<Title>Recording using phone camera</Title>
		Here are the settings for making an iPhone record with the compatible h.264 codec: 
		<link><address>./EU_HA_AVIXVideoiPhone.xml</address><text>LINK</text></link><br/>
		
		<Title>Cutting up a large video</Title>
		For cutting up large videos into smaller pieces, you can use the free program LossLessCut.<br/>
		It is available for free download at GitHub: <link><address>https://github.com/mifi/lossless-cut</address><text>LINK</text></link><br/>
		Download the file, [Windows: 7zip] <bold>LosslessCut-win-x64.7z</bold><br/>
		<br/>
		Here is an example that shows when a small video is dropped onto the the program window and then 
		cut in two segments and then exported.<br/>
		<br/>
		The video shows the full original clip, the procedure to make two clips, exporting and then
		proceeds to play the two smaller clips.<br/><br/>
		<video><width>640</width><address>./Videos/LossLessCut-exampleCut.mp4</address></video>	<br/><br/>
		<br/><br/>
		There are more tutorials for LossLessCut on <link><address>https://www.youtube.com/playlist?list=PL_dhPga7ruueJ4GWDtBGf67G6S-QWp8wp</address><text>YouTube</text></link><br/>
	</paragraph>
</chapter> 