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

Strange Behaviour for a mkv file #7

Open
spbisc97 opened this issue Jan 2, 2021 · 9 comments
Open

Strange Behaviour for a mkv file #7

spbisc97 opened this issue Jan 2, 2021 · 9 comments

Comments

@spbisc97
Copy link

spbisc97 commented Jan 2, 2021

I tried to use this on a mkv file of 1h and the script created a 192h smaller file

The bigger file seems to do strange jumps from a point to another while watching it

$ mediainfo 2020-11-04.mkv (__Original fIle__)
General
Unique ID                                : 320983083349980904216325639691054698819 (0xF17B17DB12D4BE27E2188CEF9B755143)
Complete name                            : 2020-11-04.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 367 MiB
Duration                                 : 1 h 12 min
Overall bit rate                         : 703 kb/s
Writing application                      : Lavf58.29.100
Writing library                          : Lavf58.29.100
ErrorDetectionType                       : Per level 1

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 1 h 12 min
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 30.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Writing library                          : x264 core 157 r2945 72db437
Encoding settings                        : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=6 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=10 / rc=crf / mbtree=1 / crf=21.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : A_AAC-2
Duration                                 : 1 h 12 min
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Title                                    : simple_aac_recording
Default                                  : Yes
Forced                                   : No

image

And this created a file smaller (right) but with a lenght of 192h (also vlc and mediainfo shows this lenght )

image

this are the info about the modified file!

mediainfo 2020-11-04_22-20-9.mkv (__script applied file__)
General
Unique ID                                : 32342141967383299756911926598104612617 (0x1854DEB63A1119FC2BF4DA039C717F09)
Complete name                            : 2020-11-04_22-20-9.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 273 MiB
Duration                                 : 192 h
Overall bit rate mode                    : Variable
Overall bit rate                         : 3 310 b/s
Writing application                      : Lavf58.45.100
Writing library                          : Lavf58.45.100
ErrorDetectionType                       : Per level 1

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Writing library                          : x264 core 160 r3011 cde9a93
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Default                                  : Yes
Forced                                   : No
DURATION                                 : 192:06:06.506000000

Audio
ID                                       : 2
Format                                   : Vorbis
Format settings, Floor                   : 1
Codec ID                                 : A_VORBIS
Duration                                 : 192 h
Bit rate mode                            : Variable
Bit rate                                 : 112 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Compression mode                         : Lossy
Stream size                              : 9.02 GiB
Title                                    : simple_aac_recording
Writing application                      : Lavc58.91.100
Writing library                          : libVorbis (Reducing Environment) (20200704 (Reducing Environment))
Default                                  : Yes
Forced                                   : No
DURATION                                 : 192:06:06.520000000

thank you so much for your work!!

@spbisc97
Copy link
Author

spbisc97 commented Jan 3, 2021

This strange behavior repeated with all mkv files, but if i just copy this to mp4 (container?) this works
and this copy takes only a fiew seconds

ffmpeg -i fileName.mkv -c copy fileName.mp4

and then

./simple_ehm-runnable.py fileName.mp4

thanks, i hope this can also be useful

@morrolinux
Copy link
Owner

morrolinux commented Jan 3, 2021 via email

@spbisc97
Copy link
Author

spbisc97 commented Jan 4, 2021

ffmpeg version 4.3.1-4ubuntu1

on Kubuntu 20.10

@morrolinux
Copy link
Owner

I'm observing a strange behaviour on mkv files, it's probably due to some ffmpeg option that work different on this container and I don't know of.
This could be investigated further.. or maybe I'll just force the mp4 container, IDK

@spbisc97
Copy link
Author

spbisc97 commented Feb 9, 2021

A little time ago made an error also by using the mp4 container, but sorry I didn't have enough time to check better the error. Anyway just re-encoding before applying simple-ehm fixed the error.
Thanks again for this beautiful piece of Art!

@bleo181-dev
Copy link

Hi everyone, I have the same problem with .MKV files
To solve it first I manually convert the videos to .MP4 with an external program (Video to Video on Windows 10) then I can finally use the program.
If this .MKV to .MP4 conversion could be automated it would be perfect

@Guray00
Copy link
Contributor

Guray00 commented May 10, 2021

Hi, i made an update in my fork because i had the same issue, can you please check if works? (in my case the answer is yes)
https://github.com/Guray00/simple-ehm/tree/fix_cut

@bleo181-dev
Copy link

@Guray00 I tried your version on a .mkv video and now it finally generates a consistent video.
I appreciated the more user-friendly updated readme.
Despite being a command line tool a GUI would be appreciated or at least a sort of prompt that guides the user step-by-step to insert the video input and maybe even the destination output folder plus all the options already present and that you introduced about renaming. Bravo

@luca-morellini
Copy link

@Guray00 It works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants