Can you help me write a PowerShell script that will compress a list of *.mkv files into *.mp4 files in the current directory using ffmpeg? I'd like to use libx264 to compress the video with CRF 22 and a slow preset, as well as aac to compress the audio.
system
kya aap mujhe ek PowerShell script likhane main madad kar sakate hai jo FFMPEG kaa upyog karke vartmaan nirdeshika main *.mp4 filon main *.mkv filon kii suchi ko sampeedit karegi?main CRF 22 or ek dhimi priset ke saath video ko sampeedit karne ke liye libx264 kaa upyog karnaa chahta hum, saath hi audio ko sampeedit karne ke liye AAC bhi.
user
bilkul!yahan ek PowerShell script he jo *.mkv praaroop se mail khaane vaali sabhi filon ke madhyam se punrariti karegi.yah tab FFMPEG cmand ko chalaaegaa, prayek fil ko input ke rup main upyog karegaa jo ise paata he, ise sampeedit karata he, or ise ek nae MP4 ekstansion ke saath output karata he.

Get -childitem. \ -filter *.mkv |Foreach-object {
  $ new_name = $ _. Basename + ".mp4"
  ffmpeg -i $ _. FullName -C: v libx264 -preset Slow -crf 22 -C: AAC $ NEW_NAME
}
assistant
<|system|>
</s>
<|user|>
kya aap mujhe ek PowerShell script likhane main madad kar sakate hai jo FFMPEG kaa upyog karke vartmaan nirdeshika main *.mp4 filon main *.mkv filon kii suchi ko sampeedit karegi?main CRF 22 or ek dhimi priset ke saath video ko sampeedit karne ke liye libx264 kaa upyog karnaa chahta hum, saath hi audio ko sampeedit karne ke liye AAC bhi.</s>
<|assistant|>
bilkul!yahan ek PowerShell script he jo *.mkv praaroop se mail khaane vaali sabhi filon ke madhyam se punrariti karegi.yah tab FFMPEG cmand ko chalaaegaa, prayek fil ko input ke rup main upyog karegaa jo ise paata he, ise sampeedit karata he, or ise ek nae MP4 ekstansion ke saath output karata he.

Get -childitem. \ -filter *.mkv |Foreach-object {
  $ new_name = $ _. Basename + ".mp4"
  ffmpeg -i $ _. FullName -C: v libx264 -preset Slow -crf 22 -C: AAC $ NEW_NAME
}</s>
