Optimization

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Optimization

Marcus Lim
Hey all,
New to the list and trying to get my head around ffmpeg a bit still.
So I am using ffmpeg to create slideshows out of individual images, with an
audio backing track (usually mp3), and then encoding as MP4 (video is h264
and audio is acc), but for some reason the process is taking up to 1.4Gb of
memory which is blowing me away.
Now I am using a complex filter to achieve this, with multiple inputs, and
example of my command is below:

ffmpeg \
-loop 1 -t 4 -i
test/ed141148-9b79-494b-a26d-f5c84535eeaf8912937006552540487.tmp \
-loop 1 -t 4 -i
test/ed141148-9b79-494b-a26d-f5c84535eeaf5351513282402727883.tmp \
-loop 1 -t 4 -i
test/ed141148-9b79-494b-a26d-f5c84535eeaf9204204500598689609.tmp \
-loop 1 -t 4 -i
test/ed141148-9b79-494b-a26d-f5c84535eeaf1241593939921003895.tmp \
-loop 1 -t 4 -i
test/ed141148-9b79-494b-a26d-f5c84535eeaf6231405065182432206.tmp \
-loop 1 -t 4 -i
test/ed141148-9b79-494b-a26d-f5c84535eeaf4783563520441940155.tmp \
-loop 1 -t 4 -i
test/ed141148-9b79-494b-a26d-f5c84535eeaf823726872837129805.tmp \
-loop 1 -t 4 -i
test/ed141148-9b79-494b-a26d-f5c84535eeaf4148893068919936811.tmp \
-loop 1 -t 4 -i
test/ed141148-9b79-494b-a26d-f5c84535eeaf6815991692415841819.tmp \
-loop 1 -t 4 -i
test/ed141148-9b79-494b-a26d-f5c84535eeaf553287365250808111.tmp \
-loop 1 -t 4 -i
test/ed141148-9b79-494b-a26d-f5c84535eeaf6763129487770212040.tmp \
-loop 1 -t 4 -i
test/ed141148-9b79-494b-a26d-f5c84535eeaf4160943340255327277.tmp \
-loop 1 -t 4 -i
test/ed141148-9b79-494b-a26d-f5c84535eeaf8834606975865492644.tmp \
-loop 1 -t 4 -i
test/ed141148-9b79-494b-a26d-f5c84535eeaf9160476045329137307.tmp \
-loop 1 -t 4 -i
test/ed141148-9b79-494b-a26d-f5c84535eeaf8917976550433767102.tmp \
-stream_loop -1 -t 60 -i
test/ed141148-9b79-494b-a26d-f5c84535eeaf6379741644027890621.tmp  \
-filter_complex \
"[0:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v0];\
 [1:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v1];\
 [2:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v2];\
 [3:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v3];\
 [4:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v4];\
 [5:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v5];\
 [6:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v6];\
 [7:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v7];\
 [8:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v8];\
 [9:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v9];\
 [10:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v10];\
 [11:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v11];\
 [12:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v12];\
 [13:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v13];\
 [14:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v14];\
 [v0][v1][v2][v3][v4][v5][v6][v7][v8][v9][v10][v11][v12][v13][v14]concat=n=15:v=1:a=0,format=yuv420p[v]"
-map "[v]" -map 15:a test/fcd2b1a9-f3c8-4cdc-8355-51c08b088ee3.mp4

Each loop is on a 4Mb Jpeg, and the stream_loop was the only way I could
figure out to get the audio track to loop in the background, which is about
4Mb as well.

I'm kinda stumped as to why this would be with my limited understanding of
ffmpeg, I have some theories surrounding the -loop filling memory with
copies of the img in a lossless format but any help would be most welcome.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Optimization

Paul B Mahol
Hi,

On 11/1/18, Marcus Lim <[hidden email]> wrote:

> Hey all,
> New to the list and trying to get my head around ffmpeg a bit still.
> So I am using ffmpeg to create slideshows out of individual images, with an
> audio backing track (usually mp3), and then encoding as MP4 (video is h264
> and audio is acc), but for some reason the process is taking up to 1.4Gb of
> memory which is blowing me away.
> Now I am using a complex filter to achieve this, with multiple inputs, and
> example of my command is below:
>
> ffmpeg \
> -loop 1 -t 4 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf8912937006552540487.tmp \
> -loop 1 -t 4 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf5351513282402727883.tmp \
> -loop 1 -t 4 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf9204204500598689609.tmp \
> -loop 1 -t 4 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf1241593939921003895.tmp \
> -loop 1 -t 4 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf6231405065182432206.tmp \
> -loop 1 -t 4 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf4783563520441940155.tmp \
> -loop 1 -t 4 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf823726872837129805.tmp \
> -loop 1 -t 4 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf4148893068919936811.tmp \
> -loop 1 -t 4 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf6815991692415841819.tmp \
> -loop 1 -t 4 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf553287365250808111.tmp \
> -loop 1 -t 4 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf6763129487770212040.tmp \
> -loop 1 -t 4 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf4160943340255327277.tmp \
> -loop 1 -t 4 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf8834606975865492644.tmp \
> -loop 1 -t 4 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf9160476045329137307.tmp \
> -loop 1 -t 4 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf8917976550433767102.tmp \
> -stream_loop -1 -t 60 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf6379741644027890621.tmp  \
> -filter_complex \
> "[0:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v0];\
> [1:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v1];\
> [2:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v2];\
> [3:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v3];\
> [4:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v4];\
> [5:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v5];\
> [6:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v6];\
> [7:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v7];\
> [8:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v8];\
> [9:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v9];\
> [10:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v10];\
> [11:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v11];\
> [12:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v12];\
> [13:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v13];\
> [14:v]scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v14];\
> [v0][v1][v2][v3][v4][v5][v6][v7][v8][v9][v10][v11][v12][v13][v14]concat=n=15:v=1:a=0,format=yuv420p[v]"
> -map "[v]" -map 15:a test/fcd2b1a9-f3c8-4cdc-8355-51c08b088ee3.mp4
>
> Each loop is on a 4Mb Jpeg, and the stream_loop was the only way I could
> figure out to get the audio track to loop in the background, which is about
> 4Mb as well.
>
> I'm kinda stumped as to why this would be with my limited understanding of
> ffmpeg, I have some theories surrounding the -loop filling memory with
> copies of the img in a lossless format but any help would be most welcome.

Full uncut ffmpeg ouput missing.

I bet you are using too old version, which have bug regarding using
too much memory.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Optimization

Carl Eugen Hoyos-2
In reply to this post by Marcus Lim
2018-11-01 3:31 GMT+01:00, Marcus Lim <[hidden email]>:

> Hey all,
> New to the list and trying to get my head around ffmpeg a bit still.
> So I am using ffmpeg to create slideshows out of individual images, with an
> audio backing track (usually mp3), and then encoding as MP4 (video is h264
> and audio is acc), but for some reason the process is taking up to 1.4Gb of
> memory which is blowing me away.
> Now I am using a complex filter to achieve this, with multiple inputs, and
> example of my command is below:
>
> ffmpeg \
> -loop 1 -t 4 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf8912937006552540487.tmp \
> -loop 1 -t 4 -i
> test/ed141148-9b79-494b-a26d-f5c84535eeaf5351513282402727883.tmp \

I suggest you put the files names in a text file and use the concat demuxer.

An alternative is to rename the files as tmp-01 to tmp-15 and use:
ffmpeg -i tmp-02%d

Both solutions will not have the increased memory usage and will
significantly simplify your command line.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Optimization

Paul B Mahol
On 11/1/18, Carl Eugen Hoyos <[hidden email]> wrote:

> 2018-11-01 3:31 GMT+01:00, Marcus Lim <[hidden email]>:
>> Hey all,
>> New to the list and trying to get my head around ffmpeg a bit still.
>> So I am using ffmpeg to create slideshows out of individual images, with
>> an
>> audio backing track (usually mp3), and then encoding as MP4 (video is h264
>> and audio is acc), but for some reason the process is taking up to 1.4Gb
>> of
>> memory which is blowing me away.
>> Now I am using a complex filter to achieve this, with multiple inputs, and
>> example of my command is below:
>>
>> ffmpeg \
>> -loop 1 -t 4 -i
>> test/ed141148-9b79-494b-a26d-f5c84535eeaf8912937006552540487.tmp \
>> -loop 1 -t 4 -i
>> test/ed141148-9b79-494b-a26d-f5c84535eeaf5351513282402727883.tmp \
>
> I suggest you put the files names in a text file and use the concat demuxer.
>
> An alternative is to rename the files as tmp-01 to tmp-15 and use:
> ffmpeg -i tmp-02%d
>
> Both solutions will not have the increased memory usage and will
> significantly simplify your command line.

How it is supposed to loop for 4 seconds with above solutions?
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Optimization

Carl Eugen Hoyos-2
2018-11-01 21:36 GMT+01:00, Paul B Mahol <[hidden email]>:

> On 11/1/18, Carl Eugen Hoyos <[hidden email]> wrote:
>> 2018-11-01 3:31 GMT+01:00, Marcus Lim <[hidden email]>:
>>> Hey all,
>>> New to the list and trying to get my head around ffmpeg a bit still.
>>> So I am using ffmpeg to create slideshows out of individual images, with
>>> an
>>> audio backing track (usually mp3), and then encoding as MP4 (video is
>>> h264
>>> and audio is acc), but for some reason the process is taking up to 1.4Gb
>>> of
>>> memory which is blowing me away.
>>> Now I am using a complex filter to achieve this, with multiple inputs,
>>> and
>>> example of my command is below:
>>>
>>> ffmpeg \
>>> -loop 1 -t 4 -i
>>> test/ed141148-9b79-494b-a26d-f5c84535eeaf8912937006552540487.tmp \
>>> -loop 1 -t 4 -i
>>> test/ed141148-9b79-494b-a26d-f5c84535eeaf5351513282402727883.tmp \
>>
>> I suggest you put the files names in a text file and use the concat
>> demuxer.
>>
>> An alternative is to rename the files as tmp-01 to tmp-15 and use:
>> ffmpeg -i tmp-02%d
>>
>> Both solutions will not have the increased memory usage and
>> will significantly simplify your command line.
>
> How it is supposed to loop for 4 seconds with above solutions?

The concat demuxer supports the duration command, the img2
demuxer an input frame rate.
Do you believe one of them will not work?

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Optimization

Paul B Mahol
On 11/1/18, Carl Eugen Hoyos <[hidden email]> wrote:

> 2018-11-01 21:36 GMT+01:00, Paul B Mahol <[hidden email]>:
>> On 11/1/18, Carl Eugen Hoyos <[hidden email]> wrote:
>>> 2018-11-01 3:31 GMT+01:00, Marcus Lim <[hidden email]>:
>>>> Hey all,
>>>> New to the list and trying to get my head around ffmpeg a bit still.
>>>> So I am using ffmpeg to create slideshows out of individual images, with
>>>> an
>>>> audio backing track (usually mp3), and then encoding as MP4 (video is
>>>> h264
>>>> and audio is acc), but for some reason the process is taking up to 1.4Gb
>>>> of
>>>> memory which is blowing me away.
>>>> Now I am using a complex filter to achieve this, with multiple inputs,
>>>> and
>>>> example of my command is below:
>>>>
>>>> ffmpeg \
>>>> -loop 1 -t 4 -i
>>>> test/ed141148-9b79-494b-a26d-f5c84535eeaf8912937006552540487.tmp \
>>>> -loop 1 -t 4 -i
>>>> test/ed141148-9b79-494b-a26d-f5c84535eeaf5351513282402727883.tmp \
>>>
>>> I suggest you put the files names in a text file and use the concat
>>> demuxer.
>>>
>>> An alternative is to rename the files as tmp-01 to tmp-15 and use:
>>> ffmpeg -i tmp-02%d
>>>
>>> Both solutions will not have the increased memory usage and
>>> will significantly simplify your command line.
>>
>> How it is supposed to loop for 4 seconds with above solutions?
>
> The concat demuxer supports the duration command, the img2
> demuxer an input frame rate.
> Do you believe one of them will not work?

Didn't know. It should work for images too, if not report a bug.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Optimization

Marcus Lim
Thanks for all the suggestions,
So after some reading, the img2 demuxer won't work since the images I have
are all of different sizes, and according to the documentation it says that
they need to be of the same size (still tried it, but the images became cut
off) as well I couldn't figure out how to get the timings done right.
The concat demuxer actually had the same issue as the img2 demuxer.

For reference to the output from ffmpeg:

ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers

>   built with Apple LLVM version 9.1.0 (clang-902.0.39.2)
>   configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-shared
> --enable-pthreads --enable-version3 --enable-hardcoded-tables
> --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl
> --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl
> --enable-videotoolbox --disable-lzma
>   libavutil      56. 14.100 / 56. 14.100
>   libavcodec     58. 18.100 / 58. 18.100
>   libavformat    58. 12.100 / 58. 12.100
>   libavdevice    58.  3.100 / 58.  3.100
>   libavfilter     7. 16.100 /  7. 16.100
>   libavresample   4.  0.  0 /  4.  0.  0
>   libswscale      5.  1.100 /  5.  1.100
>   libswresample   3.  1.100 /  3.  1.100
>   libpostproc    55.  1.100 / 55.  1.100
> [jpeg_pipe @ 0x7feed9802800] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7feed9802800] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #0, jpeg_pipe, from
> 'ed141148-9b79-494b-a26d-f5c84535eeaf8912937006552540487.tmp':
>   Duration: N/A, bitrate: N/A
>     Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 4032x3024 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
> [jpeg_pipe @ 0x7feed9807800] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7feed9807800] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #1, jpeg_pipe, from
> 'ed141148-9b79-494b-a26d-f5c84535eeaf5351513282402727883.tmp':
>   Duration: N/A, bitrate: N/A
>     Stream #1:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 3024x4032 [SAR 1:1 DAR 3:4], 25 tbr, 25 tbn, 25 tbc
> [jpeg_pipe @ 0x7feedb002400] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7feedb002400] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #2, jpeg_pipe, from
> 'ed141148-9b79-494b-a26d-f5c84535eeaf9204204500598689609.tmp':
>   Duration: N/A, bitrate: N/A
>     Stream #2:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 3024x4032 [SAR 1:1 DAR 3:4], 25 tbr, 25 tbn, 25 tbc
> [jpeg_pipe @ 0x7feedb001800] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7feedb001800] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #3, jpeg_pipe, from
> 'ed141148-9b79-494b-a26d-f5c84535eeaf1241593939921003895.tmp':
>   Duration: N/A, bitrate: N/A
>     Stream #3:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 3024x4032 [SAR 1:1 DAR 3:4], 25 tbr, 25 tbn, 25 tbc
> [jpeg_pipe @ 0x7feeda009a00] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7feeda009a00] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #4, jpeg_pipe, from
> 'ed141148-9b79-494b-a26d-f5c84535eeaf6231405065182432206.tmp':
>   Duration: N/A, bitrate: N/A
>     Stream #4:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 4032x3024 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
> [jpeg_pipe @ 0x7feed9009200] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7feed9009200] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #5, jpeg_pipe, from
> 'ed141148-9b79-494b-a26d-f5c84535eeaf4783563520441940155.tmp':
>   Duration: N/A, bitrate: N/A
>     Stream #5:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 4032x3024 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
> [jpeg_pipe @ 0x7feedc007a00] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7feedc007a00] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #6, jpeg_pipe, from
> 'ed141148-9b79-494b-a26d-f5c84535eeaf823726872837129805.tmp':
>   Duration: N/A, bitrate: N/A
>     Stream #6:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 3264x2448 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
> [jpeg_pipe @ 0x7feedd003e00] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7feedd003e00] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #7, jpeg_pipe, from
> 'ed141148-9b79-494b-a26d-f5c84535eeaf4148893068919936811.tmp':
>   Duration: N/A, bitrate: N/A
>     Stream #7:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 3024x4032 [SAR 1:1 DAR 3:4], 25 tbr, 25 tbn, 25 tbc
> [jpeg_pipe @ 0x7feedb005400] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7feedb005400] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #8, jpeg_pipe, from
> 'ed141148-9b79-494b-a26d-f5c84535eeaf6815991692415841819.tmp':
>   Duration: N/A, bitrate: N/A
>     Stream #8:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 3024x4032 [SAR 1:1 DAR 3:4], 25 tbr, 25 tbn, 25 tbc
> [jpeg_pipe @ 0x7feeda00b800] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7feeda00b800] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #9, jpeg_pipe, from
> 'ed141148-9b79-494b-a26d-f5c84535eeaf553287365250808111.tmp':
>   Duration: N/A, bitrate: N/A
>     Stream #9:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 3264x2448 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
> [jpeg_pipe @ 0x7feed980c200] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7feed980c200] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #10, jpeg_pipe, from
> 'ed141148-9b79-494b-a26d-f5c84535eeaf6763129487770212040.tmp':
>   Duration: N/A, bitrate: N/A
>     Stream #10:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 4032x3024 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
> [jpeg_pipe @ 0x7feedb801200] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7feedb801200] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #11, jpeg_pipe, from
> 'ed141148-9b79-494b-a26d-f5c84535eeaf4160943340255327277.tmp':
>   Duration: N/A, bitrate: N/A
>     Stream #11:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 4032x3024 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
> [jpeg_pipe @ 0x7feed9009e00] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7feed9009e00] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #12, jpeg_pipe, from
> 'ed141148-9b79-494b-a26d-f5c84535eeaf8834606975865492644.tmp':
>   Duration: N/A, bitrate: N/A
>     Stream #12:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 3024x4032 [SAR 1:1 DAR 3:4], 25 tbr, 25 tbn, 25 tbc
> [jpeg_pipe @ 0x7feedb013c00] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7feedb013c00] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #13, jpeg_pipe, from
> 'ed141148-9b79-494b-a26d-f5c84535eeaf9160476045329137307.tmp':
>   Duration: N/A, bitrate: N/A
>     Stream #13:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 3264x2448 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
> [jpeg_pipe @ 0x7feeda00c400] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7feeda00c400] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #14, jpeg_pipe, from
> 'ed141148-9b79-494b-a26d-f5c84535eeaf8917976550433767102.tmp':
>   Duration: N/A, bitrate: N/A
>     Stream #14:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 3024x4032 [SAR 1:1 DAR 3:4], 25 tbr, 25 tbn, 25 tbc
> [mp3 @ 0x7feed980ba00] Estimating duration from bitrate, this may be
> inaccurate
> Input #15, mp3, from
> 'ed141148-9b79-494b-a26d-f5c84535eeaf6379741644027890621.tmp':
>   Metadata:
>     title           : Indo Rock2
>     artist          : DL Sounds
>     album           : Royalty Free Music
>     date            : 2014
>     comment         : (C) dl-sounds.com
>     genre           : Other
>   Duration: 00:00:34.81, start: 0.000000, bitrate: 255 kb/s
>     Stream #15:0: Audio: mp3, 44100 Hz, stereo, fltp, 256 kb/s
> File 'fcd2b1a9-f3c8-4cdc-8355-51c08b088ee3.mp4' already exists. Overwrite
> ? [y/N] y
> Stream mapping:
>   Stream #0:0 (mjpeg) -> scale (graph 0)
>   Stream #1:0 (mjpeg) -> scale (graph 0)
>   Stream #2:0 (mjpeg) -> scale (graph 0)
>   Stream #3:0 (mjpeg) -> scale (graph 0)
>   Stream #4:0 (mjpeg) -> scale (graph 0)
>   Stream #5:0 (mjpeg) -> scale (graph 0)
>   Stream #6:0 (mjpeg) -> scale (graph 0)
>   Stream #7:0 (mjpeg) -> scale (graph 0)
>   Stream #8:0 (mjpeg) -> scale (graph 0)
>   Stream #9:0 (mjpeg) -> scale (graph 0)
>   Stream #10:0 (mjpeg) -> scale (graph 0)
>   Stream #11:0 (mjpeg) -> scale (graph 0)
>   Stream #12:0 (mjpeg) -> scale (graph 0)
>   Stream #13:0 (mjpeg) -> scale (graph 0)
>   Stream #14:0 (mjpeg) -> scale (graph 0)
>   format (graph 0) -> Stream #0:0 (libx264)
>   Stream #15:0 -> #0:1 (mp3 (mp3float) -> aac (native))
> Press [q] to stop, [?] for help
> [swscaler @ 0x7feed981f200] deprecated pixel format used, make sure you
> did set range correctly
> [swscaler @ 0x7feed9087e00] deprecated pixel format used, make sure you
> did set range correctly
> [swscaler @ 0x7feeda07ec00] deprecated pixel format used, make sure you
> did set range correctly
> [swscaler @ 0x7feed90e5a00] deprecated pixel format used, make sure you
> did set range correctly
> [swscaler @ 0x7feed9142800] deprecated pixel format used, make sure you
> did set range correctly
> [swscaler @ 0x7feed9191400] deprecated pixel format used, make sure you
> did set range correctly
> [swscaler @ 0x7feed91ea400] deprecated pixel format used, make sure you
> did set range correctly
> [swscaler @ 0x7feed923dc00] deprecated pixel format used, make sure you
> did set range correctly
> [swscaler @ 0x7feed929b800] deprecated pixel format used, make sure you
> did set range correctly
> [swscaler @ 0x7feed92f5600] deprecated pixel format used, make sure you
> did set range correctly
> [swscaler @ 0x7feedb09ce00] deprecated pixel format used, make sure you
> did set range correctly
> [swscaler @ 0x7feeda0d3000] deprecated pixel format used, make sure you
> did set range correctly
> [swscaler @ 0x7feed9887c00] deprecated pixel format used, make sure you
> did set range correctly
> [swscaler @ 0x7feed98e5800] deprecated pixel format used, make sure you
> did set range correctly
> [swscaler @ 0x7feed9933800] deprecated pixel format used, make sure you
> did set range correctly
> [swscaler @ 0x7feed9087e00] Warning: data is not aligned! This can lead to
> a speed loss
> [libx264 @ 0x7feedb014e00] using SAR=1/1
> [libx264 @ 0x7feedb014e00] using cpu capabilities: MMX2 SSE2Fast SSSE3
> SSE4.2 AVX
> [libx264 @ 0x7feedb014e00] profile High, level 3.2
> [libx264 @ 0x7feedb014e00] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC
> codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options:
> cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
> psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
> cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12
> lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0
> bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
> b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
> scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
> qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
> Output #0, mp4, to 'fcd2b1a9-f3c8-4cdc-8355-51c08b088ee3.mp4':
>   Metadata:
>     encoder         : Lavf58.12.100
>     Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661),
> yuv420p(progressive), 1080x1080 [SAR 1:1 DAR 1:1], q=-1--1, 25 fps, 12800
> tbn, 25 tbc (default)
>     Metadata:
>       encoder         : Lavc58.18.100 libx264
>     Side data:
>       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
>     Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo,
> fltp, 128 kb/s
>     Metadata:
>       encoder         : Lavc58.18.100 aac
> frame= 1500 fps= 12 q=-1.0 Lsize=    3148kB time=00:01:00.00 bitrate=
> 429.8kbits/s speed=0.466x
> video:2148kB audio:949kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: 1.628573%
> [libx264 @ 0x7feedb014e00] frame I:14    Avg QP:12.68  size:137636
> [libx264 @ 0x7feedb014e00] frame P:376   Avg QP:14.98  size:   585
> [libx264 @ 0x7feedb014e00] frame B:1110  Avg QP:12.69  size:    47
> [libx264 @ 0x7feedb014e00] consecutive B-frames:  1.1%  0.0%  2.4% 96.5%
> [libx264 @ 0x7feedb014e00] mb I  I16..4: 26.6% 46.1% 27.3%
> [libx264 @ 0x7feedb014e00] mb P  I16..4:  0.0%  0.1%  0.1%  P16..4:  0.9%
> 0.1%  0.1%  0.0%  0.0%    skip:98.7%
> [libx264 @ 0x7feedb014e00] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.1%
> 0.0%  0.0%  direct: 0.0%  skip:99.9%  L0:17.4% L1:82.6% BI: 0.0%
> [libx264 @ 0x7feedb014e00] 8x8 transform intra:46.9% inter:74.4%
> [libx264 @ 0x7feedb014e00] coded y,uvDC,uvAC intra: 73.6% 73.4% 63.9%
> inter: 0.1% 0.2% 0.0%
> [libx264 @ 0x7feedb014e00] i16 v,h,dc,p: 87%  4%  4%  4%
> [libx264 @ 0x7feedb014e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 24% 13%  6%
> 7%  6% 10%  7% 14%
> [libx264 @ 0x7feedb014e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 26%  7%  6%
> 8%  7% 12%  6% 11%
> [libx264 @ 0x7feedb014e00] i8c dc,h,v,p: 52% 24% 15%  9%
> [libx264 @ 0x7feedb014e00] Weighted P-Frames: Y:0.0% UV:0.0%
> [libx264 @ 0x7feedb014e00] ref P L0: 90.9%  4.3%  4.0%  0.8%
> [libx264 @ 0x7feedb014e00] ref B L0: 71.5% 28.5%
> [libx264 @ 0x7feedb014e00] ref B L1: 98.5%  1.5%
> [libx264 @ 0x7feedb014e00] kb/s:293.20
> [aac @ 0x7feedb02a400] Qavg: 574.226


Now I should probably share a requirement that I realize I hadn't included
before, that being that the reason I am using a complex filter, is because
I sometimes incorporate simple fade transitions between the images using
the fade filter.

I should note as well, when I tried to use all the files in, so ffmpeg -i
file.txt, it meant the complex filter couldn't find reference to the
individual streams.

I did find https://trac.ffmpeg.org/wiki/Slideshow and followed it's example
using the concat demuxer, much to my horror it resulted in using approx 3.2
gig which I think we can all agree was simply stupid levels.

Below is the command and output, though I should note I cancelled it since
the 3.2 gig is a touch above the budget I would allow to run on my server
for a single process:

ffmpeg -f concat -i file.txt -stream_loop -1 -t 60 -i

> ed141148-9b79-494b-a26d-f5c84535eeaf6379741644027890621.tmp
> fcd2b1a9-f3c8-4cdc-8355-51c08b088ee3.mp4
> ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
>   built with Apple LLVM version 9.1.0 (clang-902.0.39.2)
>   configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-shared
> --enable-pthreads --enable-version3 --enable-hardcoded-tables
> --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl
> --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl
> --enable-videotoolbox --disable-lzma
>   libavutil      56. 14.100 / 56. 14.100
>   libavcodec     58. 18.100 / 58. 18.100
>   libavformat    58. 12.100 / 58. 12.100
>   libavdevice    58.  3.100 / 58.  3.100
>   libavfilter     7. 16.100 /  7. 16.100
>   libavresample   4.  0.  0 /  4.  0.  0
>   libswscale      5.  1.100 /  5.  1.100
>   libswresample   3.  1.100 /  3.  1.100
>   libpostproc    55.  1.100 / 55.  1.100
> [jpeg_pipe @ 0x7fcdbc800600] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> Input #0, concat, from 'file.txt':
>   Duration: N/A, start: 0.000000, bitrate: N/A
>     Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 3024x4032 [SAR 1:1 DAR 3:4], 25 tbr, 25 tbn, 25 tbc
> [mp3 @ 0x7fcdbd009200] Estimating duration from bitrate, this may be
> inaccurate
> Input #1, mp3, from
> 'ed141148-9b79-494b-a26d-f5c84535eeaf6379741644027890621.tmp':
>   Metadata:
>     title           : Indo Rock2
>     artist          : DL Sounds
>     album           : Royalty Free Music
>     date            : 2014
>     comment         : (C) dl-sounds.com
>     genre           : Other
>   Duration: 00:00:34.81, start: 0.000000, bitrate: 255 kb/s
>     Stream #1:0: Audio: mp3, 44100 Hz, stereo, fltp, 256 kb/s
> File 'fcd2b1a9-f3c8-4cdc-8355-51c08b088ee3.mp4' already exists. Overwrite
> ? [y/N] y
> Stream mapping:
>   Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
>   Stream #1:0 -> #0:1 (mp3 (mp3float) -> aac (native))
> Press [q] to stop, [?] for help
> [libx264 @ 0x7fcdbb01d200] using SAR=1/1
> [libx264 @ 0x7fcdbb01d200] using cpu capabilities: MMX2 SSE2Fast SSSE3
> SSE4.2 AVX
> [jpeg_pipe @ 0x7fcdbb011400] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [libx264 @ 0x7fcdbb01d200] profile High, level 6.0
> [libx264 @ 0x7fcdbb01d200] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC
> codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options:
> cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
> psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
> cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12
> lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0
> bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
> b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
> scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
> qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
> Output #0, mp4, to 'fcd2b1a9-f3c8-4cdc-8355-51c08b088ee3.mp4':
>   Metadata:
>     encoder         : Lavf58.12.100
>     Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj420p(pc,
> progressive), 3024x4032 [SAR 1:1 DAR 3:4], q=-1--1, 25 fps, 12800 tbn, 25
> tbc
>     Metadata:
>       encoder         : Lavc58.18.100 libx264
>     Side data:
>       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
>     Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo,
> fltp, 128 kb/s
>     Metadata:
>       encoder         : Lavc58.18.100 aac
> [jpeg_pipe @ 0x7fcdbb011400] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [swscaler @ 0x7fcdbe89e400] deprecated pixel format used, make sure you
> did set range correctly
> [jpeg_pipe @ 0x7fcdbd027600] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7fcdbe800e00] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7fcdbd801200] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7fcdbc82d400] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7fcdbf009200] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7fcdbe00d200] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7fcdbf008000] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7fcdbd809800] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!
> [jpeg_pipe @ 0x7fcdbb15d600] Format jpeg_pipe detected only with low score
> of 25, misdetection possible!163x
> ^C^C^CReceived > 3 system signals, hard exiting


Right now I'm running into a bit of a brick wall. I noticed an earlier post
mentioning the use of a loop filter which would mean i wouldn't have to use
-loop which I assume is where my overhead is coming from, but I have yet to
be able to get an example to work.

Any thoughts feedbacks, and examples of things I could do would be ever so
helpful

On Fri, 2 Nov 2018 at 07:57, Paul B Mahol <[hidden email]> wrote:

> On 11/1/18, Carl Eugen Hoyos <[hidden email]> wrote:
> > 2018-11-01 21:36 GMT+01:00, Paul B Mahol <[hidden email]>:
> >> On 11/1/18, Carl Eugen Hoyos <[hidden email]> wrote:
> >>> 2018-11-01 3:31 GMT+01:00, Marcus Lim <[hidden email]>:
> >>>> Hey all,
> >>>> New to the list and trying to get my head around ffmpeg a bit still.
> >>>> So I am using ffmpeg to create slideshows out of individual images,
> with
> >>>> an
> >>>> audio backing track (usually mp3), and then encoding as MP4 (video is
> >>>> h264
> >>>> and audio is acc), but for some reason the process is taking up to
> 1.4Gb
> >>>> of
> >>>> memory which is blowing me away.
> >>>> Now I am using a complex filter to achieve this, with multiple inputs,
> >>>> and
> >>>> example of my command is below:
> >>>>
> >>>> ffmpeg \
> >>>> -loop 1 -t 4 -i
> >>>> test/ed141148-9b79-494b-a26d-f5c84535eeaf8912937006552540487.tmp \
> >>>> -loop 1 -t 4 -i
> >>>> test/ed141148-9b79-494b-a26d-f5c84535eeaf5351513282402727883.tmp \
> >>>
> >>> I suggest you put the files names in a text file and use the concat
> >>> demuxer.
> >>>
> >>> An alternative is to rename the files as tmp-01 to tmp-15 and use:
> >>> ffmpeg -i tmp-02%d
> >>>
> >>> Both solutions will not have the increased memory usage and
> >>> will significantly simplify your command line.
> >>
> >> How it is supposed to loop for 4 seconds with above solutions?
> >
> > The concat demuxer supports the duration command, the img2
> > demuxer an input frame rate.
> > Do you believe one of them will not work?
>
> Didn't know. It should work for images too, if not report a bug.
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Optimization

Carl Eugen Hoyos-2
2018-11-02 0:05 GMT+01:00, Marcus Lim <[hidden email]>:
> Thanks for all the suggestions,
> So after some reading, the img2 demuxer won't work since the images I have
> are all of different sizes, and according to the documentation it says that
> they need to be of the same size (still tried it, but the images became cut
> off)

This doesn't seem correct to me, please point me to this part
of the documentation.
I just tried different sizes and it works fine.

> as well I couldn't figure out how to get the timings done right.

$ ffmpeg -r 1/4 -i img%2d.jpg

> The concat demuxer actually had the same issue as the img2 demuxer.

I wanted to suggest using the img2 demuxer instead, but since you
only tested old FFmpeg, it may work with a current version.

> For reference to the output from ffmpeg:
>
> ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers

Only current FFmpeg git head is supported here.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Optimization

Marcus Lim
Sorry for the confusion, I just double checked, and I miss read "video size
is guessed from the first image file in the sequence." as it effectively
see's as only one size.

The issue though still stands, and I did a fresh clone from git, and built
from source as per https://trac.ffmpeg.org/wiki/CompilationGuide/macOS.

>
> ./../FFmpeg/ffmpeg -r 1/4 -i IMG_%3d.jpg out.mp4
> ffmpeg version N-92328-gf4dd2db913 Copyright (c) 2000-2018 the FFmpeg
> developers
>   built with Apple LLVM version 9.1.0 (clang-902.0.39.2)
>   configuration: --enable-gpl --enable-nonfree --enable-libass
> --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
> --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
> --enable-libx265 --enable-libopus --enable-libxvid --samples=fate-suite
>   libavutil      56. 23.100 / 56. 23.100
>   libavcodec     58. 36.100 / 58. 36.100
>   libavformat    58. 21.100 / 58. 21.100
>   libavdevice    58.  6.100 / 58.  6.100
>   libavfilter     7. 41.100 /  7. 41.100
>   libswscale      5.  4.100 /  5.  4.100
>   libswresample   3.  4.100 /  3.  4.100
>   libpostproc    55.  4.100 / 55.  4.100
> Input #0, image2, from 'IMG_%3d.jpg':
>   Duration: 00:00:00.12, start: 0.000000, bitrate: N/A
>     Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 3024x4032 [SAR 1:1 DAR 3:4], 25 tbr, 25 tbn, 25 tbc
> File 'out.mp4' already exists. Overwrite ? [y/N] y
> Stream mapping:
>   Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
> Press [q] to stop, [?] for help
> [libx264 @ 0x7fd903012000] using SAR=1/1
> [libx264 @ 0x7fd903012000] using cpu capabilities: MMX2 SSE2Fast SSSE3
> SSE4.2 AVX
> [libx264 @ 0x7fd903012000] profile High, level 6.0
> [libx264 @ 0x7fd903012000] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC
> codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options:
> cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
> psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
> cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12
> lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0
> bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
> b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=1
> scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
> qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
> Output #0, mp4, to 'out.mp4':
>   Metadata:
>     encoder         : Lavf58.21.100
>     Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj420p(pc),
> 3024x4032 [SAR 1:1 DAR 3:4], q=-1--1, 0.25 fps, 16384 tbn, 0.25 tbc
>     Metadata:
>       encoder         : Lavc58.36.100 libx264
>     Side data:
>       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
> [swscaler @ 0x7fd9041be400] deprecated pixel format used, make sure you
> did set range correctly
> frame=    3 fps=1.3 q=-1.0 Lsize=    5248kB time=00:00:00.00
> bitrate=704743868.9kbits/s speed=2.56e-05x
> video:5247kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: 0.016509%
> [libx264 @ 0x7fd903012000] frame I:2     Avg QP:15.08  size:1810918
> [libx264 @ 0x7fd903012000] frame P:1     Avg QP:15.30  size:1750261
> [libx264 @ 0x7fd903012000] mb I  I16..4:  0.7% 91.2%  8.1%
> [libx264 @ 0x7fd903012000] mb P  I16..4:  1.0% 81.6% 11.6%  P16..4:  2.2%
> 2.5%  0.9%  0.0%  0.0%    skip: 0.1%
> [libx264 @ 0x7fd903012000] 8x8 transform intra:89.7% inter:73.6%
> [libx264 @ 0x7fd903012000] coded y,uvDC,uvAC intra: 99.2% 76.0% 51.3%
> inter: 91.2% 86.4% 14.0%
> [libx264 @ 0x7fd903012000] i16 v,h,dc,p: 14%  4% 18% 65%
> [libx264 @ 0x7fd903012000] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 14% 23%  6%
> 7%  8%  8%  8% 10%
> [libx264 @ 0x7fd903012000] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 12% 10%  8%
> 11% 12%  8% 10%  8%
> [libx264 @ 0x7fd903012000] i8c dc,h,v,p: 50% 18% 23% 10%
> [libx264 @ 0x7fd903012000] Weighted P-Frames: Y:0.0% UV:0.0%
> [libx264 @ 0x7fd903012000] kb/s:3581.40


And I've noticed using the image demuxer is distorting the image to the
first images dimensions which is different to what the original script does


On Fri, 2 Nov 2018 at 11:06, Carl Eugen Hoyos <[hidden email]> wrote:

> 2018-11-02 0:05 GMT+01:00, Marcus Lim <[hidden email]>:
> > Thanks for all the suggestions,
> > So after some reading, the img2 demuxer won't work since the images I
> have
> > are all of different sizes, and according to the documentation it says
> that
> > they need to be of the same size (still tried it, but the images became
> cut
> > off)
>
> This doesn't seem correct to me, please point me to this part
> of the documentation.
> I just tried different sizes and it works fine.
>
> > as well I couldn't figure out how to get the timings done right.
>
> $ ffmpeg -r 1/4 -i img%2d.jpg
>
> > The concat demuxer actually had the same issue as the img2 demuxer.
>
> I wanted to suggest using the img2 demuxer instead, but since you
> only tested old FFmpeg, it may work with a current version.
>
> > For reference to the output from ffmpeg:
> >
> > ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
>
> Only current FFmpeg git head is supported here.
>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Optimization

Carl Eugen Hoyos-2
2018-11-02 3:47 GMT+01:00, Marcus Lim <[hidden email]>:

> The issue though still stands, and I did a fresh clone from git, and built
> from source as per https://trac.ffmpeg.org/wiki/CompilationGuide/macOS.

Which issue?

>> ./../FFmpeg/ffmpeg -r 1/4 -i IMG_%3d.jpg out.mp4

You want to set an output frame rate and a resolution (and possibly
other filters which is why I only gave an example for reading the
input files):
ffmpeg -r 1/4 -i IMG_%3d.jpg -s 2000x3000 -r 25 out.mp4

Please avoid top-posting here, Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".