[Ffmpeg-devel-irc] ffmpeg.log.20170301

burek burek021 at gmail.com
Thu Mar 2 03:05:01 EET 2017


[01:05:19 CET] <arog> hey in nvenc how do you set it up to be lossless?
[01:10:14 CET] <arog> its really blurry right now
[01:13:23 CET] <arog> is it possible to see all the different options I could set?
[01:29:22 CET] <thebombzen_> arog: ffmpeg -h encoder=h264_nvenc
[01:29:25 CET] <thebombzen_> that'll list all the options
[01:29:30 CET] <arog> thanks
[01:29:36 CET] <arog> but tehre is no way to tell if the option was applied correctly
[01:29:46 CET] <arog> av_dict_set( &codec_options, "preset", std::to_string(10).c_str(), 0 );
[01:29:46 CET] <thebombzen_> the one you're looking for is -preset:v lossless
[01:29:53 CET] <arog> i thought it has to be an int
[01:29:58 CET] <thebombzen_> perhaps
[01:30:09 CET] <arog> in any case how can i tell if it is lossless
[01:30:10 CET] <thebombzen_> I don't know. sometimes ffmpeg.c is smart enough
[01:30:23 CET] <furq> a lot of integer options have string mappings
[01:30:25 CET] <furq> e.g. vsync
[01:30:33 CET] <thebombzen_> so if you're using the CLI tool, maybe. if you're using libavcodec, then maybe
[01:31:00 CET] <thebombzen_> using an int is the old method, most of the new options require strings. it's possible that nvenc is using bad ones and it's int mappings
[01:31:26 CET] <thebombzen_> the issue is probably the most if you're setting the level. because idk if "-level 4" sets the level to be 4.0 or to be the 5th option on the list
[01:31:39 CET] <arog> i never set the level
[01:32:02 CET] <thebombzen_> you probably shouldn't unless you know exactly what the restrictions are
[01:32:08 CET] <arog> heh
[01:32:26 CET] <thebombzen_> but yea. idk if you can use "-preset lossless" or if you have to use -preset 10
[01:32:44 CET] <arog> is it possible to figujre out if my video is lossless
[01:49:07 CET] <thebombzen_> one way is to check the bitrate. if it's absurdly high, then it's lossless
[01:55:10 CET] <thebombzen_> speaking of nvenc, does anyone here know how nvenc_hevc compares to libx264 with respect to quality per bitrate?
[02:00:59 CET] <furq> badly
[02:01:10 CET] <furq> i've not tested but that's according to the fine folks in #ffmpeg
[02:01:31 CET] <furq> as far as i know it's not really much better than nvenc h264, it's just an hevc bitstream
[02:08:52 CET] <thebombzen_> then like
[02:08:54 CET] <thebombzen_> what's the point lol
[02:10:57 CET] <thebombzen_> so upon futher googling, x264 with -preset veryslow outperforms hevc_nvenc, but hevc_nvenc outperforms x264 using the faster presets (such as -preset medium)
[02:11:11 CET] <c3r1c3-Win> To brag that they 'support' HEVC... but at least on the decode side they do, and that does account for something.
[02:11:51 CET] <thebombzen_> so apparently it only outperforms it if you use a fast preset
[02:12:04 CET] <thebombzen_> so it's better for realtime grabbing b/c
[02:12:20 CET] <thebombzen_> b/c it offloads the cpu and performs better anyway
[03:27:36 CET] <TikityTik> What's a good audio codec for good compression for mp4s?
[03:29:02 CET] <TikityTik> opus? vorbis?
[03:38:02 CET] <furq> aac
[03:52:19 CET] <TikityTik> Also what is bufsize? How does it affect quality, size, and encoding speed?
[04:01:52 CET] <thebombzen_> furq: mp4 supports vorbis
[04:02:12 CET] <thebombzen_> techncially it supports opus too, but libavformat doesn't know that yet
[04:16:41 CET] <furq> is that actually finalised now
[04:40:12 CET] <TikityTik> What is bufsize? How does it affect quality, size, and encoding speed?
[04:40:33 CET] <TikityTik> Also if I use -ac 1 to make my audio mono, does the actual audio bitrate get divided by 2?
[04:44:42 CET] <thebombzen_> furq: it's on the table of accepted fourccs
[04:44:49 CET] <thebombzen_> on the official website I think
[04:49:59 CET] <evex> hey dudes
[04:50:04 CET] <evex> anybody here?
[04:57:09 CET] <TikityTik> yes
[04:58:03 CET] <TikityTik> evex: just ask your question
[05:03:23 CET] <evex> yes
[05:03:33 CET] <evex> ok so I have a folder that have a some 20+ videos
[05:03:34 CET] <evex> all mp4
[05:03:42 CET] <evex> and I want to merge all of these together
[05:03:46 CET] <evex> I tried the concat
[05:04:11 CET] <evex> I tried it with cli input -i 'concat:file.mp4|file.mp4'
[05:04:16 CET] <evex> and I tried it with a file
[05:04:34 CET] <evex> both produced a video thats out of sync between video and audio
[05:04:58 CET] <evex> and sometimes the video just freezes
[05:05:17 CET] <evex> I tried the mmcat script found at the ffmpeg.org website
[05:05:19 CET] <evex> didn't work
[05:05:38 CET] <evex> I tried mp4box, it produced a video that's so messy
[05:05:55 CET] <evex> how do I know wether the problem is from my videos or from ffmpeg
[05:06:07 CET] <evex> this is how I'm getting the videos
[05:06:25 CET] <evex> basically I'm downloading specific parts from a youtube video
[05:07:37 CET] <evex> ffmpeg -n -ss 2 -i $(youtube-dl -f mp4 --get-url https://www.youtube.com/watch?v=F9z6LZAasls) -t 10 F9z6LZAasls_1.mp4;
[05:07:47 CET] <evex> after downloading vids from youtube
[05:07:52 CET] <evex> I'm trying to merge them
[05:07:57 CET] <evex> and there happens the issue
[05:08:16 CET] <evex> each video of these download is perfectly fine when played alone
[05:09:03 CET] <evex> what do you think I'm doing wrong? and what should I do to merge these mp4 files?
[05:10:28 CET] <TikityTik> evex: are you also re-encoding the audio with the audio?
[05:10:38 CET] <TikityTik> I mean the audio with the video
[05:11:32 CET] <evex> not when I'm merging
[05:11:36 CET] <TikityTik> evex: Are you only encoding the video? Are you using -c:a copy or -c:v copy?
[05:11:50 CET] <evex> yea its all copy
[05:12:07 CET] <TikityTik> evex: Usually I find using copy doesn't work for that kind of stuff
[05:12:18 CET] <TikityTik> evex: sometimes it even breaks when trimming just 1 video
[05:12:30 CET] <TikityTik> There might be a way to go around this, but I don't know it.
[05:12:36 CET] <evex> hmm
[05:12:48 CET] <TikityTik> evex: Your best bet is to actually specify a video & audio codec for it to fully work
[05:12:50 CET] <evex> I'll try to encode the audio with aac and video with h264
[05:12:54 CET] <evex> give me a sec
[05:13:42 CET] <TikityTik> But I'm not ffmpeg expert, so there might be a workaround. But I always had issues with copy for editing.
[05:15:02 CET] <TikityTik> Also why is it that when I specify -ac 1 for aac encoding, the filesize increases? Shouldn't the file size decrease since there's 1 channel instead of 2?
[05:15:25 CET] <evex> I have no idea man
[05:19:13 CET] <evex> I'm not sure whats happening but
[05:19:39 CET] <evex> ffmpeg -i 'concat:file2.mp4|file1.mp4' -y -c:a aac -c:v libx264 output.mp4
[05:19:50 CET] <evex> produces a file with only one video
[05:19:54 CET] <evex> it didn't concat anything
[05:23:13 CET] <deneme> hi
[05:25:01 CET] <evex> ls *.mp4 | perl -ne 'print "file $_"' > test.test ; ffmpeg -f concat -i test.test -c:a aac -c:v libx264 Movie_Joined.mp4
[05:25:17 CET] <deneme> when i tried to decode a h264 video file, i always get  errors
[05:25:19 CET] <evex> this is the last command
[05:25:21 CET] <deneme> like this.
[05:25:22 CET] <deneme> [h264 @ 0000019262FA00A0] Invalid NAL unit size (554406925 > 554). [h264 @ 0000019262FA00A0] Error splitting the input into NAL units.
[05:25:28 CET] <evex> it worked but the video got stuck again
[05:26:38 CET] <deneme> how can i solve this problem? i'm using ffmpeg 3.2.0 in C
[05:26:40 CET] <TikityTik> evex: as far as I know, concatenating is more complicated
[05:26:49 CET] <evex> damn
[05:27:03 CET] <evex> with iMovie its like 10 sec job
[05:27:10 CET] <evex> but I want to automate it
[05:27:16 CET] <evex> this really sucks
[05:27:33 CET] <TikityTik> evex: You already read https://trac.ffmpeg.org/wiki/Concatenate ?
[05:27:47 CET] <evex> yes
[05:28:04 CET] <evex> the mmcat script I was talking about earlier is from there
[05:28:47 CET] <TikityTik> evex: and all the input files are the same container and same codecs?
[05:29:41 CET] <evex> I'm not sure
[05:29:48 CET] <evex> let me see if they are
[05:30:10 CET] <evex> I'm giving mmcat another try as well
[05:30:14 CET] <TikityTik> evex: Check via ffprobe
[05:30:30 CET] <evex> ok
[05:30:35 CET] <TikityTik> evex: If they are different codecs then you have to use a different method
[05:30:44 CET] <Diag> https://www.youtube.com/watch?v=qmfqpOGzOhI
[05:32:17 CET] <TikityTik> deneme: Paste your command
[05:41:48 CET] <evex> python -c "import os; print ';'.join(['ffprobe -v error -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1 '+file for file in os.listdir('.') if file.split('.')[-1] in ['mp4']])" | sh
[05:41:51 CET] <evex> I made this command
[05:41:58 CET] <evex> all codecs are the same
[05:42:03 CET] <evex> aac h264
[05:48:50 CET] <deneme> i'm not using .exe files
[05:49:35 CET] <deneme> sws_scale(sws_ctx, (uint8_t const * const *)pFrame->data, pFrame->linesize, 0,pCodecCtx->height, pFrameRGB->data, pFrameRGB->linesize);
[07:14:20 CET] <nmschulte> There was a post from July 2016 that said ffserver is being dropped w/ next release, and notice on wiki about it.  Is this so, and what is the "next release" this post refers to?
[07:15:11 CET] <tab1293> Ive inspected http requests that ffmepgs http input format makes to the requested resource and it seems that the range header always has the trailing dash like Range: 0-
[07:16:05 CET] <tab1293> but it will often seek through the file with some offset like Range: 1024-
[07:16:20 CET] <tab1293> how should the implementing resource know to end the previous requests?
[10:30:42 CET] <krstjns> So I have this problem: leakage when running a bunch of decoders and encoders within a single application (both video and audio)
[10:31:44 CET] <krstjns> Running the same thing multiple times provides different memory consumption
[10:32:17 CET] <krstjns> sometimes it grows to 2gb, other times 3.5gb
[10:33:36 CET] <krstjns> Is this a known problem and are there any ways to go around it?
[14:12:55 CET] <JC_Yang> how long does it take to build ffmpeg? with 2G ram and 2 cores? typically
[14:14:57 CET] <JC_Yang> numbers for modern hardware are welcome, so that I can roughly estimate it
[14:21:11 CET] <DHE> my core i7 (recent, 4 cores with hyperthreading) will do it in 2.5 to 3 minutes.
[14:21:56 CET] <DHE> so for you I'd guess 12 to 15 minutes
[14:22:18 CET] <BtbN> depends a lot on what you enable
[14:22:34 CET] <BtbN> The coverity build with absolutely everything enabled takes a good 40 minutes on a dual core
[14:22:48 CET] <BtbN> But the coverity compiler is also slow
[14:23:04 CET] <BtbN> but it still doubled in time when we enabled more stuff
[14:28:09 CET] <JC_Yang> thank u
[15:57:20 CET] <john_rambo> Source file : Video = h.264 /// Audio = Opus ....Want to keep the Video (h.264) and convert the audio to mp3 .....PLease help me with the command
[15:58:38 CET] <Diag> Why mp3
[15:58:52 CET] <Diag> Once you go opus you never go black
[15:59:05 CET] <john_rambo> My hardware player can play only mp3 Diag
[15:59:12 CET] <Diag> Oh
[15:59:20 CET] <Diag> Rewrite the hardware
[16:00:57 CET] <BtbN> it can play h264... but no aac?
[16:01:27 CET] <john_rambo> BtbN, I am going to try that now
[16:01:44 CET] <Mavrik> yeah, AAC sounds like a better option :)
[16:02:00 CET] <Mavrik> -codec:v copy -codec:a aac -b:a 192k should do the job
[16:07:14 CET] <john_rambo> Mavrik, ffmpeg -codec:v copy -codec:a aac -b:a 192k <source file> <output file>....Is this correct ?
[16:07:56 CET] <kepstin> john_rambo: put the source file before the output options
[16:10:10 CET] <john_rambo> kepstin, $ ffmpeg KK.mkv -codec:v copy -codec:a aac -b:a 192k ~/Desktop/KK.avi
[16:10:15 CET] <john_rambo> IS this okay ?
[16:10:29 CET] <furq> -i KK.mkv
[16:10:33 CET] <furq> also don't use avi if you can avoid it
[16:12:33 CET] <john_rambo> furq, https://paste.debian.net/917449/
[16:13:54 CET] <Mavrik> your ffmpeg is old
[16:14:02 CET] <Mavrik> and the error describes exactly what to do
[17:00:00 CET] <xtina_> g'morning guys. i know you're tired of me peppering the chat w questions everyday -_-
[17:00:22 CET] <xtina_> i'm still finding that my audio/video streaming command often results in ALSA buffer overruns within the 1st minute when the script is executed upon boot
[17:00:29 CET] <xtina_> but this never happens if I manually execute from SSH
[17:00:45 CET] <xtina_> I've turned verbosity on the rec command to max, and have scoured the ffmpeg logs as well
[17:01:09 CET] <xtina_> I can't find any sign of a problem. when the audio overruns the ffmpeg logs look 100% healthy, and 'rec' logs tell me nothing
[17:01:59 CET] <xtina_> the audio and video stay within 500ms of each other in both successful and broken streams
[17:02:53 CET] <xtina_> so it doesn't seem like it's the encoder being slower to start up when I execute from boot?
[17:03:05 CET] <xtina_> here's the full logs from a successful manual stream: http://vpaste.net/SDtai
[17:03:31 CET] <xtina_> here's an overrun stream from boot, identical commands: http://vpaste.net/MFl0k
[17:04:42 CET] <xtina_> does anyone have a clue how I can continue debugging..? thanks in advance
[17:40:36 CET] <derek__> I've sent at e-mail to ffmpeg-user-owner at ffmpeg.org and it's being moderated . How do I register to #ffmpeg , please ?
[17:42:52 CET] <pappi> hello. how can you get the command that was used to encode a video stream?
[17:44:17 CET] <pappi> if that's not possible, then how can you rebuild the command using  a list of parameters ?
[17:47:35 CET] <kepstin> xtina_: the box is probably busy doing a bunch of stuff at boot. Have you tried something as simple as adding a sleep for ~10s or so before actually starting up the encoders?
[17:49:41 CET] <LongChair> I am trying to benchmark decoding performance on a device. i have read around and found that one way was to use " ffmpeg   -i <file> -f null null - -benchmark", but i'm getting errors when doing this
[17:50:06 CET] <LongChair> this is the error i'm getting :
[17:50:07 CET] <LongChair> Automatic encoder selection failed for output stream #0:0. Default encoder for format null (codec wrapped_avframe) is probably disabled. Please choose an encoder manually.
[17:50:07 CET] <LongChair> Error selecting an encoder for stream 0:0
[17:50:18 CET] <mdavis> You only need one "null"
[17:50:27 CET] <mdavis> ffmpeg -i <file> -f null - -benchmark
[17:50:40 CET] <LongChair> same error with one null
[17:51:16 CET] <LongChair> could there be missing configuration flags ?
[17:51:32 CET] <LongChair> cuz i basically specified none (all defaults)
[17:51:37 CET] <mdavis> can you do ffmpeg -formats | grep null
[17:52:00 CET] <mdavis> It should show a line "E null           raw null video"
[17:52:12 CET] <LongChair> yep has that
[17:53:12 CET] <mdavis> Can you do "ffmpeg -buildconf" and post that to pastebin?
[17:53:40 CET] <xtina_> kepstin: that's a good point.. i'll try. feeling stupid. thanks :)
[17:54:27 CET] <LongChair> mdavis: http://pastebin.com/iGEkFCVP
[17:55:26 CET] <mdavis> "--disable-encoders --enable-encoder=ac3" is your problem
[17:55:49 CET] <LongChair> ok so which flags am i supposed to use ?
[17:56:08 CET] <mdavis> If you want to use null output, you need to add --enable-encoder=wrapped_avframe
[17:56:20 CET] <LongChair> ok lemme try that
[17:56:24 CET] <mdavis> when compiling
[17:56:34 CET] <mdavis> *configuring, I mean
[17:57:01 CET] <LongChair> yep
[17:58:20 CET] <mdavis> I usually go the other way. I make huge, bloated, do-everything builds :)
[17:59:48 CET] <LongChair> hehe
[18:00:06 CET] <LongChair> there is no --enable-all flag :)
[18:00:16 CET] <mdavis> --arch=x86_64 --enable-gpl --enable-nonfree --extra-cflags='-pipe -I/usr/include/w32api -I/usr/local/include/cuda' --extra-ldflags=-L/usr/local/lib/cuda --extra-libs=-lstdc++ --enable-sdl2 --enable-fontconfig --enable-libass --enable-libmp3lame --enable-version3 --enable-librtmp --enable-libvorbis --enable-libtheora --enable-gnutls --enable-libfreetype --enable-libopus --enable-libschroedinger --enable-libvpx --enable-libwavpack
[18:00:16 CET] <mdavis> --enable-libwebp --enable-libx264 --enable-libx265 --enable-librubberband --enable-libfdk-aac --enable-libvidstab --disable-libxcb --enable-opengl --enable-opencl --enable-libnpp
[18:00:37 CET] <mdavis> A/V swiss army knife
[18:01:37 CET] <LongChair> yeah i probably should have done something similar, the device i'm building it one is a bit slow though .. so limitting the stuff it builds is good, until you end up building it too many times :)
[18:02:59 CET] <mdavis> Limiting it after you've tried a full build and figured out what you need is probably the best way to go
[18:04:42 CET] <LongChair> indeed
[18:18:39 CET] <LongChair> mdavis: same error even with that option :/
[18:20:12 CET] <mdavis> Then I'm out of ideas. Anyone else here can help?
[18:20:40 CET] <mdavis> Are you sure you're using the ffmpeg you just built, and not the one previously installed?
[18:21:25 CET] <LongChair> yeah that one shows "configuration: --enable-encoder=wrapped_avframe"
[18:21:55 CET] <mdavis> Then idk
[18:22:25 CET] <LongChair> thanks for your help :) hopefully someone else will have an idea :)
[18:23:36 CET] <xtina_> kepstin: sleeping for a while before starting the stream did seem to eliminate overruns. however in my CPU usage prints I don't see high CPU even if I don't sleep before starting the stream, so it's strange that this helps
[18:24:44 CET] <forgon> I fucked up an mkv file while reencoding it and don't know why: http://sprunge.us/CMXd
[18:27:38 CET] <forgon> Does anyone know what 'Duplicate element' means?
[18:27:53 CET] <LongChair> mdavis: though something is odd in the erro message, it's mentionning the default "encoder", where i'd expect it to use a decoder ..
[18:28:08 CET] <LongChair> i just want it to read file & decode
[18:28:53 CET] <mdavis> LongChair: Technically, it has to encode to a pseudo-codec to use the null format
[18:29:18 CET] <mdavis> I think
[18:31:58 CET] <furq> who are these people who only have six minutes to get a problem solved
[18:41:04 CET] <timothy> hi, I have an ffmpeg line with -filter_complex "[0:v:0] [0:a:0] [1:v:0] [1:a:0] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]"
[18:41:34 CET] <timothy> I need to use h264_vaapi and so I need to set format=nv12,hwupload
[18:41:46 CET] <timothy> ofc -vf doesn't work
[18:42:36 CET] <xtina_> derek__: you have to subscribe to the ffmpeg mailing list
[18:42:48 CET] <xtina_> in order to be notified when people reply to your messages
[18:43:05 CET] <xtina_> otherwise i think it still gets approved generally but you won't know unless you check the archives on the site
[18:43:12 CET] <xtina_> the ffmpeg mailing list has nothing to do with #ffmpeg irc
[18:55:01 CET] <forgon> Can someone explain to me how the 'Duplicate element' error might have resulted from my seek and reencode command?
[18:55:20 CET] <forgon> http://sprunge.us/CMXd
[19:00:12 CET] <furq> forgon: that should work, but you should probably be using the segment muxer instead of doing all that seeking
[19:00:16 CET] <furq> !muxer segment
[19:00:16 CET] <nfobot> furq: http://ffmpeg.org/ffmpeg-formats.html#segment_002c-stream_005fsegment_002c-ssegment
[19:00:49 CET] <furq> with -segment_times
[19:01:36 CET] <forgon> furq: Would you be nice and give me the complete syntax?
[19:02:32 CET] <forgon> Where do encoding options go?
[19:02:36 CET] <furq> -f segment -segment_times 00:20,10:16,24:33,36:38,51:19,1:06:19 %d.mkv
[19:03:14 CET] <forgon> furq: And the encoding just stays the same?
[19:03:17 CET] <furq> yeah
[19:03:20 CET] <forgon> Is your method faster than seeking?
[19:03:27 CET] <furq> yeah
[19:03:30 CET] <forgon> My file is lossless, that's why I ask.
[19:03:43 CET] <furq> yours is seeking from the start five times
[19:03:56 CET] <furq> segment just splits the output so it doesn't seek at all
[19:05:06 CET] <furq> that will encode 00:00 to 00:20 and 1:06:19 to eof segments though
[19:06:40 CET] <forgon> furq: So 2 seeks still :p
[19:06:40 CET] <forgon> let me test your idea.
[19:06:49 CET] <forgon> Sadly, my laptop crashes a lot.
[19:07:15 CET] <furq> you might need to offset the timestamps if you use that with -ss 00:20
[19:08:49 CET] <forgon> Afaik there is also a negative seek, correct?
[19:09:02 CET] <furq> there's -sseof
[19:12:11 CET] <forgon> So, the current line is:
[19:16:40 CET] <forgon> ffmpeg -i input.mkv -vcodec libx264 -acodec flac -f segment -segment_times 00:20,10:16 \%d.mkv
[19:17:03 CET] <forgon> Still figuring out the syntax :
[19:18:13 CET] <furq> you shouldn't need to escape that %
[19:18:22 CET] <forgon> I use the ghastly fish shell
[19:18:29 CET] <furq> oh dear
[19:18:40 CET] <forgon> Not that I can't use bash, I wrote almost a hundred scripts in it.
[19:18:49 CET] <forgon> But I got too lazy for its quirks.
[19:20:08 CET] <forgon> With -segment_times 00:00:01,00:00:02 FFmpeg seeks way beyond these times.
[19:20:33 CET] <furq> when encoding?
[19:20:59 CET] <forgon> With or without specifying codecs.
[19:22:13 CET] <furq> what do you mean by "seeks way beyond"
[19:23:42 CET] <forgon> I would hope that after 2 seconds part 2 ennds
[19:24:04 CET] <forgon> or part 1, since 0 is the first digit here.
[19:24:33 CET] <furq> how long is part 2
[19:24:37 CET] <forgon> Yet instead, my first output file is corrupted.
[19:25:54 CET] <forgon> dup= in the progress bar and steadily increasing, 0.mkv contains 'Duplicate elements' and is corrupted.
[19:26:38 CET] <forgon> And that should definitely be only a second long and finished.
[19:27:08 CET] <furq> sounds like fun
[19:28:25 CET] <forgon> Better seek 5 times and wait 3 days :p
[19:32:16 CET] <forgon> A penance for noobness to the great FFmpeg creators :|
[19:39:57 CET] <LongChair1> so i'm trying to bench some specific hw decoder that i have implemented. i will use "ffmpeg  -c:v <my_codec> -i <file> -an -f null - -benchmark.
[19:40:44 CET] <LongChair1> that starts fine and will start the decoding process, but upon first frame decoded i'm getting this error message : Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scaler_0'
[19:41:13 CET] <LongChair1> my hw decoder uses a specific pixel format as frame will hold some platform specific info.
[19:41:54 CET] <LongChair1> would anyone have a clue on what could be missing or why is it trying to use autoscaler when the filter is set to null ?
[19:43:00 CET] <klaxa> interesting, sadly i have no idea what could be wrong
[19:44:35 CET] <Duality> i am using -crf 0 to stream losless h264 but on the other side i see that single pixels are spread out over multple any ideas why this could be ?
[19:45:11 CET] <kepstin> Duality: does it only happen with bright colors (red, blue)?
[19:45:49 CET] <Duality> kepstin: i can do a quick test, i see it happen with blue for sure
[19:46:07 CET] <kepstin> Duality: if so, the issue is that the image is being downsampled to yuv420, you might want to explicitly specify -pix_fmt yuv444p or if you have an rgb source, consider using libx264rgb.
[19:46:41 CET] <kepstin> if your original source is already yuv420p well, it's losslessly encoding a source that already has this issue...
[19:46:47 CET] <Duality> i am currently using -pix_fmt yuv420p
[19:47:02 CET] <kepstin> Duality: yep, that would do it
[19:47:25 CET] <Duality> the original source is rgb data
[19:47:49 CET] <jkqxz> LongChair1:  Hardware pixel format setup is tricky, because ffmpeg always makes a filter graph there and your frames have to pass through it.  If you have hwcontext support then you can generally push it into doing the right thing with the hw* filters.  If you don't you may need to hack ffmpeg.
[19:49:55 CET] <jkqxz> (This will hopefully become much easier soon for hwcontext when lazy filter/output setup gets merged from libav, but I don't know whether that will help your case.)
[20:01:11 CET] <Duality> my command now looks like this
[20:01:14 CET] <Duality> http://pastebin.com/neW3rmx6
[20:01:35 CET] <Duality> but pixels are still spreadout
[20:03:22 CET] <Duality> when i change libx264 to libx264 it throws an assertion namely: Assertion `cost >= 0' failed.
[20:03:26 CET] <kepstin> but like I said, you might want to try libx264rgb so it's using rgb from end to end
[20:03:39 CET] <Duality> libx264rgb *
[20:04:17 CET] <kepstin> Duality: again, complete command line and full console output please...
[20:04:24 CET] <Duality> yea sorry :)
[20:07:12 CET] <Duality> http://pastebin.com/qe7a0ePc
[20:07:16 CET] <Duality> is the full output
[20:07:33 CET] <Duality> (sorry toke me a bit to figure out that you actually wanted the output logs too
[20:08:43 CET] <llogan> it's mandatory
[20:09:08 CET] <Duality> yea no exuse sorry again :D
[20:11:31 CET] <klaxa> i have never seen that error
[20:14:57 CET] <llogan> i can't duplciate the issue
[20:15:03 CET] <Duality> :(
[20:15:26 CET] <Duality> it's version 3.2.2
[20:15:33 CET] <LongChair1> jkqxz: well that's not 100% clear but thanks :)
[20:15:43 CET] <LongChair1> i suppose i'll have to find a workaround :)
[20:15:48 CET] <llogan> update your old linked x264 and ffmpeg. users are recommended to use git master branch
[20:16:33 CET] <jkqxz> LongChair1:  What is your pixel format?
[20:16:51 CET] <Duality> llogan: me ?
[20:17:48 CET] <LongChair1> it's is not existing inside ffmpeg master. but basically decoder will make avframes with a struct in data[3] that struct holds information for dmabuf stuff
[20:18:17 CET] <LongChair1> i use it with mpv for opengl/dmabuf or drm/dmabuf
[20:18:33 CET] <jkqxz> Right.  I strongly recommend that you make a hwcontext implementation for it.
[20:18:52 CET] <llogan> Duality: yes
[20:19:12 CET] <LongChair1> jkqxz: ok, i'll have to dig what this means in ffmpeg code
[20:25:52 CET] <llogan> Duality: you can get a binary here https://johnvansickle.com/ffmpeg/
[20:26:50 CET] <Duality> llogan: building it right now :)
[20:26:53 CET] <relaxed> Duality: also, use -framerate 1000 instead of -r 1000
[20:27:25 CET] <llogan> and -video_size instead of -s
[20:28:52 CET] <Duality> are they different ?
[20:29:16 CET] <Duality> of does using -video_size make sure that it's video size meant ?
[20:30:39 CET] <llogan> IIRC, -r and -framerate are different. at least for image demuxer and some input devices. i never looked into if -video_size is anything different, but it's in the rawvideo demuxer docs
[20:45:23 CET] <Duality> llogan: i tried a newer version that was avialable same issue, now i am going to try the binary
[20:47:26 CET] <Duality> binary work :)
[20:48:39 CET] <Duality> and the pixels are nice now
[20:48:49 CET] <Duality> i do see something else though
[20:49:21 CET] <Duality> sometimes it flashes a green frame with white square in it. and i am not sending it any ideas what it could be ?
[20:57:41 CET] <llogan> hard to say. does the input have the same thing?
[21:03:42 CET] <Duality> seems that the archive on the link you gave me didn't include a ffplay :S
[21:05:40 CET] <Duality> but i have one now :)
[21:09:27 CET] <Duality> no the input does not
[21:09:33 CET] <Duality> have that issue
[21:12:01 CET] <Duality> could it be the fact that i am streaming over a wifi connection that does something with the udp data ? or does ffmpeg check if the data is valid?
[21:14:14 CET] <llogan> Duality: if you output to a local file does it have the same issue?
[21:14:51 CET] <Duality> llogan: i streamt it myself locally and it didn't show that issue
[21:16:41 CET] <llogan> if it's a network induced issue than I have no idea. not an area i have any interest in.
[21:17:01 CET] <Duality> llogan: it doesn't show when saving to file either
[21:17:03 CET] <Duality> :)
[21:17:55 CET] <Duality> yea could be something weird, but i am so happy that i atleast got it working  all the way to playing things remotely
[21:18:15 CET] <Duality> thanks to you llogan and kepstin :) you guys are awesome :)
[21:32:05 CET] <Duality> llogan: never mind the problem isn't the network or any data parsing, the problem is that the target device is a really slow arm board :D
[21:37:55 CET] <chandoo> hi
[21:38:17 CET] <chandoo> i am on windows, how to write ffmpeg code in multiple lines
[21:38:32 CET] <chandoo>  \ is not working in windows
[21:39:41 CET] <BtbN> Install a proper shell
[21:40:19 CET] <chandoo> BtbN, i didn't get you
[21:40:26 CET] <chandoo> you mean power shell?
[21:40:43 CET] <BtbN> Whatever you prefer
[21:47:27 CET] <derek__> xtina_ Thank you for your reply I have now subscribed to ffmpeg-user at ffmpeg.org and resent my e-mail
[22:03:31 CET] <chandoo> hi
[22:03:45 CET] <chandoo> i am displaying all my cameras in single window
[22:05:21 CET] <chandoo> i have only 5 cameras , but the empty space is flickering a lot, how to make it one color constant say blue
[22:05:59 CET] <llogan> add the "color" source filter
[22:06:24 CET] <llogan> color=c=blue:s=640x360:r=ntsc
[22:07:08 CET] <chandoo> this is my cams output
[22:07:19 CET] <chandoo> filter complex code
[22:07:52 CET] <chandoo> https://paste.fedoraproject.org/paste/zgRSLU8MzPtpGM0qAtV8ol5M1UNdIGYhyRLivL9gydE=
[22:08:41 CET] <llogan> use color instead of nullsrc
[22:09:04 CET] <llogan> you can use vstack and hstack instead of overlay.
[22:09:14 CET] <chandoo> -filter_complex "nullsrc=size=920x480 [base]   |||| -filter_complex "color=c=blue=size=920x480 [base]
[22:09:16 CET] <chandoo> like that
[22:09:44 CET] <llogan> sure
[22:10:44 CET] <chandoo> didn't work
[22:11:01 CET] <llogan> "didn't work" is a very common error.
[22:12:31 CET] <chandoo> https://paste.fedoraproject.org/paste/OfUKGhh2mXmPWKxFFg7Sel5M1UNdIGYhyRLivL9gydE=
[22:12:59 CET] <llogan> blue=size to blue:size
[22:14:14 CET] <chandoo> :) it worked
[22:14:16 CET] <chandoo> cool
[22:14:18 CET] <chandoo> thanks
[22:15:06 CET] <llogan> but i would just use *stack filters and add another 320x240 sized blue color as the filler
[22:16:25 CET] <llogan> something like "color=s=320x240:r=25:c=blue[blue];[0:v][1:v][2:v]hstack[top];[3:v][4:v][blue]hstack[bottom];[top][bottom]vstack"
[22:16:26 CET] <chandoo> actually i got this code some where and i modified it to include the 5 cameras
[22:17:20 CET] <chandoo> woow
[22:17:29 CET] <chandoo> this is short form
[22:17:46 CET] <llogan> easier. and probably faster.
[22:18:03 CET] <chandoo> so no need to bother saying where to start and where to end hstack will take care of it right?
[22:18:30 CET] <chandoo> yes my laptop is diying to parse the ffmpeg command
[22:18:38 CET] Action: chandoo modifying the code
[22:18:42 CET] <llogan> i forgot the "inputs" option for *stack (default is 2).
[22:19:12 CET] <llogan> see *stack shortest option if you want to force termination when the shortest input terminates (default false)
[22:19:16 CET] <chandoo> i have all 5 inputs with -i xxxx -i xxx 5 times
[22:22:06 CET] <chandoo> okay
[22:22:10 CET] <chandoo> i have this error
[22:22:11 CET] <chandoo> [AVFilterGraph @ 03736160] Too many inputs specified for the "hstack" filter.
[22:22:11 CET] <chandoo> Error initializing complex filters.
[22:22:11 CET] <chandoo> Invalid argument
[22:22:23 CET] <chandoo> okay i will check that out
[22:23:16 CET] <chandoo> when i run i have lot of errors and there is significant delay in what is happening outside and what i see in the frames
[22:23:17 CET] <chandoo> https://paste.fedoraproject.org/paste/quujatyrqXzMVf6El1DxIl5M1UNdIGYhyRLivL9gydE=
[22:31:40 CET] <k92> Hi everyone, have any try -pass 2 on libvpx-vp9 ? If I remove -pass 2, it work, but if turn it on, it show this:
[22:31:50 CET] <k92> [libvpx-vp9 @ 0x55825f1e5a20] v1.6.1 [libvpx-vp9 @ 0x55825f1e5a20] Failed to initialize encoder: Invalid parameter [libvpx-vp9 @ 0x55825f1e5a20]   Additional information: rc_twopass_stats_in.buf not set. Stream mapping:   Stream #0:0 -> #0:0 (h264 (native) -> vp9 (libvpx-vp9))   Stream #0:1 -> #0:1 (truehd (native) -> opus (libopus)) Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, w
[22:35:01 CET] <kepstin> k92: have you already run it with -pass 1 to generate the stats file?
[22:36:02 CET] <k92> :l no, how to do that @kepstin, please show me ?
[22:36:19 CET] <kepstin> run the same command but with '1' instead of '2'
[22:36:50 CET] <kepstin> when you do a two-pass encode, you have to run the command twice, first with the option "-pass 1" to generate statistics, then again with the option "-pass 2" to use them.
[22:37:08 CET] <k92> wow :D
[22:37:27 CET] <k92> but I didn't catch that from docs, am I missing it some where?
[22:38:06 CET] <kepstin> k92: it's basically "common knowledge", that's how 2-pass encoding works in all codecs.
[22:39:09 CET] <k92> haha, I just switch from handbrake to ffmpeg cli, handbrake auto run 2 times, I've no idea
[22:39:25 CET] <kepstin> k92: that said, the description for -pass in https://www.ffmpeg.org/ffmpeg.html#Video-Options does give examples and says how it works
[22:39:53 CET] <kepstin> sort of, anyways
[22:40:48 CET] <k92> thanks you kepstin, save my day :)
[22:43:40 CET] <k92> should have add docs "when you do a two-pass encode, you have to run the command twice, first with the option "-pass 1" to generate statistics, then again with the option "-pass 2" to use them.", much clear than right now
[22:45:14 CET] <kepstin> k92: the existing doc that I linked is pretty close to that, actually...
[22:45:32 CET] <kepstin> "Select the pass number (1 or 2). It is used to do two-pass video encoding. The statistics of the video are recorded in the first pass into a log file (see also the option -passlogfile), and in the second pass that log file is used to generate the video at the exact requested bitrate."
[22:47:21 CET] <k92> I guess it on me, my head still wrap around handbrake way
[22:47:37 CET] <k92> anw thank you again :D
[23:32:37 CET] <RossW> quiet time in channel ffmpeg? Or is everyone just waiting for the fresh meat to say something stoopid?
[23:36:05 CET] <DHE> no preference. nice to have downtime while I eat
[23:36:29 CET] <RossW> Sounds fair :)
[23:37:26 CET] <RossW> When you've finished eating, perhaps you can talk me down from my frustration?  I'm trying to use ffmpeg without fully understanding (well, barely understanding at all) how it works.
[23:38:40 CET] <RossW> I've got a large number of still frames, which need to be pulled together into a video. This works. They have to be stills, because depending on the need at the time, I may need all frames, or every 2nd or 5th or 10th. I may need them between only two particular times, etc.
[23:39:30 CET] <RossW> I am also wanting to overlay a watermark, which is fine. I've got all that working, but now I've had a request ... to add a timestamp to the video.
[23:40:25 CET] <RossW> and this is the one that's driving me nuts. I'm getting close to the conclusion that I have no option but to make an intermediate stage: one to convert the stills to a video, then one to add the overlays.
[23:40:49 CET] <llogan> see select filter for choosing every n image. see overlay filter for overlay. see drawtext filter for timestamp.
[23:42:23 CET] <RossW> The every n image isn't completely easy, because it's not necessarily a linearly ordered list of files, so I'm getting the ones I need, then piping them to ffmpeg with -f image2pipe
[23:42:33 CET] <llogan> ah, ok.
[23:43:14 CET] <RossW> overlay is working with -filter_complex  and that seems fine. I can locate the watermark where I need it (that varies too)
[23:43:48 CET] <RossW> drawtext filter seems not to want to co-exist with filter_complex. That, or my ffmpeg foo simply isn't up to working out the right incantation.
[23:44:15 CET] <RossW> It can't apply to the input (because it's still frames), and it won't apply to the output (presumably because of the filter_complex)
[23:46:47 CET] <llogan> ffmpeg -i - -i logo.png -filter_complex "[0:v][1:v]overlay,drawtexttext='%{pts\:hms}':x=(w-tw)/2:y=h-(2*lh):fontcolor=white:box=1:boxcolor=black" output
[23:47:09 CET] <llogan> should be "drawtext=text"
[23:48:20 CET] Action: RossW tries
[23:53:23 CET] <RossW> ok, remember I'm coming at this cold and inexperienced with ffmpeg...
[23:53:48 CET] <RossW> I have a line that's something like (I'll have to expand some of the variables I'm using to show this) but:
[23:56:32 CET] <RossW>  | ffmpeg -f image2pipe -r 25 -vcodec mjpeg -i - -i $logo -filter_complex overlay=(main_w*$safe)-overlay_w:(main_h*$safe)-overlay_h -vcodec libx264 -crf $crf $a -b:v ${rate:-200}k -movflags +faststart $output
[23:57:26 CET] <RossW> I don't understand the  [0:v][1:v]  ref, but I'm sure it's critical..
[23:58:29 CET] <RossW> [0:v] is the first stream? Ie, the output from the static pics?  [1:v] is the logo?
[23:59:36 CET] <llogan> yes
[00:00:00 CET] --- Thu Mar  2 2017


More information about the Ffmpeg-devel-irc mailing list