code not woring since update

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
johnzapf
Posts: 29
Joined: Tue Jun 07, 2016 2:44 pm

code not woring since update

Post by johnzapf » Tue May 23, 2017 1:31 am

can anyone tell me why this code is not working any more since the last update? all works but handbrack...


----------------------------------------------------
set /P file=Enter input File Name:
set /P fileext=Enter input File Extension:
set /P tit=Enter Input Title:
set /P dis=Enter Input Description:

handbrakecli -i "C:\Users\John.ARTISTICIMAGES\Desktop\VIDEO\%file%.%fileext%" -t 1 --angle 1 -c 1 -o "\\aiws01\c$\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.6.0\content\%file%-1080.mp4" -f mp4 -O --decomb -w 1920 --crop 0:0:0:0 --loose-anamorphic --modulus 2 -e x264 -b 6000 -2 -T --vfr -a 1 -E av_aac -6 dpl2 -R 44.1 -B 160 -D 0 --gain 0 --audio-fallback ac3 --markers="C:\Users\John.artisticimages\AppData\Local\Temp\T_T1_C1-1-chapters.csv" --encoder-preset=placebo --encoder-level="4.1" --encoder-profile=main --verbose=1

handbrakecli -i "C:\Users\John.ARTISTICIMAGES\Desktop\VIDEO\%file%.%fileext%" -t 1 --angle 1 -c 1 -o "\\aiws01\c$\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.6.0\content\%file%-720.mp4" -f mp4 -O --decomb -w 1280 --crop 0:0:0:0 --loose-anamorphic --modulus 2 -e x264 -b 3000 -2 -T --vfr -a 1 -E av_aac -6 dpl2 -R 44.1 -B 128 -D 0 --gain 0 --audio-fallback ac3 --markers="C:\Users\John.artisticimages\AppData\Local\Temp\T_T1_C1-1-chapters.csv" --encoder-preset=placebo --encoder-level="4.1" --encoder-profile=main --verbose=1

handbrakecli -i "C:\Users\John.ARTISTICIMAGES\Desktop\VIDEO\%file%.%fileext%" -t 1 --angle 1 -c 1 -o "\\aiws01\c$\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.6.0\content\%file%-540.mp4" -f mp4 -O --decomb -w 960 --crop 0:0:0:0 --loose-anamorphic --modulus 2 -e x264 -b 1500 -2 -T --vfr -a 1 -E av_aac -6 dpl2 -R 44.1 -B 96 -D 0 --gain 0 --audio-fallback ac3 --markers="C:\Users\John.artisticimages\AppData\Local\Temp\T_T1_C1-1-chapters.csv" --encoder-preset=placebo --encoder-level="4.1" --encoder-profile=main --verbose=1

handbrakecli -i "C:\Users\John.ARTISTICIMAGES\Desktop\VIDEO\%file%.%fileext%" -t 1 --angle 1 -c 1 -o "\\aiws01\c$\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.6.0\content\%file%-360.mp4" -f mp4 -O --decomb -w 640 --crop 0:0:0:0 --loose-anamorphic --modulus 2 -e x264 -b 750 -2 -T --vfr -a 1 -E av_aac -6 dpl2 -R 44.1 -B 160 -D 0 --gain 0 --audio-fallback ac3 --markers="C:\Users\John.artisticimages\AppData\Local\Temp\T_T1_C1-1-chapters.csv" --encoder-preset=placebo --encoder-level="4.1" --encoder-profile=main --verbose=1
set path="\\aiws01\c$\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.6.0\content\%file%.smil"

@echo off

echo ^<?xml version=^"1.0^" encoding=^"UTF-8^"?^> > %path%
echo ^<smil title=^"%file%^"^> >> %path%
echo ^<body^> >> %path%
echo ^<switch^> >> %path%
echo ^<video height=^"1080^" src=^"%file%-1080.mp4^" >> %path%
echo systemLanguage=^"eng^" width=^"1920^"^> >> %path%
echo ^<param name=^"videoBitrate^" value=^"6000000^" valuetype=^"data^"^>^</param^> >> %path%
echo ^<param name=^"audioBitrate^" value=^"160000^" valuetype=^"data^"^>^</param^> >> %path%
echo ^</video^> >> %path%
echo ^<video height=^"720^" src=^"%file%-720.mp4^" >> %path%
echo systemLanguage=^"eng^" width=^"1280^"^> >> %path%
echo ^<param name=^"videoBitrate^" value=^"3000000^" valuetype=^"data^"^>^</param^> >> %path%
echo ^<param name=^"audioBitrate^" value=^"128000^" valuetype=^"data^"^>^</param^> >> %path%
echo ^</video^> >> %path%
echo ^<video height=^"540^" src=^"%file%-540.mp4^" >> %path%
echo systemLanguage=^"eng^" width=^"960^"^> >> %path%
echo ^<param name=^"videoBitrate^" value=^"1500000^" valuetype=^"data^"^>^</param^> >> %path%
echo ^<param name=^"audioBitrate^" value=^"64000^" valuetype=^"data^"^>^</param^> >> %path%
echo ^</video^> >> %path%
echo ^<video height=^"360^" src=^"%file%-360.mp4^" >> %path%
echo systemLanguage=^"eng^" width=^"640^"^> >> %path%
echo ^<param name=^"videoBitrate^" value=^"750000^" valuetype=^"data^"^>^</param^> >> %path%
echo ^<param name=^"audioBitrate^" value=^"64000^" valuetype=^"data^"^>^</param^> >> %path%
echo ^</video^> >> %path%
echo ^</switch^> >> %path%
echo ^</body^> >> %path%
echo ^</smil^> >> %path%


set path="\\JZOFFICE01\c$\Users\John.artisticimages\Desktop\%file%.txt"
@echo off

echo^ sources: [{ >> %path%
echo^ "default": false, >> %path%
echo^ "file": "http://70.167.119.116:1935/vod/smil:%fi ... nifest.mpd", >> %path%
echo^ },{ >> %path%
echo^ "default": false, >> %path%
echo^ "file": "http://70.167.119.116:1935/vod/smil:%fi ... layer.smil", >> %path%
echo^ },{ >> %path%
echo^ "default": false, >> %path%
echo^ "file": "http://70.167.119.116:1935/vod/smil:%fi ... ylist.m3u8", >> %path%
echo^ }], >> %path%
echo^ "image": "/images/wowza/%file%.jpg", >> %path%
echo^ "title": "%tit%",^ >> %path%
echo^ "description": "%dis%", >> %path%

exit

Woodstock
Veteran User
Posts: 3154
Joined: Tue Aug 27, 2013 6:39 am

Re: code not woring since update

Post by Woodstock » Tue May 23, 2017 4:09 am

Might be helpful to add "2> \path\to\logfile.txt" to the end of the handbrake.cli lines so we could see what handbrake sees. You have a LOT of variable substitution going on, to the point that it is hard to see what is happening when handbrake is called.

johnzapf
Posts: 29
Joined: Tue Jun 07, 2016 2:44 pm

Re: code not woring since update

Post by johnzapf » Tue May 23, 2017 2:22 pm

the problem is something in this code: need to look up how to add the log file code in so I can see whats going on this is not working
----------------------------------

"2> my-activity-C:\Users\John.ARTISTICIMAGES\Desktop\log.txt"

-----------------------------------


handbrakecli -i "C:\Users\John.ARTISTICIMAGES\Desktop\VIDEO\%file%.%fileext%" -t 1 --angle 1 -c 1 -o "\\aiws01\c$\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.6.0\content\%file%-1080.mp4" -f mp4 -O --decomb -w 1920 --crop 0:0:0:0 --loose-anamorphic --modulus 2 -e x264 -b 6000 -2 -T --vfr -a 1 -E av_aac -6 dpl2 -R 44.1 -B 160 -D 0 --gain 0 --audio-fallback ac3 --markers="C:\Users\John.artisticimages\AppData\Local\Temp\T_T1_C1-1-chapters.csv" --encoder-preset=placebo --encoder-level="4.1" --encoder-profile=main --verbose=1

Woodstock
Veteran User
Posts: 3154
Joined: Tue Aug 27, 2013 6:39 am

Re: code not woring since update

Post by Woodstock » Tue May 23, 2017 2:37 pm

Where the line has "--verbose=1", append " 2> \path\to\logfile.txt" (there is a space in front of the 2).

johnzapf
Posts: 29
Joined: Tue Jun 07, 2016 2:44 pm

Re: code not woring since update

Post by johnzapf » Tue May 23, 2017 11:30 pm

not working. something changed in this last update. that code has been working for 2 years.

please, if any one can help, doing this manually has taken 10 hours so fare today just to do 3 files.

cant get it to put out the log files so I can see whats going on.


John

johnzapf
Posts: 29
Joined: Tue Jun 07, 2016 2:44 pm

Re: code not woring since update

Post by johnzapf » Wed May 24, 2017 12:16 am

handbrakecli -i "C:\Users\John.artisticimages\Desktop\VIDEO\%file%.%fileext%" -t 1 --angle 1 -c 1 -o "\\aiws01\c$\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.6.0\content\%file%-1080.mp4" -f mp4 -O --decomb -w 1920 --crop 0:0:0:0 --loose-anamorphic --modulus 2 -e x264 -b 6000 -2 -T --vfr -a 1 -E av_aac -6 dpl2 -R 44.1 -B 192 -D 0 --gain 0 --audio-fallback ac3 --markers="C:\Users\John.artisticimages\AppData\Local\Temp\T_T1_C1-1-chapters.csv" --encoder-preset=faster --encoder-level="4.1" --encoder-profile=main --verbose 2 "C:\Users\John.artisticimages\Desktop\VIDEO\log.txt"


I get no log file!

johnzapf
Posts: 29
Joined: Tue Jun 07, 2016 2:44 pm

Re: code not woring since update

Post by johnzapf » Wed May 24, 2017 12:19 am

Been messing with the code for 4 hours, just going back to doing manually. I don't see what I am missing.

User avatar
Rodeo
HandBrake Team
Posts: 12141
Joined: Tue Mar 03, 2009 8:55 pm

Re: code not woring since update

Post by Rodeo » Wed May 24, 2017 12:39 am

handbrakecli -i "C:\Users\John.artisticimages\Desktop\VIDEO\%file%.%fileext%" -t 1 --angle 1 -c 1 -o "\\aiws01\c$\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.6.0\content\%file%-1080.mp4" -f mp4 -O --decomb -w 1920 --crop 0:0:0:0 --loose-anamorphic --modulus 2 -e x264 -b 6000 -2 -T --vfr -a 1 -E av_aac -6 dpl2 -R 44.1 -B 192 -D 0 --gain 0 --audio-fallback ac3 --markers="C:\Users\John.artisticimages\AppData\Local\Temp\T_T1_C1-1-chapters.csv" --encoder-preset=faster --encoder-level="4.1" --encoder-profile=main 2> "C:\Users\John.artisticimages\Desktop\VIDEO\log.txt"

johnzapf
Posts: 29
Joined: Tue Jun 07, 2016 2:44 pm

Re: code not woring since update

Post by johnzapf » Wed May 24, 2017 1:25 am

so how can I simplify all this and use a preset?

so with this:

handbrakecli -i "C:\Users\John.artisticimages\Desktop\VIDEO\%file%.%fileext%" -t 1 --angle 1 -c 1 -o "\\aiws01\c$\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.6.0\content\%file%-1080.mp4" -f mp4 -O --decomb -w 1920 --crop 0:0:0:0 --loose-anamorphic --modulus 2 -e x264 -b 6000 -2 -T --vfr -a 1 -E av_aac -6 dpl2 -R 44.1 -B 192 -D 0 --gain 0 --audio-fallback ac3 --markers="C:\Users\John.artisticimages\AppData\Local\Temp\T_T1_C1-1-chapters.csv" --encoder-preset=faster --encoder-level="4.1" --encoder-profile=main --verbose 2 "C:\Users\John.artisticimages\Desktop\VIDEO\log.txt"

same thing but use "Windows Mobile 1080p30"

johnzapf
Posts: 29
Joined: Tue Jun 07, 2016 2:44 pm

Re: code not woring since update

Post by johnzapf » Wed May 24, 2017 1:57 pm

thanks for the log file help.

I get this in the log.txt


'handbrakecli' is not recognized as an internal or external command,
operable program or batch file.

rollin_eng
Veteran User
Posts: 3129
Joined: Wed May 04, 2011 11:06 pm

Re: code not woring since update

Post by rollin_eng » Wed May 24, 2017 2:07 pm

handbrakecli.exe needs to be in the same folder, is it?

johnzapf
Posts: 29
Joined: Tue Jun 07, 2016 2:44 pm

Re: code not woring since update

Post by johnzapf » Wed May 24, 2017 2:52 pm

the .bat is in the handbrake folder. But there is no handbrakecli.exe in that folder, only HandBrake.exe.

Where is handbrakecli.exe, is that a separate download now?

johnzapf
Posts: 29
Joined: Tue Jun 07, 2016 2:44 pm

Re: code not woring since update

Post by johnzapf » Wed May 24, 2017 2:55 pm

ok, I see its a separate download. got it. I dont remember having to do that before.

Thanks
John

rollin_eng
Veteran User
Posts: 3129
Joined: Wed May 04, 2011 11:06 pm

Re: code not woring since update

Post by rollin_eng » Wed May 24, 2017 2:59 pm

The gui no longer needs the cli so it is now separate.

User avatar
Rodeo
HandBrake Team
Posts: 12141
Joined: Tue Mar 03, 2009 8:55 pm

Re: code not woring since update

Post by Rodeo » Thu May 25, 2017 2:55 pm

TBH the CLI has always been available as a separate download, but yes, it happened to also be bundled with the graphical user interface download in the past.

Post Reply