http://tsgdoc.socsci.ru.nl/api.php?action=feedcontributions&user=E.vandenberge&feedformat=atomTSG Doc - User contributions [en]2024-03-29T05:23:38ZUser contributionsMediaWiki 1.35.4http://tsgdoc.socsci.ru.nl/index.php?title=RIVER_Lab&diff=5805RIVER Lab2024-03-28T17:28:12Z<p>E.vandenberge: /* Computer */</p>
<hr />
<div>{{Infobox tsg<br />
| image = mmvr.jpg<br />
| image alt = A photo of the Virtual Reality lab<br />
| caption = VR Lab in 2022 (under construction)<br />
| location = MM 00.630<br />
| manuals = <br />
}}<br />
<br />
The Radboud Immersive Virtual Environment Research (RIVER) Lab is an advanced Virtual Reality lab.<br />
<br />
==Physical Properties==<br />
The lab measures 8.0 x 6.6 meters, with a usable tracking area of about 45m2. The large truss framework allows for flexible mounting of tracking systems and other equipment. The floor is covered in 50x50cm carpet tiles.<br />
<br />
==Equipment== <br />
[[File:Valve-index.png|thumb|320px|Valve Index Head Mounted Display]]<br />
Below is the current (October 2022) standard lab setup. However, VR equipment is often changed or adapted for specific experiments. If you have conducted a VR experiment in the past, or are currently conducting a VR experiment, please contact the [[RIVER_Lab/manager|lab manager]] for information on the exact specifications used for your experiment. <br />
<br />
=== Head Mounted Display ===<br />
A Valve Index head mounted display (HMD) is provided. For specifications, see [[Head Mounted Displays]]. The HMD is tethered to the PC on top of the truss framework. Cable length is sufficient for users to reach all corners of the lab. Four Lighthouse 2.0 tracking units are used for tracking the HMD and any additional trackers. Two hand controllers (left & right handed) are available.<br />
<br />
<!--=== Computer ===<br />
A [[Dell_Precision_series#Precision_5820_Tower|Dell Precision 5820]] is used for VR stimuli presentation.--><br />
<br />
== Usage ==<br />
New users will have to follow a course to get familiar with operating the lab. Please contact the [[RIVER_Lab/manager|lab manager]] to make an appointment.<br />
<br />
==See Also==<br />
*[[Head Mounted Displays]]<br />
*[[RIVER_Lab/Legacy|Legacy VR Labs]]<br />
<br />
<!--==References==<br />
<references />--></div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Video_Codecs&diff=5803Video Codecs2024-03-21T15:19:11Z<p>E.vandenberge: /* Neurobs Presentation */</p>
<hr />
<div>We advise users to contact the Technical Support Group to discuss which codec and export settings are best suited for your video stimuli. This page functions only as reference.<br />
<br />
For a guide on recording your screen, see [[Screen Recording with OBS]].<br />
<br />
== Information == <br />
=== Codecs ===<br />
To find out what video codecs are and why they are used, grab a cup of coffee (or other non-alcoholic beverage of choice) and reserve about 45 minutes of your life to watch this comprehensive video: [https://vimeo.com/104554788 How Codecs Work (Vimeo)].<br />
<br />
=== Bitrate ===<br />
<br />
When compressing a video, you will be asked to enter a 'bitrate'. This is what determines how much information is stored for every second of video. The more information, the higher the quality of the video. The tradeoff is file size. The more information, the larger the file. So setting a bitrate is striking a balance between limiting the file size without losing too much quality. The smarter the compression format, the easier this is to achieve. <br />
<br />
If you are using H.264 compression, you can calculate a ballpark estimate for your target bitrate using the Kush gauge, a helpful formula written by a guy named Kush:<br />
Target Bitrate (kbps) = Frame Width (px) * Frame Height (px) * Frame Rate (fps) * Motion Factor * 0.07 / 1000<br />
"Motion Factor" is an arbitrary value (typically 1, 2 or 4) that you can assign to your video based on the amount of (fast) movement in the video. Higher amounts of movement require a higher amount of information to be stored in order to prevent quality loss. <br />
Example calculation for a typical 720p video:<br />
1280 * 720 * 25 * 2 * 0.07 / 1000 = 3225.6 kbps (= 3.2 Mbps)<br />
<br />
Bitrate can be set to Constant (CBR) or Variable (VBR). A variable bitrate can help decreasing file size when your video has a combination of high and low amounts of movement, as it will optimize the distribution of information storage for those parts in your video. The downside is that your video player has to sometimes suddenly decode a lot more information than the previous frame, potentially causing laggy playback. For this reason, we advise using a constant bitrate.<br />
<br />
=== HEVC ===<br />
High Efficiency Video Coding (HEVC, also known as H.265) is the successor to H.264. Together with AVC, VP9 and AV1, it is one of the latest standards that yield significantly better compression rates than H.264. However, support is still far from universal and you may experience performance issues in some programs or on some devices. Therefore, we do not advise storing your videos in these formats unless it is for archival purposes only.<br />
<br />
== Software support ==<br />
{| class="wikitable" <br />
|- <br />
! scope="row" |<br />
! scope="row" colspan="3" | Recommended formats<br />
! scope="row" colspan="2" | Non-Recommended formats<br />
|-<br />
| Codec<br />
| style="text-align: center;" | VP8/VP9<br />
| style="text-align: center;" | Theora<br />
| style="text-align: center;" colspan="2" | H.264<br />
| style="text-align: center;" | XVID<br />
|-<br />
| Container <br />
| .webm .mkv<br />
| .ogv .ogg<br />
| .mp4<br />
| colspan="2" | .avi<br />
|-<br />
| Advantage<br />
| Open Source<br />
| Open Source<br />
| Industry Standard<br />
| colspan="2" | Works in Presentation <br />
|-<br />
! Software<br />
|-<br />
| Chrome/Firefox/Opera<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| <br />
| style="background-color:#F99;" | No<br />
|-<br />
| VLC <br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
|-<br />
| PsychoPy <br />
| style="background-color:#9F9;" | Yes<sup>1</sup><br />
| style="background-color:#9F9;" | Yes<sup>1</sup><br />
| style="background-color:#9F9;" | Yes<sup>1</sup><br />
| style="background-color:#FFF;" | <br />
| style="background-color:#FFF;" | <br />
|-<br />
| Neurobs Presentation<br />
| style="background-color:#F99;" | No <br />
| style="background-color:#F99;" | No <br />
| style="background-color:#F99;" | No<br />
<br />
| style="background-color:#9F9;" | Yes<sup>2</sup><br />
| style="background-color:#9F9;" | Yes<br />
|}<br />
<sup>1</sup> Windows version requires careful installation, ask the TSG for help.<br/><br />
<sup>2</sup> Recommended output for Presentation only. See documentation below for conversion options.<br/><br />
Note: This list is incomplete and will be updated as soon as we have tested all the common and recommended video formats with all supported stimuli software.<br />
<br />
== Neurobs Presentation ==<br />
<br />
Neurobs Presentation does not support the .mp4 container, so you will have to convert your H.264 encoded .mp4 videos to the .avi container. We recommend doing this with [[FFmpeg]]. <br />
<br />
Neurobs recommends using MP4Cam2AVI Easy Converter<ref>http://www.neurobs.com/wiki/Presentation/Video#Video_Encoding</ref>. Be sure to uncheck 'preview On' before opening your files, because the program might crash otherwise.<br />
<br />
<br />
{{Warn|There are performance issues with playing videos in Presentation. Please contact the TSG if you plan to use videos in your Presentation experiment.}}<br />
<br />
== Downloads ==<br />
=== Converters ===<br />
We recommend using [[FFmpeg]] for encoding/converting your videos. If you prefer using a GUI for converting to mp4, Handbrake is a decent option.<br />
{| class="wikitable" <br />
|-<br />
! scope="col" | Name<br />
! scope="col" | Download Location<br />
! scope="col" | Supported formats<br />
! scope="col" | Supported containers<br />
|-<br />
| [[FFmpeg]] || https://ffmpeg.org/ || various || any<br />
|-<br />
| Handbrake || https://handbrake.fr/ || H.264, MPEG-4, MPEG-2, VP3 || mp4, mkv<br />
|-<br />
| MP4Cam2AVI Easy Converter || http://sourceforge.net/projects/mp4cam2avi || H.264 || avi, mp4<br />
|}<br />
<br />
<!--<br />
=== Codec Packs ===<br />
Note: Below is just a list of several codec packs. Please '''do not attempt to install all packs together''', but only choose the one(s) your playback-software requires.<br />
{| class="wikitable" <br />
|-<br />
! scope="col" | Name<br />
! scope="col" | Download Location<br />
|-<br />
| Libavcodec || https://libav.org/<br />
|-<br />
| LAV Filters || https://github.com/Nevcairiel/LAVFilters/releases<br />
|-<br />
| K-Lite Codec Pack || http://www.codecguide.com/download_kl.htm<br />
|-<br />
| FFDshow || http://sourceforge.net/projects/ffdshow-tryout/<br />
|}<br />
--> <br />
=== Codec Viewer ===<br />
Want to know how a video was encoded? You can use MediaInfo (open-source, at https://mediaarea.net/en/MediaInfo) to gain insight into the video and audio codecs, bit rates, resolution, frame rate, etc.<br />
<br />
=== Media Players ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! scope="col" | Name<br />
! scope="col" | Download Location<br />
|-<br />
| VLC || https://www.videolan.org/<br />
|-<br />
| Noldus Mainconcept Codec (Noldus Media Recorder) || [[Media:Noldus MainConcept Codec Package 8.5.26.zip]]<br />
|-<br />
| AVBin (Psychopy) || http://avbin.github.io/AVbin/Home/Home.html<br />
|-<br />
| Gstreamer (Matlab) || http://gstreamer.freedesktop.org/<br />
|}<br />
<br />
==References==<br />
<references /></div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Video_Codecs&diff=5802Video Codecs2024-03-21T15:16:50Z<p>E.vandenberge: /* Software support */</p>
<hr />
<div>We advise users to contact the Technical Support Group to discuss which codec and export settings are best suited for your video stimuli. This page functions only as reference.<br />
<br />
For a guide on recording your screen, see [[Screen Recording with OBS]].<br />
<br />
== Information == <br />
=== Codecs ===<br />
To find out what video codecs are and why they are used, grab a cup of coffee (or other non-alcoholic beverage of choice) and reserve about 45 minutes of your life to watch this comprehensive video: [https://vimeo.com/104554788 How Codecs Work (Vimeo)].<br />
<br />
=== Bitrate ===<br />
<br />
When compressing a video, you will be asked to enter a 'bitrate'. This is what determines how much information is stored for every second of video. The more information, the higher the quality of the video. The tradeoff is file size. The more information, the larger the file. So setting a bitrate is striking a balance between limiting the file size without losing too much quality. The smarter the compression format, the easier this is to achieve. <br />
<br />
If you are using H.264 compression, you can calculate a ballpark estimate for your target bitrate using the Kush gauge, a helpful formula written by a guy named Kush:<br />
Target Bitrate (kbps) = Frame Width (px) * Frame Height (px) * Frame Rate (fps) * Motion Factor * 0.07 / 1000<br />
"Motion Factor" is an arbitrary value (typically 1, 2 or 4) that you can assign to your video based on the amount of (fast) movement in the video. Higher amounts of movement require a higher amount of information to be stored in order to prevent quality loss. <br />
Example calculation for a typical 720p video:<br />
1280 * 720 * 25 * 2 * 0.07 / 1000 = 3225.6 kbps (= 3.2 Mbps)<br />
<br />
Bitrate can be set to Constant (CBR) or Variable (VBR). A variable bitrate can help decreasing file size when your video has a combination of high and low amounts of movement, as it will optimize the distribution of information storage for those parts in your video. The downside is that your video player has to sometimes suddenly decode a lot more information than the previous frame, potentially causing laggy playback. For this reason, we advise using a constant bitrate.<br />
<br />
=== HEVC ===<br />
High Efficiency Video Coding (HEVC, also known as H.265) is the successor to H.264. Together with AVC, VP9 and AV1, it is one of the latest standards that yield significantly better compression rates than H.264. However, support is still far from universal and you may experience performance issues in some programs or on some devices. Therefore, we do not advise storing your videos in these formats unless it is for archival purposes only.<br />
<br />
== Software support ==<br />
{| class="wikitable" <br />
|- <br />
! scope="row" |<br />
! scope="row" colspan="3" | Recommended formats<br />
! scope="row" colspan="2" | Non-Recommended formats<br />
|-<br />
| Codec<br />
| style="text-align: center;" | VP8/VP9<br />
| style="text-align: center;" | Theora<br />
| style="text-align: center;" colspan="2" | H.264<br />
| style="text-align: center;" | XVID<br />
|-<br />
| Container <br />
| .webm .mkv<br />
| .ogv .ogg<br />
| .mp4<br />
| colspan="2" | .avi<br />
|-<br />
| Advantage<br />
| Open Source<br />
| Open Source<br />
| Industry Standard<br />
| colspan="2" | Works in Presentation <br />
|-<br />
! Software<br />
|-<br />
| Chrome/Firefox/Opera<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| <br />
| style="background-color:#F99;" | No<br />
|-<br />
| VLC <br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
|-<br />
| PsychoPy <br />
| style="background-color:#9F9;" | Yes<sup>1</sup><br />
| style="background-color:#9F9;" | Yes<sup>1</sup><br />
| style="background-color:#9F9;" | Yes<sup>1</sup><br />
| style="background-color:#FFF;" | <br />
| style="background-color:#FFF;" | <br />
|-<br />
| Neurobs Presentation<br />
| style="background-color:#F99;" | No <br />
| style="background-color:#F99;" | No <br />
| style="background-color:#F99;" | No<br />
<br />
| style="background-color:#9F9;" | Yes<sup>2</sup><br />
| style="background-color:#9F9;" | Yes<br />
|}<br />
<sup>1</sup> Windows version requires careful installation, ask the TSG for help.<br/><br />
<sup>2</sup> Recommended output for Presentation only. See documentation below for conversion options.<br/><br />
Note: This list is incomplete and will be updated as soon as we have tested all the common and recommended video formats with all supported stimuli software.<br />
<br />
== Neurobs Presentation ==<br />
<br />
Neurobs Presentation does not support the .mp4 container, so you will have to convert your H.264 encoded .mp4 videos to the .avi container. We recommend doing this with [[FFmpeg]]. <br />
<br />
Neurobs recommends using MP4Cam2AVI Easy Converter<ref>http://www.neurobs.com/wiki/Presentation/Video#Video_Encoding</ref>. Be sure to uncheck 'preview On' before opening your files, because the program might crash otherwise.<br />
<br />
== Downloads ==<br />
=== Converters ===<br />
We recommend using [[FFmpeg]] for encoding/converting your videos. If you prefer using a GUI for converting to mp4, Handbrake is a decent option.<br />
{| class="wikitable" <br />
|-<br />
! scope="col" | Name<br />
! scope="col" | Download Location<br />
! scope="col" | Supported formats<br />
! scope="col" | Supported containers<br />
|-<br />
| [[FFmpeg]] || https://ffmpeg.org/ || various || any<br />
|-<br />
| Handbrake || https://handbrake.fr/ || H.264, MPEG-4, MPEG-2, VP3 || mp4, mkv<br />
|-<br />
| MP4Cam2AVI Easy Converter || http://sourceforge.net/projects/mp4cam2avi || H.264 || avi, mp4<br />
|}<br />
<br />
<!--<br />
=== Codec Packs ===<br />
Note: Below is just a list of several codec packs. Please '''do not attempt to install all packs together''', but only choose the one(s) your playback-software requires.<br />
{| class="wikitable" <br />
|-<br />
! scope="col" | Name<br />
! scope="col" | Download Location<br />
|-<br />
| Libavcodec || https://libav.org/<br />
|-<br />
| LAV Filters || https://github.com/Nevcairiel/LAVFilters/releases<br />
|-<br />
| K-Lite Codec Pack || http://www.codecguide.com/download_kl.htm<br />
|-<br />
| FFDshow || http://sourceforge.net/projects/ffdshow-tryout/<br />
|}<br />
--> <br />
=== Codec Viewer ===<br />
Want to know how a video was encoded? You can use MediaInfo (open-source, at https://mediaarea.net/en/MediaInfo) to gain insight into the video and audio codecs, bit rates, resolution, frame rate, etc.<br />
<br />
=== Media Players ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! scope="col" | Name<br />
! scope="col" | Download Location<br />
|-<br />
| VLC || https://www.videolan.org/<br />
|-<br />
| Noldus Mainconcept Codec (Noldus Media Recorder) || [[Media:Noldus MainConcept Codec Package 8.5.26.zip]]<br />
|-<br />
| AVBin (Psychopy) || http://avbin.github.io/AVbin/Home/Home.html<br />
|-<br />
| Gstreamer (Matlab) || http://gstreamer.freedesktop.org/<br />
|}<br />
<br />
==References==<br />
<references /></div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Video_Codecs&diff=5801Video Codecs2024-03-21T15:15:13Z<p>E.vandenberge: /* Neurobs Presentation */</p>
<hr />
<div>We advise users to contact the Technical Support Group to discuss which codec and export settings are best suited for your video stimuli. This page functions only as reference.<br />
<br />
For a guide on recording your screen, see [[Screen Recording with OBS]].<br />
<br />
== Information == <br />
=== Codecs ===<br />
To find out what video codecs are and why they are used, grab a cup of coffee (or other non-alcoholic beverage of choice) and reserve about 45 minutes of your life to watch this comprehensive video: [https://vimeo.com/104554788 How Codecs Work (Vimeo)].<br />
<br />
=== Bitrate ===<br />
<br />
When compressing a video, you will be asked to enter a 'bitrate'. This is what determines how much information is stored for every second of video. The more information, the higher the quality of the video. The tradeoff is file size. The more information, the larger the file. So setting a bitrate is striking a balance between limiting the file size without losing too much quality. The smarter the compression format, the easier this is to achieve. <br />
<br />
If you are using H.264 compression, you can calculate a ballpark estimate for your target bitrate using the Kush gauge, a helpful formula written by a guy named Kush:<br />
Target Bitrate (kbps) = Frame Width (px) * Frame Height (px) * Frame Rate (fps) * Motion Factor * 0.07 / 1000<br />
"Motion Factor" is an arbitrary value (typically 1, 2 or 4) that you can assign to your video based on the amount of (fast) movement in the video. Higher amounts of movement require a higher amount of information to be stored in order to prevent quality loss. <br />
Example calculation for a typical 720p video:<br />
1280 * 720 * 25 * 2 * 0.07 / 1000 = 3225.6 kbps (= 3.2 Mbps)<br />
<br />
Bitrate can be set to Constant (CBR) or Variable (VBR). A variable bitrate can help decreasing file size when your video has a combination of high and low amounts of movement, as it will optimize the distribution of information storage for those parts in your video. The downside is that your video player has to sometimes suddenly decode a lot more information than the previous frame, potentially causing laggy playback. For this reason, we advise using a constant bitrate.<br />
<br />
=== HEVC ===<br />
High Efficiency Video Coding (HEVC, also known as H.265) is the successor to H.264. Together with AVC, VP9 and AV1, it is one of the latest standards that yield significantly better compression rates than H.264. However, support is still far from universal and you may experience performance issues in some programs or on some devices. Therefore, we do not advise storing your videos in these formats unless it is for archival purposes only.<br />
<br />
== Software support ==<br />
{| class="wikitable" <br />
|- <br />
! scope="row" |<br />
! scope="row" colspan="3" | Recommended formats<br />
! scope="row" colspan="2" | Non-Recommended formats<br />
|-<br />
| Codec<br />
| style="text-align: center;" | VP8/VP9<br />
| style="text-align: center;" | Theora<br />
| style="text-align: center;" colspan="2" | H.264<br />
| style="text-align: center;" | XVID<br />
|-<br />
| Container <br />
| .webm .mkv<br />
| .ogv .ogg<br />
| .mp4<br />
| colspan="2" | .avi<br />
|-<br />
| Advantage<br />
| Open Source<br />
| Open Source<br />
| Industry Standard<br />
| colspan="2" | Works in Presentation <br />
|-<br />
! Software<br />
|-<br />
| Chrome/Firefox/Opera<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| <br />
| style="background-color:#F99;" | No<br />
|-<br />
| VLC <br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
|-<br />
| PsychoPy <br />
| style="background-color:#9F9;" | Yes<sup>1</sup><br />
| style="background-color:#9F9;" | Yes<sup>1</sup><br />
| style="background-color:#9F9;" | Yes<sup>1</sup><br />
| style="background-color:#FFF;" | <br />
| style="background-color:#FFF;" | <br />
|-<br />
| Neurobs Presentation<br />
| style="background-color:#F99;" | No <br />
| style="background-color:#F99;" | No <br />
| style="background-color:#F99;" | No<br />
<br />
| style="background-color:#9F9;" | Yes<sup>2</sup><br />
| style="background-color:#9F9;" | Yes<br />
|}<br />
<sup>1</sup> Windows version requires careful installation, consult the TSG for help.<br/><br />
<sup>2</sup> Recommended output for Presentation only. See documentation below for conversion options.<br/><br />
Note: This list is incomplete and will be updated as soon as we have tested all the common and recommended video formats with all supported stimuli software.<br />
<br />
== Neurobs Presentation ==<br />
<br />
Neurobs Presentation does not support the .mp4 container, so you will have to convert your H.264 encoded .mp4 videos to the .avi container. We recommend doing this with [[FFmpeg]]. <br />
<br />
Neurobs recommends using MP4Cam2AVI Easy Converter<ref>http://www.neurobs.com/wiki/Presentation/Video#Video_Encoding</ref>. Be sure to uncheck 'preview On' before opening your files, because the program might crash otherwise.<br />
<br />
== Downloads ==<br />
=== Converters ===<br />
We recommend using [[FFmpeg]] for encoding/converting your videos. If you prefer using a GUI for converting to mp4, Handbrake is a decent option.<br />
{| class="wikitable" <br />
|-<br />
! scope="col" | Name<br />
! scope="col" | Download Location<br />
! scope="col" | Supported formats<br />
! scope="col" | Supported containers<br />
|-<br />
| [[FFmpeg]] || https://ffmpeg.org/ || various || any<br />
|-<br />
| Handbrake || https://handbrake.fr/ || H.264, MPEG-4, MPEG-2, VP3 || mp4, mkv<br />
|-<br />
| MP4Cam2AVI Easy Converter || http://sourceforge.net/projects/mp4cam2avi || H.264 || avi, mp4<br />
|}<br />
<br />
<!--<br />
=== Codec Packs ===<br />
Note: Below is just a list of several codec packs. Please '''do not attempt to install all packs together''', but only choose the one(s) your playback-software requires.<br />
{| class="wikitable" <br />
|-<br />
! scope="col" | Name<br />
! scope="col" | Download Location<br />
|-<br />
| Libavcodec || https://libav.org/<br />
|-<br />
| LAV Filters || https://github.com/Nevcairiel/LAVFilters/releases<br />
|-<br />
| K-Lite Codec Pack || http://www.codecguide.com/download_kl.htm<br />
|-<br />
| FFDshow || http://sourceforge.net/projects/ffdshow-tryout/<br />
|}<br />
--> <br />
=== Codec Viewer ===<br />
Want to know how a video was encoded? You can use MediaInfo (open-source, at https://mediaarea.net/en/MediaInfo) to gain insight into the video and audio codecs, bit rates, resolution, frame rate, etc.<br />
<br />
=== Media Players ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! scope="col" | Name<br />
! scope="col" | Download Location<br />
|-<br />
| VLC || https://www.videolan.org/<br />
|-<br />
| Noldus Mainconcept Codec (Noldus Media Recorder) || [[Media:Noldus MainConcept Codec Package 8.5.26.zip]]<br />
|-<br />
| AVBin (Psychopy) || http://avbin.github.io/AVbin/Home/Home.html<br />
|-<br />
| Gstreamer (Matlab) || http://gstreamer.freedesktop.org/<br />
|}<br />
<br />
==References==<br />
<references /></div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5800FFmpeg2024-03-21T15:13:51Z<p>E.vandenberge: /* Python */</p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. There is also a plugin for Python (https://pypi.org/project/ffmpeg-python/), but it is fairly limited so we recommend using subprocess instead (see example below).<br />
<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
<code>-i</code> specifies input file<br />
<br />
The last argument is always the output file. Without specifying any codec or bit rate (see examples below), FFmpeg will encode the video using some arbitrary default settings.<br />
<br />
===Encoding===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec h264 -b:v 8M -r:v 25 -acodec aac -b:a 256k output.mp4}}<br />
<br />
<code>-vcodec h264</code> specifies video codec. "h264" is a shorthand for FFmpeg's x264 encoder, it is (by default) interchangeable with "x264" or "libx264".<br />
<br />
<code>-b:v 8M</code> sets the video bit rate, in bits per second. You can use "k" or "M" as shorthand for a thousand or a million respectively. See [[Video Codecs]] for help choosing a bit rate. <br />
<br />
<code>-r:v 25</code> sets the video frame rate, in frames per second. By default, the frame rate of the original video is kept.<br />
<br />
<code>-acodec aac</code> specifies audio codec. AAC is used by default if your output is a .mp4 file. For AVI the default is MP3.<br />
<br />
<code>-b:a</code> sets the audio bit rate, in bits per second. Default for AAC is 128k.<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}<br />
<br />
<code>-i</code> is used twice here to add a seceond input file.<br />
<br />
<code>-map 0:v</code> tells FFmpeg to take video from the first input (count starts at 0)<br />
<br />
<code>-map 1:a</code> tells FFmpeg to take audio from the second input (1)<br />
<br />
===Trimming video===<br />
{{cmdline|ffmpeg -i input.mp4 -ss 00:00:04 -to 00:00:06 -vcodec h264 -b:v 8M output.mp4}}<br />
<br />
<code>-ss 00:00:04</code> specifies the starting time, in this case 4 seconds (use format HH:MM:SS, or HH:MM:SS.MS)<br />
<br />
<code>-to 00:00:06</code> specifies end point, in this case 6 seconds (same formatting as above)<br />
<br />
Alternatively, instead of <code>-to</code>, you can use <code>-t 00:00:02</code> to cut exactly 2 seconds from the starting time.<br />
<br />
<code>-vcodec h264</code> specifies video codec. <br />
<br />
<code>-b:v 8M</code> specifies video bit rate, in this case 8Mbit/s, which determines video quality.<br />
<br />
Note: you can use <code>-c copy</code> to trim without re-encoding, but in this case FFmpeg can only cut to the nearest keyframe, so the output may not be exactly the same length as specified.<br />
<br />
===Batching===<br />
The following is a batch script (text file with .bat file extension) that converts all .mp4 files in the specified folder to .avi:<br />
<syntaxhighlight lang="batch" overflow:auto;">@echo off<br />
setlocal enabledelayedexpansion<br />
<br />
:: Set source video folder, as absolute path or relative to this script<br />
set src="videos"<br />
<br />
:: Set destination folder<br />
set dst="videos/converted"<br />
<br />
for /R %src% %%F in (*.mp4) do (<br />
:: Put your FFmpeg command here<br />
ffmpeg -i "%%F" -vcodec copy "%dst%\%%~nF.avi<br />
)<br />
<br />
pause<br />
</syntaxhighlight ><br />
<br />
===Python===<br />
<syntaxhighlight lang="python" overflow:auto;">import subprocess<br />
<br />
inputFile = "input.mov"<br />
outputFile = "output.mp4"<br />
<br />
subprocess.run(f'ffmpeg -i "{inputFile}" -vcodec h264 -b:v 8M "{outputFile}"')<br />
</syntaxhighlight ><br />
The command within <code>subprocess.run()</code> is the same as you would type into the command line. You can use Python's [https://docs.python.org/3/tutorial/inputoutput.html#tut-f-strings string formatting] to insert variables.<br />
<br />
==See Also== <br />
* [[Video Codecs]]</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5799FFmpeg2024-03-21T15:11:35Z<p>E.vandenberge: /* Encoding */</p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. There is also a plugin for Python (https://pypi.org/project/ffmpeg-python/), but it is fairly limited so we recommend using subprocess instead (see example below).<br />
<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
<code>-i</code> specifies input file<br />
<br />
The last argument is always the output file. Without specifying any codec or bit rate (see examples below), FFmpeg will encode the video using some arbitrary default settings.<br />
<br />
===Encoding===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec h264 -b:v 8M -r:v 25 -acodec aac -b:a 256k output.mp4}}<br />
<br />
<code>-vcodec h264</code> specifies video codec. "h264" is a shorthand for FFmpeg's x264 encoder, it is (by default) interchangeable with "x264" or "libx264".<br />
<br />
<code>-b:v 8M</code> sets the video bit rate, in bits per second. You can use "k" or "M" as shorthand for a thousand or a million respectively. See [[Video Codecs]] for help choosing a bit rate. <br />
<br />
<code>-r:v 25</code> sets the video frame rate, in frames per second. By default, the frame rate of the original video is kept.<br />
<br />
<code>-acodec aac</code> specifies audio codec. AAC is used by default if your output is a .mp4 file. For AVI the default is MP3.<br />
<br />
<code>-b:a</code> sets the audio bit rate, in bits per second. Default for AAC is 128k.<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}<br />
<br />
<code>-i</code> is used twice here to add a seceond input file.<br />
<br />
<code>-map 0:v</code> tells FFmpeg to take video from the first input (count starts at 0)<br />
<br />
<code>-map 1:a</code> tells FFmpeg to take audio from the second input (1)<br />
<br />
===Trimming video===<br />
{{cmdline|ffmpeg -i input.mp4 -ss 00:00:04 -to 00:00:06 -vcodec h264 -b:v 8M output.mp4}}<br />
<br />
<code>-ss 00:00:04</code> specifies the starting time, in this case 4 seconds (use format HH:MM:SS, or HH:MM:SS.MS)<br />
<br />
<code>-to 00:00:06</code> specifies end point, in this case 6 seconds (same formatting as above)<br />
<br />
Alternatively, instead of <code>-to</code>, you can use <code>-t 00:00:02</code> to cut exactly 2 seconds from the starting time.<br />
<br />
<code>-vcodec h264</code> specifies video codec. <br />
<br />
<code>-b:v 8M</code> specifies video bit rate, in this case 8Mbit/s, which determines video quality.<br />
<br />
Note: you can use <code>-c copy</code> to trim without re-encoding, but in this case FFmpeg can only cut to the nearest keyframe, so the output may not be exactly the same length as specified.<br />
<br />
===Batching===<br />
The following is a batch script (text file with .bat file extension) that converts all .mp4 files in the specified folder to .avi:<br />
<syntaxhighlight lang="batch" overflow:auto;">@echo off<br />
setlocal enabledelayedexpansion<br />
<br />
:: Set source video folder, as absolute path or relative to this script<br />
set src="videos"<br />
<br />
:: Set destination folder<br />
set dst="videos/converted"<br />
<br />
for /R %src% %%F in (*.mp4) do (<br />
:: Put your FFmpeg command here<br />
ffmpeg -i "%%F" -vcodec copy "%dst%\%%~nF.avi<br />
)<br />
<br />
pause<br />
</syntaxhighlight ><br />
<br />
===Python===<br />
<syntaxhighlight lang="python" overflow:auto;">import subprocess<br />
<br />
inputFile = "input.mov"<br />
outputFile = "output.mp4"<br />
<br />
subprocess.run(f'ffmpeg -i "{inputFile}" -vcodec h264 -b:v 8M "{outputFile}"')<br />
</syntaxhighlight ><br />
The command within <code>subprocess.run()</code> is the same as you would type into the command line. You can use Python's string formatting to insert variables.<br />
<br />
==See Also== <br />
* [[Video Codecs]]</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=User:E.vandenberge/common.css&diff=5798User:E.vandenberge/common.css2024-03-21T14:16:31Z<p>E.vandenberge: </p>
<hr />
<div>/* CSS playground of Erik van den Berge*/<br />
<br />
.mw-wiki-logo {<br />
background-image: url("https://erikvdb.nl/resources/doge.png");<br />
background-position: top center !important;<br />
height:138px !important;<br />
margin-top: 12px !important<br />
}<br />
<br />
.mw-wiki-logo:hover {<br />
background-position: center -138px !important;<br />
}<br />
<br />
#p-logo:after {<br />
content:"Welcome back, Erik!";<br />
position:absolute;<br />
margin-top:2px;<br />
width:95%;<br />
text-align:center;<br />
font-size:0.8em; <br />
color:#9b3c6c;<br />
}<br />
<br />
#p-logo:hover:after {<br />
content:"Return to Home"; <br />
<br />
}<br />
<br />
::selection{ <br />
background:#fff2a8;<br />
}<br />
::-moz-selection{<br />
background:#fff2a8; <br />
}</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Erik_van_den_Berge&diff=5797Erik van den Berge2024-03-20T17:16:08Z<p>E.vandenberge: </p>
<hr />
<div>{{Infobox staff<br />
| name = Erik van den Berge<br />
| image = Erikvdb_wiki.png<br />
| caption = Van den Berge in 2017<br />
| role = {{unbulleted_list | Stimulus Designer | Manager [[RIVER Labs]]}}<br />
| expertise = {{unbulleted_list | 2D Design | 3D Design & Animation | Game & Interaction Design | Virtual Reality | Motion Capture | Video editing | Photography}}<br />
| email = e.vandenberge@ru.nl<br />
| website = [http://www.ru.nl/socialsciences/technicalsupportgroup/about/staff/van-den-berge/ TSG Staff Profile]<br />
| telephone = 17811<br />
| office = 00.324<br />
| building = Maria Montessori<br />
| working_days = {{unbulleted_list | Monday | Tuesday | Wednesday | Thursday }}<br />
}} <br />
<br />
Erik van den Berge is the TSG's resident Unity Developer and Stimulus Designer. He is an expert in the field of digital media, with a bachelor's degree in Communication and Multimedia Design. Erik is specialized in:<br />
*Virtual Reality Development<br />
*Game Design & Development<br />
But can also provide support for:<br />
*2D content creation and manipulation<br />
*3D content creation, including animation<br />
*Video content creation and editing<br />
*Audio recording and editing<br />
<br />
Erik is manager of the [[RIVER_Lab|Radboud Immersive Virtual Environment Research lab]] and also does a vague attempt to keep this Wiki up-to-date (if you see anything that needs updating, contact him!).<br />
<br />
==Software Support==<br />
* Adobe Illustrator<br />
* Adobe Photoshop<br />
* Adobe Premiere Pro<br />
* Audacity<br />
* Autodesk 3Ds Max<br />
* Autodesk Motionbuilder <br />
* Blender<br />
* DaVinci Resolve<br />
* [[FFmpeg]]<br />
* HTML5 + CSS<br />
* Metus Ingest<br />
* [[Screen_Recording_with_OBS|OBS Studio]]<br />
* [[Python]]<br />
* Qualisys QTM<br />
* Twine<br />
* Unity<br />
<!--* Worldviz Vizard--><br />
<br />
==External Links==<br />
[http://www.ru.nl/socialsciences/technicalsupportgroup/about/staff/van-den-berge/ TSG Staff Profile]<br />
<br />
[[Category:TSG Staff]]</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Erik_van_den_Berge&diff=5796Erik van den Berge2024-03-20T17:15:45Z<p>E.vandenberge: /* Software Support */</p>
<hr />
<div>{{Infobox staff<br />
| name = Erik van den Berge<br />
| image = Erikvdb_wiki.png<br />
| caption = Van den Berge in 2017<br />
| role = {{unbulleted_list | Stimulus Designer | Manager [[RIVER Labs]]}}<br />
| expertise = {{unbulleted_list | 2D Design | 3D Design & Animation | Game & Interaction Design | Virtual Reality | Motion Capture | Video editing | Photography}}<br />
| email = e.vandenberge@ru.nl<br />
| website = [http://www.ru.nl/socialsciences/technicalsupportgroup/about/staff/van-den-berge/ TSG Staff Profile]<br />
| telephone = 17811<br />
| office = 00.324<br />
| building = Maria Montessori<br />
| working_days = {{unbulleted_list | Monday | Tuesday | Wednesday | Thursday }}<br />
}} <br />
<br />
Erik van den Berge is the TSG's resident Unity Developer and Stimulus Designer. He is an expert in the field of digital media, with a bachelor's degree in Communication and Multimedia Design. Erik is specialized in:<br />
*Virtual Reality Development<br />
*Game Design & Development<br />
But can also provide support for:<br />
*2D content creation and manipulation<br />
*3D content creation, including animation<br />
*Video content creation and editing<br />
<br />
<br />
Erik is manager of the [[RIVER_Lab|Radboud Immersive Virtual Environment Research lab]] and also does a vague attempt to keep this Wiki up-to-date (if you see anything that needs updating, contact him!).<br />
<br />
==Software Support==<br />
* Adobe Illustrator<br />
* Adobe Photoshop<br />
* Adobe Premiere Pro<br />
* Audacity<br />
* Autodesk 3Ds Max<br />
* Autodesk Motionbuilder <br />
* Blender<br />
* DaVinci Resolve<br />
* [[FFmpeg]]<br />
* HTML5 + CSS<br />
* Metus Ingest<br />
* [[Screen_Recording_with_OBS|OBS Studio]]<br />
* [[Python]]<br />
* Qualisys QTM<br />
* Twine<br />
* Unity<br />
<!--* Worldviz Vizard--><br />
<br />
==External Links==<br />
[http://www.ru.nl/socialsciences/technicalsupportgroup/about/staff/van-den-berge/ TSG Staff Profile]<br />
<br />
[[Category:TSG Staff]]</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Erik_van_den_Berge&diff=5795Erik van den Berge2024-03-20T17:15:16Z<p>E.vandenberge: /* Software Support */</p>
<hr />
<div>{{Infobox staff<br />
| name = Erik van den Berge<br />
| image = Erikvdb_wiki.png<br />
| caption = Van den Berge in 2017<br />
| role = {{unbulleted_list | Stimulus Designer | Manager [[RIVER Labs]]}}<br />
| expertise = {{unbulleted_list | 2D Design | 3D Design & Animation | Game & Interaction Design | Virtual Reality | Motion Capture | Video editing | Photography}}<br />
| email = e.vandenberge@ru.nl<br />
| website = [http://www.ru.nl/socialsciences/technicalsupportgroup/about/staff/van-den-berge/ TSG Staff Profile]<br />
| telephone = 17811<br />
| office = 00.324<br />
| building = Maria Montessori<br />
| working_days = {{unbulleted_list | Monday | Tuesday | Wednesday | Thursday }}<br />
}} <br />
<br />
Erik van den Berge is the TSG's resident Unity Developer and Stimulus Designer. He is an expert in the field of digital media, with a bachelor's degree in Communication and Multimedia Design. Erik is specialized in:<br />
*Virtual Reality Development<br />
*Game Design & Development<br />
But can also provide support for:<br />
*2D content creation and manipulation<br />
*3D content creation, including animation<br />
*Video content creation and editing<br />
<br />
<br />
Erik is manager of the [[RIVER_Lab|Radboud Immersive Virtual Environment Research lab]] and also does a vague attempt to keep this Wiki up-to-date (if you see anything that needs updating, contact him!).<br />
<br />
==Software Support==<br />
* Adobe Illustrator<br />
* Adobe Photoshop<br />
* Adobe Premiere Pro<br />
* Autodesk 3Ds Max<br />
* Autodesk Motionbuilder <br />
* Blender<br />
* DaVinci Resolve<br />
* [[FFmpeg]]<br />
* HTML5 + CSS<br />
* Metus Ingest<br />
* [[Screen_Recording_with_OBS|OBS Studio]]<br />
* [[Python]]<br />
* Qualisys QTM<br />
* Twine<br />
* Unity<br />
<!--* Worldviz Vizard--><br />
<br />
==External Links==<br />
[http://www.ru.nl/socialsciences/technicalsupportgroup/about/staff/van-den-berge/ TSG Staff Profile]<br />
<br />
[[Category:TSG Staff]]</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Erik_van_den_Berge&diff=5794Erik van den Berge2024-03-20T17:12:54Z<p>E.vandenberge: /* Software Support */</p>
<hr />
<div>{{Infobox staff<br />
| name = Erik van den Berge<br />
| image = Erikvdb_wiki.png<br />
| caption = Van den Berge in 2017<br />
| role = {{unbulleted_list | Stimulus Designer | Manager [[RIVER Labs]]}}<br />
| expertise = {{unbulleted_list | 2D Design | 3D Design & Animation | Game & Interaction Design | Virtual Reality | Motion Capture | Video editing | Photography}}<br />
| email = e.vandenberge@ru.nl<br />
| website = [http://www.ru.nl/socialsciences/technicalsupportgroup/about/staff/van-den-berge/ TSG Staff Profile]<br />
| telephone = 17811<br />
| office = 00.324<br />
| building = Maria Montessori<br />
| working_days = {{unbulleted_list | Monday | Tuesday | Wednesday | Thursday }}<br />
}} <br />
<br />
Erik van den Berge is the TSG's resident Unity Developer and Stimulus Designer. He is an expert in the field of digital media, with a bachelor's degree in Communication and Multimedia Design. Erik is specialized in:<br />
*Virtual Reality Development<br />
*Game Design & Development<br />
But can also provide support for:<br />
*2D content creation and manipulation<br />
*3D content creation, including animation<br />
*Video content creation and editing<br />
<br />
<br />
Erik is manager of the [[RIVER_Lab|Radboud Immersive Virtual Environment Research lab]] and also does a vague attempt to keep this Wiki up-to-date (if you see anything that needs updating, contact him!).<br />
<br />
==Software Support==<br />
* Adobe Illustrator<br />
* Adobe Photoshop<br />
* Adobe Premiere Pro<br />
* Autodesk 3Ds Max<br />
* Autodesk Motionbuilder <br />
* Blender<br />
* DaVinci Resolve<br />
* [[FFmpeg]]<br />
* HTML5 + CSS<br />
* Metus Ingest<br />
* [[Python]]<br />
* Qualisys QTM<br />
* Twine<br />
* Unity<br />
<!--* Worldviz Vizard--><br />
<br />
==External Links==<br />
[http://www.ru.nl/socialsciences/technicalsupportgroup/about/staff/van-den-berge/ TSG Staff Profile]<br />
<br />
[[Category:TSG Staff]]</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Erik_van_den_Berge&diff=5793Erik van den Berge2024-03-20T17:12:14Z<p>E.vandenberge: /* Software Support */</p>
<hr />
<div>{{Infobox staff<br />
| name = Erik van den Berge<br />
| image = Erikvdb_wiki.png<br />
| caption = Van den Berge in 2017<br />
| role = {{unbulleted_list | Stimulus Designer | Manager [[RIVER Labs]]}}<br />
| expertise = {{unbulleted_list | 2D Design | 3D Design & Animation | Game & Interaction Design | Virtual Reality | Motion Capture | Video editing | Photography}}<br />
| email = e.vandenberge@ru.nl<br />
| website = [http://www.ru.nl/socialsciences/technicalsupportgroup/about/staff/van-den-berge/ TSG Staff Profile]<br />
| telephone = 17811<br />
| office = 00.324<br />
| building = Maria Montessori<br />
| working_days = {{unbulleted_list | Monday | Tuesday | Wednesday | Thursday }}<br />
}} <br />
<br />
Erik van den Berge is the TSG's resident Unity Developer and Stimulus Designer. He is an expert in the field of digital media, with a bachelor's degree in Communication and Multimedia Design. Erik is specialized in:<br />
*Virtual Reality Development<br />
*Game Design & Development<br />
But can also provide support for:<br />
*2D content creation and manipulation<br />
*3D content creation, including animation<br />
*Video content creation and editing<br />
<br />
<br />
Erik is manager of the [[RIVER_Lab|Radboud Immersive Virtual Environment Research lab]] and also does a vague attempt to keep this Wiki up-to-date (if you see anything that needs updating, contact him!).<br />
<br />
==Software Support==<br />
* Adobe Illustrator<br />
* Adobe Photoshop<br />
* Adobe Premiere Pro<br />
* Autodesk 3Ds Max<br />
* Autodesk Motionbuilder <br />
* Blender<br />
* DaVinci Resolve<br />
* HTML5 + CSS<br />
* Metus Ingest<br />
* [[Python]]<br />
* Qualisys QTM<br />
* Twine<br />
* Unity<br />
<!--* Worldviz Vizard--><br />
<br />
==External Links==<br />
[http://www.ru.nl/socialsciences/technicalsupportgroup/about/staff/van-den-berge/ TSG Staff Profile]<br />
<br />
[[Category:TSG Staff]]</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Truus_Rensen&diff=5792Truus Rensen2024-03-20T17:10:52Z<p>E.vandenberge: </p>
<hr />
<div>{{Infobox staff<br />
| name = Truus Rensen<br />
| image = Default-avatar.jpg<br />
| caption = <br />
| role = IT Support<br />
| expertise = <br />
| email = truus.rensen@ru.nl<br />
| website = <br />
| telephone = 13019<br />
| office = 00.318<br />
| building = Maria Montessori<br />
| working_days = {{unbulleted_list | Monday | Tuesday | Wednesday | Thursday | Friday }}<br />
}} <br />
<br />
Truus provides IT support for the BSI and DCC labs. <br />
<br />
<br />
[[Category:TSG Staff]]</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5791FFmpeg2024-03-20T16:37:04Z<p>E.vandenberge: /* Trimming video */</p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. There is also a plugin for Python (https://pypi.org/project/ffmpeg-python/), but it is fairly limited so we recommend using subprocess instead (see example below).<br />
<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
<code>-i</code> specifies input file<br />
<br />
The last argument is always the output file. Without specifying any codec or bit rate (see examples below), FFmpeg will encode the video using some arbitrary default settings.<br />
<br />
===Encoding===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec h264 -b:v 8M -r:v 25 -acodec aac -b:a 256k output.mp4}}<br />
<br />
<code>-vcodec h264</code> specifies video codec. "h264" is a shorthand for FFmpeg's x264 encoder, it is (by default) interchangeable with "x264" or "libx264".<br />
<br />
<code>-b:v 8M</code> sets the video bit rate, in bits per second. You can use "k" or "M" as shorthand for a thousand or a million respectively. See [[Video Codecs]] for help choosing a bit rate. <br />
<br />
<code>-r:v 25</code> sets the video frame rate, in frames per second. <br />
<br />
<code>-acodec aac</code> specifies audio codec. AAC is used by default if your output is a .mp4 file. For AVI the default is MP3.<br />
<br />
<code>-b:a</code> sets the audio bit rate, in bits per second. Default for AAC is 128k.<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}<br />
<br />
<code>-i</code> is used twice here to add a seceond input file.<br />
<br />
<code>-map 0:v</code> tells FFmpeg to take video from the first input (count starts at 0)<br />
<br />
<code>-map 1:a</code> tells FFmpeg to take audio from the second input (1)<br />
<br />
===Trimming video===<br />
{{cmdline|ffmpeg -i input.mp4 -ss 00:00:04 -to 00:00:06 -vcodec h264 -b:v 8M output.mp4}}<br />
<br />
<code>-ss 00:00:04</code> specifies the starting time, in this case 4 seconds (use format HH:MM:SS, or HH:MM:SS.MS)<br />
<br />
<code>-to 00:00:06</code> specifies end point, in this case 6 seconds (same formatting as above)<br />
<br />
Alternatively, instead of <code>-to</code>, you can use <code>-t 00:00:02</code> to cut exactly 2 seconds from the starting time.<br />
<br />
<code>-vcodec h264</code> specifies video codec. <br />
<br />
<code>-b:v 8M</code> specifies video bit rate, in this case 8Mbit/s, which determines video quality.<br />
<br />
Note: you can use <code>-c copy</code> to trim without re-encoding, but in this case FFmpeg can only cut to the nearest keyframe, so the output may not be exactly the same length as specified.<br />
<br />
===Batching===<br />
The following is a batch script (text file with .bat file extension) that converts all .mp4 files in the specified folder to .avi:<br />
<syntaxhighlight lang="batch" overflow:auto;">@echo off<br />
setlocal enabledelayedexpansion<br />
<br />
:: Set source video folder, as absolute path or relative to this script<br />
set src="videos"<br />
<br />
:: Set destination folder<br />
set dst="videos/converted"<br />
<br />
for /R %src% %%F in (*.mp4) do (<br />
:: Put your FFmpeg command here<br />
ffmpeg -i "%%F" -vcodec copy "%dst%\%%~nF.avi<br />
)<br />
<br />
pause<br />
</syntaxhighlight ><br />
<br />
===Python===<br />
<syntaxhighlight lang="python" overflow:auto;">import subprocess<br />
<br />
inputFile = "input.mov"<br />
outputFile = "output.mp4"<br />
<br />
subprocess.run(f'ffmpeg -i "{inputFile}" -vcodec h264 -b:v 8M "{outputFile}"')<br />
</syntaxhighlight ><br />
The command within <code>subprocess.run()</code> is the same as you would type into the command line. You can use Python's string formatting to insert variables.<br />
<br />
==See Also== <br />
* [[Video Codecs]]</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5790FFmpeg2024-03-20T16:35:42Z<p>E.vandenberge: /* Usage */</p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. There is also a plugin for Python (https://pypi.org/project/ffmpeg-python/), but it is fairly limited so we recommend using subprocess instead (see example below).<br />
<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
<code>-i</code> specifies input file<br />
<br />
The last argument is always the output file. Without specifying any codec or bit rate (see examples below), FFmpeg will encode the video using some arbitrary default settings.<br />
<br />
===Encoding===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec h264 -b:v 8M -r:v 25 -acodec aac -b:a 256k output.mp4}}<br />
<br />
<code>-vcodec h264</code> specifies video codec. "h264" is a shorthand for FFmpeg's x264 encoder, it is (by default) interchangeable with "x264" or "libx264".<br />
<br />
<code>-b:v 8M</code> sets the video bit rate, in bits per second. You can use "k" or "M" as shorthand for a thousand or a million respectively. See [[Video Codecs]] for help choosing a bit rate. <br />
<br />
<code>-r:v 25</code> sets the video frame rate, in frames per second. <br />
<br />
<code>-acodec aac</code> specifies audio codec. AAC is used by default if your output is a .mp4 file. For AVI the default is MP3.<br />
<br />
<code>-b:a</code> sets the audio bit rate, in bits per second. Default for AAC is 128k.<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}<br />
<br />
<code>-i</code> is used twice here to add a seceond input file.<br />
<br />
<code>-map 0:v</code> tells FFmpeg to take video from the first input (count starts at 0)<br />
<br />
<code>-map 1:a</code> tells FFmpeg to take audio from the second input (1)<br />
<br />
===Trimming video===<br />
{{cmdline|ffmpeg -i input.mp4 -ss 00:00:04 -to 00:00:06 -vcodec h264 -b:v 8M output.mp4}}<br />
<br />
<code>-ss 00:00:04</code> specifies the starting time, in this case 4 seconds (use format HH:MM:SS, or HH:MM:SS.MS)<br />
<br />
<code>-to 00:00:06</code> specifies end point, in this case 6 seconds (same formatting as above)<br />
<br />
Alternatively, instead of <code>-to</code>, you can use <code>-t 00:00:02</code> to cut exactly 2 seconds from the starting time.<br />
<br />
<code>-vcodec h264</code> specifies video codec. <br />
<br />
<code>-b:v 8M</code> specifies video bit rate, in this case 8Mbit/s, which determines video quality.<br />
<br />
Note: you can use <code>-c copy</code> to trim without re-encoding, but FFmpeg can only cut to the nearest keyframe, so the output may not be exactly the same length as specified.<br />
<br />
===Batching===<br />
The following is a batch script (text file with .bat file extension) that converts all .mp4 files in the specified folder to .avi:<br />
<syntaxhighlight lang="batch" overflow:auto;">@echo off<br />
setlocal enabledelayedexpansion<br />
<br />
:: Set source video folder, as absolute path or relative to this script<br />
set src="videos"<br />
<br />
:: Set destination folder<br />
set dst="videos/converted"<br />
<br />
for /R %src% %%F in (*.mp4) do (<br />
:: Put your FFmpeg command here<br />
ffmpeg -i "%%F" -vcodec copy "%dst%\%%~nF.avi<br />
)<br />
<br />
pause<br />
</syntaxhighlight ><br />
<br />
===Python===<br />
<syntaxhighlight lang="python" overflow:auto;">import subprocess<br />
<br />
inputFile = "input.mov"<br />
outputFile = "output.mp4"<br />
<br />
subprocess.run(f'ffmpeg -i "{inputFile}" -vcodec h264 -b:v 8M "{outputFile}"')<br />
</syntaxhighlight ><br />
The command within <code>subprocess.run()</code> is the same as you would type into the command line. You can use Python's string formatting to insert variables.<br />
<br />
==See Also== <br />
* [[Video Codecs]]</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5789FFmpeg2024-03-20T16:19:25Z<p>E.vandenberge: /* Python */</p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. There is also a plugin for Python (https://pypi.org/project/ffmpeg-python/), but it is fairly limited so we recommend using subprocess instead (see example below).<br />
<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
<code>-i</code> specifies input file<br />
<br />
The last argument is always the output file. Without specifying any codec or bit rate (see examples below), FFmpeg will encode the video using some arbitrary default settings.<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}<br />
<br />
<code>-i</code> is used twice here to add a seceond input file.<br />
<br />
<code>-map 0:v</code> tells FFmpeg to take video from the first input (count starts at 0)<br />
<br />
<code>-map 1:a</code> tells FFmpeg to take audio from the second input (1)<br />
<br />
===Trimming video===<br />
{{cmdline|ffmpeg -i input.mp4 -ss 00:00:04 -to 00:00:06 -vcodec h264 -b:v 8M output.mp4}}<br />
<br />
<code>-ss 00:00:04</code> specifies the starting time, in this case 4 seconds (use format HH:MM:SS, or HH:MM:SS.MS)<br />
<br />
<code>-to 00:00:06</code> specifies end point, in this case 6 seconds (same formatting as above)<br />
<br />
Alternatively, instead of <code>-to</code>, you can use <code>-t 00:00:02</code> to cut exactly 2 seconds from the starting time.<br />
<br />
<code>-vcodec h264</code> specifies video codec. <br />
<br />
<code>-b:v 8M</code> specifies video bit rate, in this case 8Mbit/s, which determines video quality.<br />
<br />
Note: you can use <code>-c copy</code> to trim without re-encoding, but FFmpeg can only cut to the nearest keyframe, so the output may not be exactly the same length as specified.<br />
<br />
===Batching===<br />
The following is a batch script (text file with .bat file extension) that converts all .mp4 files in the specified folder to .avi:<br />
<syntaxhighlight lang="batch" overflow:auto;">@echo off<br />
setlocal enabledelayedexpansion<br />
<br />
:: Set source video folder, as absolute path or relative to this script<br />
set src="videos"<br />
<br />
:: Set destination folder<br />
set dst="videos/converted"<br />
<br />
for /R %src% %%F in (*.mp4) do (<br />
:: Put your FFmpeg command here<br />
ffmpeg -i "%%F" -vcodec copy "%dst%\%%~nF.avi<br />
)<br />
<br />
pause<br />
</syntaxhighlight ><br />
<br />
===Python===<br />
<syntaxhighlight lang="python" overflow:auto;">import subprocess<br />
<br />
inputFile = "input.mov"<br />
outputFile = "output.mp4"<br />
<br />
subprocess.run(f'ffmpeg -i "{inputFile}" -vcodec h264 -b:v 8M "{outputFile}"')<br />
</syntaxhighlight ><br />
The command within <code>subprocess.run()</code> is the same as you would type into the command line. You can use Python's string formatting to insert variables.<br />
<br />
==See Also== <br />
* [[Video Codecs]]</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Sound_Recording_Lab&diff=5788Sound Recording Lab2024-03-20T16:16:29Z<p>E.vandenberge: /* Equipment */</p>
<hr />
<div>{{Infobox tsg<br />
| name = Sound Recording Labs<br />
| image = <br />
| caption = <br />
| manuals = {{bulleted list<br />
| [[Media:Beer_Audio.pdf|Lab Setup and User Manual]]<br />
}}<br />
}}<br />
<br />
Our sound recording labs are special, sound-proofed rooms for speech recording and critical audio listening.<br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
<!--==Physical Properties==<br />
Dimensions, special features, etc.--><br />
<br />
==Equipment== <br />
*[[Computers#Lab Computer|Dell T3600]]<br />
*[[Monitors|Benq XL2420Z]]<br />
*[[Behringer X-Air XR18]]<br />
*[[Microphones|Shure SM57]]<br />
<br />
==Usage==<br />
See [[Media:Beer_Audio.pdf|Lab Setup and User Manual]]<br />
<br />
==See Also== <!-- Optional --><br />
*[[Behringer X-Air XR18]]<br />
<br />
<!--==References==<br />
<references /> <br />
<br />
==External Links==<br />
--></div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Main_Page&diff=5787Main Page2024-03-20T16:15:50Z<p>E.vandenberge: </p>
<hr />
<div>Welcome to the TSG Wiki. <br />
<br />
On this wiki you will find documentation for the Hardware, Software and Research Equipment used in the lab environments of the research facilities of the Faculty of Social Sciences, as well as other useful information. <br />
To learn more about the Technical Support Group, visit [http://www.ru.nl/socialsciences/technicalsupportgroup/ our website] or the [[TSG info|about]] section.<br />
<br />
<div style="width:100%;"><br />
<br />
{{Main Page/Frame<br />
| color = be311a<br />
| title = Hardware Documentation<br />
| content = {{Bulleted list<br />
| [[Balance Board]]<br />
| [[Behringer X-Air XR18]] (Audio Mixer)<br />
| [[Biopac]]<br />
| [[Brainvision]]<br />
| [[ButtonBoxes]] <br />
| [[Camcorders]]<br />
| [[Ipod]] (Video Recording)<br />
| [[Computers]]<br />
| [[Eyetrackers]]<br />
| [[Head Mounted Displays]]<br />
| [[Headphones]]<br />
| [[JoySticks]]<br />
| [[Kinect]]<br />
| [[Laptops]]<br />
| [[Microphones]]<br />
| [[Monitors]]<br />
| [[Optotrak]] <br />
| [[plux biosignals]] <br />
| [[Structure sensor]]<br />
| [[Surveillance Camera]]<br />
| [[TemperatureHumidity]]<br />
| [[TMSi]] <br />
| [[Vertical Sync sensor]] <br />
}}<br />
}}<br />
<br />
{{Main Page/Frame<br />
| color = be311a<br />
| title = Software Documentation<br />
| content = {{Bulleted list<br />
| [[DataHub]] (LSL)<br />
| [[FFmpeg]] (Video Conversion)<br />
| [[Matlab]]<br />
| [[Presentation]]<br />
| [[Psychopy]]<br />
| [[Python]]<br />
| [[System Image]]<br />
| [[Unity]]<br />
}}<br/><br />
;Online Experiments<br />
{{Bulleted list <br />
| [[online experiment systems|Overview of Online Systems]]<br />
| [[jsPsych]]<br />
| [[LimeSurvey]]<br />
| [[Qualtrics]]<br />
| [[Toolbox|Toolbox for online experiments]]<br />
| [[Web development]]<br />
}}<br/><br />
;Miscellaneous<br />
{{Bulleted list <br />
| [[Audio]] <br />
| [[Data Files]]<br />
| [https://wiki.dcc.science.ru.nl DCC Cluster]<br />
| [[Gitlab Social Sciences]]<br />
| [[Mattermost Social Sciences]]<br />
| [[Personal and Group drive Data storage ]]<br />
| [[Screen Recording with OBS|Screen Recording]]<br />
| [[Video Codecs]] <br />
| [[Virtualization Server]]<br />
}}<br />
}}<br />
<br />
{{Main Page/Frame<br />
| color = be311a<br />
| title = Lab Documentation<br />
| content = {{Bulleted list<br />
| [[BalanceBoard Lab]]<br />
| [[Cubicles]] (Standard Labs)<br />
| [[EEG Lab]]<br />
| [[Eye Tracker Lab]]<br />
| [[RIVER Lab]] (Virtual Reality)<br />
| [[SensoriMotorLab]]<br />
| [[Sound Recording Lab]]<br />
| [[VoiceKey Lab]]<br />
| [[TMS Lab]]<br />
| [[BCI Lab]]<br />
}}<br/><br />
;Lab Use Policy and Guidelines<br />
{{Bulleted list<br />
| [[Booking labs]]<br />
| [[Media:EEG_lab_user_guide.pdf|EEG lab user guide]]<br />
| [[Media:Cleaningprocedure_EEG.pdf|EEG cleaning protocol]]<br />
| [[Using labs]]<br />
}}<br />
}}<br />
<br />
</div></div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Main_Page&diff=5786Main Page2024-03-20T16:14:34Z<p>E.vandenberge: </p>
<hr />
<div>Welcome to the TSG Wiki. <br />
<br />
On this wiki you will find documentation for the Hardware, Software and Research Equipment used in the lab environments of the research facilities of the Faculty of Social Sciences, as well as other useful information. <br />
To learn more about the Technical Support Group, visit [http://www.ru.nl/socialsciences/technicalsupportgroup/ our website] or the [[TSG info|about]] section.<br />
<br />
<div style="width:100%;"><br />
<br />
{{Main Page/Frame<br />
| color = be311a<br />
| title = Hardware Documentation<br />
| content = {{Bulleted list<br />
| [[Balance Board]]<br />
| [[Behringer X-Air XR18]] (Audio Mixer)<br />
| [[Biopac]]<br />
| [[Brainvision]]<br />
| [[ButtonBoxes]] <br />
| [[Camcorders]]<br />
| [[Ipod]] (Video Recording)<br />
| [[Computers]]<br />
| [[Eyetrackers]]<br />
| [[Head Mounted Displays]]<br />
| [[Headphones]]<br />
| [[JoySticks]]<br />
| [[Kinect]]<br />
| [[Laptops]]<br />
| [[Microphones]]<br />
| [[Monitors]]<br />
| [[Optotrak]] <br />
| [[plux biosignals]] <br />
| [[Structure sensor]]<br />
| [[Surveillance Camera]]<br />
| [[TemperatureHumidity]]<br />
| [[TMSi]] <br />
| [[Vertical Sync sensor]] <br />
}}<br />
}}<br />
<br />
{{Main Page/Frame<br />
| color = be311a<br />
| title = Software Documentation<br />
| content = {{Bulleted list<br />
| [[DataHub]] (LSL)<br />
| [[FFmpeg]] (Video Conversion)<br />
| [[Matlab]]<br />
| [[Presentation]]<br />
| [[Psychopy]]<br />
| [[Python]]<br />
| [[System Image]]<br />
| [[Unity]]<br />
| [[Web development]]<br />
}}<br/><br />
;Online Experiments<br />
{{Bulleted list <br />
| [[online experiment systems|Overview of Online Systems]]<br />
| [[jsPsych]]<br />
| [[LimeSurvey]]<br />
| [[Toolbox|Toolbox for online experiments]]<br />
| [[Qualtrics]]<br />
}}<br/><br />
;Miscellaneous<br />
{{Bulleted list <br />
| [[Audio]] <br />
| [[Data Files]]<br />
| [https://wiki.dcc.science.ru.nl DCC Cluster]<br />
| [[Gitlab Social Sciences]]<br />
| [[Mattermost Social Sciences]]<br />
| [[Personal and Group drive Data storage ]]<br />
| [[Screen Recording with OBS|Screen Recording]]<br />
| [[Video Codecs]] <br />
| [[Virtualization Server]]<br />
}}<br />
}}<br />
<br />
{{Main Page/Frame<br />
| color = be311a<br />
| title = Lab Documentation<br />
| content = {{Bulleted list<br />
| [[BalanceBoard Lab]]<br />
| [[Cubicles]] (Standard Labs)<br />
| [[EEG Lab]]<br />
| [[Eye Tracker Lab]]<br />
| [[RIVER Lab]] (Virtual Reality)<br />
| [[SensoriMotorLab]]<br />
| [[Sound Recording Lab]]<br />
| [[VoiceKey Lab]]<br />
| [[TMS Lab]]<br />
| [[BCI Lab]]<br />
}}<br/><br />
;Lab Use Policy and Guidelines<br />
{{Bulleted list<br />
| [[Booking labs]]<br />
| [[Media:EEG_lab_user_guide.pdf|EEG lab user guide]]<br />
| [[Media:Cleaningprocedure_EEG.pdf|EEG cleaning protocol]]<br />
| [[Using labs]]<br />
}}<br />
}}<br />
<br />
</div></div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Main_Page&diff=5785Main Page2024-03-20T16:14:10Z<p>E.vandenberge: </p>
<hr />
<div>Welcome to the TSG Wiki. <br />
<br />
On this wiki you will find documentation for the Hardware, Software and Research Equipment used in the lab environments of the research facilities of the Faculty of Social Sciences, as well as other useful information. <br />
To learn more about the Technical Support Group, visit [http://www.ru.nl/socialsciences/technicalsupportgroup/ our website] or the [[TSG info|about]] section.<br />
<br />
<div style="width:100%;"><br />
<br />
{{Main Page/Frame<br />
| color = be311a<br />
| title = Hardware Documentation<br />
| content = {{Bulleted list<br />
| [[Balance Board]]<br />
| [[Behringer X-Air XR18]] (Audio Mixer)<br />
| [[Biopac]]<br />
| [[Brainvision]]<br />
| [[ButtonBoxes]] <br />
| [[Camcorders]]<br />
| [[Ipod]] (Video Recording)<br />
| [[Computers]]<br />
| [[Eyetrackers]]<br />
| [[Head Mounted Displays]]<br />
| [[Headphones]]<br />
| [[JoySticks]]<br />
| [[Kinect]]<br />
| [[Laptops]]<br />
| [[Microphones]]<br />
| [[Monitors]]<br />
| [[Optotrak]] <br />
| [[plux biosignals]] <br />
| [[Structure sensor]]<br />
| [[Surveillance Camera]]<br />
| [[TemperatureHumidity]]<br />
| [[TMSi]] <br />
| [[Vertical Sync sensor]] <br />
}}<br />
}}<br />
<br />
{{Main Page/Frame<br />
| color = be311a<br />
| title = Software Documentation<br />
| content = {{Bulleted list<br />
| [[Audio]] <br />
| [[DataHub]] (LSL)<br />
| [[FFmpeg]] (Video Conversion)<br />
| [[Matlab]]<br />
| [[Presentation]]<br />
| [[Psychopy]]<br />
| [[Python]]<br />
| [[System Image]]<br />
| [[Unity]]<br />
| [[Web development]]<br />
}}<br/><br />
;Online Experiments<br />
{{Bulleted list <br />
| [[online experiment systems|Overview of Online Systems]]<br />
| [[jsPsych]]<br />
| [[LimeSurvey]]<br />
| [[Toolbox|Toolbox for online experiments]]<br />
| [[Qualtrics]]<br />
}}<br/><br />
;Miscellaneous<br />
{{Bulleted list <br />
| [[Data Files]]<br />
| [https://wiki.dcc.science.ru.nl DCC Cluster]<br />
| [[Gitlab Social Sciences]]<br />
| [[Mattermost Social Sciences]]<br />
| [[Personal and Group drive Data storage ]]<br />
| [[Screen Recording with OBS|Screen Recording]]<br />
| [[Video Codecs]] <br />
| [[Virtualization Server]]<br />
}}<br />
}}<br />
<br />
{{Main Page/Frame<br />
| color = be311a<br />
| title = Lab Documentation<br />
| content = {{Bulleted list<br />
| [[BalanceBoard Lab]]<br />
| [[Cubicles]] (Standard Labs)<br />
| [[EEG Lab]]<br />
| [[Eye Tracker Lab]]<br />
| [[RIVER Lab]] (Virtual Reality)<br />
| [[SensoriMotorLab]]<br />
| [[Sound Recording Lab]]<br />
| [[VoiceKey Lab]]<br />
| [[TMS Lab]]<br />
| [[BCI Lab]]<br />
}}<br/><br />
;Lab Use Policy and Guidelines<br />
{{Bulleted list<br />
| [[Booking labs]]<br />
| [[Media:EEG_lab_user_guide.pdf|EEG lab user guide]]<br />
| [[Media:Cleaningprocedure_EEG.pdf|EEG cleaning protocol]]<br />
| [[Using labs]]<br />
}}<br />
}}<br />
<br />
</div></div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Microphones&diff=5784Microphones2024-03-20T16:13:47Z<p>E.vandenberge: Created page with "{{Infobox tsg | name = Microphones | image = Obama2010.jpg | caption = Shure SM57: the microphone of choice for every US president since 1965, and ou..."</p>
<hr />
<div>{{Infobox tsg<br />
| name = Microphones<br />
| image = Obama2010.jpg<br />
| caption = Shure SM57: the microphone of choice for every US president since 1965, and ours since 2015 or so<br />
}}<br />
<br />
Microphones turn sound into data. When you want to record sound for your experiment, please contact the TSG to discuss which microphone(s) is/are best suited for your application. Below is an overview of some of the microphones available within our research labs.<br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Specifications==<br />
<br />
{| class="wikitable" <br />
|-<br />
! style="width:200px;"| <br />
! style="width:200px;"| [[File:Shure_sm57.jpg |200px|Image: 200 pixels]]<br />
! style="width:200px;"| [[File:Sennheiser_mke600.jpg |200px|Image: 200 pixels]]<br />
! style="width:200px;"| [[File:Rode_videomic_ntg.jpg |200px|Image: 200 pixels]]<br />
|-<br />
! <!-- empty cell --><br />
! Shure SM57<br />
! Sennheiser MKE600 <br />
! RØDE VideoMic NTG<br />
|-<br />
| Type || Dynamic || Small Condenser || Small Condenser<br />
|-<br />
| Polar Pattern || Cardioid || Super-cardioid || Super-cardioid<br />
|-<br />
| Frequency Response (Hz) || 40 - 15,000 || 40 - 20,000 || 35 - 18,000<br />
|-<br />
| Max. SPL<ref>Maximum Sound Pressure Level</ref> (dB) || 160 || 132 || 105<br />
|-<br />
| Connector || XLR || XLR (3.5mm jack adapter included) || USB-C, 3.5mm jack<br />
|-<br />
| Power requirement || None || 48V Phantom or 1.5V AA battery || 5V USB or internal battery<br />
|-<br />
| Extras || None || Low Cut Filter || High Pass Filter, Pad, Safety Channel, USB DAC<br />
|}<br />
<br />
==See Also== <br />
*[[Audio]]<br />
<br />
==References==<br />
<references /></div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=File:Rode_videomic_ntg.jpg&diff=5783File:Rode videomic ntg.jpg2024-03-20T15:38:45Z<p>E.vandenberge: </p>
<hr />
<div><br />
== Licensing ==<br />
{{Non-free promotional}}</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=File:Sennheiser_mke600.jpg&diff=5782File:Sennheiser mke600.jpg2024-03-20T15:38:05Z<p>E.vandenberge: </p>
<hr />
<div><br />
== Licensing ==<br />
{{Non-free promotional}}</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=File:Shure_sm57.jpg&diff=5781File:Shure sm57.jpg2024-03-20T15:37:27Z<p>E.vandenberge: </p>
<hr />
<div><br />
== Licensing ==<br />
{{Non-free promotional}}</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Headphones&diff=5780Headphones2024-03-20T14:15:14Z<p>E.vandenberge: </p>
<hr />
<div>{{Infobox tsg<br />
| name = Headphones<br />
| image = Sony_mdr-7506.jpg<br />
| caption = Sony MDR-7506 headphones<br />
}}<br />
<br />
With exception of the [[EEG Lab]]s, headphones are the standard audio delivery system in our labs. In dedicated audio labs, such as the [[Sound Recording Lab]] and the [[VoiceKey Lab]], headphones are part of the standard equipment. In other labs (e.g. [[Cubicles]]), you can lend one of our recommended headphones (listed below) from [[Ronny]].<br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Specifications==<br />
<br />
{| class="wikitable" <br />
|-<br />
! style="width:200px;"| <br />
! style="width:200px;"| [[File:Shure_se112.jpg |200px|Image: 200 pixels]]<br />
! style="width:200px;"| [[File:Sennheiser_hd201_01.jpg |200px|Image: 200 pixels]]<br />
! style="width:200px;"| [[File:Sony_mdr-7506.jpg |200px|Image: 200 pixels]]<br />
|-<br />
! <!-- empty cell --><br />
! Shure SE112<br />
! Sennheiser HD201<br />
! Sony MDR-7506<br />
|-<br />
| Type || In-ear || Over-ear, closed back || Over-ear, closed back<br />
|-<br />
| Usage || Instances where the headband of a regular headphone would interfere with other equipment (e.g. EEG) || General purpose || Audio recording, analytic listening<br />
|-<br />
|}<br />
<br />
==Usage==<br />
<br />
When plugging the headphones directly into our [[Computers | lab computer]], please use the green port on the back of the case. The front audio jack, while more accessible, can introduce noise. In labs with a [[Behringer X-Air XR18]], the headphones will be connected to a stereo or monitor output.<br />
<br />
When using the headphones for time-critical audio stimuli, please (ask the TSG to) check your audio settings and scripts before running your experiment. <br />
<br />
==See Also== <br />
*[[Audio]]</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Audio&diff=5779Audio2024-03-20T14:12:03Z<p>E.vandenberge: </p>
<hr />
<div>When using audio in your experiment, especially when presenting time-critical stimuli, special care should be taken to optimize the audio settings on multiple levels (hardware, OS, script), as many things can go wrong along the way. <br />
<br />
This page outlines some best practices, however we advise to always consult a TSG member if you plan to run an audio experiment in the labs.<br />
<br />
==Recording==<br />
When recording audio for stimuli material or as input for your experiment, please:<br />
* Use a high quality microphone, with a [https://www.audio-technica.com/en-us/support/a-brief-guide-to-microphones-whats-the-pattern/ polar pattern] suitable for your application.<br />
* Use a high quality recorder or audio interface, capable of recording at 24bit and 48kHz or higher. <br />
* Place the microphone at an appropriate distance from your subject. Set the levels so the audio does not clip (exceeding maximum volume).<br />
* Record in a quiet environment.<br />
<br />
You can use our [[Sound Recording Lab]]s for high quality voice recording.<br />
<br />
==Editing==<br />
We recommend using Audacity for editing and converting audio files. Audacity is open-source and fairly easy to use, available here: https://www.audacityteam.org/<br />
<br />
===Export Settings===<br />
We recommend using the following export settings:<br />
* File format: .wav (PCM). <br />
* Sample Frequency: 44.1kHz.<br />
* Bit depth: 16 bit.<br />
<br />
The [[Lab Computer]] audio output is also set to 16 bit, 44.1kHz. We found that this is good enough for most applications; higher settings will increase file size with limited perceivable quality gains.<br />
<br />
When using multiple audio files in your experiment, make sure they all use the same settings for consistent playback in your experiment.<br />
<br />
In Audacity, you can set up Macros to automate processing and exporting your audio files: https://manual.audacityteam.org/man/macros.html<br />
<br />
==Windows Settings==<br />
Windows 10 has a habit of automatically enabling '''audio enhancements''' when connecting new speakers or headphones. These "enhancements" can distort your audio and cause timing issues. Therefore, please make sure they are turned off:<br />
# Right click sound icon on taskbar (next to clock) -> Sounds<br />
# Goto Playback tab. Select your audio output device and click "Properties"<br />
# Goto Enhancements tab. Make sure "Disable all enhancements" is checked.<br />
# Click Apply.<br />
<br />
==Playback==<br />
=== Psychopy ===<br />
This is an example of a Python script that plays a .wav file with high time accuracy.<br />
<syntaxhighlight lang="python" line><br />
from psychopy import sound, core<br />
from psychopy import prefs<br />
prefs.hardware['audioLib'] = ['PTB']<br />
<br />
# Path to audio file<br />
audio_file = "voice.wav"<br />
<br />
# Load audio<br />
# preBuffer – integer to control streaming/buffering -1 means store all <br />
audio = sound.Sound(audio_file,preBuffer=-1)<br />
<br />
# Play audio<br />
audio.play()<br />
<br />
# Wait for audio to finish playing<br />
core.wait(audio.getDuration())<br />
<br />
# Close audio<br />
audio.stop()<br />
audio.close()<br />
</syntaxhighlight></div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Audio&diff=5778Audio2024-03-20T14:11:55Z<p>E.vandenberge: </p>
<hr />
<div>{{Under construction}}<br />
When using audio in your experiment, especially when presenting time-critical stimuli, special care should be taken to optimize the audio settings on multiple levels (hardware, OS, script), as many things can go wrong along the way. <br />
<br />
This page outlines some best practices, however we advise to always consult a TSG member if you plan to run an audio experiment in the labs.<br />
<br />
==Recording==<br />
When recording audio for stimuli material or as input for your experiment, please:<br />
* Use a high quality microphone, with a [https://www.audio-technica.com/en-us/support/a-brief-guide-to-microphones-whats-the-pattern/ polar pattern] suitable for your application.<br />
* Use a high quality recorder or audio interface, capable of recording at 24bit and 48kHz or higher. <br />
* Place the microphone at an appropriate distance from your subject. Set the levels so the audio does not clip (exceeding maximum volume).<br />
* Record in a quiet environment.<br />
<br />
You can use our [[Sound Recording Lab]]s for high quality voice recording.<br />
<br />
==Editing==<br />
We recommend using Audacity for editing and converting audio files. Audacity is open-source and fairly easy to use, available here: https://www.audacityteam.org/<br />
<br />
===Export Settings===<br />
We recommend using the following export settings:<br />
* File format: .wav (PCM). <br />
* Sample Frequency: 44.1kHz.<br />
* Bit depth: 16 bit.<br />
<br />
The [[Lab Computer]] audio output is also set to 16 bit, 44.1kHz. We found that this is good enough for most applications; higher settings will increase file size with limited perceivable quality gains.<br />
<br />
When using multiple audio files in your experiment, make sure they all use the same settings for consistent playback in your experiment.<br />
<br />
In Audacity, you can set up Macros to automate processing and exporting your audio files: https://manual.audacityteam.org/man/macros.html<br />
<br />
==Windows Settings==<br />
Windows 10 has a habit of automatically enabling '''audio enhancements''' when connecting new speakers or headphones. These "enhancements" can distort your audio and cause timing issues. Therefore, please make sure they are turned off:<br />
# Right click sound icon on taskbar (next to clock) -> Sounds<br />
# Goto Playback tab. Select your audio output device and click "Properties"<br />
# Goto Enhancements tab. Make sure "Disable all enhancements" is checked.<br />
# Click Apply.<br />
<br />
==Playback==<br />
=== Psychopy ===<br />
This is an example of a Python script that plays a .wav file with high time accuracy.<br />
<syntaxhighlight lang="python" line><br />
from psychopy import sound, core<br />
from psychopy import prefs<br />
prefs.hardware['audioLib'] = ['PTB']<br />
<br />
# Path to audio file<br />
audio_file = "voice.wav"<br />
<br />
# Load audio<br />
# preBuffer – integer to control streaming/buffering -1 means store all <br />
audio = sound.Sound(audio_file,preBuffer=-1)<br />
<br />
# Play audio<br />
audio.play()<br />
<br />
# Wait for audio to finish playing<br />
core.wait(audio.getDuration())<br />
<br />
# Close audio<br />
audio.stop()<br />
audio.close()<br />
</syntaxhighlight></div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Lab_Computer&diff=5777Lab Computer2024-03-20T13:40:57Z<p>E.vandenberge: Redirected page to Computers</p>
<hr />
<div>#REDIRECT [[Computers]]</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Python&diff=5776Python2024-03-20T13:14:22Z<p>E.vandenberge: /* Example: TestArgs.py */</p>
<hr />
<div>{{Infobox software<br />
| name = Python<br />
| logo = Python-logo-generic.svg<br />
| logo size = 180px<br />
| logo alt = Python(tm)<br />
| caption = <br />
| developer = <br />
| released = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| latest preview version = <br />
| latest preview date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 3.7.9 64-bits<br />
| installed version date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| status = Active<br />
| programming language = Python<br />
| operating system = <br />
| platform = <br />
| website = [http://www.python.org python.org]<br />
| resources = {{Infobox tsg<br />
| child = yes<br />
| header2 = Workshop<br />
| data2 = {{bulleted list<br />
| [[Workshop: Python for behavioural scientists|Python for behavioural scientists]]<br />
}}<br />
}} <br />
}}<br />
<br />
[[wikipedia:Python_(programming_language)|Python]] is a general-purpose, high-level programming language. It is also a [[wikipedia:Python_%28genus%29|type of snake]] and a [[wikipedia:Python_%28Efteling%29|rollercoaster]], but one is arguably more relevant to your research than the others. <br/><br />
On the lab computers, there is support for Spyder, PyCharm and [[Psychopy]]. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Upgrade from 2.7 to 3.7==<br />
Since Python version 2.7 has reached end of life since January first 2020, this version is no longer installed on our [[System Image]]. Standard is now: Python 3.7 64-bits.<br />
If you still have scripts written in Python2, the scripts should be upgraded to Python 3. Most changes are probably the print statements. Print statements should always have parentheses: print('some text')<br />
Key differences between Python 2 and Python 3 are here: https://sebastianraschka.com/Articles/2014_python_2_3_key_diff.html<br />
<br />
For our previous documentation for Python 2.7, see [[Python/Legacy]]<br />
<br />
==Psychopy==<br />
{{see also|Psychopy}}<br />
Psychopy 2020.2.10 has been installed in the root of the Python3.7 64-bit version. This is also the default version when 'psychopy' is typed from the command prompt. It is also the default that opens when a .py file is double-clicked. It also can be started by clicking the appropriate icon on the desktop.<br />
There is also a Psychopy 2020.2.10 installed on Python3.6 32-bits. This version has its own icon on the desktop and should be used when you are using a [[Tobii Eye Tracker]].<br />
<br />
When your script fails to load in Psychopy, because you need packages that are not installed on our lab computers, please contact TSG.<br />
<br />
== Usage ==<br />
<br />
===Example: TestArgs.py===<br />
Execute the following script within the commandline (CMD): <code style="background-color:#000; color:#fff; padding:1px 3px;">python testArgs.py a.</code><br/><br />
You should see the following result:<br />
<br />
<syntaxhighlight lang="python" overflow:auto;"><br />
number of argument: 2<br />
argv[0]: ./testArgs.py<br />
argv[1]: a<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
*[[Psychopy]]<br />
*[[Workshop: Python for social scientists]]<br />
<!--<br />
==References==<br />
<references /> --><br />
<br />
==External Links== <br />
*{{Official website|http://www.python.org}}</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5775FFmpeg2024-03-20T13:14:09Z<p>E.vandenberge: </p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. There is also a plugin for Python (https://pypi.org/project/ffmpeg-python/), but it is fairly limited so we recommend using subprocess instead (see example below).<br />
<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
<code>-i</code> specifies input file<br />
<br />
The last argument is always the output file. Without specifying any codec or bit rate (see examples below), FFmpeg will encode the video using some arbitrary default settings.<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}<br />
<br />
<code>-i</code> is used twice here to add a seceond input file.<br />
<br />
<code>-map 0:v</code> tells FFmpeg to take video from the first input (count starts at 0)<br />
<br />
<code>-map 1:a</code> tells FFmpeg to take audio from the second input (1)<br />
<br />
===Trimming video===<br />
{{cmdline|ffmpeg -i input.mp4 -ss 00:00:04 -to 00:00:06 -vcodec h264 -b:v 8M output.mp4}}<br />
<br />
<code>-ss 00:00:04</code> specifies the starting time, in this case 4 seconds (use format HH:MM:SS, or HH:MM:SS.MS)<br />
<br />
<code>-to 00:00:06</code> specifies end point, in this case 6 seconds (same formatting as above)<br />
<br />
Alternatively, instead of <code>-to</code>, you can use <code>-t 00:00:02</code> to cut exactly 2 seconds from the starting time.<br />
<br />
<code>-vcodec h264</code> specifies video codec. <br />
<br />
<code>-b:v 8M</code> specifies video bit rate, in this case 8Mbit/s, which determines video quality.<br />
<br />
Note: you can use <code>-c copy</code> to trim without re-encoding, but FFmpeg can only cut to the nearest keyframe, so the output may not be exactly the same length as specified.<br />
<br />
===Batching===<br />
The following is a batch script (text file with .bat file extension) that converts all .mp4 files in the specified folder to .avi:<br />
<syntaxhighlight lang="batch" overflow:auto;">@echo off<br />
setlocal enabledelayedexpansion<br />
<br />
:: Set source video folder, as absolute path or relative to this script<br />
set src="videos"<br />
<br />
:: Set destination folder<br />
set dst="videos/converted"<br />
<br />
for /R %src% %%F in (*.mp4) do (<br />
:: Put your FFmpeg command here<br />
ffmpeg -i "%%F" -vcodec copy "%dst%\%%~nF.avi<br />
)<br />
<br />
pause<br />
</syntaxhighlight ><br />
<br />
===Python===<br />
<syntaxhighlight lang="python" overflow:auto;">import subprocess<br />
<br />
inputFile = "input.mov"<br />
outputFile = "output.mp4"<br />
<br />
subprocess.run(f'ffmpeg -i "{inputFile}" -vcodec h264 -b:v 8M "{outputFile}"')<br />
</syntaxhighlight ><br />
<br />
==See Also== <br />
* [[Video Codecs]]</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Main_Page&diff=5774Main Page2024-03-20T12:56:48Z<p>E.vandenberge: </p>
<hr />
<div>Welcome to the TSG Wiki. <br />
<br />
On this wiki you will find documentation for the Hardware, Software and Research Equipment used in the lab environments of the research facilities of the Faculty of Social Sciences, as well as other useful information. <br />
To learn more about the Technical Support Group, visit [http://www.ru.nl/socialsciences/technicalsupportgroup/ our website] or the [[TSG info|about]] section.<br />
<br />
<div style="width:100%;"><br />
<br />
{{Main Page/Frame<br />
| color = be311a<br />
| title = Hardware Documentation<br />
| content = {{Bulleted list<br />
| [[Balance Board]]<br />
| [[Behringer X-Air XR18]] (Audio Mixer)<br />
| [[Biopac]]<br />
| [[Brainvision]]<br />
| [[ButtonBoxes]] <br />
| [[Camcorders]]<br />
| [[Ipod]] (Video Recording)<br />
| [[Computers]]<br />
| [[Eyetrackers]]<br />
| [[Head Mounted Displays]]<br />
| [[Headphones]]<br />
| [[JoySticks]]<br />
| [[Kinect]]<br />
| [[Laptops]]<br />
| [[Monitors]]<br />
| [[Optotrak]] <br />
| [[plux biosignals]] <br />
| [[Structure sensor]]<br />
| [[Surveillance Camera]]<br />
| [[TemperatureHumidity]]<br />
| [[TMSi]] <br />
| [[Vertical Sync sensor]] <br />
}}<br />
}}<br />
<br />
{{Main Page/Frame<br />
| color = be311a<br />
| title = Software Documentation<br />
| content = {{Bulleted list<br />
| [[Audio]] <br />
| [[DataHub]] (LSL)<br />
| [[FFmpeg]] (Video Conversion)<br />
| [[Matlab]]<br />
| [[Presentation]]<br />
| [[Psychopy]]<br />
| [[Python]]<br />
| [[System Image]]<br />
| [[Unity]]<br />
| [[Web development]]<br />
}}<br/><br />
;Online Experiments<br />
{{Bulleted list <br />
| [[online experiment systems|Overview of Online Systems]]<br />
| [[jsPsych]]<br />
| [[LimeSurvey]]<br />
| [[Toolbox|Toolbox for online experiments]]<br />
| [[Qualtrics]]<br />
}}<br/><br />
;Miscellaneous<br />
{{Bulleted list <br />
| [[Data Files]]<br />
| [https://wiki.dcc.science.ru.nl DCC Cluster]<br />
| [[Gitlab Social Sciences]]<br />
| [[Mattermost Social Sciences]]<br />
| [[Personal and Group drive Data storage ]]<br />
| [[Screen Recording with OBS|Screen Recording]]<br />
| [[Video Codecs]] <br />
| [[Virtualization Server]]<br />
}}<br />
}}<br />
<br />
{{Main Page/Frame<br />
| color = be311a<br />
| title = Lab Documentation<br />
| content = {{Bulleted list<br />
| [[BalanceBoard Lab]]<br />
| [[Cubicles]] (Standard Labs)<br />
| [[EEG Lab]]<br />
| [[Eye Tracker Lab]]<br />
| [[RIVER Lab]] (Virtual Reality)<br />
| [[SensoriMotorLab]]<br />
| [[Sound Recording Lab]]<br />
| [[VoiceKey Lab]]<br />
| [[TMS Lab]]<br />
| [[BCI Lab]]<br />
}}<br/><br />
;Lab Use Policy and Guidelines<br />
{{Bulleted list<br />
| [[Booking labs]]<br />
| [[Media:EEG_lab_user_guide.pdf|EEG lab user guide]]<br />
| [[Media:Cleaningprocedure_EEG.pdf|EEG cleaning protocol]]<br />
| [[Using labs]]<br />
}}<br />
}}<br />
<br />
</div></div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Video_Codecs&diff=5773Video Codecs2024-03-12T16:30:11Z<p>E.vandenberge: /* Downloads */</p>
<hr />
<div>We advise users to contact the Technical Support Group to discuss which codec and export settings are best suited for your video stimuli. This page functions only as reference.<br />
<br />
For a guide on recording your screen, see [[Screen Recording with OBS]].<br />
<br />
== Information == <br />
=== Codecs ===<br />
To find out what video codecs are and why they are used, grab a cup of coffee (or other non-alcoholic beverage of choice) and reserve about 45 minutes of your life to watch this comprehensive video: [https://vimeo.com/104554788 How Codecs Work (Vimeo)].<br />
<br />
=== Bitrate ===<br />
<br />
When compressing a video, you will be asked to enter a 'bitrate'. This is what determines how much information is stored for every second of video. The more information, the higher the quality of the video. The tradeoff is file size. The more information, the larger the file. So setting a bitrate is striking a balance between limiting the file size without losing too much quality. The smarter the compression format, the easier this is to achieve. <br />
<br />
If you are using H.264 compression, you can calculate a ballpark estimate for your target bitrate using the Kush gauge, a helpful formula written by a guy named Kush:<br />
Target Bitrate (kbps) = Frame Width (px) * Frame Height (px) * Frame Rate (fps) * Motion Factor * 0.07 / 1000<br />
"Motion Factor" is an arbitrary value (typically 1, 2 or 4) that you can assign to your video based on the amount of (fast) movement in the video. Higher amounts of movement require a higher amount of information to be stored in order to prevent quality loss. <br />
Example calculation for a typical 720p video:<br />
1280 * 720 * 25 * 2 * 0.07 / 1000 = 3225.6 kbps (= 3.2 Mbps)<br />
<br />
Bitrate can be set to Constant (CBR) or Variable (VBR). A variable bitrate can help decreasing file size when your video has a combination of high and low amounts of movement, as it will optimize the distribution of information storage for those parts in your video. The downside is that your video player has to sometimes suddenly decode a lot more information than the previous frame, potentially causing laggy playback. For this reason, we advise using a constant bitrate.<br />
<br />
=== HEVC ===<br />
High Efficiency Video Coding (HEVC, also known as H.265) is the successor to H.264. Together with AVC, VP9 and AV1, it is one of the latest standards that yield significantly better compression rates than H.264. However, support is still far from universal and you may experience performance issues in some programs or on some devices. Therefore, we do not advise storing your videos in these formats unless it is for archival purposes only.<br />
<br />
== Software support ==<br />
{| class="wikitable" <br />
|- <br />
! scope="row" |<br />
! scope="row" colspan="3" | Recommended formats<br />
! scope="row" colspan="2" | Non-Recommended formats<br />
|-<br />
| Codec<br />
| style="text-align: center;" | VP8/VP9<br />
| style="text-align: center;" | Theora<br />
| style="text-align: center;" colspan="2" | H.264<br />
| style="text-align: center;" | XVID<br />
|-<br />
| Container <br />
| .webm .mkv<br />
| .ogv .ogg<br />
| .mp4<br />
| colspan="2" | .avi<br />
|-<br />
| Advantage<br />
| Open Source<br />
| Open Source<br />
| Industry Standard<br />
| colspan="2" | Works in Presentation <br />
|-<br />
! Software<br />
|-<br />
| Chrome/Firefox/Opera<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| <br />
| style="background-color:#F99;" | No<br />
|-<br />
| VLC <br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
|-<br />
| PsychoPy <br />
| style="background-color:#9F9;" | Yes<sup>1</sup><br />
| style="background-color:#9F9;" | Yes<sup>1</sup><br />
| style="background-color:#9F9;" | Yes<sup>1</sup><br />
| style="background-color:#FFF;" | <br />
| style="background-color:#FFF;" | <br />
|-<br />
| Neurobs Presentation<br />
| style="background-color:#F99;" | No <br />
| style="background-color:#F99;" | No <br />
| style="background-color:#F99;" | No<br />
<br />
| style="background-color:#9F9;" | Yes<sup>2</sup><br />
| style="background-color:#9F9;" | Yes<br />
|}<br />
<sup>1</sup> Windows version requires careful installation, consult the TSG for help.<br/><br />
<sup>2</sup> Recommended output for Presentation only. See documentation below for conversion options.<br/><br />
Note: This list is incomplete and will be updated as soon as we have tested all the common and recommended video formats with all supported stimuli software.<br />
<br />
== Neurobs Presentation ==<br />
<br />
Neurobs Presentation does not support the .mp4 container, so you will have to convert your H.264 encoded .mp4 videos to the .avi container. Neurobs recommends using MP4Cam2AVI Easy Converter<ref>http://www.neurobs.com/wiki/Presentation/Video#Video_Encoding</ref>. Be sure to uncheck 'preview On' before opening your files, because the program might crash otherwise. <br />
<br />
== Downloads ==<br />
=== Converters ===<br />
We recommend using [[FFmpeg]] for encoding/converting your videos. If you prefer using a GUI for converting to mp4, Handbrake is a decent option.<br />
{| class="wikitable" <br />
|-<br />
! scope="col" | Name<br />
! scope="col" | Download Location<br />
! scope="col" | Supported formats<br />
! scope="col" | Supported containers<br />
|-<br />
| [[FFmpeg]] || https://ffmpeg.org/ || various || any<br />
|-<br />
| Handbrake || https://handbrake.fr/ || H.264, MPEG-4, MPEG-2, VP3 || mp4, mkv<br />
|-<br />
| MP4Cam2AVI Easy Converter || http://sourceforge.net/projects/mp4cam2avi || H.264 || avi, mp4<br />
|}<br />
<br />
<!--<br />
=== Codec Packs ===<br />
Note: Below is just a list of several codec packs. Please '''do not attempt to install all packs together''', but only choose the one(s) your playback-software requires.<br />
{| class="wikitable" <br />
|-<br />
! scope="col" | Name<br />
! scope="col" | Download Location<br />
|-<br />
| Libavcodec || https://libav.org/<br />
|-<br />
| LAV Filters || https://github.com/Nevcairiel/LAVFilters/releases<br />
|-<br />
| K-Lite Codec Pack || http://www.codecguide.com/download_kl.htm<br />
|-<br />
| FFDshow || http://sourceforge.net/projects/ffdshow-tryout/<br />
|}<br />
--> <br />
=== Codec Viewer ===<br />
Want to know how a video was encoded? You can use MediaInfo (open-source, at https://mediaarea.net/en/MediaInfo) to gain insight into the video and audio codecs, bit rates, resolution, frame rate, etc.<br />
<br />
=== Media Players ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! scope="col" | Name<br />
! scope="col" | Download Location<br />
|-<br />
| VLC || https://www.videolan.org/<br />
|-<br />
| Noldus Mainconcept Codec (Noldus Media Recorder) || [[Media:Noldus MainConcept Codec Package 8.5.26.zip]]<br />
|-<br />
| AVBin (Psychopy) || http://avbin.github.io/AVbin/Home/Home.html<br />
|-<br />
| Gstreamer (Matlab) || http://gstreamer.freedesktop.org/<br />
|}<br />
<br />
==References==<br />
<references /></div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5772FFmpeg2024-03-12T16:21:07Z<p>E.vandenberge: /* Usage */</p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. You can also set up FFmpeg for Python: https://www.bannerbear.com/blog/how-to-use-ffmpeg-in-python-with-examples/<br />
<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
<code>-i</code> specifies input file<br />
<br />
The last argument is always the output file. Without specifying any codec or bit rate (see examples below), FFmpeg will encode the video using some arbitrary default settings.<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}<br />
<br />
<code>-i</code> is used twice here to add a seceond input file.<br />
<br />
<code>-map 0:v</code> tells FFmpeg to take video from the first input (count starts at 0)<br />
<br />
<code>-map 1:a</code> tells FFmpeg to take audio from the second input (1)<br />
<br />
===Trimming video===<br />
{{cmdline|ffmpeg -i input.mp4 -ss 00:00:04 -to 00:00:06 -vcodec h264 -b:v 8M output.mp4}}<br />
<br />
<code>-ss 00:00:04</code> specifies the starting time, in this case 4 seconds (use format HH:MM:SS, or HH:MM:SS.MS)<br />
<br />
<code>-to 00:00:06</code> specifies end point, in this case 6 seconds (same formatting as above)<br />
<br />
Alternatively, instead of <code>-to</code>, you can use <code>-t 00:00:02</code> to cut exactly 2 seconds from the starting time.<br />
<br />
<code>-vcodec h264</code> specifies video codec. <br />
<br />
<code>-b:v 8M</code> specifies video bit rate, in this case 8Mbit/s, which determines video quality.<br />
<br />
Note: you can use <code>-c copy</code> to trim without re-encoding, but FFmpeg can only cut to the nearest keyframe, so the output may not be exactly the same length as specified.<br />
<br />
===Batching===<br />
The following is a batch script (text file with .bat file extension) that converts all .mp4 files in the specified folder to .avi:<br />
<pre>@echo off<br />
setlocal enabledelayedexpansion<br />
<br />
:: Set source video folder, as absolute path or relative to this script<br />
set src="videos"<br />
<br />
:: Set destination folder<br />
set dst="videos/converted"<br />
<br />
for /R %src% %%F in (*.mp4) do (<br />
:: Put your FFmpeg command here<br />
ffmpeg -i "%%F" -vcodec copy "%dst%\%%~nF.avi<br />
)<br />
<br />
pause<br />
</pre><br />
<br />
==See Also== <br />
* [[Video Codecs]]</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Video_Codecs&diff=5771Video Codecs2024-03-12T15:23:08Z<p>E.vandenberge: </p>
<hr />
<div>We advise users to contact the Technical Support Group to discuss which codec and export settings are best suited for your video stimuli. This page functions only as reference.<br />
<br />
For a guide on recording your screen, see [[Screen Recording with OBS]].<br />
<br />
== Information == <br />
=== Codecs ===<br />
To find out what video codecs are and why they are used, grab a cup of coffee (or other non-alcoholic beverage of choice) and reserve about 45 minutes of your life to watch this comprehensive video: [https://vimeo.com/104554788 How Codecs Work (Vimeo)].<br />
<br />
=== Bitrate ===<br />
<br />
When compressing a video, you will be asked to enter a 'bitrate'. This is what determines how much information is stored for every second of video. The more information, the higher the quality of the video. The tradeoff is file size. The more information, the larger the file. So setting a bitrate is striking a balance between limiting the file size without losing too much quality. The smarter the compression format, the easier this is to achieve. <br />
<br />
If you are using H.264 compression, you can calculate a ballpark estimate for your target bitrate using the Kush gauge, a helpful formula written by a guy named Kush:<br />
Target Bitrate (kbps) = Frame Width (px) * Frame Height (px) * Frame Rate (fps) * Motion Factor * 0.07 / 1000<br />
"Motion Factor" is an arbitrary value (typically 1, 2 or 4) that you can assign to your video based on the amount of (fast) movement in the video. Higher amounts of movement require a higher amount of information to be stored in order to prevent quality loss. <br />
Example calculation for a typical 720p video:<br />
1280 * 720 * 25 * 2 * 0.07 / 1000 = 3225.6 kbps (= 3.2 Mbps)<br />
<br />
Bitrate can be set to Constant (CBR) or Variable (VBR). A variable bitrate can help decreasing file size when your video has a combination of high and low amounts of movement, as it will optimize the distribution of information storage for those parts in your video. The downside is that your video player has to sometimes suddenly decode a lot more information than the previous frame, potentially causing laggy playback. For this reason, we advise using a constant bitrate.<br />
<br />
=== HEVC ===<br />
High Efficiency Video Coding (HEVC, also known as H.265) is the successor to H.264. Together with AVC, VP9 and AV1, it is one of the latest standards that yield significantly better compression rates than H.264. However, support is still far from universal and you may experience performance issues in some programs or on some devices. Therefore, we do not advise storing your videos in these formats unless it is for archival purposes only.<br />
<br />
== Software support ==<br />
{| class="wikitable" <br />
|- <br />
! scope="row" |<br />
! scope="row" colspan="3" | Recommended formats<br />
! scope="row" colspan="2" | Non-Recommended formats<br />
|-<br />
| Codec<br />
| style="text-align: center;" | VP8/VP9<br />
| style="text-align: center;" | Theora<br />
| style="text-align: center;" colspan="2" | H.264<br />
| style="text-align: center;" | XVID<br />
|-<br />
| Container <br />
| .webm .mkv<br />
| .ogv .ogg<br />
| .mp4<br />
| colspan="2" | .avi<br />
|-<br />
| Advantage<br />
| Open Source<br />
| Open Source<br />
| Industry Standard<br />
| colspan="2" | Works in Presentation <br />
|-<br />
! Software<br />
|-<br />
| Chrome/Firefox/Opera<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| <br />
| style="background-color:#F99;" | No<br />
|-<br />
| VLC <br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
| style="background-color:#9F9;" | Yes<br />
|-<br />
| PsychoPy <br />
| style="background-color:#9F9;" | Yes<sup>1</sup><br />
| style="background-color:#9F9;" | Yes<sup>1</sup><br />
| style="background-color:#9F9;" | Yes<sup>1</sup><br />
| style="background-color:#FFF;" | <br />
| style="background-color:#FFF;" | <br />
|-<br />
| Neurobs Presentation<br />
| style="background-color:#F99;" | No <br />
| style="background-color:#F99;" | No <br />
| style="background-color:#F99;" | No<br />
<br />
| style="background-color:#9F9;" | Yes<sup>2</sup><br />
| style="background-color:#9F9;" | Yes<br />
|}<br />
<sup>1</sup> Windows version requires careful installation, consult the TSG for help.<br/><br />
<sup>2</sup> Recommended output for Presentation only. See documentation below for conversion options.<br/><br />
Note: This list is incomplete and will be updated as soon as we have tested all the common and recommended video formats with all supported stimuli software.<br />
<br />
== Neurobs Presentation ==<br />
<br />
Neurobs Presentation does not support the .mp4 container, so you will have to convert your H.264 encoded .mp4 videos to the .avi container. Neurobs recommends using MP4Cam2AVI Easy Converter<ref>http://www.neurobs.com/wiki/Presentation/Video#Video_Encoding</ref>. Be sure to uncheck 'preview On' before opening your files, because the program might crash otherwise. <br />
<br />
== Downloads ==<br />
=== Converters ===<br />
We recommend using [[FFmpeg]] for encoding/converting your videos. If you prefer using a GUI for converting to mp4, Handbrake is a decent option.<br />
{| class="wikitable" <br />
|-<br />
! scope="col" | Name<br />
! scope="col" | Download Location<br />
! scope="col" | Supported formats<br />
! scope="col" | Supported containers<br />
|-<br />
| [[FFmpeg]] || https://ffmpeg.org/ || various || any<br />
|-<br />
| Handbrake || https://handbrake.fr/ || H.264, MPEG-4, MPEG-2, VP3 || mp4, mkv<br />
|-<br />
| MP4Cam2AVI Easy Converter || http://sourceforge.net/projects/mp4cam2avi || H.264 || avi, mp4<br />
|}<br />
<br />
<!--<br />
=== Codec Packs ===<br />
Note: Below is just a list of several codec packs. Please '''do not attempt to install all packs together''', but only choose the one(s) your playback-software requires.<br />
{| class="wikitable" <br />
|-<br />
! scope="col" | Name<br />
! scope="col" | Download Location<br />
|-<br />
| Libavcodec || https://libav.org/<br />
|-<br />
| LAV Filters || https://github.com/Nevcairiel/LAVFilters/releases<br />
|-<br />
| K-Lite Codec Pack || http://www.codecguide.com/download_kl.htm<br />
|-<br />
| FFDshow || http://sourceforge.net/projects/ffdshow-tryout/<br />
|}<br />
--> <br />
<br />
=== Media Players ===<br />
<br />
{| class="wikitable" <br />
|-<br />
! scope="col" | Name<br />
! scope="col" | Download Location<br />
|-<br />
| VLC || https://www.videolan.org/<br />
|-<br />
| Noldus Mainconcept Codec (Noldus Media Recorder) || [[Media:Noldus MainConcept Codec Package 8.5.26.zip]]<br />
|-<br />
| AVBin (Psychopy) || http://avbin.github.io/AVbin/Home/Home.html<br />
|-<br />
| Gstreamer (Matlab) || http://gstreamer.freedesktop.org/<br />
|}<br />
<br />
==References==<br />
<references /></div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5770FFmpeg2024-03-12T15:16:39Z<p>E.vandenberge: </p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. You can also set up FFmpeg for Python: https://www.bannerbear.com/blog/how-to-use-ffmpeg-in-python-with-examples/<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
<code>-i</code> specifies input file<br />
<br />
The last argument is always the output file. Without specifying any codec or bit rate (see examples below), FFmpeg will encode the video using some arbitrary default settings.<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}<br />
<br />
<code>-i</code> is used twice here to add a seceond input file.<br />
<br />
<code>-map 0:v</code> tells FFmpeg to take video from the first input (count starts at 0)<br />
<br />
<code>-map 1:a</code> tells FFmpeg to take audio from the second input (1)<br />
<br />
===Trimming video===<br />
{{cmdline|ffmpeg -i input.mp4 -ss 00:00:04 -to 00:00:06 -vcodec h264 -b:v 8M output.mp4}}<br />
<br />
<code>-ss 00:00:04</code> specifies the starting time, in this case 4 seconds (use format HH:MM:SS, or HH:MM:SS.MS)<br />
<br />
<code>-to 00:00:06</code> specifies end point, in this case 6 seconds (same formatting as above)<br />
<br />
Alternatively, instead of <code>-to</code>, you can use <code>-t 00:00:02</code> to cut exactly 2 seconds from the starting time.<br />
<br />
<code>-vcodec h264</code> specifies video codec. <br />
<br />
<code>-b:v 8M</code> specifies video bit rate, in this case 8Mbit/s, which determines video quality.<br />
<br />
Note: you can use <code>-c copy</code> to trim without re-encoding, but FFmpeg can only cut to the nearest keyframe, so the output may not be exactly the same length as specified.<br />
<br />
===Batching===<br />
The following is a batch script (text file with .bat file extension) that converts all .mp4 files in the specified folder to .avi:<br />
<pre>@echo off<br />
setlocal enabledelayedexpansion<br />
<br />
:: Set source video folder, as absolute path or relative to this script<br />
set src="videos"<br />
<br />
:: Set destination folder<br />
set dst="videos/converted"<br />
<br />
for /R %src% %%F in (*.mp4) do (<br />
:: Put your FFmpeg command here<br />
ffmpeg -i "%%F" -vcodec copy "%dst%\%%~nF.avi<br />
)<br />
<br />
pause<br />
</pre><br />
<br />
==See Also== <br />
* [[Video Codecs]]</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Online_experiment_systems&diff=5769Online experiment systems2024-03-12T09:33:00Z<p>E.vandenberge: /* Gorilla */</p>
<hr />
<div>= Pilot Run =<br />
It is the researcher's responsibility to make sure that a pilot run is performed and verify that everything is set up properly and the data is correct. For instance, if the goal is to connect SONA to an experiment(e.g. PsychoPy) and a Survey (e.g. LimeSurvey), please make sure that it is possible to link the response data of a single participant over the various platforms used.<br />
<br />
= jsPsych =<br />
[[jsPsych]] is our preferred framework.<br />
<br />
= Custom solutions =<br />
For more complex experiment designs or if you need very specific features, a custom design might be necessary. TSG helps you getting started, provides support during this process or implements such a web application for you. Hosting the experiment can (and in some cases even must) be done on our Titus server. Currently, there is no ready made solution for researchers to manage their experiments themselves. It is planned for this facility, but it will not become available soon. In the mean time we will put it on the server for you or discuss the procedure to find a possible customised way of working.<br />
In case you would like to create a web server on your computer locally, if your (jsPsych) experiment requires data storage directly on our Titus server, [https://tsgdoc.socsci.ru.nl/index.php?title=Simulate_a_web_server follow the instructions here].<br><br />
<br>Some implemented examples are outlined [[examples|here]].<br><br />
<br />
= Psychopy Builder with Pavlovia =<br />
[https://psychopy.org/ PsychoPy Builder] is a free and open system (GNU GPL v3.0) for building experiment with a visual interface, both in the lab and online.<br />
<br />
Radboud university has a institute License for publishing Psychopy Builder experiments on [http://pavlovia.org pavlovia.org].<br />
<br />
Do not confuse Psychopy Builder with Psychopy Coder, for which we have a [[Workshop: Python for social scientists|workshop]] and a [https://www.socsci.ru.nl/wilberth/psychopy/index.html tutorial].<br />
<br />
= OpenSesame =<br />
[https://osdoc.cogsci.nl/ OpenSesame] is a mature free and open system (GNU GPL v3) for building experiment with a visual interface, both in the lab and online.<br />
https://osdoc.cogsci.nl/3.2/manual/osweb/<br />
<br />
= Gorilla =<br />
[https://gorilla.sc/?utm_medium=referral&utm_source=tsgdoc.socsci.ru.nl Gorilla] is an online hosted solution for which DCC and BSI have a license. Usage is allowed but not supported by TSG. For DCC see [https://intranet.donders.ru.nl/index.php?id=5813#c27808 here] for more info.<br />
<br />
= Inquisit Web =<br />
If you need an Inquisit Web License, contact [mailto:t.verwijmeren@psych.ru.nl Thijs Verwijmeren]. The TSG does not provide any support for Inquisit.<br />
<br />
= Lab.js = <br />
[https://labjs.readthedocs.io/en/latest/ lab js] is a free and open solution (Apache/ AGPL) for which we currently do not offer support.<br />
<br />
= Psiturk = <br />
[https://psiturk.readthedocs.io/en/stable/ Psiturk] is a free and open solution (MIT) for which we currently do not offer support. It is build for usage in conjunction with<br />
Amazon Mechanical Turk, but can also be used without.<br />
<br />
= Panel systems, integration =<br />
== Sona ==<br />
Sona integrates with more than 15 online survey products and experiment builders, find the [https://www.sona-systems.com/help/ instructions here] on how to do this.<br />
<br />
== Prolific ==<br />
Prolific is a crowd-sourcing platform. For DCC see [https://intranet.donders.ru.nl/index.php?id=5608 here] for more information.<br />
<br />
== Amazon Mechanical Turk ==<br />
== CloudResearch (TurkPrime) ==</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5768FFmpeg2024-03-11T11:27:47Z<p>E.vandenberge: /* Usage */</p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. You can also set up FFmpeg for Python: https://www.bannerbear.com/blog/how-to-use-ffmpeg-in-python-with-examples/<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
<code>-i</code> specifies input file<br />
<br />
The last argument is always the output file. Without specifying any codec or bit rate (see examples below), FFmpeg will encode the video using some arbitrary default settings.<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}<br />
<br />
<code>-i</code> is used twice here to add a seceond input file.<br />
<br />
<code>-map 0:v</code> tells FFmpeg to take video from the first input (count starts at 0)<br />
<br />
<code>-map 1:a</code> tells FFmpeg to take audio from the second input (1)<br />
<br />
===Trimming video===<br />
{{cmdline|ffmpeg -i input.mp4 -ss 00:00:04 -to 00:00:06 -vcodec h264 -b:v 8M output.mp4}}<br />
<br />
<code>-ss 00:00:04</code> specifies the starting time, in this case 4 seconds (use format HH:MM:SS, or HH:MM:SS.MS)<br />
<br />
<code>-to 00:00:06</code> specifies end point, in this case 6 seconds (same formatting as above)<br />
<br />
Alternatively, instead of <code>-to</code>, you can use <code>-t 00:00:02</code> to cut exactly 2 seconds from the starting time.<br />
<br />
<code>-vcodec h264</code> specifies video codec. <br />
<br />
<code>-b:v 8M</code> specifies video bit rate, in this case 8Mbit/s, which determines video quality.<br />
<br />
Note: you can use <code>-c copy</code> to trim without re-encoding, but FFmpeg can only cut to the nearest keyframe, so the output may not be exactly the same length as specified.<br />
<br />
===Batching===<br />
The following is a batch script (text file with .bat file extension) that converts all .mp4 files in the specified folder to .avi:<br />
<pre>@echo off<br />
setlocal enabledelayedexpansion<br />
<br />
:: Set source video folder, as absolute path or relative to this script<br />
set src="videos"<br />
<br />
:: Set destination folder<br />
set dst="videos/converted"<br />
<br />
for /R %src% %%F in (*.mp4) do (<br />
:: Put your FFmpeg command here<br />
ffmpeg -i "%%F" -vcodec copy "%dst%\%%~nF.avi<br />
)<br />
<br />
pause<br />
</pre></div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5767FFmpeg2024-03-11T11:06:30Z<p>E.vandenberge: /* Trimming video */</p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. You can also set up FFmpeg for Python: https://www.bannerbear.com/blog/how-to-use-ffmpeg-in-python-with-examples/<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
<code>-i</code> specifies input file<br />
<br />
The last argument is always the output file. Without specifying any codec or bit rate (see examples below), FFmpeg will encode the video using some arbitrary default settings.<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}<br />
<br />
<code>-i</code> is used twice here to add a seceond input file.<br />
<br />
<code>-map 0:v</code> tells FFmpeg to take video from the first input (count starts at 0)<br />
<br />
<code>-map 1:a</code> tells FFmpeg to take audio from the second input (1)<br />
<br />
===Trimming video===<br />
{{cmdline|ffmpeg -i input.mp4 -ss 00:00:04 -to 00:00:06 -vcodec h264 -b:v 8M output.mp4}}<br />
<br />
<code>-ss 00:00:04</code> specifies the starting time, in this case 4 seconds (use format HH:MM:SS, or HH:MM:SS.MS)<br />
<br />
<code>-to 00:00:06</code> specifies end point, in this case 6 seconds (same formatting as above)<br />
<br />
Alternatively, instead of <code>-to</code>, you can use <code>-t 00:00:02</code> to cut exactly 2 seconds from the starting time.<br />
<br />
<code>-vcodec h264</code> specifies video codec. <br />
<br />
<code>-b:v 8M</code> specifies video bit rate, in this case 8Mbit/s, which determines video quality.<br />
<br />
Note: you can use <code>-c copy</code> to trim without re-encoding, but FFmpeg can only cut to the nearest keyframe, so the output may not be exactly the same length as specified.</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5766FFmpeg2024-03-11T11:02:38Z<p>E.vandenberge: /* Add audio to video */</p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. You can also set up FFmpeg for Python: https://www.bannerbear.com/blog/how-to-use-ffmpeg-in-python-with-examples/<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
<code>-i</code> specifies input file<br />
<br />
The last argument is always the output file. Without specifying any codec or bit rate (see examples below), FFmpeg will encode the video using some arbitrary default settings.<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}<br />
<br />
<code>-i</code> is used twice here to add a seceond input file.<br />
<br />
<code>-map 0:v</code> tells FFmpeg to take video from the first input (count starts at 0)<br />
<br />
<code>-map 1:a</code> tells FFmpeg to take audio from the second input (1)<br />
<br />
===Trimming video===<br />
{{cmdline|ffmpeg -i input.mp4 -ss 00:00:04 -to 00:00:06 -vcodec h264 -b:v 8M output.mp4}}<br />
<br />
<code>-ss 00:00:04</code> specifies the starting time, in this case 4 seconds (use format HH:MM:SS, or HH:MM:SS.MS)<br />
<br />
<code>-to 00:00:06</code> specifies end point, in this case 6 seconds (same formatting as above)<br />
<br />
Alternatively, instead of <code>-to</code>, you can use <code>-t 00:00:02</code> to cut exactly 2 seconds from the starting time.<br />
<br />
<code>-vcodec h264</code> specifies video codec. <br />
<br />
<code>-b:v 8M</code> specifies video bit rate, in this case 8Mbit/s, which determines video quality.<br />
<br />
<br />
<br />
Note: you can use <code>-c copy</code> to trim without re-encoding, but FFmpeg can only cut to the nearest keyframe, so the output may not be exactly the same length as specified.</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5765FFmpeg2024-03-11T10:58:53Z<p>E.vandenberge: /* Add audio to video */</p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. You can also set up FFmpeg for Python: https://www.bannerbear.com/blog/how-to-use-ffmpeg-in-python-with-examples/<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
<code>-i</code> specifies input file<br />
<br />
The last argument is always the output file. Without specifying any codec or bit rate (see examples below), FFmpeg will encode the video using some arbitrary default settings.<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}<br />
<br />
===Trimming video===<br />
{{cmdline|ffmpeg -i input.mp4 -ss 00:00:04 -to 00:00:06 -vcodec h264 -b:v 8M output.mp4}}<br />
<br />
<code>-ss 00:00:04</code> specifies the starting time, in this case 4 seconds (use format HH:MM:SS, or HH:MM:SS.MS)<br />
<br />
<code>-to 00:00:06</code> specifies end point, in this case 6 seconds (same formatting as above)<br />
<br />
Alternatively, instead of <code>-to</code>, you can use <code>-t 00:00:02</code> to cut exactly 2 seconds from the starting time.<br />
<br />
<code>-vcodec h264</code> specifies video codec. <br />
<br />
<code>-b:v 8M</code> specifies video bit rate, in this case 8Mbit/s, which determines video quality.<br />
<br />
<br />
<br />
Note: you can use <code>-c copy</code> to trim without re-encoding, but FFmpeg can only cut to the nearest keyframe, so the output may not be exactly the same length as specified.</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5764FFmpeg2024-03-11T10:57:17Z<p>E.vandenberge: /* Basic Format Conversion */</p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. You can also set up FFmpeg for Python: https://www.bannerbear.com/blog/how-to-use-ffmpeg-in-python-with-examples/<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
<code>-i</code> specifies input file<br />
<br />
The last argument is always the output file. Without specifying any codec or bit rate (see examples below), FFmpeg will encode the video using some arbitrary default settings.<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}<br />
<br />
===Trimming video===<br />
{{cmdline|ffmpeg -i input.mp4 -ss 00:00:04 -to 00:00:06 -vcodec h264 -b:v 8M output.mp4}}<br />
<br />
<code>-ss 00:00:04</code> specifies the starting time, in this case 4 seconds (use format HH:MM:SS, or HH:MM:SS.MS)<br />
<br />
<code>-to 00:00:06</code> specifies end point, in this case 6 seconds (same formatting as above)<br />
<br />
Alternatively, instead of <code>-to</code>, you can use <code>-t 00:00:02</code> to cut exactly 2 seconds from the starting time.<br />
<br />
<code>-vcodec h264</code> specifies video codec. <br />
<br />
<code>-b:v 8M</code> specifies video bit rate, in this case 8Mbit/s, which determines video quality.<br />
<br />
<br />
<br />
Note: you can use <code>-c copy</code> to trim without re-encoding, but FFmpeg can only cut to the nearest keyframe, so the output may not be exactly the same length as specified.</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5763FFmpeg2024-03-11T10:56:51Z<p>E.vandenberge: /* Basic Format Conversion */</p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. You can also set up FFmpeg for Python: https://www.bannerbear.com/blog/how-to-use-ffmpeg-in-python-with-examples/<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
<code>-i</code> specifies input file<br />
<br />
The last argument is always the output file. Without specifying any codec or bit rate, FFmpeg will encode the video using some arbitrary default settings.<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}<br />
<br />
===Trimming video===<br />
{{cmdline|ffmpeg -i input.mp4 -ss 00:00:04 -to 00:00:06 -vcodec h264 -b:v 8M output.mp4}}<br />
<br />
<code>-ss 00:00:04</code> specifies the starting time, in this case 4 seconds (use format HH:MM:SS, or HH:MM:SS.MS)<br />
<br />
<code>-to 00:00:06</code> specifies end point, in this case 6 seconds (same formatting as above)<br />
<br />
Alternatively, instead of <code>-to</code>, you can use <code>-t 00:00:02</code> to cut exactly 2 seconds from the starting time.<br />
<br />
<code>-vcodec h264</code> specifies video codec. <br />
<br />
<code>-b:v 8M</code> specifies video bit rate, in this case 8Mbit/s, which determines video quality.<br />
<br />
<br />
<br />
Note: you can use <code>-c copy</code> to trim without re-encoding, but FFmpeg can only cut to the nearest keyframe, so the output may not be exactly the same length as specified.</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5762FFmpeg2024-03-11T10:55:50Z<p>E.vandenberge: /* Basic Format Conversion */</p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. You can also set up FFmpeg for Python: https://www.bannerbear.com/blog/how-to-use-ffmpeg-in-python-with-examples/<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
<code>-i</code> specifies input file<br />
<br />
The last argument is always the output file. Without specifying any codec or bit rate, defaults are used.<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}<br />
<br />
===Trimming video===<br />
{{cmdline|ffmpeg -i input.mp4 -ss 00:00:04 -to 00:00:06 -vcodec h264 -b:v 8M output.mp4}}<br />
<br />
<code>-ss 00:00:04</code> specifies the starting time, in this case 4 seconds (use format HH:MM:SS, or HH:MM:SS.MS)<br />
<br />
<code>-to 00:00:06</code> specifies end point, in this case 6 seconds (same formatting as above)<br />
<br />
Alternatively, instead of <code>-to</code>, you can use <code>-t 00:00:02</code> to cut exactly 2 seconds from the starting time.<br />
<br />
<code>-vcodec h264</code> specifies video codec. <br />
<br />
<code>-b:v 8M</code> specifies video bit rate, in this case 8Mbit/s, which determines video quality.<br />
<br />
<br />
<br />
Note: you can use <code>-c copy</code> to trim without re-encoding, but FFmpeg can only cut to the nearest keyframe, so the output may not be exactly the same length as specified.</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5761FFmpeg2024-03-11T10:54:59Z<p>E.vandenberge: /* Usage */</p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. You can also set up FFmpeg for Python: https://www.bannerbear.com/blog/how-to-use-ffmpeg-in-python-with-examples/<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
<code>-i</code> specifies input file<br />
<br />
The last argument is always the output file.<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}<br />
<br />
===Trimming video===<br />
{{cmdline|ffmpeg -i input.mp4 -ss 00:00:04 -to 00:00:06 -vcodec h264 -b:v 8M output.mp4}}<br />
<br />
<code>-ss 00:00:04</code> specifies the starting time, in this case 4 seconds (use format HH:MM:SS, or HH:MM:SS.MS)<br />
<br />
<code>-to 00:00:06</code> specifies end point, in this case 6 seconds (same formatting as above)<br />
<br />
Alternatively, instead of <code>-to</code>, you can use <code>-t 00:00:02</code> to cut exactly 2 seconds from the starting time.<br />
<br />
<code>-vcodec h264</code> specifies video codec. <br />
<br />
<code>-b:v 8M</code> specifies video bit rate, in this case 8Mbit/s, which determines video quality.<br />
<br />
<br />
<br />
Note: you can use <code>-c copy</code> to trim without re-encoding, but FFmpeg can only cut to the nearest keyframe, so the output may not be exactly the same length as specified.</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5760FFmpeg2024-03-11T10:53:28Z<p>E.vandenberge: </p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. You can also set up FFmpeg for Python: https://www.bannerbear.com/blog/how-to-use-ffmpeg-in-python-with-examples/<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}<br />
<br />
===Trimming video===<br />
{{cmdline|ffmpeg -i input.mp4 -ss 00:00:04 -to 00:00:06 -vcodec h264 -b:v 8M output.mp4}}<br />
<br />
<code>-ss 00:00:04</code> specifies the starting time, in this case 4 seconds (use format HH:MM:SS, or HH:MM:SS.MS)<br />
<br />
<code>-to 00:00:06</code> specifies end point, in this case 6 seconds (same formatting as above)<br />
<br />
Alternatively, instead of <code>-to</code>, you can use <code>-t 00:00:02</code> to cut exactly 2 seconds from the starting time.<br />
<br />
<code>-vcodec h264</code> specifies video codec. <br />
<br />
<code>-b:v 8M</code> specifies video bit rate, in this case 8Mbit/s, which determines video quality.<br />
<br />
<br />
<br />
Note: you can use <code>-c copy</code> to trim without re-encoding, but FFmpeg can only cut to the nearest keyframe, so the output may not be exactly the same length as specified.</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5759FFmpeg2024-03-07T14:36:00Z<p>E.vandenberge: /* Usage */</p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. You can also set up FFmpeg for Python: https://www.bannerbear.com/blog/how-to-use-ffmpeg-in-python-with-examples/<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.<br />
<br />
===Add audio to video===<br />
{{cmdline|ffmpeg -i inputvideo.mp4 -i inputaudio.wav -vcodec copy -map 0:v -map 1:a output.mp4}}</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Main_Page&diff=5758Main Page2024-03-07T14:31:25Z<p>E.vandenberge: </p>
<hr />
<div>Welcome to the TSG Wiki. <br />
<br />
On this wiki you will find documentation for the Hardware, Software and Research Equipment used in the lab environments of the research facilities of the Faculty of Social Sciences, as well as other useful information. <br />
To learn more about the Technical Support Group, visit [http://www.ru.nl/socialsciences/technicalsupportgroup/ our website] or the [[TSG info|about]] section.<br />
<br />
<div style="width:100%;"><br />
<br />
{{Main Page/Frame<br />
| color = be311a<br />
| title = Hardware Documentation<br />
| content = {{Bulleted list<br />
| [[Balance Board]]<br />
| [[Behringer X-Air XR18]] (Audio Mixer)<br />
| [[Biopac]]<br />
| [[Brainvision]]<br />
| [[ButtonBoxes]] <br />
| [[Camcorders]]<br />
| [[Ipod]] (Video Recording)<br />
| [[Computers]]<br />
| [[Eyetrackers]]<br />
| [[Head Mounted Displays]]<br />
| [[Headphones]]<br />
| [[JoySticks]]<br />
| [[Kinect]]<br />
| [[Laptops]]<br />
| [[Monitors]]<br />
| [[Optotrak]] <br />
| [[plux biosignals]] <br />
| [[Structure sensor]]<br />
| [[Surveillance Camera]]<br />
| [[TemperatureHumidity]]<br />
| [[TMSi]] <br />
| [[Vertical Sync sensor]] <br />
}}<br />
}}<br />
<br />
{{Main Page/Frame<br />
| color = be311a<br />
| title = Software Documentation<br />
| content = {{Bulleted list<br />
| [[Audio]] <br />
| [[DataHub]] (LSL)<br />
| [[FFmpeg]]<br />
| [[Matlab]]<br />
| [[Presentation]]<br />
| [[Psychopy]]<br />
| [[Python]]<br />
| [[System Image]]<br />
| [[Unity]]<br />
| [[Web development]]<br />
}}<br/><br />
;Online Experiments<br />
{{Bulleted list <br />
| [[online experiment systems|Overview of Online Systems]]<br />
| [[jsPsych]]<br />
| [[LimeSurvey]]<br />
| [[Toolbox|Toolbox for online experiments]]<br />
| [[Qualtrics]]<br />
}}<br/><br />
;Miscellaneous<br />
{{Bulleted list <br />
| [[Data Files]]<br />
| [https://wiki.dcc.science.ru.nl DCC Cluster]<br />
| [[Gitlab Social Sciences]]<br />
| [[Mattermost Social Sciences]]<br />
| [[Personal and Group drive Data storage ]]<br />
| [[Screen Recording with OBS|Screen Recording]]<br />
| [[Video Codecs]] <br />
| [[Virtualization Server]]<br />
}}<br />
}}<br />
<br />
{{Main Page/Frame<br />
| color = be311a<br />
| title = Lab Documentation<br />
| content = {{Bulleted list<br />
| [[BalanceBoard Lab]]<br />
| [[Cubicles]] (Standard Labs)<br />
| [[EEG Lab]]<br />
| [[Eye Tracker Lab]]<br />
| [[RIVER Lab]] (Virtual Reality)<br />
| [[SensoriMotorLab]]<br />
| [[Sound Recording Lab]]<br />
| [[VoiceKey Lab]]<br />
| [[TMS Lab]]<br />
| [[BCI Lab]]<br />
}}<br/><br />
;Lab Use Policy and Guidelines<br />
{{Bulleted list<br />
| [[Booking labs]]<br />
| [[Media:EEG_lab_user_guide.pdf|EEG lab user guide]]<br />
| [[Media:Cleaningprocedure_EEG.pdf|EEG cleaning protocol]]<br />
| [[Using labs]]<br />
}}<br />
}}<br />
<br />
</div></div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=FFmpeg&diff=5757FFmpeg2024-03-07T14:30:27Z<p>E.vandenberge: Created page with "{{Infobox software | name = FFmpeg | logo = Ffmpeg_logo.jpg | screenshot = | caption = | discontinued..."</p>
<hr />
<div>{{Infobox software<br />
| name = FFmpeg<br />
| logo = Ffmpeg_logo.jpg<br />
| screenshot = <br />
| caption = <br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = 6.1.1<br />
| status = Active<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| license = [https://ffmpeg.org/legal.html GNU LGPL 2.1]<br />
| website = [https://ffmpeg.org/ ffmpeg.org]<br />
| resources = <br />
}}<br />
<br />
FFmpeg is an open-source command-line tool to convert audio and video files. <br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Installation==<br />
===Windows 10===<br />
#Download the latest ffmpeg-release-full build on https://ffmpeg.org/download.html<br />
#Unpack the 7z/zip file anywhere you like<br />
#Add ffmpeg to Windows' Environment Variables:<br />
## Open the start menu and start typing "Environment Variables"<br />
## Select "Edit the system environment variables"<br />
## Click "Environment Variables"<br />
## Select "Path" and click "Edit"<br />
## Click "Browse" and go to the folder where you unpacked your FFmpeg files. Select the 'bin' folder inside (e.g. "C:\ffmpeg\bin")<br />
## Click OK on all previously opened windows. <br />
# To test, go to the command line (Windows+R -> cmd) and type {{cmdline|ffmpeg}}. It should tell you the installed ffmpeg version.<br />
<br />
==Usage==<br />
FFmpeg needs to be run from the command line, but you can create batch scripts to automate the process for multiple files. You can also set up FFmpeg for Python: https://www.bannerbear.com/blog/how-to-use-ffmpeg-in-python-with-examples/<br />
The following are examples of conversions that we commonly use.<br />
<br />
===Basic Format Conversion===<br />
{{cmdline|ffmpeg -i input.mp4 output.avi}}<br />
<br />
===Remove audio from video file===<br />
{{cmdline|ffmpeg -i input.mp4 -vcodec copy -an output.mp4}}<br />
<br />
<code>-vcodec copy</code> means the video won't be re-encoded, preserving the quality.<br />
<br />
<code>-an</code> strips the audio<br />
<br />
===Extract single audio channel from video file===<br />
<code style="background-color:#000; color:#fff; padding:1px 3px;">ffmpeg -i input.mp4 -af "pan=mono|c0=c0" output.wav</code><br />
<br />
<code>-af "pan=mono|c0=c0"</code> extracts a single channel from the file. Use <code>c0=c0</code> for left channel, <code>c0=c1</code> for right channel.</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Meta:Samples/Software&diff=5756Meta:Samples/Software2024-03-07T14:12:15Z<p>E.vandenberge: /* Configuration */</p>
<hr />
<div>{{Infobox software<br />
| name = Software name<br />
| logo = placeholder.png<br />
| screenshot = <br />
| caption = Software version X.X running on Windows X<br />
| developer = <br />
| released = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| discontinued = <br />
| latest release version = <br />
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| latest preview version = <br />
| latest preview date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| installed version = <br />
| installed version date = <!-- {{Start date and age|YYYY|MM|DD|df=yes}} --><br />
| status = Active<br />
| programming language = Ruby<br />
| operating system = Microsoft Windows, Linux, MacOSX<br />
| platform = <br />
| size = <br />
| language = <br />
| genre = <br />
| license = [http://creativecommons.org/licenses/by-sa/4.0/ Creative Commons Attribution-ShareAlike 4.0]<br />
| website = [https://about.gitlab.com/ www.gitlab.nl]<br />
| resources = <br />
{{Infobox tsg<br />
| child = yes<br />
| downloads = {{bulleted list<br />
| [http://www.ru.nl Some Download link]<br />
| [http://www.ru.nl Some other Download link]<br />
}}<br />
| manuals = {{bulleted list<br />
| [http://www.ru.nl Quick start guide]<br />
}}<br />
}}<br />
}}<br />
<br />
Introduction. What does this software do? Who are the intended users?<br />
<br />
<!-- Table of Contents will be generated here --><br />
<br />
==Features==<br />
This software is made to do this, it has these unique selling points:<br />
* Feature 1<br />
* Feature 2<br />
* Feature 3<br />
<br />
===Requirements=== <br />
* Microsoft Windows XP or later.<br />
* Intel Core 2 Duo E8600 or higher.<br />
* Python<br />
<br />
==Installation==<br />
===Windows 7 64-bit===<br />
#Step 1<br />
#Step 2<br />
#Step 3<br />
<br />
==Configuration==<br />
General settings.<br />
For CMD commands, you can use this format:<br/><br />
{{cmdline|ping 127.0.0.1 -n 50 -l 1024}}<br />
<br />
=== License ===<br />
License setup.<br />
<br />
==Usage==<br />
Templates and how-to's go here.<br />
<br />
===Python===<br />
<br />
<syntaxhighlight lang="python" line><br />
#In the syntaxhighlight tag, change lang value to desired language. <br />
#For the list of supported languages, see http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Supported_languages<br />
<br />
def main():<br />
"""Lots of useless code here."""<br />
if True:<br />
print "Hello, world!"<br />
return None # Explicitly returning None!<br />
else:<br />
raise Exception<br />
<br />
if __name__ == "__main__":<br />
main()<br />
</syntaxhighlight><br/><br />
<br />
<!-- Room for extra headers, like ==Course==, or ==Troubleshooting== --><br />
<br />
==See Also== <!-- Optional --><br />
*[[Project:Samples/Hardware|Samples/Hardware]]<br />
*{{tl|Infobox_software}}<br />
*{{tl|Infobox_tsg}}<br />
<br />
==References== <!-- Optional, include only if <ref> tags are used in the article. --><br />
<references /><br />
<br />
==External Links== <!-- Optional --><br />
*{{Official website|https://about.gitlab.com/}}<br />
*[http://tsgdoc.socsci.ru.nl tsgdoc]&nbsp;– Technical documentation.</div>E.vandenbergehttp://tsgdoc.socsci.ru.nl/index.php?title=Template:Cmdline&diff=5755Template:Cmdline2024-03-07T14:10:58Z<p>E.vandenberge: Created page with "<code style="background-color:#000; color:#fff; padding:1px 3px;">{{{1}}}</code>"</p>
<hr />
<div><code style="background-color:#000; color:#fff; padding:1px 3px;">{{{1}}}</code></div>E.vandenberge