mlsmithjr / transcoder

Python wrapper for ffmpeg for batch and/or concurrent transcoding
GNU General Public License v3.0
117 stars 27 forks source link

"regex match on video stream data failed" for some files #7

Open EricTheMagician opened 5 years ago

EricTheMagician commented 5 years ago

Hi,

I'm not sure if this is an issue I should be posting here or on ffmpeg, but I get this issue: regex match on video stream data failed: ffmpeg -i episode.mkv

When I run it, I get this for the output:

ffmpeg version N-94528-gfaa9cd3 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
  configuration: --prefix=/home/eric/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/eric/ffmpeg_build/include --extra-ldflags=-L/home/eric/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/eric/bin --enable-gpl --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-cuda-nvcc --nvcc=/usr/local/cuda/bin/nvcc --enable-cuda-nvcc --enable-nvenc --enable-nvdec
  libavutil      56. 33.100 / 56. 33.100
  libavcodec     58. 55.100 / 58. 55.100
  libavformat    58. 30.100 / 58. 30.100
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 58.100 /  7. 58.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[eac3 @ 0x56385f474e00] Format eac3 detected only with low score of 25, misdetection possible!
[eac3 @ 0x56385f476840] Multiple frames in a packet.
[eac3 @ 0x56385f476840] invalid bitstream id
[eac3 @ 0x56385f476840] unable to determine channel mode
[eac3 @ 0x56385f474e00] Estimating duration from bitrate, this may be inaccurate
Input #0, eac3, from 'episode.mkv':
  Duration: 11:44:54.14, start: 0.000000, bitrate: 640 kb/s
    Stream #0:0: Audio: eac3, 48000 Hz, 5.1(side), fltp, 640 kb/s

And here's my yaml settings file:

config:
    default_queue_file:   '/home/eric/.transcode.q'
    ffmpeg:               '/home/eric/bin/ffmpeg'       # path to ffmpeg for this config
    ssh:                  '/usr/bin/ssh'
    queues:
        qsv:                1                   # sequential encodes
        queue:              1                   # maximum of 2 encodes at a time
        cuda:               4
    colorize:             yes
    automap:              yes

profiles:

    # some common, reusable settings to keep things tidy
    common:
        output_options:
            - "-crf 28"
            - "-c:a copy"
            - "-c:s copy"
            - "-f matroska"
        extension: '.mkv'
        threshold: 20
        threshold_check: 60
        automap: yes
        audio:
            include_languages:
                - "eng"
                - "fr"
            default_language: eng

        subtitle:
            include_languages:
                - "eng"
                - "fr"
            default_language: eng

    hevc_cuda:                  # nVidia CUDA HEVC encoding 
        include: common
        input_options:
            - "-hwaccel cuvid"        # REQUIRED for CUDA
            - "-c:v h264_cuvid"       # hardware decoding too
        output_options:
            - "-c:v hevc_nvenc"
            - "-profile:v main"
            - "-bf -1"
        threshold: 20
        threshold_check: 60
        queue: cuda

    hevc:                  # profile name
        include: common
        input_options:          # ffmpeg input options
        #   - "-c:v h264" # hardware decoding too
        output_options:         # in addition to included from 'common'
            - "-c:v libx265"
            - "-preset medium"
            - "-threads 4"
        queue: queue # manage this encode in the 'cuda' queue defined globally

rules:
    'default':                      # this will be the DEFAULT (no criteria implies a match)
        profile: hevc_cuda
        criteria:
            vcodec: '!hevc'
mlsmithjr commented 5 years ago

I apologize for the delay. I completely missed this issue.

So it appears either your input mkv is missing the video stream or ffmpeg can't figure it out. pytranscoder requires at least 1 video stream and 1 audio stream to correctly parse the results, hence the error.

On Thu, Sep 5, 2019 at 5:56 AM Eric Yen notifications@github.com wrote:

Hi,

I'm not sure if this is an issue I should be posting here or on ffmpeg, but I get this issue: regex match on video stream data failed: ffmpeg -i episode.mkv

When I run it, I get this for the output:

ffmpeg version N-94528-gfaa9cd3 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1) configuration: --prefix=/home/eric/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/eric/ffmpeg_build/include --extra-ldflags=-L/home/eric/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/eric/bin --enable-gpl --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-cuda-nvcc --nvcc=/usr/local/cuda/bin/nvcc --enable-cuda-nvcc --enable-nvenc --enable-nvdec libavutil 56. 33.100 / 56. 33.100 libavcodec 58. 55.100 / 58. 55.100 libavformat 58. 30.100 / 58. 30.100 libavdevice 58. 9.100 / 58. 9.100 libavfilter 7. 58.100 / 7. 58.100 libswscale 5. 6.100 / 5. 6.100 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 [eac3 @ 0x56385f474e00] Format eac3 detected only with low score of 25, misdetection possible! [eac3 @ 0x56385f476840] Multiple frames in a packet. [eac3 @ 0x56385f476840] invalid bitstream id [eac3 @ 0x56385f476840] unable to determine channel mode [eac3 @ 0x56385f474e00] Estimating duration from bitrate, this may be inaccurate Input #0, eac3, from 'episode.mkv': Duration: 11:44:54.14, start: 0.000000, bitrate: 640 kb/s Stream #0:0: Audio: eac3, 48000 Hz, 5.1(side), fltp, 640 kb/s

And here's my yaml settings file:

config: default_queue_file: '/home/eric/.transcode.q' ffmpeg: '/home/eric/bin/ffmpeg' # path to ffmpeg for this config ssh: '/usr/bin/ssh' queues: qsv: 1 # sequential encodes queue: 1 # maximum of 2 encodes at a time cuda: 4 colorize: yes automap: yes

profiles:

# some common, reusable settings to keep things tidy
common:
    output_options:
        - "-crf 28"
        - "-c:a copy"
        - "-c:s copy"
        - "-f matroska"
    extension: '.mkv'
    threshold: 20
    threshold_check: 60
    automap: yes
    audio:
        include_languages:
            - "eng"
            - "fr"
        default_language: eng

    subtitle:
        include_languages:
            - "eng"
            - "fr"
        default_language: eng

hevc_cuda:                  # nVidia CUDA HEVC encoding   
    include: common
    input_options:
        - "-hwaccel cuvid"        # REQUIRED for CUDA
        - "-c:v h264_cuvid"       # hardware decoding too
    output_options:
        - "-c:v hevc_nvenc"
        - "-profile:v main"
        - "-bf -1"
    threshold: 20
    threshold_check: 60
    queue: cuda

hevc:                  # profile name
    include: common
    input_options:          # ffmpeg input options
    #   - "-c:v h264" # hardware decoding too
    output_options:         # in addition to included from 'common'
        - "-c:v libx265"
        - "-preset medium"
        - "-threads 4"
    queue: queue # manage this encode in the 'cuda' queue defined globally

rules: 'default': # this will be the DEFAULT (no criteria implies a match) profile: hevc_cuda criteria: vcodec: '!hevc'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mlsmithjr/transcoder/issues/7?email_source=notifications&email_token=AAHRMTH54DNXTHKYFIK5SO3QIDJVJA5CNFSM4IT326CKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HJPPPMQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHRMTAHQ6MCYDYL6TO2QUDQIDJVJANCNFSM4IT326CA .