Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: preserve original video fps #54

Merged
merged 2 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Converts any Dolby Vision (Profile 5, 7 Single Track, 7 Dual Track, 8) / HDR10+

# Requirements
- ffmpeg 6.0
- ffprobe 6.x
- **mp4box 2.2.1**
- dovi_tool 2.1.0
- hdr10plus_tool 1.6.0
Expand Down
9 changes: 6 additions & 3 deletions dvmkv2mp4
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,11 @@ EOF
echo
dv_target=5
fi

mp4string=("$ionc MP4Box -add \"${TEMP_DIR}BL_RPU.hevc\":dvp=${dv_target}:hdr=none")

fps=$(ffprobe -v error -select_streams v -show_entries stream=avg_frame_rate -of csv=p=0 "$input" | awk -F '/' '{if ($2) {print $1/$2} else {print $1}}')
echo "Detected framerate: $fps"

mp4string=("$ionc MP4Box -add \"${TEMP_DIR}BL_RPU.hevc\":dvp=${dv_target}:fps=${fps}:hdr=none")
tcount=2
while read i;do
stream=`echo "$i" | cut -f1 -d\|`
Expand Down Expand Up @@ -550,4 +553,4 @@ hours=$((runtime / 3600)); minutes=$(( (runtime % 3600) / 60 )); seconds=$(( (ru
echo ""
echo "-------------------------------"
echo "Conversions runtime: $hours:$minutes:$seconds (hh:mm:ss)"
echo
echo
Loading