question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. Itย collects links to all the places you might be looking at while hunting down a tough bug.

And, if youโ€™re still stuck at the end, weโ€™re happy to hop on a call to see how we can help out.

Cannot get script to remux HEVC video file

See original GitHub issue

Hi there,

I have a video file (ffprobe info can be found here: http://paste.ubuntu.com/26007478/) that Iโ€™m trying to remux using manual.py. The problem is that itโ€™s trying to convert it to h264, which kills the CPU. Hereโ€™s my autoProcess.ini:

[MP4]
ffmpeg = /usr/bin/ffmpeg
ffprobe = /usr/bin/ffprobe
threads = auto
output_directory = 
copy_to = 
move_to = 
output_extension = mp4
output_format = mp4
delete_original = True
relocate_moov = True
video-codec = h264,x264,hevc,h265,x265,HEVC,mpeg4,MPEG-4,MPEG-H,h.265,h.264
video-bitrate = 18000
video-crf = 
video-max-width = 
h264-max-level = 
use-qsv-decoder-with-encoder = True
ios-audio = True
ios-first-track-only = False
ios-audio-filter = 
max-audio-channels = 
use-hevc-qsv-decoder = 
audio-codec = ac3
audio-language = eng
audio-default-language = eng
audio-channel-bitrate = 256
audio-filter = 
subtitle-codec = mov_text
subtitle-language = eng
subtitle-default-language = eng
subtitle-encoding = 
fullpathguess = True
convert-mp4 = True
tagfile = True
tag-language = en
download-artwork = Poster
download-subs = True
embed-subs = True
sub-providers = addic7ed,podnapisi,thesubdb,opensubtitles
permissions = 0777
post-process = False
pix-fmt = 
aac_adtstoasc = False
postopts = 
preopts = 

And hereโ€™s what I get when I run the script:

{                                                                                                                                  โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
    "preopts": [],                                                                                                                 โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
    "subtitle": {},                                                                                                                โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
    "format": "mp4",                                                                                                               โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
    "postopts": [                                                                                                                  โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
        "-threads",                                                                                                                โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
        "auto"                                                                                                                     โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
    ],                                                                                                                             โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
    "video": {                                                                                                                     โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
        "map": 0,                                                                                                                  โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
        "codec": "h264",                                                                                                           โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
        "bitrate": 18000,                                                                                                          โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
        "level": null                                                                                                              โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
    },                                                                                                                             โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
    "audio": {                                                                                                                     โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
        "0": {                                                                                                                     โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
            "map": 2,                                                                                                              โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
            "language": "eng",                                                                                                     โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
            "channels": 2,                                                                                                         โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
            "codec": "aac",                                                                                                        โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
            "disposition": "default",                                                                                              โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
            "bitrate": 256,                                                                                                        โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
            "filter": null                                                                                                         โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
        },                                                                                                                         โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
        "1": {                                                                                                                     โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
            "map": 2,                                                                                                              โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
            "language": "eng",                                                                                                     โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
            "channels": 6,                                                                                                         โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
            "codec": "copy",                                                                                                       โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
            "disposition": "none",                                                                                                 โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
            "bitrate": 1536,                                                                                                       โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
            "filter": null                                                                                                         โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
        }                                                                                                                          โ”‚ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
    }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Collisionccommented, Nov 23, 2017

Does the original input file have a bitrate over 18000 ? video-bitrate = 18000

Would force encoding if thatโ€™s the case.

0reactions
astrodadcommented, Nov 24, 2017

@Collisionc That was it! I increased the value in the autoProcess.ini file and itโ€™s running much faster, and also picking up the correct video codec.

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Avoiding h265/HEVC codec while still allowing REMUX ...
I think the problem is that you can't scan the file until you have it, so you either have to rely on the...
Read more >
Unable to remux HEVC stream from MKV to MKV - FFmpeg Wiki
Summary of the bug: With some MKV source files, copying the HEVC video stream to an MKV output may produce the error: Could...
Read more >
muxing audio and video from hevc encode to final video ...
maybe mp4box is not good for this. am now trying muxer, but having problems getting it to include audio: muxer.exe -i g:\video.hm10 -i...
Read more >
How to Convert HEVC H.265 to H.264 | Free | HandBrake
Are you wondering how to convert your video files from HEVC / H.265 to H.264 codec? ... Your browser can't play this video....
Read more >
FASTEST MKV to MP4 REMUX using FFMPEG - YouTube
Your browser can't play this video. Learn more. Switch camera.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found