@Set /p fps= "Insert framerate: "
@Set /p vq= "Insert video quality (1 = HQ, 2 = LQ): "
@Set /p unique_id= "Insert cia Unique ID (Example: 0xAAAAAA): "
@cd stuffs
@Echo Starting video extraction through ffmpeg, please wait...
@IF %vq%==1 ffmpeg -i ../files/video.mp4 -r %fps% -qscale:v 2 -vf "transpose=1" -s 240x400 "temp\output%%1d.jpg"
@IF %vq%==2 ffmpeg -i ../files/video.mp4 -r %fps% -vf "transpose=1" -s 240x400 "temp\output%%1d.jpg"
@Echo Starting audio extraction through ffmpeg, please wait...
@ffmpeg -i ../files/video.mp4 -acodec: libvorbis -ac 2 -ar 24000 -vn temp\audio.ogg
@Echo Encoding video to JPGV format...
@jpgv_encoder %fps%
@Echo Deleting temp files...
@Del /q ".\temp\*.*"
@move /-y output.jpgv "../romfs/video.jpgv"
@Echo Creating icon and banner files...
@bannertool makebanner -i ../files/banner.png -a ../files/audio.wav -o ../tmp/banner.bin
@bannertool makesmdh -s "
XXXXX" -l "
YYYYY" -p "
ZZZZZ" -i ../files/icon.png -o ../tmp/icon.bin
@Echo Creating romfs file...
@3dstool -cvtf romfs ../tmp/romfs.bin --romfs-dir ../romfs
@Echo Building cia file...
@hex_set %unique_id%
@makerom -f cia -o ../my_video.cia -elf lpp-3ds.elf -rsf cia_workaround.rsf -icon ../tmp/icon.bin -banner ../tmp/banner.bin -exefslogo -target t -romfs ../tmp/romfs.bin
@cd ..
@Echo Deleting temp files...
@Del /q ".\tmp\*.*"
@Del .\romfs\video.jpgv
@Echo Video converted successfully!
@Set /p dummy= "Press ENTER to exit"