http://localhost:8080
http://localhost:8080
вызываем в браузере (не пост запрос):
https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A//www.googleapis.com/auth/youtube&state=state_parameter_passthrough_value&redirect_uri=http://localhost:8080&access_type=offline&include_granted_scopes=true&response_type=code&client_id=[[CLIENT_ID]]
code=[[CODE]]&redirect_uri=http://localhost:8080&client_id=[[CLIENT_ID]]&client_secret=[[CLIENT_SECRET]]&scope=&grant_type=authorization_code
юрл такой: https://youtube.googleapis.com/youtube/v3/playlists?part=snippet%2Cstatus&access_token=[[ACCES_TOKEN]]&key=[[API_KEY]]
{
"snippet": {
"title": "[[NAZV_PLAYLISTA]]",
"description": "1111111",
"tags": [
"sample playlist",
"API call"
],
"defaultLanguage": "en"
},
"status": {
"privacyStatus": "public"
}
}
"error": "invalid_grant",
"error_description": "Bad Request"
http://localhost
или http://localhost:8080
Url: https://oauth2.googleapis.com/token
Status: 400
Pragma: no-cache
Date: Thu, 11 Aug 2022 18:14:44 GMT
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Expires: Mon, 01 Jan 1990 00:00:00 GMT
Content-Type: application/json; charset=utf-8
Vary: X-Origin
Vary: Referer
Server: scaffolding on HTTPServer2
X-XSS-Protection: 0
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Accept-Ranges: none
Vary: Origin,Accept-Encoding
Transfer-Encoding: chunked
{
"error": "redirect_uri_mismatch",
"error_description": "Bad Request"
}
Url: oauth2.googleapis.com/token
Status: 403
Vary: X-Origin
Vary: Referer
Content-Type: application/json; charset=UTF-8
Date: Thu, 11 Aug 2022 16:20:20 GMT
Server: scaffolding on HTTPServer2
Cache-Control: private
X-XSS-Protection: 0
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Accept-Ranges: none
Vary: Origin,Accept-Encoding
Transfer-Encoding: chunked
{
"error": {
"code": 403,
"message": "SSL is required to perform this operation.",
"status": "PERMISSION_DENIED"
}
}
Url: https://oauth2.googleapis.com/token
Status: 400
Date: Thu, 11 Aug 2022 16:17:47 GMT
Pragma: no-cache
Expires: Mon, 01 Jan 1990 00:00:00 GMT
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Type: application/json; charset=utf-8
Vary: X-Origin
Vary: Referer
Server: scaffolding on HTTPServer2
X-XSS-Protection: 0
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Accept-Ranges: none
Vary: Origin,Accept-Encoding
Transfer-Encoding: chunked
{
"error": "invalid_grant",
"error_description": "Bad Request"
}
@echo off
setlocal EnableExtensions DisableDelayedExpansion
(for %%i in (*.mov) do (
md "result_%%~ni"
ffmpeg.exe -i "%%i" -filter_complex "[0:v]boxblur=40,scale=1080x1920,setsar=1[bg];[0:v]scale=1080:1920:force_original_aspect_ratio=decrease[fg];[bg][fg]overlay=y=(H-h)/2" -c:v libx264 -profile:v main -level:v 3.0 -x264-params scenecut=0:open_gop=0:min-keyint=72:keyint=72 -c:a aac -preset slow -crf 23 -r 30 -sn -force_key_frames "expr: gte(t, n_forced * 0.5)" -f segment -segment_time 14.5 -reset_timestamps 1 "result_%%~ni\%%~ni%%03d.mp4"
if not errorlevel 1 set "FolderName=result_%%~ni" & call :MoveFiles
)) & exit /B
:MoveFiles
set "FolderCount=0"
:FolderLoop
set /A FolderCount+=1
set "SlicesFolder=%FolderName%\Slices_%FolderCount%"
md "%SlicesFolder%"
set "FileCount=0"
for %%j in ("%FolderName%\*.mp4") do (
setlocal EnableDelayedExpansion
if !FileCount! == 10 endlocal & goto FolderLoop
endlocal
move "%%j" "%SlicesFolder%\" >nul
set /A FileCount+=1
)
goto :EOF
set idx=1
set subfolder=1
for %%f in (*. mts) do (
call :inc "%%f"
ffmpeg -i "%%i" -filter_complex "[0:v]boxblur=40,scale=1080x1920,setsar=1[bg];[0:v]scale=1080:1920:force_original_aspect_ratio=decrease[fg];[bg][fg]overlay=y=(H-h)/2" -c:v libx264 -profile:v main -level:v 3.0 -x264-params scenecut=0:open_gop=0:min-keyint=72:keyint=72 -c:a aac -preset slow -crf 23 -r 30 -sn -force_key_frames "expr: gte(t, n_forced * 0.5)" -f segment -segment_time 14.5 -reset_timestamps 1 result_%%i/%%i%%03d.mp4
)
goto :EOF
:inc
echo %1 - %idx% - %subfolder%
set /a "idx+=1"
if .%idx% == .11 (
set /a "subfolder+=1"
set idx=1
)
pause
@echo off
for %%i in (*.mov) do (
ffmpeg -i "%%i" -vf "scale=ih*9/16:ih,scale=iw:-2,setsar=1,scale=-2:1080" -f segment -segment_time 59 -reset_timestamps 1 %%03d.mp4
)
@echo off
for %%i in (*.mov) do (
ffmpeg -i "%%i" -vf "scale=ih*9/16:ih,scale=iw:-2,setsar=1,scale=-2:1080" -f segment -segment_time 59 -reset_timestamps 1 %%03d.mp4
)
@echo off
for %%i in (*.mov) do (
ffmpeg -i "%%i" -vf "scale=ih*9/16:ih,scale=iw:-2,setsar=1,scale=-2:1080" -f segment -segment_time 59 -segment_format_options movflags=+faststart -force_key_frames "expr: gte(t, n_forced * 0.5)" -y "%%03d.mp4"
)
@echo off
for %%i in (*.mov) do (
ffmpeg -i "%%i" -vf "scale=ih*9/16:ih,scale=iw:-2,setsar=1,scale=-2:1080" -f segment -segment_time 59 -segment_format_options movflags=+faststart -force_key_frames "expr: gte(t, n_forced * 0.5)" -y "%%03d.mp4"
)
@echo off
for %%i in (*.mov) do (
ffmpeg -i "%%i" -vf scale=ih*9/16:ih,scale=iw:-2,setsar=1,scale=-2:1080 -f segment -segment_time 59 -segment_format_options movflags=+faststart -force_key_frames "expr: gte(t, n_forced * 0.5)" -y "%%~ni.mp4"
)
pause
@echo off
for %%i in (*.mov) do (
ffmpeg -i "%%i" -vf scale=ih*9/16:ih,scale=iw:-2,setsar=1,scale=-2:1080,format=yuv420p -c:v libx264 -profile:v main -level:v 3.0 -x264-params scenecut=0:open_gop=0:min-keyint=72:keyint=72 -c:a aac -preset slow -crf 23 -r 30 -sn -f segment -segment_time 59 -y "part-^%03d.mp4"
)
pause