gacopl / dvmkv2mp4

Convert any Dolby Vision/HDR10+ MKV to DV MP4 that runs on many devices
198 stars 36 forks source link

docker doesn't write mp4 file #28

Closed markg85 closed 1 year ago

markg85 commented 1 year ago

Hi,

For various reasons building the docker image took whopping hours! Issues like connection refused to some ubuntu repo, download failures and whatnot. It eventually worked after ~6 retries.

However, running it on a video that for sure does have Dolby Vision ended in no mp4 file at all. The output:

❯ docker run -it -u $(id -u):$(id -g) --rm -v /home/mark/Videos/source:/convert dvmkv2mp4
dvmkv2mp4 0.3.0-dev - easily convert Dolby Vision or HDR10+ mkvs to Dolby Vision MP4 
Created by github.com/gacopl, Released under GPLv3

Starting Conversions Mon May 15 15:22:08 UTC 2023
Converting DV8: "fancy_video.mkv"
ionice -c 3 ffmpeg -i "fancy_video.mkv" -y -loglevel error -stats -map 0:0 -c:v copy -vbsf hevc_mp4toannexb -f hevc BL_RPU.hevc -map 0:1 -c:a:0 copy 1.rus.ac3 -map 0:2 -c:a:0 copy 2.rus.ac3 -map 0:3 -c:a:0 copy 3.ukr.ac3 -map 0:4 -c:a:0 copy 4.eng.eac3 -map 0:5 -c:s:0 copy "fancy_video DV-MP4.rus5.srt" -map 0:6 -c:s:0 copy "fancy_video DV-MP4.rus6.srt" -map 0:7 -c:s:0 copy "fancy_video DV-MP4.ukr7.srt" -map 0:8 -c:s:0 copy "fancy_video DV-MP4.eng8.srt" -map 0:9 -c:s:0 copy "fancy_video DV-MP4.eng9.srt" -map 0:10 -c:s:0 copy "fancy_video DV-MP4.eng10.srt"
frame=206179 fps=1826 q=-1.0 Lsize=30803255kB time=02:23:19.36 bitrate=29344.1kbits/s speed=76.2x    
cp: cannot stat 'fancy_video.*.srt': No such file or directory
ionice -c 3 MP4Box -add BL_RPU.hevc:dv-profile=8 -add "1.rus.ac3":sopt:gfreg=ffdmx -lang 2=rus -name 2="Dub" -delay 2=0 -add "2.rus.ac3":sopt:gfreg=ffdmx -lang 3=rus -name 3="MVO" -delay 3=0 -add "3.ukr.ac3":sopt:gfreg=ffdmx -lang 4=ukr -name 4="Dub" -delay 4=0 -add "4.eng.eac3":sopt:gfreg=ffdmx -lang 5=eng -name 5="Original" -delay 5=0 -chap chapters.list -brand mp42isom -ab dby1 "fancy_video DV-MP4.mp4"
Cannot create directory "/.gpac": last error 13
Cannot create directory "/.gpac": last error 13
Cannot create directory "/.gpac/Storage": last error 2
Track Importing HEVC - Width 3840 Height 2160 FPS 24000/1001 SAR 1/1
HEVC Import results: 206179 samples (849763 NALUs) - Slices: 1920 I 45224 P 159035 B - 220491 SEI - 1789 IDR
HEVC Stream uses forward prediction - stream CTS offset: 8 frames
Track Importing AC-3 - SampleRate 48000 Num Channels 6
Track Importing AC-3 - SampleRate 48000 Num Channels 6
Track Importing AC-3 - SampleRate 48000 Num Channels 2

        Error: Bad Parameter
rm: cannot remove 'RPU.bin': No such file or directory
rm: cannot remove 'extra.json': No such file or directory
rm: cannot remove 'hdr10plus_metadata.json': No such file or directory
Conversions runtime: 0:3:55 (hh:mm:ss)
❯ ll
total 33G
-rw-r--r-- 1 mark mark 110K May 15 17:24 'fancy_video DV-MP4.eng10.srt'
-rw-r--r-- 1 mark mark  78K May 15 17:24 'fancy_video DV-MP4.eng8.srt'
-rw-r--r-- 1 mark mark  96K May 15 17:24 'fancy_video DV-MP4.eng9.srt'
-rw-r--r-- 1 mark mark 2.4K May 15 17:24 'fancy_video DV-MP4.rus5.srt'
-rw-r--r-- 1 mark mark  98K May 15 17:24 'fancy_video DV-MP4.rus6.srt'
-rw-r--r-- 1 mark mark 2.7K May 15 17:24 'fancy_video DV-MP4.ukr7.srt'
-rw-r--r-- 1 mark mark  33G May 15 01:02  fancy_video.mkv

It created the srt files though... Do note that i did chmod /home/mark/Videos/source to 777 because i noticed errors like Cannot create directory "/.gpac": last error 13 but apparently changing the permissions on that folder has no effect in this regard.

Any idea what i might be doing wrong here?

scandinave commented 1 year ago

Hi, I just create a PR with a fix for this error I also have. https://github.com/gacopl/dvmkv2mp4/pull/29

Feel free to test it.