Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
ffmpeg install on RHEL7.5 [on hold]
14 septembre 2018, par Sruthin Kumar TKI got an error during the installation of FFmpeg on RHEL7.5
> Error: Package: 1:ffmpeg-4.0.2-2.el7.x86_64 (epel-multimedia) > Requires: libSDL2-2.0.so.0()(64bit) Error: Package: 1:ffmpeg-libs-4.0.2-2.el7.x86_64 (epel-multimedia) > Requires: libvidstab.so.1.1()(64bit) Error: Package: rubberband-1.8.1-5.el7.nux.x86_64 (nux-dextop) > Requires: ladspa Error: Package: 1:libavdevice-4.0.2-2.el7.x86_64 (epel-multimedia) > Requires: libSDL2-2.0.so.0()(64bit)
-
YTDL-Core MP4 to MP3 doesn't work with FFMPEG (Code 101)
14 septembre 2018, par doamattoIn a simple YouTube downloader, I keep trying to get an MP4 to convert to an MP3 using FFMPEG/Fluent-FFMPEG (Fluent was used as recommened by the ytdl-core examples). However, both times resolve in one of two errors:
Cannot find ffmpeg
orcode: 101, msg: "The input file path must be a string"
I have updated the source to all be on GitHub (sorry for that slight inconvenience as opposed to it being here. It's linked below. However, I have tried two things: using the normal "node-ffmpeg" library as the require for "ffmpeg", and using the "fluent-ffmpeg" library as the require for "ffmpeg." I mainly did this because via the ytdl-core uses such and I figured it may work in that case.
Thanks in advance and thanks as a whole!
The GitHub Repo: https://gist.github.com/Incrested/d9ef8125bd41afbb7e6720ec3a78e331
Once again: thanks for any and all assistance!
Edit: I've changed the URL to a better snippet of focus of where I think the issue is.
-
FFmpeg - Max rtbufsize via dshow ?
14 septembre 2018, par NimbleI recently added an additional 4K capture card to my setup and now I'm dropping frames while initializing and ending recordings. In the past I was encoding a 1080P60 stream and a 4K60 stream simultaneously and had no issues, but now that I am trying to encode 2 4K60 streams at once I'm dropping frames as mentioned before.
The error displays as:
[dshow @ 000001499bb17180] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (62% of size: 2147480000 [rtbufsize parameter])! frame dropped!
or
[dshow @ 00000149944e7080] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (62% of size: 2147480000 [rtbufsize parameter])! frame dropped!
10 - 20 times when starting a recording or ending a recording.
You'd think the solution would be simply increasing my rtbufsize but when I do I just get another error:
[dshow @ 00000250df6c7080] Value 3000000000.000000 for parameter 'rtbufsize' out of range [0 - 2.14748e+09] [dshow @ 00000250df6c7080] Error setting option rtbufsize to value 3000M. video=AVerMedia HD Capture GC573 1:audio=SPDIF/ADAT (1+2) (RME Fireface UC): Result too large
This same error seems to appear if I try to increase the rtbufsize past 2147.48M on any input so I assume it's a limitation of FFmpeg and not my hardware? If it is a baked in limitation of FFmpeg what would be the reasoning? Any way to bypass or other possible solutions?
Full command:
ffmpeg -y -hide_banner -thread_queue_size 9999 -indexmem 9999 -guess_layout_max 0 -f dshow -rtbufsize 2147.48M ` -i audio="Analog (1+2) (RME Fireface UC)" ` -thread_queue_size 9999 -indexmem 9999 -guess_layout_max 0 -f dshow -rtbufsize 2147.48M ` -i audio="ADAT (5+6) (RME Fireface UC)" ` -thread_queue_size 9999 -indexmem 9999 -guess_layout_max 0 -f dshow -video_size 3840x2160 -rtbufsize 2147.48M ` -framerate 60 -pixel_format nv12 -i video="Video (00 Pro Capture HDMI 4K+)":audio="ADAT (3+4) (RME Fireface UC)" ` -thread_queue_size 9999 -indexmem 9999 -guess_layout_max 0 -f dshow -video_size 3840x2160 -rtbufsize 2147.48M ` -framerate 60 -pixel_format nv12 -i video="AVerMedia HD Capture GC573 1":audio="SPDIF/ADAT (1+2) (RME Fireface UC)" ` -thread_queue_size 9999 -indexmem 9999 -r 25 -f lavfi -rtbufsize 2147.48M -i color=c=black:s=50x50 ` -map 4,0 -map 0 -c:v libx264 -r 25 -rc-lookahead 50 -forced-idr 1 -sc_threshold 0 -flags +cgop ` -force_key_frames "expr:gte(t,n_forced*2)" -preset ultrafast -pix_fmt nv12 -b:v 16K -minrate 16K -maxrate 16K -bufsize 16k ` -c:a aac -ar 44100 -b:a 384k -ac 2 -af "aresample=async=250" -vsync 1 -ss 00:00:01.768 ` -max_muxing_queue_size 9999 -f segment -segment_time 600 -segment_wrap 9 -reset_timestamps 1 ` -segment_format_options max_delay=0 C:\Users\djcim\Videos\Main\Discord\Discord%02d.ts ` -map 4,1 -map 1 -c:v libx264 -r 25 -rc-lookahead 50 -forced-idr 1 -sc_threshold 0 -flags +cgop ` -force_key_frames "expr:gte(t,n_forced*2)" -preset ultrafast -pix_fmt nv12 -b:v 16K -minrate 16K -maxrate 16K -bufsize 16k ` -c:a aac -ar 44100 -b:a 384k -ac 2 -af "aresample=async=250" -vsync 1 -ss 00:00:01.071 ` -max_muxing_queue_size 9999 -f segment -segment_time 600 -segment_wrap 9 -reset_timestamps 1 ` -segment_format_options max_delay=0 C:\Users\djcim\Videos\Main\Soundboard\Soundboard%02d.ts ` -map 2:0,2:1 -map 2:1 -c:v h264_nvenc -r 60 -rc-lookahead 120 -forced-idr 1 -strict_gop 1 -sc_threshold 0 -flags +cgop ` -force_key_frames "expr:gte(t,n_forced*2)" -preset: llhp -pix_fmt nv12 -b:v 250M -minrate 250M -maxrate 250M -bufsize 250M ` -c:a aac -ar 44100 -b:a 384k -ac 2 -af "atrim=0.086, asetpts=PTS-STARTPTS, aresample=async=250" -vsync 1 -ss 00:00:00.102 ` -max_muxing_queue_size 9999 -f segment -segment_time 600 -segment_wrap 9 -reset_timestamps 1 ` -segment_format_options max_delay=0 C:\Users\djcim\Videos\Main\Magewell\Magewell%02d.ts ` -map 3:0,3:1 -map 3:1 -c:v h264_nvenc -r 60 -rc-lookahead 120 -forced-idr 1 -strict_gop 1 -sc_threshold 0 -flags +cgop ` -force_key_frames "expr:gte(t,n_forced*2)" -preset: llhp -pix_fmt nv12 -b:v 250M -minrate 250M -maxrate 250M -bufsize 250M ` -c:a aac -ar 44100 -b:a 384k -ac 2 -af "pan=mono|c0=c0, aresample=async=250" -vsync 1 ` -max_muxing_queue_size 9999 -f segment -segment_time 600 -segment_wrap 9 -reset_timestamps 1 ` -segment_format_options max_delay=0 C:\Users\djcim\Videos\Main\Camera\Camera%02d.ts
EDIT: Also worth mentioning that I only drop frames when starting and ending recording, everything is fine in the middle. Wonder if I could like "ease" the recording in or something?
(09/13/2018): I was able to stop frames from dropping while starting a recording by re-arranging inputs and outputs, however no matter how I list things I still drop frames ending recordings.
-
ffmpeg h264_nvenc error [Cannot init Cuda] on NVidia Quadro p620
13 septembre 2018, par Vitor Silva de DeusI've installed the nv-codec-headers from https://git.videolan.org/git/ffmpeg/nv-codec-headers.git. whit:
cd nv-codec-headers && make && sudo make install
Then I got ffmpeg from https://git.ffmpeg.org/ffmpeg.git and compiled with:
cd ffmpeg && PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --pkg-config-flags="--static" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --extra-libs="-lpthread -lm" --bindir="$HOME/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 --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 && PATH="$HOME/bin:$PATH" make && make install && hash -r
When I run:
ffmpeg -hex -rtsp_transport tcp -t 1800 -r 30 -i rtsp://stream_url -c:v h264_nvenc -s:v 360x180 -vsync 0 -preset slow outfile.mp4
ffmpeg breaks and logs:
[aac @ 0x5636a2d9f540] Too many bits 8832.000000 > 6144 per frame requested, clamping to max
[swscaler @ 0x5636a33e7840] deprecated pixel format used, make sure you did set range correctly
[h264_nvenc @ 0x5636a2da2880] Cannot init CUDA
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[aac @ 0x5636a2d9f540] Qavg: -nan
[aac @ 0x5636a2d9f540] 1 frames left in the queue on closing Conversion failed!
OS: Ubuntu Server 18.04
ffmpeg version: N-91936-g776cdd1dc8 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
CUDA version: 9.2
GPU Device: Dual NVIDIA Quadro P620, 2 GB, 4 mDP
Any suggestion on how can i debug or what I'm doing wrong?! Many thanks!
-
How to extract frames from a video at browser using javascript ? [on hold]
13 septembre 2018, par Hrisheekesh RProblem Statement :
- User picks a video to upload
- 20 screenshots at random timestamps at the video is captured inside the browser
- The screenshots are sent to a server.
Is there a way to capture the frames inside a browser?