I have this ffmpeg sentence:
Code:ffmpeg -f lavfi -i 'testsrc=size=1280x720:rate=24' -f lavfi -i "sine=frequency=1000:sample_rate=44100,volume=0:enable='gt(t-trunc(t),0.25)'" -filter_complex "format=yuv420p, drawtext=fontcolor=white: fontsize=60: fontfile=/usr/share/fonts/truetype/LiberationMono-Bold.ttf: box=1:boxcolor=black@0.3: shadowcolor=black: shadowx=1: shadowy=1: x=(w-text_w-10):y=(h-text_h-5): text=${localtime}: timecode='01\:00\:00\;00': rate=30000/1001" -c:v libx264 -profile:v baseline -level 3.0 -x264opts 'keyint=48:min-keyint=48:no-scenecut' -r-g 48 -keyint_min 48 -sc_threshold 0 -preset veryfast -maxrate 1984k -bufsize 3968k -c:a aac -b:a 128k -ar 44100 -tune zerolatency -movflags +faststart -f flv "rtmp://10.162.20.20/live/bunny"Code:24
But when I change timecode "rate=30000/1001" (that is really 29.976 (30000/1001)) to 24 or 25 or even 30, ffmpeg fails and show me an
Please, can anyone help me to solve this?Code:Drop frame is only allowed with 30000/1001 or 60000/1001 FPS
Thank you
Support our site by donate $5 directly to us Thanks!!!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
+ Reply to Thread
Results 1 to 9 of 9
-
Last edited by Rafael Linux User; 17th May 2017 at 06:18.
-
It looks like the drawtext timecode rate argument is irrelevant anyways, because it seems to take the rate from the source framerate. In your example it's already 24 because testsrc was 24 (it works here)
eg. if testsrc rate was 15, it would be 15, regardless if drawtext timecode rate "said" 30000/1001
I'm not sure if that "feature" is supposed to be there - would there be any situation where you would want a different timecode than source rate in drawtext ? If so, maybe file a bug report -
Try changing the ; to a :
https://trac.ffmpeg.org/wiki/FilteringGuide#BurntinTimecode
(I haven't evaluated what poisondeathray said) -
Yes it doesn't matter ; a colon works but you can make it 12 , 24 , 30, 30000/1001 it will still take on the src frame rate . It seems to have no effect . But if you change the src framerate, it does change the drawtext
I guess if you had a situation where you needed a different timecode overlay I supposed you can derive it from a nullsrc or separate testsrc with different framerate -
Well, in fact, the problem is that each elapsed second showed in "timecode" doesn't match a "real" second. That's to say, it's supposed that if I assigned 24fps to this stream, the timecode counter should be synchronized with the real time, but it's not. The timecode is slower that the real time.
I expect I explained properly.
Thank you -
Maybe I don't understand what you're trying to say, or maybe we're getting different results (I tested on windows, with an older ffmpeg binary)
The timecode matches a real second according to the source framerate, irrespective of what you set
eg. if zero to 23 frames have been displayed and passed, and you are at the beginning of frame 24, 1 second duration has passed if the source fps is 24. The timecode should read 00:00:01.000 and 24 because you're on the start of frame 24 . If source fps was 30, it would say 00:00:01.000, but on frame 30. Eitherway, 1 second has passed
Are you playing an encoded file (TC is "baked" in), or using ffplay in realtime ? If the latter, it might be that you are not getting realtime encoding speed -
My apologies - I was looking at something completely different testsrc2 (not testsrc), which places a different accurate timecode overlay in the top left corner . Not the one you were looking at... in the bottom right
-
as sneaker suggested, the colon seems to work for hh:min
ec:frames
you might have to use some text expansion notation for other notations
Code:ffmpeg -f lavfi -i "color=c=black@1.0:s=1280x720:r=24" -filter_complex "format=yuv420p, drawtext=fontcolor=white: fontsize=60: fontfile=arial.ttf: box=1:boxcolor=black@0.3: shadowcolor=black: shadowx=1: shadowy=1: x=(w-text_w-10):y=(h-text_h-5): text=${localtime}: timecode='00\:00\:00\:00': timecode_rate=24" -c:v libx264 -crf 18 -an -t 00:00:10 test.mp4 -y
Last edited by poisondeathray; 16th May 2017 at 11:12.
-
In the first place, I must say this forum is incredible. I asked about the same question in the ffmpeg support forum and no one solved it.
However poisondeathray and sneaker not only answered my question, but they solved it!!!
THANK YOU VERY MUCH, that was exactly what I was looking for. Now it's synchred and I expect to share what I learn here.
I'm glad to ask here.
Similar Threads
-
[SOLVED] "--ipratio" "--pbratio"+"--scenecut" "--minkeyint" / "--keyint
By Kdmeizk in forum Video ConversionReplies: 14Last Post: 21st Jun 2015, 07:21 -
Please help....... difficulty playing videos with "Variable Frame Rate"
By True Colors in forum Newbie / General discussionsReplies: 13Last Post: 19th May 2014, 01:32 -
How to "???" an video: Adjust the sync.
By vletroye in forum Newbie / General discussionsReplies: 5Last Post: 1st May 2014, 19:12 -
Is there a way to "stamp" a specific timecode into an avi file?
By marcorocchini in forum Newbie / General discussionsReplies: 4Last Post: 19th Nov 2013, 18:34 -
Any advice against vdubmod "source rate adjustment" in AVI-XviDs?
By CactusMan in forum Newbie / General discussionsReplies: 2Last Post: 5th Feb 2013, 17:33