Closed VegethB closed 3 years ago
Fix, add -pix_fmt yuv420p
after -crf 4
it seems that quicktime needs forced "4: 2: 0" or from the above problems.
Final Command:
"#{encbin}" -ss #{startt} -sn -an -i "#{inpath}\#{input}" -vframes #{lenf} -c:v libx264 -r 24000/1001 -crf 4 -pix_fmt yuv420p "#{prefix}/#{output}[#{startf}-#{endf}].mp4"
the default command generates too low quality .jpg and gives problems if you do a 1 minute trim (since prefix doesn't work).
So I searched for a commando for ffmpeg and found 2:
"#{encbin}" -ss #{startt} -sn -an -i "#{inpath}\#{input}" -vframes #{lenf} -c:v libx264 -r 24000/1001 "#{prefix}/#{output}[#{startf}-#{endf}].mp4"
from #45"#{encbin}" -ss #{startt} -sn -an -i "#{inpath}/#{input}" -to #{endt} -copyts -map 0:v "#{prefix}/#{output}[#{startt}-#{endt}].mp4"
both do the trim ... Except that when opened on mocha the frames are all black or white. If you open the file on mediainfo under duration (in general): For the first command it is the duration of the source video file (ex, 1 hour instead of 2 seconds); For the second command it is the duration in the
-to
parameter (ex, 44minutes and 21seconds instead of 2seconds);First Command:
![image](https://user-images.githubusercontent.com/17975351/101544121-76c5e580-39a5-11eb-838f-a67d4f2c4194.png)
Second Command:
![image](https://user-images.githubusercontent.com/17975351/101544387-e8059880-39a5-11eb-80c0-0c7252e9c412.png)
I don't understand how to fix