This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] how to configurate these ffmpeg commands in Hybrid?
#1
@echo off
if "%~1"=="" (
echo function: adjust video Display Aspect Ratio, will copy video and audio streams to a new file.
echo usage: ffmpeg-new-aspect [file]  [-aspect a:b]
echo -aspect, default aspect is 4:3
goto end
)

set aspectStr="4:3"
if "%2"=="-aspect"  set aspectStr="%3"
set file=%~1
set newFile=%~n1[new-aspect]%~x1
@echo on
# ffmpeg -i "%file%" -scodec copy -acodec copy -vcodec copy -aspect 4:3 "%newFile%"
ffmpeg -i "%file%" -c copy -map 0 -aspect "%aspectStr%" "%newFile%"
:end
Reply
#2
Don't really get what is wrong with using the bash script you have, here you go:
  • First you would need to figure out which PAR you want, since Hybrid does not use DAR, but PAR to specify aspect ratios. read: [INFO] About pixel aspect ratios,..
  • Then you would tell Hybrid to passthrough audio, video and subtitle:
    • set "Base->Processing->Video" to "passthrough"
    • set "Base->Processing->Audio" to "passthrough (all)"
    • enable "Config->Automation->Passthrough streams->Subtitle"
  • then you would enable "Muxing->Overwrite->Pixel aspect ratio" and set it to the value you want. (Personally I would also enable 'adjust stream PAR', but that would be more than your bash script does.)
Note that:
a. ffmpeg does process audio&video&subtitles in one go, which Hybrid does not, so if your streams or containers are broken Hybrid will more likely produce async output.
b. with a bit of reading the tool-tips this should have been easy to figure out on your own.

Cu Selur
Reply
#3
this bat is used to chang par which isn't 1:1(such 8:9  16:15) into par 1:1 mp4 without re-encode.
I just want to if hybrid can do the same without re-encode.
Reply
#4
Quote:I just want to if hybrid can do the same without re-encode.
By "Muxing->Overwrite->Pixel aspect ratio" you will overwrite the PAR flag in the container.
By additionally enabling 'adjust stream PAR' Hybrid will also adjust the stream PAR if it's able to.

Note that this is different from what your batch script does.
There you specify the DAR (=display aspect ratio, i.e. 4:3, 16:9) not the PAR (=pixel aspect ration, i.e. 1:1, 8:9, 16:15).

Cu Selur
Reply
#5
Maybe I didn't say it clearly.The original file is PAR 8:9 SAR 3:2 DAR 4:3.Some platform  mediaplayer such as MX player will display  like the next picture as default,and everytime switch a new video you have to change to display as 4:3 again.
[Image: Lgf5vR.png]
the hybrid output file is PAR 1:1 SAR 3:2 DAR 3:2
[Image: LghNs1.png]
Is it possible to set PAR 1:1 SAR 4:3 DAR 4:3 without re-encode?then no matter what platform and no matter what mediaplayer will display the same.thank you.
Reply
#6
Since you are not changing the SAR (sample aspect ration = actual number of pixels in width divided by number of pixels in height), as soon as you change the PAR your change the DAR and the other way around.
Any decent media player should respect these the PAR and DAR flags and resize the content properly on playback.
If your content is already displayed correctly you should not change PAR or DAR unless you want to change the way the content is displayed.

Cu Selur
Reply
#7
So I have to encode DVDISO/VOB from PAR 8:9 SAR 3:2 DAR 4:3/PAR 16:15 SAR 5:4 DAR 4:3 all the same to MP4/MKV VIDEO  PAR 1:1 SAR 4:3 DAR 4:3,no matter what mediaplayer will display correctly.
Reply
#8
Yes, if you want everything to be square pixel, so that players which do not support anamorphic content also playback the file properly you need to reencode it. Just changing the aspect ratio can't do that.

Cu Selur
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)