[Ffmpeg-devel-irc] ffmpeg.log.20180426
burek
burek021 at gmail.com
Fri Apr 27 03:05:01 EEST 2018
[01:01:35 CEST] <giaco> hello
[01:02:01 CEST] <giaco> ffmpeg -f v4l2 -i /dev/video0 -> ioctl(VIDIOC_QUERYCAP): Inappropriate ioctl for device
[01:36:13 CEST] <oliverdain> hey - I have some C code that is encoding a video. It works fine on OSX. I re-compiled it for Linux and changed the encoder from ffmpeg native to libx264. It still "works" but now the first few frames of video are grey. I compared the ffprobe -show_frames -pretty output between what Linux and OSX generate and the only difference is the sizes of those initial frames. They're *tiny* on the Linux version: 12 bytes instead of 100+k
[01:36:21 CEST] <oliverdain> Why ideas what could be causing that?
[01:50:59 CEST] <kepstin> oliverdain: the x264 encoder doesn't generate an output frame for each input frame - it has a delay
[01:52:12 CEST] <kepstin> i suppose what you're describing might happen if you aren't handling this correctly, and try to mux null frames into the output
[01:54:38 CEST] <oliverdain> kepstin: we have the normal loop were we call avcodec_receive_packet and then bail if we get EAGAIN. If we don't get EAGAIN (or other error code) we call av_interleaved_write_frame. Isn't that the right sequence
[01:55:22 CEST] <kepstin> hmm, that should be correct then.
[01:55:31 CEST] <oliverdain> so if x264 isn't ready to generate an output avcodec_receive_packet should return EAGAIN and that's OK. Then at some later point we'd go through our loop multiple times and those frames would be output, right?
[01:55:39 CEST] <kepstin> yeah.
[01:56:01 CEST] <kepstin> so, hmm. i guess the place to look into would be the input to the encoder, then.
[02:29:45 CEST] <Pandela> Hey guys. I was curious if anyone has gotten local lv2 plugins to work with the new option to load lv2 plugins?
[02:30:13 CEST] <Pandela> Or are http:// urls the only suppoeted option?
[02:33:13 CEST] <Pandela> If I try to specify a file to use I just get invalid uri
[02:52:18 CEST] <Pandela> I noticed that if I do "ffmpeg -i input.wav -af lv2=plugin=http:\\\\://lv2plug.in/plugins/eg-amp output.wav" It works.
[02:52:58 CEST] <Pandela> Its calling an lv2 in my usr/local/lib/lv2/ folder
[02:54:02 CEST] <Pandela> I know that because i have no internet and I edited the file to see if it changed the lv2 plugin in ffmpeg. So you would think one would be able to call a local lv2 plugin no?
[02:54:04 CEST] <furq> maybe file://
[02:54:11 CEST] <furq> or however much escaping that needs
[02:59:24 CEST] <Pandela> @furq no luck with that either :c I tried using the .so and .ttl files
[03:26:21 CEST] <Pandela> I'll have to just keep trying and checking back if there's a solution
[04:53:57 CEST] <hotbobby> what would be the most obvious way to have ffmpeg recognize the input file's video stream is x264 and then make it just -c:v copy instead of transcode
[04:54:16 CEST] <furq> ffprobe
[04:55:05 CEST] <hotbobby> oh wow. thank you. i did not know this tool existed
[04:55:25 CEST] <furq> i'll save you the effort of figuring it out
[04:55:29 CEST] <hotbobby> scripting my desired behavior is straightforward now, i have to see that it works on streams but im sure it does
[04:56:05 CEST] <furq> [ $(ffprobe -v error -select_streams v:0 -show_entries stream=codec_name -f default=nk=1:nw=1 "foo") = "h264" ]
[04:56:21 CEST] <hotbobby> wow!
[04:56:53 CEST] <hotbobby> so the part before the equals will either return h264 or not?
[04:56:58 CEST] <furq> right
[04:57:05 CEST] <hotbobby> excellent, thank you very much
[04:59:06 CEST] <hotbobby> it doesnt like the -f part
[04:59:51 CEST] <furq> sorry, -of
[04:59:52 CEST] <hotbobby> taking that out gives me a few more lines but i can just test for the line "codec_name=h264". still works
[04:59:55 CEST] <hotbobby> ooo let me try that
[05:00:12 CEST] <hotbobby> amazing!
[15:12:49 CEST] <AppleTor> weird, got this message from ffmpeg on ubuntu "https protocol not found, recompile FFmpeg with openssl, gnutls or securetransport enabled."
[15:12:55 CEST] <AppleTor> never happen on my mac
[15:16:09 CEST] <JEEB> you just don't have a lunix TLS implementation enabled
[15:16:27 CEST] <JEEB> macs and windows have their own things, which might get enabled by default?
[15:16:41 CEST] <JEEB> and since they're system things you don't need to install devleopment packages for them separately :P
[15:17:56 CEST] <AppleTor> will running brew install ffmpeg --with-openssl --with-gnutls going to solved the problem?
[15:19:46 CEST] <AppleTor> ah it works now
[15:22:50 CEST] <atomnuker> you don't need both openssl and gnutls
[15:22:56 CEST] <atomnuker> just one, preferably gnutls
[15:23:37 CEST] <JEEB> didn't macs have their own TLS library? and wasn't your problem with *ubuntu* , not macs?
[15:23:46 CEST] <JEEB> lul
[15:25:04 CEST] <dragmore88> hi, trying to encode a UHD clip and ffmpeg is barfing: ./ffmpeg-10bit -loglevel verbose -i "BBC_Short_HDR.mov" -strict -1 -vf scale=out_color_matrix=bt2020nc:out_h_chr_pos=0:out_v_chr_pos=0,format=yuv420p10 -an -r 25 -f yuv4mpegpipe - | "x265.exe" --y4m - --output-depth 10 --input-res 3840x2160 --fps 25 --preset medium --b-adapt 2 --ref 4 --no-open-gop --keyint 50 --rc-lookahead=50 --profile main10 --level-idc 5.1 --no-high-tier --sa
[15:25:04 CEST] <dragmore88> t2020 --transfer smpte-st-2084 --colormatrix bt2020nc --b-pyramid --bframes 4 --hrd --vbv-bufsize 35000 --crf18 --vbv-maxrate 80000 --slow-firstpass --aud --chromaloc 2 --max-cll "1000,400" --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,0.0050)" --repeat-headers -vn -filter_complex "[0:7][0:8]amerge=inputs=2[aout]" -map "[aout]" -c:a libfaac -q:a 330 -y BBC_HDR
[15:25:04 CEST] <dragmore88> _HRD.ts -loglevel debug
[15:25:17 CEST] <dragmore88> av_interleaved_write_frame(): Broken pipe
[15:25:21 CEST] <dragmore88> Error writing trailer of pipe:: Broken pipe
[15:25:25 CEST] <dragmore88> [swscaler @ 0x87db740] YUV color matrix differs for YUV->YUV, using intermediate RGB to convert
[15:25:25 CEST] <dragmore88> [yuv4mpegpipe @ 0x670f440] Warning: generating non standard YUV stream. Mjpegtools will not work.
[15:26:00 CEST] <dragmore88> anyone know what can be wrong ?
[15:27:01 CEST] <AppleTor> atomnuker I have already installed both 😅
[15:29:06 CEST] <AppleTor> JEEB it's running just fine on my mac, the problem was on my ubuntu machine
[15:29:19 CEST] <JEEB> yes
[15:29:25 CEST] <AppleTor> using it along with youtube-dl
[15:29:28 CEST] <JEEB> exactly that's why you asking about your homebrew config was weird
[15:29:47 CEST] <JEEB> since seemingly your *mac* thing was working JustFine
[15:29:51 CEST] <JEEB> so why ask about that?
[15:30:09 CEST] <AppleTor> i have homebrew installed on my ubuntu too
[15:30:20 CEST] <JEEB> ugh
[15:30:34 CEST] Action: JEEB erases that line from his memory with brain bleach
[15:30:48 CEST] <AppleTor> 😂
[15:32:16 CEST] <AppleTor> ah onemore thing. why ffmpeg with https proxy on ubuntu decoding the chunk link one by one, like literally one by one.
[15:32:48 CEST] <AppleTor> while on my mac it's just downloading smoothly. am i missing something?
[15:36:13 CEST] <AppleTor> MAC:https://pastebin.com/CVuTyMZT Ubuntu: https://pastebin.com/cAbmZ5z7
[15:45:31 CEST] <kepstin> dragmore88: the lines you posted are just warnings, they wouldn't have stopped the ffmpeg command from working. Please pastebin the *complete* output.
[15:50:23 CEST] <dragmore88> kepstin,https://pastebin.com/GguejQ6j
[15:51:26 CEST] <kepstin> dragmore88: "-bash: x265.exe: command not found"
[15:52:52 CEST] <kepstin> there's your problem. ffmpeg exits early because the other end of the pipe it's writing to is disconnected, because the x265 process couldn't be started.
[15:56:33 CEST] <dragmore88> kepstin, ure right! i didnt see that one... its on a linux box.. and my syntax was done on a windoze pc... i just changed it to ./x265 but doest want to use it..
[15:56:57 CEST] <kepstin> assuming you have x265 installed and in the path, it's just "x265"
[15:57:13 CEST] <dragmore88> its there.. both in the same directory and in the global path
[15:57:16 CEST] <kepstin> but why are you running external libx265 anyways? ffmpeg can use the x265 encoder as a library
[15:57:34 CEST] <kepstin> external x265 cli tool*
[15:58:11 CEST] <dragmore88> well.. it was an old syntax from a time half a year ago when one had to use it for hdr
[15:58:18 CEST] <dragmore88> i need to convert it for libx265 now
[16:01:42 CEST] Last message repeated 1 time(s).
[16:01:42 CEST] <dragmore88> kepstin, can u see any wrongdoings in this one then : https://pastebin.com/2B1mKaQU
[16:01:49 CEST] <dragmore88> im getting only audio..?? ;)
[16:02:06 CEST] <sfan5> you have -vn
[16:02:20 CEST] <sfan5> and you'd need to -map the video output too
[16:02:38 CEST] <dragmore88> https://pastebin.com/8EDeDxvy
[16:02:44 CEST] <dragmore88> ah
[16:03:15 CEST] <dragmore88> whats the problem with -vn ?
[16:03:52 CEST] <sfan5> -vn disables video
[16:03:56 CEST] <dragmore88> oh
[16:03:58 CEST] <dragmore88> right
[16:04:53 CEST] <dragmore88> removed that one.. still getting the same problem.. i need to map the video.. never done that before
[16:07:55 CEST] <dragmore88> https://pastebin.com/5ePhUKgy
[16:10:26 CEST] <dragmore88> ./ffmpeg-10bit -loglevel verbose -i "BBC_Short_HDR.mov" -map 0:0 -map 0:1 -pix_fmt yuv422p10le -codec:v libx265 -x265-params "colorprim=bt2020:transfer=smpte-st-2084:colormatrix=bt2020nc:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,10):max-cll=0,0:rc-lookahead=50:keyint=100:min-keyint=50:hrd=1:vbv_maxrate=75000:vbv_bufsize=33000" -crf 18 -force_key_frames "expr:e
[16:10:26 CEST] <dragmore88> q(mod(n,50),0)" -filter_complex "[0:7][0:8]amerge=inputs=2[aout]" -map "[aout]" -c:a aac -q:a 330 -y test1.ts
[16:10:41 CEST] <dragmore88> added a map.. seems to work now
[16:18:52 CEST] <dragmore88> how can i force the ouput as 4:2:0 10bit and 1 stereo aac track.. i got 2 stereo tracks and 422 output.. ?
[16:21:10 CEST] <sfan5> -pixfmt yuv420p10le
[16:21:24 CEST] <sfan5> for audio just remove the filter_complex construct you got there(?)
[16:22:19 CEST] <dragmore88> problem is that for the audio, the source is a prores with a ton of channels.. i need to pick channel 7 and 8, merge em together as a stereo track
[16:23:06 CEST] <dragmore88> 9 PCM tracks
[16:23:10 CEST] <dragmore88> mono
[16:24:17 CEST] <dragmore88> both output audio tracks are stereo
[16:24:22 CEST] <dragmore88> different bitrates..
[16:25:37 CEST] <AppleTor> can't you use map to select which audio you want to use?
[16:26:05 CEST] <AppleTor> i'm not so sure either, never did it before
[16:26:54 CEST] <kepstin> with the -map stuff you have, there should only be a single stereo track output
[16:27:33 CEST] <kepstin> if you use any -map options, ffmpeg will include a single output track for each -map option present
[16:41:52 CEST] <AppleTor> why ffmpeg with https proxy on ubuntu decoding the chunk link one by one, like literally one by one.
[16:41:52 CEST] <AppleTor> while on my mac it's just downloading smoothly. am i missing something?
[16:41:53 CEST] <AppleTor> OUTPUT= MAC: https://pastebin.com/CVuTyMZT Ubuntu: https://pastebin.com/cAbmZ5z7
[16:44:13 CEST] <sfan5> wildly different ffmpeg version
[16:45:03 CEST] <AppleTor> oh right, just noticed that
[16:45:17 CEST] <AppleTor> but wait, the one on my mac is older right?
[16:46:34 CEST] <sfan5> 2.8.1 is older than 4.0 yes
[16:47:14 CEST] <AppleTor> so, should i downgrade the one on my ubuntu machine?
[16:48:08 CEST] <sfan5> why do you even care about which things ffmpeg logs or doesn't
[16:48:45 CEST] <AppleTor> wait, it's just loggin?
[16:48:50 CEST] <sfan5> (the older version is still doing the exact same thing, but doesn't log each chunk)
[16:49:17 CEST] <AppleTor> then why i'm seeing spike at my network traffic
[16:49:23 CEST] <AppleTor> like it's downloading one chunk
[16:49:48 CEST] <AppleTor> then stop, then starting to download another chunk and so on
[16:49:54 CEST] <AppleTor> while on my mac, it's stable
[16:50:19 CEST] <sfan5> ¯\_(Ä)_/¯
[19:25:51 CEST] <DanneDunder> Hey, I'm trying to decode some audio from a videofile, but when I send packet/receive frame I get two EAGAIN's and then a 'Resource temporarily unavailable' , does anyone know what could be wrong?
[19:26:55 CEST] <DanneDunder> EAGAINS from avcodec_receive_frame and 'temp unavailable' from the avcodec_send_packet that is
[19:28:17 CEST] <DanneDunder> It could be that I used the video decoder in receive .__:
[19:29:55 CEST] <atomnuker> multiple EAGAINS are normal, just means you need to send it more packets
[19:35:19 CEST] <DanneDunder> I had the audio_ctx in the send_packet and video_ctx in the receive
[19:48:13 CEST] <dragmore88> anyone know why using this syntax: -map 0:a:0 -c:a aac -b:a 256k -y test1.ts i still get the 2 first audiotracks from a prores files? (i want the first one )
[19:48:31 CEST] <TheWild> hello
[19:48:56 CEST] <ChocolateArmpits> dragmore88, audio tracks or audio channels?
[19:48:57 CEST] <JEEB> dragmore88: that has only one map so it's somewhere else. or you are meaning audio channels and not streams
[19:49:08 CEST] <dragmore88> yea.. i found another map that was redundant
[19:49:20 CEST] <TheWild> surprised just realized today my DVB receiver/recorder records the audio and video... along with teletext streams :O
[19:49:45 CEST] <dragmore88> prores file with 9 pcm "channels" wheres the 2 first are stereo and the last 7 are moni
[19:49:47 CEST] <dragmore88> mono
[19:50:07 CEST] <TheWild> I tried ffplay, but the video is overlayed with insanely-switching teletext pages. How to command ffmpeg to not display teletext?
[19:50:35 CEST] <dragmore88> JEEB, know of any good guides to encode 5.1 AC3 from 6 mono channels in prores?
[19:50:47 CEST] <dragmore88> cherrypicking, id and mapping ?
[19:51:24 CEST] <JEEB> if it was 6 channels it wouldn't be a problem
[19:51:27 CEST] <JEEB> you mean 6 mono streams
[19:51:46 CEST] <JEEB> in which case you have to map them, and then use an audio filter to make 5.1 out of them
[19:52:34 CEST] <TheWild> okay, disabling subtitles (-sn option) helped
[19:53:00 CEST] <JEEB> dragmore88: see https://trac.ffmpeg.org/wiki/AudioChannelManipulation
[19:53:21 CEST] <JEEB> it even has a 6xmono to 5.1 example
[19:53:40 CEST] <dragmore88> JEEB,https://pastebin.com/uw3wCUS4
[19:53:53 CEST] <JEEB> yes, that's N streams
[19:54:00 CEST] <JEEB> all mono except for the last
[19:54:14 CEST] <JEEB> oh, and 0:1 and 0:2 are stereo as well :P
[19:54:16 CEST] <dragmore88> first 2 are stereo
[19:54:24 CEST] <dragmore88> thats what im using now for the aac target
[19:54:31 CEST] <dragmore88> but i wanna create a 5.1 EAC3 track too
[19:54:39 CEST] <JEEB> just see the example
[19:54:45 CEST] <JEEB> I literally just linked you the trac wiki page
[19:54:49 CEST] <dragmore88> i have no idea how the mapping is.. but the example is for external wave files
[19:54:57 CEST] <dragmore88> i need to cherry pick from the prores file
[19:55:07 CEST] <JEEB> it's the same thing. you map and then you set up the audio filter
[19:55:28 CEST] <dragmore88> so -map 0:a:2 -> left etc.. ?
[19:55:28 CEST] <JEEB> or I think you might not even need map
[19:55:48 CEST] <JEEB> in filter_complex you can tell it to just use the mapping values with [] around them
[19:55:56 CEST] <JEEB> [0:a:2]blah
[19:55:58 CEST] <JEEB> for example
[19:56:05 CEST] <dragmore88> ah, thx
[19:56:08 CEST] <dragmore88> ill try later
[19:56:58 CEST] <kepstin> then at the end of the filter, add a named pad like [out51] or something, then you can use 2 -map options: "-map 0:a:0 -map [out51]" to select both the stereo track and the filtered combined track.
[19:57:02 CEST] <kepstin> if that's what you want to do
[20:05:16 CEST] <TheWild> ffplay. How to display current frame number?
[20:05:34 CEST] <JEEB> pretty sure you can't
[20:05:43 CEST] <JEEB> unless you never seek :)
[20:05:55 CEST] <TheWild> drawtext ... text=%{n} does that, but everytime I seek... yeah, JEEB
[20:06:03 CEST] <TheWild> everytime I seek, the count is restarted
[20:06:18 CEST] <TheWild> s**t, and I want to cut something at precise frames
[20:06:19 CEST] <JEEB> yes, because exactly as I noted on #mpv
[20:06:23 CEST] <JEEB> oh
[20:06:25 CEST] <JEEB> you just want preview?
[20:06:32 CEST] <JEEB> use vapoursynth editor and ffms2
[20:06:33 CEST] <JEEB> :P
[20:06:38 CEST] <JEEB> that indexes your input
[20:06:44 CEST] <JEEB> and you get frame-exactness
[20:07:02 CEST] <JEEB> also vapoursynth scripts can of course be fed into an encoder then
[20:07:58 CEST] <JEEB> frame-exact things generally require indexing, and while you can make that *with* FFmpeg (ffms2 does this), FFmpeg's APIs in general are all about A->B
[20:08:36 CEST] <JEEB> basically ffms2 uses FFmpeg's APIs to once go through the whole input and generates an index on things. then it uses that for seeking etc
[20:09:37 CEST] <TheWild> the video needs a TOC somewhat, since one frames require more data, other less.
[20:10:03 CEST] <TheWild> and it's about seeking
[20:10:33 CEST] <JEEB> but yea, vapoursynth editor + ffms2 as an input module for that
[20:10:37 CEST] <JEEB> should give you what you want
[20:11:17 CEST] <TheWild> so when I want to go to frame 152, it finds in the TOC which says "keyframe no is 146 and it's at offset 0x199CE4", or something like that
[20:11:32 CEST] <JEEB> yes
[20:11:36 CEST] <JEEB> ffms2 does that basically
[20:11:56 CEST] <TheWild> okay, let's try vapoursynth + ffms2 then
[20:11:59 CEST] <TheWild> thanks JEEB
[20:13:20 CEST] <kepstin> yeah, the seek index included in files is normally a map from a timestamp to the location of a packet in the file for that timestamp, there's generally no record of frame numbers in the seek index
[20:13:37 CEST] <kepstin> so you need to build an external index if you want that info.
[20:14:13 CEST] <JEEB> well, the sample number is the thing you usually need, and then you have random access point flags in modern containers
[20:14:29 CEST] <JEEB> but then the problem is that FFmpeg is not made to give that info to the API user
[20:14:43 CEST] <JEEB> the API user just cares about A->B and seeking to a timestamp
[20:14:56 CEST] <JEEB> or, well, that's the use cases
[20:14:58 CEST] <JEEB> :)
[20:15:03 CEST] <JEEB> (FFmpeg was designed for)
[20:15:13 CEST] <kepstin> ffmpeg's time based seeking is (in most indexed formats) accurate enough to select a particular frame by timestamp/pts, if you know the timestamp somehow
[20:15:34 CEST] <TheWild> I thought it's: I want to go to 42.5 second * 24 fps = frame no 1020
[20:15:34 CEST] <JEEB> and then it flies way out somewhere with stuff like MPEG-TS :)
[20:15:48 CEST] <JEEB> quite often it's not 24 but 24000/1001
[20:15:56 CEST] <JEEB> but yes, if you have a constant frame
[20:16:11 CEST] <JEEB> you do it generally in that way
[20:16:13 CEST] <TheWild> but hmmm... as I seen one video changing it's resolution "at runtime" then frame rate might not be constant as well
[20:16:40 CEST] <kepstin> pretty much all webcam and cell phone captured video is variable rate, for example (they run slower in lower light conditions, normally)
[20:17:01 CEST] <kepstin> some newer phones might do better i suppose
[20:17:27 CEST] <JEEB> and then there's the granularity of timestamps
[20:17:40 CEST] <kepstin> mkv is fun, because it's normally used with a fixed 1ms timebase, so frame times are rounded rather than exact
[20:17:41 CEST] <JEEB> some containers let you express the timestamps exactly
[20:17:49 CEST] <JEEB> but then others don't
[20:17:57 CEST] <JEEB> kepstin: actually you can bump that up, 1ms is just the default
[20:18:06 CEST] <JEEB> so instead of 1000 you can have 10000
[20:18:18 CEST] <JEEB> (you can't have fractions though)
[20:18:30 CEST] <kepstin> i've never seen any tools use something other than 1000, but yeah, I knew it supported changing to a different power of 10
[20:18:51 CEST] <JEEB> mkvtoolnix lets you pick it I think, but default is what you guess it is
[20:19:44 CEST] <kepstin> i think the pts is a fixed length field? so increasing the timebase reduces the max video length
[20:25:44 CEST] <JEEB> kepstin: that's true with almost any container :)
[20:25:50 CEST] <JEEB> but I think the field's a 64bit int anyways
[20:26:25 CEST] <kepstin> hmm, i thought it was 32, but when I tried looking it up, well, the mkv spec doesn't clearly say
[20:26:33 CEST] <kepstin> maybe I'm just reading it wrong
[20:27:56 CEST] <JEEB> it'd be surprising if any modern container was limited to 32bit, but of course that's possible
[20:28:27 CEST] <JEEB> also the time base is in nanoseconds
[20:28:35 CEST] <JEEB> so what you think of 1/1000 is actually 1000000
[20:30:19 CEST] <JEEB> ok, so you have cluster's timestamp, and then each cluster's packet has a relative timestamp to the cluster
[20:32:01 CEST] <JEEB> kepstin: and yes the data size field is used to note how big the value is
[20:32:59 CEST] <JEEB> and the spec even says at the beginning that both types of integers can be any size from 1 to 8 octets
[20:33:02 CEST] <JEEB> https://matroska.org/technical/specs/index.html
[20:35:10 CEST] <kepstin> hmm, yeah, the cluster stuff just says the timestamp is an 'unsigned integer', i guess that means it's a variable length encoding?
[20:36:17 CEST] <JEEB> yes
[20:36:20 CEST] <JEEB> that's what I was noting :)
[20:36:38 CEST] <JEEB> ctrl+F "The known basic types are"
[20:36:46 CEST] <JEEB> that lists unsigned integer as the second thing
[20:36:55 CEST] <kepstin> the problem is that all of these matroska specs are defined assuming you know ebml
[20:37:04 CEST] <kepstin> rather than just telling you what the binary format is like
[20:37:12 CEST] <JEEB> yea
[20:38:32 CEST] <kepstin> (has anything other than matroska ever even used ebml?)
[20:58:02 CEST] <oliverdain> I'm trying to set crf and a preset in C code. I've tried av_dict_set(&opts, "preset", "medium", 0) with av_dict_set_int(&opts, "crf", 5, 0) before calling avcodec_open2 but that doesn't change anything - that is changing the values of those options doesn't change the resulting file at all
[20:58:23 CEST] <oliverdain> I also tried av_opt_set on my context's priv_data both before and after the call to avcodec_open2 and that also has no effect.
[20:58:35 CEST] <oliverdain> How is one supposed to set these options?
[21:13:59 CEST] <oliverdain> So I checked what's in my AVDictionary after the call to avcodec_open2 and sure enough, preset and crf are in there as unrecognized options. But all the examples I see and the docs seem to indicate I can use them.
[21:33:33 CEST] <oliverdain> I am soooooo confused. I see several official examples from ffmpeg project using preset but when I pass it to avcodec_open2 in the AVDictionary parameter it comes back as an unrecognized option. I'm not really doing anything unusual. Any help would be greatly appreciated.
[21:33:51 CEST] <furq> oliverdain: you're using x264, right
[21:34:22 CEST] <oliverdain> yes. I even have an assert(encoder->id == AV_CODEC_ID_H264)
[21:34:35 CEST] <JEEB> no, that just makes sure you are getting H.264
[21:34:43 CEST] <JEEB> better get the encoder by name
[21:34:45 CEST] <JEEB> if you want x264
[21:34:48 CEST] <JEEB> *libx264
[21:34:58 CEST] <oliverdain> and encoder is the AVCodec that I pass to avcodec_alloc_context3
[21:35:01 CEST] <JEEB> and yes, there are other H.264 encoder wrappers
[21:35:05 CEST] <JEEB> in FFmpeg
[21:35:20 CEST] <JEEB> that may or may not be enabled in your build
[21:35:31 CEST] <oliverdain> JEEB: ahhh -- maybe that's it. We are, in fact, using libx264 on Linux but the native encoder on OSX. These tests were on OSX.
[21:35:58 CEST] <furq> yeah videotoolbox probably doesn't have those options
[21:36:00 CEST] <oliverdain> I didn't realize preset and crf are libx264 specific. the docs implied they were general H.264 options
[21:36:24 CEST] <oliverdain> I see. thanks!
[21:38:01 CEST] <oliverdain> will check encoder->name and set options accordingly.
[21:54:24 CEST] <oliverdain> hmmm... It seems that videotoolbox doesn't have the equivalent of preset and crf. It doesn't seem to have many options at all.
[21:54:24 CEST] <dreamon_> using to create jpgs out of a movie. ffmpeg -i file.mpg -r 1/1 $filename%03d.jpg
[21:54:50 CEST] <dreamon_> my question. the quality is low. what can I do to make it better?
[21:55:03 CEST] <dreamon_> movie plays good quality
[21:58:47 CEST] <dreamon_> ah.. png pics are much better its a jpg thing
[21:59:28 CEST] <JEEB> use the quantizer setting
[21:59:39 CEST] <JEEB> to set how much it tries to compress the JPEG imag
[21:59:47 CEST] <shfil> hi, I'm trying to replace deprecated codec with codecpar, but actually it (after second of play) crashes. It is code: https://github.com/rwengine/openrw/pull/420/commits/aae8f7adc5a49fd5c73e6c18411551d9c451b0c8
[22:01:01 CEST] <JEEB> shfil: I think I have done something similar with a quick look and it worked well except for my own fuck-ups by not handling memory management correctly
[22:01:18 CEST] <JEEB> are you using the old or new decode api?
[22:01:24 CEST] <JEEB> https://www.ffmpeg.org/doxygen/trunk/group__lavc__encdec.html
[22:01:36 CEST] <JEEB> also using a debugger to get a backtrace is a Good Idea
[22:01:45 CEST] <shfil> new
[22:02:09 CEST] <JEEB> (--disable-stripping is btw the command to make the build system not strip things)
[22:02:35 CEST] <dreamon_> JEEB, whats the right option for this?
[22:02:48 CEST] <JEEB> in ffmpeg.c it's -q:v NUMBER
[22:02:54 CEST] <JEEB> where NUMBER is a value you can play with
[22:03:10 CEST] <shfil> asan says it crashes at line of reading from frame "int16_t sample = reinterpret_cast<int16_t *>(frame->data[channel])[i];"
[22:05:02 CEST] <shfil> reading loop: https://github.com/ShFil119/openrw/blob/aae8f7adc5a49fd5c73e6c18411551d9c451b0c8/rwengine/src/audio/SoundManager.cpp#L214
[22:05:34 CEST] <dreamon_> JEEB, Thank you, works great
[22:19:44 CEST] <shfil> yeah, I've found guilty: "codecContext->request_sample_fmt = av_get_alt_sample_fmt(codecContext->sample_fmt, 0);"
[22:20:06 CEST] <shfil> not sure why it causes crashing
[22:20:41 CEST] <JEEB> http://www.ffmpeg.org/doxygen/trunk/group__lavu__sampfmts.html#ga8e66c3f813ea02afcaa56a8a964c749a
[22:21:24 CEST] <shfil> ah, I get it, thanks. ;)
[22:21:35 CEST] <JEEB> note: a useful thing to have in search bookmarks is `site:ffmpeg.org doxygen trunk KEYWORD`
[22:21:54 CEST] <JEEB> trunk being current master, which is the latest state of how things are all going into Mars
[22:22:04 CEST] <JEEB> and thus the documentation is most likely in the best shape there
[22:25:18 CEST] <Lite> Hello! :D
[22:25:36 CEST] <Lite> I
[22:26:22 CEST] <Lite> I faced an issue here and need support... Could somebody help me here?
[22:29:23 CEST] <Lite> Hello GrayShade
[22:31:15 CEST] <Lite> Anybody?
[22:31:57 CEST] <durandal_1707> do not ask to ask!
[22:32:51 CEST] <Lite> I'm sorry, @durandal_1707. Just here first time.
[22:33:21 CEST] <durandal_1707> Lite: so finnaly say what is your issue?
[22:34:49 CEST] <Lite> Well, I faced an issue with my FFmpeg. At my Windows 10 Pro (64 bit). Immediately. I mean before some critical unknown event which became a reason of an issue, it worked fine there.
[22:36:46 CEST] <Lite> 'What's exactly going on?' you will ask me - I will ansswer: it's pretty simple. It stucks and crashes during couple maybe a little bit more minutes after starting any task with "i" parameter
[22:37:16 CEST] <Lite> At the same time, it's working fine other options.
[22:38:34 CEST] <Lite> What I tried to do to solve this is deleting FFmpeg folder totally and reunpack actual version of FFmpeg nightly build.
[22:38:47 CEST] <Lite> Nothing helps
[22:40:50 CEST] <Lite> Today I started task with "i" parameter nad added also "-v 9 -loglevel 99" parameters. Multiplie times. And once it showed that: "Error in the pull function." Before that everything is fine.
[22:41:25 CEST] <durandal_1707> give full uncut ffmpeg output and pastebin it and send link here
[22:41:54 CEST] <Lite> can I do it via GoogleDrive?
[22:42:42 CEST] <Lite> uncut you mean logfile with these "-v 9 -loglevel 99" parameters? or what exactly?
[22:42:50 CEST] <durandal_1707> yes, even images if you do not know otherwise
[22:43:09 CEST] <Lite> Ah ok great. fine.
[22:43:13 CEST] <durandal_1707> Lite: output of ffmpeg command in terminal
[22:43:36 CEST] <durandal_1707> with command itself
[22:43:59 CEST] <Lite> ye ye
[22:44:02 CEST] <Lite> I see
[22:44:13 CEST] <Lite> I will come back in couple mins
[23:00:05 CEST] <Lite> Well, sir @durandal_1707, here you go: HTTPS://Drive.Google.Com:443/uc?id=1h6CyKvQ25ztx9FNo7YBqH-vUyHm4bEt-
[23:00:25 CEST] <Lite> Hope that screenshot is exactly what you requested
[23:03:23 CEST] <Lite> Here at my PC installed, if we talking about codecs, - except K-Lite Codec Pack Mega - XViD codec and DivX Pro Pack
[23:04:16 CEST] <sfan5> protip: you don't need codecs packs in 2018
[23:04:18 CEST] <Lite> What I know about that this issue is my OS issue. Not input URL I'm trying to download issue.
[23:04:35 CEST] <Lite> @protip :O
[23:04:44 CEST] <kepstin> hmm, a tls error. probably something going wrong with the schannel stuff.
[23:04:59 CEST] <Lite> channel?
[23:05:25 CEST] <Lite> HTTPS://Drive.Google.Com:443/uc?id=1h6CyKvQ25ztx9FNo7YBqH-vUyHm4bEt- you found that here is TLS error??
[23:05:27 CEST] <kepstin> this ffmpeg should work fine with local sources, but something is going wrong with trying to read from https
[23:06:11 CEST] <Lite> wait a sec...
[23:06:13 CEST] <Lite> TLS..
[23:07:45 CEST] <kepstin> (as a side note, why are you transcoding the stream to lossless h264 rather than just saving it to disk with -c:v copy?)
[23:08:17 CEST] <kepstin> the output file would be huge, and with -preset placebo it might be too slow for realtime streaming, too
[23:08:45 CEST] <furq> that command is using -c copy
[23:09:04 CEST] <Lite> ah, it's just copied string from notes. It is anyway savings as c:v without additional parameters
[23:09:06 CEST] <kepstin> ... oh, so it is
[23:09:14 CEST] <furq> with that said i don't know why you wouldn't just download the file
[23:09:19 CEST] <kepstin> missed that. the extra parameters there are just being ignored.
[23:09:26 CEST] <furq> oh nvm it's an m3u8
[23:10:25 CEST] <kepstin> Lite: which ffmpeg build is this? zeranoe?
[23:11:07 CEST] <furq> anyway yeah this isn't the full output
[23:11:10 CEST] <Lite> @kepstin, downloaded it today. But it's working fine on another Windows 10 device.
[23:11:13 CEST] <furq> pastebin the output file that -report generated
[23:11:24 CEST] <Lite> And should work same way on mine
[23:12:30 CEST] <Lite> Maybe you could advise me which Windows parameters should I check and where?
[23:13:08 CEST] <Lite> Maybe some service switched off as soon as should be swithed on or so...
[23:14:03 CEST] <Lite> I also tried to give admins right to FFmpeg.exe. Not sure that helped too.
[23:14:54 CEST] <kepstin> Lite: it could be something like missing tls certificates, or something akamai has done on their end. can't really tell without more debugging.
[23:15:53 CEST] <Lite> If the issue doesn't depends on version of FFmpeg (I could totally delete this and install any other - it will be same) , so that's some Windows OS issue
[23:17:08 CEST] <Lite> Are you sure codecs not the reason of the issue?
[23:17:52 CEST] <Lite> Because when I'm updating K-Lite. It requests me it doesn't like some DivX and XViD codecs...
[23:18:14 CEST] <kepstin> Lite: nothing to do with system codecs. ffmpeg does not use system codecs
[23:18:33 CEST] <postmodern> hello, i'm trying to run two video inputs through hstack and then stereo3d, however i'm noticing after 10 minutes one of the video inputs becomes de-synced with the other. I've verified that this is not an issue with the inputs, as I can ffplay them both and not observe any de-sync over time. How would I get started debugging this problem?
[23:18:40 CEST] <kepstin> Lite: maybe give ffmpeg 3.4.2 a try. it uses gnutls rather than schannel, so it might behave differently. https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-3.4.2-win64-static.zip
[23:19:35 CEST] <Lite> OK I will try it as an experiment. Will come back in couple mins
[23:21:19 CEST] <Lite> Actually this situation looks almost like an issue when you staring some process (.Exe) and it stucks at Tasks manager with 0% of usage... Maybe because of antivirus software or so...
[23:21:30 CEST] <Lite> Have no antivirus software for now
[23:21:42 CEST] <Lite> And already for along time
[23:23:00 CEST] <rjp421> can i turn a 5sec mp4 into a loop 5min long?
[23:23:15 CEST] <furq> sure
[23:24:30 CEST] <furq> for i in {1..60}; do printf "file %q\n" foo.mp4; done | ffmpeg -f concat -protocol_whitelist file,pipe -safe 0 -i - -c copy bar.mp4
[23:25:04 CEST] <rjp421> ty
[23:27:02 CEST] <rjp421> worked, neat
[23:29:10 CEST] <GrayShade> Lite: can you paste that command line here?
[23:29:31 CEST] <Lite> cmd?
[23:29:40 CEST] <Lite> what do you mean?
[23:29:56 CEST] <Lite> is PowerShell so much bad?
[23:30:09 CEST] <GrayShade> no, the command you're running, with the URL and all that
[23:30:24 CEST] <GrayShade> I just wanted to try it, though I'm not on Windows and I don't have the same ffmpeg version as you
[23:32:18 CEST] <Lite> No-no. That will be useless. Told before already: downloaded it today. But it's working fine on another Windows 10 device.
[23:36:38 CEST] <Lite> Wow
[23:36:59 CEST] <Lite> 3.4.2 works perfect
[23:37:39 CEST] <Lite> BUT I always used before faced that issue nightly builds
[23:38:46 CEST] <GrayShade> where did you get the other version from?
[23:38:47 CEST] <Lite> And continue using (totally successfully on another device), same OS
[23:39:00 CEST] <Lite> from here lol
[23:39:07 CEST] <GrayShade> the one that doesn't work
[23:39:29 CEST] <Lite> kepstin messaged
[23:39:42 CEST] <GrayShade> not 3.4.2, the one you tried and didn't work
[23:40:06 CEST] <Lite> ah
[23:40:07 CEST] <Lite> se
[23:40:09 CEST] <Lite> sec
[23:40:21 CEST] <GrayShade> kepstin: do you know if gnutls is linked statically or not?
[23:40:25 CEST] <kepstin> GrayShade: i suspect it was just a zeranoe nightly?
[23:40:45 CEST] <kepstin> GrayShade: in static builds, it would be linked statically.
[23:41:15 CEST] <GrayShade> um. do you know if Windows ffmpeg builds are usually statically linked?
[23:41:25 CEST] <Lite> https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20180426-8ea8be5-win64-static.zip
[23:41:32 CEST] <Lite> from here
[23:43:27 CEST] <kepstin> GrayShade: most people get their windows builds from zeranoe, and the default download link there is the static build
[23:43:50 CEST] <kepstin> well, I say "most", but i don't know if that's actually true. Certainly many people do :)
[23:43:53 CEST] <Lite> Moreover, when these nitghtly build worked on that machine fine (before some critical unknown event which became a reason of an issue - as I already told), I downloaded all versions I mean static, shared and dev
[23:44:30 CEST] <Lite> And unpcaked them at FFMPEG folder step by step: static-shared-dev, exchanging files
[23:44:47 CEST] <kepstin> anyways, at some point fairly recently, it looks like zeranoe's builds switched from using statically linked gnutls to using windows built-in schannel support
[23:45:06 CEST] <kepstin> which in at least this one case appears to be problematic?
[23:45:30 CEST] <Lite> Still interested in finding and fixing a reason why they stopped working at this machine. Maybe I did anything wrong. Dunno. But need to fix that
[23:45:30 CEST] <kepstin> it would be nice to see if someone else could reproduce this problem on a different system, I suppose.
[23:45:33 CEST] <GrayShade> but.. "error in the pull function" seems to be a gnutls error message
[23:45:52 CEST] <GrayShade> kepstin: I was wondering if it wasn't loading a random gnutls from PATH
[23:46:01 CEST] <kepstin> oh, i'm wrong
[23:46:07 CEST] <kepstin> looked in the wrong place at the readme
[23:46:11 CEST] <kepstin> it is still using gnutls
[23:46:22 CEST] <GrayShade> (which might explain it working on another computer)
[23:46:26 CEST] <Lite> So, stable 3.4.2 works - nightly stopped working with only "i" parameter
[23:46:41 CEST] <Lite> What is it talking about?
[23:46:49 CEST] <kepstin> the statically linked builds won't ever use gnutls from somewhere else on the system
[23:46:52 CEST] <kepstin> so that's not the problem
[23:46:56 CEST] <Lite> Is it helps to find real reason?
[23:47:06 CEST] <kepstin> i wonder if the gnutls version used in the builds changed
[23:47:22 CEST] <GrayShade> yeah, that's why I asked how it's usually linked
[23:47:53 CEST] <kepstin> hmm, no, latest nightly and 3.4.2 zeranoe readmes both list gnutls 3.5.18
[23:49:06 CEST] <GrayShade> oh, and shared builds still have static gnutls
[23:49:35 CEST] <GrayShade> welp, no idea (:
[23:49:58 CEST] <Lite> Wait, let's back to TLS. Who suggested it's TLS issue and why?
[23:50:44 CEST] <GrayShade> Lite: the error comes from the TLS client used by ffmpeg to connect to https URLs
[23:50:57 CEST] <Lite> As I understand if it was any codecs issue it wasn't going to work (going to fail with all other parameters - not only "i")
[23:51:07 CEST] <Lite> So codecs issue excluded
[23:51:09 CEST] <GrayShade> TLS is the S in HTTPS
[23:51:23 CEST] <GrayShade> it would work with local files or HTTP
[23:51:57 CEST] <Lite> Can you find me some m3u working URL without HTTP to test it?
[23:51:59 CEST] <Lite> :D
[23:52:01 CEST] <Lite> please
[23:53:45 CEST] <Lite> Ah, I will come back in couple mins. need to check something
[23:54:39 CEST] <GrayShade> http://hcmaslov.d-real.sci-nnov.ru/public/mp3/Queen/
[23:54:42 CEST] <GrayShade> pick one from there
[23:55:12 CEST] <GrayShade> and one from here https://www.mfiles.co.uk/mp3-files.htm
[23:58:19 CEST] <Lite> I remember my last nightly build worked without issues in november-december 2017 last time
[23:58:37 CEST] <Lite> ans in ~december it stopped working
[23:59:44 CEST] <Lite> I see I installed Charles 4.3b2 25.12.2017
[23:59:51 CEST] <GrayShade> Well, it might be worth testing the older nightlies to see where exactly thks
[23:59:58 CEST] <Lite> Charles is something like Wireshark and Fiddler
[00:00:00 CEST] --- Fri Apr 27 2018
More information about the Ffmpeg-devel-irc
mailing list