[FFmpeg-user] Make Output Files More Digestible / Increase Output Compatibility

Gabriel Balaich roderrooder at gmail.com
Tue Jun 19 00:07:17 EEST 2018


Hey everyone,

I've found that my video files captured with FFmpeg don't play nice with
other programs. Many video players display
incorrect duration, others allow no scrubbing, and some won't even open the
files at all. But perhaps the most annoying
incompatibility is with Adobe Premiere.

Trying to edit the 3440x1440 footage outputted from FFMpeg in Premiere is
almost impossible, it will play for around 2
seconds at a time before completely freezing up and just displaying one
frame. It would appear it is only a problem with
the preview in premiere as once I export the video everything plays back
perfectly smooth. But the preview is obviously
very important while editing video as you can't see if your edits look good
otherwise.

When I capture the same quality of footage (3440x1440, 100FPS, 250M
bitrate) with something like OBS the files playback
perfectly fine in every video player I test. And more importantly OBS
output plays back very smooth in Adobe Premiere while
editing. Now I am capturing MP4 not TS in OBS but when I encode MP4 with
FFmpeg it screws with syncronization and I can
confirm it doesn't improve compatability, at least in my experience.

So I was just wondering if anyone knows a way to increase compatability or
make the output files more digestible. My specs
aren't an issue I'm running a 7900x, GTX 1080, 64GB of RAM, and store all
the footage on a PCIe M.2 drive (1000mb+ read
and write). And as mentioned before OBS videos of the same quality, file
type, and sometimes even of larger size work
perfectly fine.

I wouldn't even have a problem re-encoding the files afterwards, but would
prefer finding a solution that allows the
initial output files to play nice with other programs, thanks for any
advice.


Output file I'm having the most problems with:
ffmpeg -loglevel error -stats -y -thread_queue_size 9999 -indexmem 9999
-guess_layout_max 0 -f dshow -video_size 3440x1440
-rtbufsize 2147.48M -framerate 200 -pixel_format nv12 ^
-i video="Video (00 Pro Capture HDMI 4K+)":audio="SPDIF/ADAT (1+2) (RME
Fireface UC)" ^
-map 0:0,0:1 -map 0:1 -c:v h264_nvenc -r 100 -rc-lookahead 200 -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.035, asetpts=PTS-STARTPTS,
aresample=async=250" -vsync 1 -ss 00:00:01.096 ^
-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\PC\PC\PC%02d.ts

Full block:
ffmpeg -loglevel error -stats -y -thread_queue_size 9999 -indexmem 9999
-guess_layout_max 0 -f dshow -rtbufsize 2147.48M ^
-i audio="Analog (3+4) (RME Fireface UC)" ^
-thread_queue_size 9999 -indexmem 9999 -guess_layout_max 0 -f dshow
-rtbufsize 2147.48M ^
-i audio="ADAT (3+4) (RME Fireface UC)" ^
-thread_queue_size 9999 -indexmem 9999 -guess_layout_max 0 -f dshow
-video_size 3440x1440 -rtbufsize 2147.48M ^
-framerate 200 -pixel_format nv12 -i video="Video (00 Pro Capture HDMI
4K+)":audio="SPDIF/ADAT (1+2) (RME Fireface UC)" ^
-thread_queue_size 9999 -indexmem 9999 -guess_layout_max 0 -f dshow
-video_size 1920x1080 -rtbufsize 2147.48M ^
-framerate 60 -pixel_format yuyv422 -i video="Game Capture HD60 Pro (Video)
(#01)":audio="ADAT (5+6) (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
-strict_gop 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 -vf "fps=25" -af "aresample=async=250"
-vsync 1 -ss 00:00:02.456 ^
-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\PC\Theirs\TPC%02d.ts ^
-map 4,1 -map 1 -c:v libx264 -r 25 -rc-lookahead 50 -forced-idr 1
-strict_gop 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 -vf "fps=25" -af "aresample=async=250"
-vsync 1 -ss 00:00:01.840 ^
-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\PC\Soundboard\SPC%02d.ts ^
-map 2:0,2:1 -map 2:1 -c:v h264_nvenc -r 100 -rc-lookahead 200 -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.035, asetpts=PTS-STARTPTS,
aresample=async=250" -vsync 1 -ss 00:00:01.096 ^
-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\PC\PC\PC%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 yuv420p
-b:v 40M -minrate 40M -maxrate 40M -bufsize 40M ^
-c:a aac -ar 44100 -b:a 384k -ac 2 -af "pan=mono|c0=c0, adelay=120|120,
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\PC\Camera\CPC%02d.ts


More information about the ffmpeg-user mailing list