1
0
hugo/content/blog/2018-12-12-psp.md

26 lines
603 B
Markdown
Raw Normal View History

2024-04-23 13:21:26 +00:00
+++
date = "2018-12-12"
tags = ["psp","video"]
title = "ffmpegでPSP用のmp4に変換する"
slug = "psp"
+++
PSPは、なかなか動画が再生できません。とても苦労します。
> path : ./xxx.mp4, ./t.zsh
> ./t.zsh
```sh
#!/bin/zsh
d=${0:a:h}
dd=$d/out
mkdir -p $dd
for f in *.mp4; do
ffmpeg -y -i $f -flags +bitexact -vcodec libx264 -profile:v baseline -level 3.0 -s 480x272 -r 29.97 -b:v 384k -acodec aac -b:a 96k -ar 48000 -f psp -strict -2 $dd/${f%.*}_psp.MP4
ffmpeg -i $f -f image2 -ss 5 -vframes 1 -s 160x120 $dd/${f%.*}_psp.THM
done
```
> $ chmod +x ./t.zsh;./t.zsh