Re: [FFmpeg-user] Video Freezing Sometimes, and not other times.
Hey Carl. Sorry I didn't reply sooner, I wanted to have an actual example of this issue first. No, I haven't tried with current git head. I think my host said they upgraded us to the most recent version they are able to, but I am not 100% sure. But, I do have both a failed example and a working example of the same video. I thought that maybe the video was getting deleted mid encode by a delete script I have, but I put in a contingency for this a couple of days ago, so I don't think that could be the issue. I am grabbing these videos off the cloud to encode, so maybe they aren't fully downloading? Thank you! Craig *WORKING ENCODE* /usr/local/bin/ffmpeg -safe 0 -f concat -i canvas.txt -safe 0 -f concat -i overlay-text-concat.txt -i original-video.MP4 -i overlay-video.mov -filter_complex_script complex-filter.txt -aspect 1:1 -c:v libx264 -profile:v high -pix_fmt yuv420p -level 5.1 -vsync 1 -async 1 -c:a aac -b:a 128k -map 2:a -t 19.15 -r 30 -y finished-video.mp4 ffmpeg version 4.3.1-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2020 the FFmpeg developers built with gcc 8 (Debian 8.3.0-6) configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg libavutil 56. 51.100 / 56. 51.100 libavcodec 58. 91.100 / 58. 91.100 libavformat 58. 45.100 / 58. 45.100 libavdevice 58. 10.100 / 58. 10.100 libavfilter 7. 85.100 / 7. 85.100 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 Input #0, concat, from 'canvas.txt': Duration: 00:00:19.15, start: 0.00, bitrate: 0 kb/s Stream #0:0: Video: targa, gray, 1280x1280, 25 tbr, 25 tbn, 25 tbc Input #1, concat, from 'overlay-text-concat.txt': * * * Duration: 00:00:19.15, start: 0.00, bitrate: 0 kb/s* Stream #1:0: Video: targa, bgra, 1280x1280, 25 tbr, 25 tbn, 25 tbc Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'original-video.MP4': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt creation_time : 2021-05-21T04:06:55.00Z com.apple.quicktime.software: SCRecorder com.apple.quicktime.creationdate: 2021-05-20T14:49:00-04:00 com.apple.photos.originating.signature: ASx36uUj/ZZKOHKYPUNOzGvtnPAp Duration: 00:00:19.15, start: 0.00, bitrate: 15901 kb/s Stream #2:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 304 kb/s (default) Metadata: creation_time : 2021-05-21T04:06:55.00Z handler_name : Core Media Audio Stream #2:1(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1280x720, 15587 kb/s, 59.95 fps, 60 tbr, 600 tbn, 1200 tbc (default) Metadata: creation_time : 2021-05-21T04:06:55.00Z handler_name : Core Media Video encoder : H.264 Input #3, mov,mp4,m4a,3gp,3g2,mj2, from 'overlay-video.mov': Metadata: major_brand : qt minor_version : 512 compatible_brands: qt encoder : Lavf58.45.100 Duration: 00:00:19.16, start: 0.00, bitrate: 82 kb/s Stream #3:0: Video: png (png / 0x20676E70), rgba(pc, progressive), 1280x26, 81 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default) Metadata: handler_name : VideoHandler encoder : Lavc58.91.100 png Stream mapping: Stream #0:0 (targa) -> overlay:main Stream #0:0 (targa) -> scale Stream #1:0 (targa) -> overlay:overlay Stream #2:0 (aac) -> atrim Stream #2:1 (h264) -> trim Stream #3:0 (png) -> scale concat:out:a0 -> Stream #0:0 (aac) overlay -> Stream #0:1 (libx264) Press [q] to stop, [?] for help -async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.10:first_pts=0. * * *[swscaler @ 0x6f1e5c0] deprecated pixel format used, make sure you did set range correctly** **[libx264 @ 0x5cde0c0] using SAR=1/1** **[libx264 @ 0x5cde0c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512** **[libx264 @ 0x5cde0c0] profile High, level 5.1, 4:2:0, 8-bit** **[libx264 @ 0x5cde0c0] 264 - core 161 r3018 db0d417 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex
Re: [FFmpeg-user] Video Freezing Sometimes, and not other times.
> Am 12.05.2021 um 02:05 schrieb Craig L. : > > ffmpeg version 4.3.1-static Is the issue you see reproducible with current FFmpeg git head? Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Video Freezing Sometimes, and not other times.
I am running into an issue where I will encode a video and the primary video (in the command below it is the one called test-video.mp4) will at some point freeze frame while the other streams continue to encode and then play back correctly. The problem is that I haven't been able to recreate the issue yet because the people that experience it, re-convert the video and on the second try it pretty much always comes out correctly and at this point, I don't want to wait until I see it again to see if someone might have a clue of what to look for. Here is a glossary of what the inputs are: testcanvas.txt is a background image looped with the duration of 137.550 test-textfile.txt is a concat of images that are overlayed. test-video-two.mov is an overlaid video that does not freeze and goes all the way to the end. test-video.mp4 is the primary video, the one that is freezing. I have an auto-delete script running and I thought that /maybe/ in the middle of the encode, the video in question was accidentally being deleted causing the freeze frame, but I have tested this and it doesn't seem to be the case, but I haven't fully ruled it out. *COMMAND* /usr/local/bin/ffmpeg -safe 0 -f concat -i testcanvas.txt -safe 0 -f concat -i test-textfile.txt -i test-video.mp4 -i test-video-two.mov -filter_complex_script test-complex-filter.txt -aspect 1:1 -c:v libx264 -profile:v high -pix_fmt yuv420p -level 5.1 -vsync 1 -async 1 -c:a aac -b:a 128k -map 2:a -r 30 -t 137.550 -y test-output7.mp4 Here is the filter used from the complex_filter_script: [2:v]trim=start=0:end=137.550,setpts=PTS-STARTPTS,format=yuv420p[101v];[2:a]atrim=start=0:end=137.550,asetpts=PTS-STARTPTS[101a];[101v][101a]concat=n=1:v=1:a=1[2];[2]scale=1280:-2[2v];[0][2v]overlay=0:280[2v];[2v][1]overlay=0:0[v];[0:v]scale=1280:-2[f];[f][v]overlay=0:0[b];[3]scale=1280:-2[3v];[b][3v]overlay=0:280.2 So, since I unfortunately don't have an actual example where this happened, is there anything in my command that might cause this intermittent behavior? Here is the output, but again, this time it turned out fine without the test-video.mp4 freeze-framing about 6 seconds before the end of the total video, but maybe this will help? /usr/local/bin/ffmpeg -safe 0 -f concat -i testcanvas.txt -safe 0 -f concat -i test-textfile.txt -i test-video.mp4 -i test-video-two.mov -filter_complex_script test-complex-filter.txt -aspect 1:1 -c:v libx264 -profile:v high -pix_fmt yuv420p -level 5.1 -vsync 1 -async 1 -c:a aac -b:a 128k -map 2:a -t 137.550 -r 30 -t 137.550 -y test-output7.mp4 ffmpeg version 4.3.1-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2020 the FFmpeg developers built with gcc 8 (Debian 8.3.0-6) configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg libavutil 56. 51.100 / 56. 51.100 libavcodec 58. 91.100 / 58. 91.100 libavformat 58. 45.100 / 58. 45.100 libavdevice 58. 10.100 / 58. 10.100 libavfilter 7. 85.100 / 7. 85.100 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 Input #0, concat, from 'testcanvas.txt': Duration: 00:02:17.55, start: 0.00, bitrate: 0 kb/s Stream #0:0: Video: targa, gray, 1280x1280, 25 tbr, 25 tbn, 25 tbc Input #1, concat, from 'test-textfile.txt': Duration: 00:02:17.45, start: 0.00, bitrate: 0 kb/s Stream #1:0: Video: targa, bgra, 1280x1280, 25 tbr, 25 tbn, 25 tbc Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'test-video.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2021-05-05T19:42:20.00Z Duration: 00:02:17.55, start: 0.00, bitrate: 836 kb/s Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 704 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default) Metadata: creation_time : 2021-05-05T19:42:20.00Z handler_name : ISO Media file produced by Google Inc. Created on: 05/05/2021. Stream #2:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default) Metadata: creation_time :