VideoHelp Forum

+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. Hello!

    I get an error when I'm trying to encode x265 video using ffmpeg:
    Code:
    [s16le @ 0x562a29c99c40] Thread message queue blocking;
    consider raising the thread_queue_size option (current value: 8)
    The problem seems to be that my computer is unable to keep up with real-time encoding, which I don't even want. I am encoding pre-recorded videos so I don't need real-time encoding.

    Here is my command:
    Code:
    fceux --subtitles 0 --slstart 0 --slend 239--xscale 1--yscale 1 --special 0 --pal 0 --sound 1
    --soundq 1 --soundrate 48000 --volume 150 --trianglevol 256 --square1vol 256 --square2vol 256
    --noisevol 256 --pcmvol 256 --mute 1 --nospritelim 1 --no-config 1 --loadlua exit.lua
    --palette QuickNes.pal --videolog ffmpeg -ar 48000 -channel_layout mono -f s16le -i "s.log"
    -f rawvideo -pix_fmt bgr24 -r 60.0998 -s 256x224 -i - -c:a libopus
    -channel_layout mono -compression_level 10 -b:a 64k -c:v libx265 -crf 20 -pix_fmt gbrp
    -preset veryslow "output_video.mp4" --playmov "input_video.fm2" "rom_file.nes"
    I have tried several suggestions to fix this which I found:
    https://stackoverflow.com/questions/63566988/thread-message-queue-blocking
    https://stackoverflow.com/questions/61723571/correct-usage-of-thread-queue-size-in-ffmpeg

    So I have tried to move the "-r 60.0998" option to the end of the command. I have tried to add the option "-thread_queue_size" after each input file and tried several different values such as 16, 128, 1024 and even 4096. Can someone help me to get rid of this error?

    Another
    Quote Quote  
  2. Retry without -f s16le
    Quote Quote  
  3. Well that error did disappear, but now I have another one:
    Code:
    s.log: Invalid data found when processing input
    write: Broken pipe
    Quote Quote  
  4. -i "s.log" -f rawvideo -pix_fmt bgr24 -r 60.0998 -s 256x224 -i - -c:a libopus
    What is s.log as input?
    The second input (-i) is empty.
    It seems to me that the whole command line is pretty messy.
    Quote Quote  
  5. It's the sound, for some reason the FCEUX emulator outputs the sound pipe as a file and the video as just pipe -.
    [CODE]
    ffmpeg -ar 48000 -channel_layout mono -i "s.log"
    -f rawvideo -pix_fmt bgr24 -r 60.0998 -s 256x224 -i -
    [CODE]
    Quote Quote  
  6. Then this part of code should be
    ffmpeg -i - -f rawvideo -pix_fmt bgr24 -r 60.0998 -s 256x224 -i "s.log" -ar 48000 -channel_layout mono
    (input, then filters and arguments)
    Quote Quote  
  7. I tried to change this as you suggested. Everything seems to start okay, but now the emulator only shows the first frame and stops there. Also the encoder does not seem to encode any frames:
    Code:
    ffmpeg -i - -f rawvideo -pix_fmt bgr24 -r 60.0998 -s 256x224
    -i "s.log" -ar 48000 -channel_layout mono
    -c:v libx265 -crf 20 -pix_fmt gbrp -preset veryslow
    -c:a libopus -b:a 96k -channel_layout mono -compression_level 10
    "output.mp4"
    But if I change the audio first:
    Code:
    ffmpeg -i "s.log" -ar 48000 -channel_layout mono
    -i - -f rawvideo -pix_fmt bgr24 -r 60.0998 -s 256x224
    -c:a libopus -b:a 96k -channel_layout mono -compression_level 10
    -c:v libx265 -crf 20 -pix_fmt gbrp -preset veryslow
    "output.mp4"
    I get an error:
    Code:
    s.log: Invalid data found when processing input
    write: Broken pipe
    Quote Quote  
  8. I wanted to add one more detail, the command has been modified using this as a guide:
    https://tasvideos.org/EncodingGuide/VideoDumping#Linux_4
    Quote Quote  
  9. Try
    fceux --subtitles 0 --slstart 0 --slend 239 --xscale 1 --yscale 1 --special 0 --pal 0 --sound 1 --soundq 1 --soundrate 48000 --volume 150 --trianglevol 256 --square1vol 256 --square2vol 256 --noisevol 256 --pcmvol 256 --mute 1 --nospritelim 1 --no-config 1 --videolog "ffmpeg -f s16le -ar 48000 -channels 1 -i /path/to/soundpipe/s.log -f rawvideo -r 60.0998 -s 256x224 -pix_fmt bgr24 -i - -c:a pcm_s16le -c:v libx264rgb -qp 0 -pix_fmt rgb24 output.mkv" --playmov input_video.fm2 rom_file.nes
    At
    /path/to/soundpipe
    insert the correct path to s.log
    Quote Quote  
  10. I'm sorry, I have tried with relative and absolute paths in each file without success. Now I this like you suggested:
    Code:
    fceux --subtitles 0 --slstart 0 --slend 239 --xscale 1 --yscale 1 --special 0 --pal 0 --sound 1
    --soundq 1 --soundrate 48000 --volume 150 --trianglevol 256 --square1vol 256 --square2vol 256
    --noisevol 256 --pcmvol 256 --mute 1 --nospritelim 1 --no-config 1
    --loadlua "/path/to/exit.lua" --palette "/path/to/QuickNes.pal" --videolog
    'ffmpeg -f s16le -ar 48000 -channel_layout mono -i "/path/to/s.log"
    -f rawvideo -r 60.0998 -s 256x224 -pix_fmt bgr24 -i -
    -c:a libopus -b:a 96k -channel_layout mono -compression_level 10
    -c:v libx265 -crf 20 -pix_fmt gbrp -preset veryslow "output_video.mp4"'
    --playmov "/path/to/input_video.fm2" "/path/to/rom_file.nes"
    And I still get the error:
    Code:
    [s16le @ 0x557d650cec80] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
    Quote Quote  
  11. -f s16le cannot work with -c:a libopus
    either
    -f s16le -c:a pcm_s16le
    or
    -c:a libopus
    only
    Quote Quote  



Similar Threads