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

burek burek021 at gmail.com
Thu Apr 12 03:05:01 EEST 2018


[02:17:15 CEST] Action: akkad hunts for the stitching for 3d video. side by side
[06:08:59 CEST] <memo1> hi, im capturing video from a h265 video camara.  With ffmpeg without transcoding, (for h264 video) i use -segement format mp4.  For h265, what should i use?
[07:00:17 CEST] <psyk> hey guys just tried doing @world update, ffmpeg failed with this: ERROR: opencl must be installed and version must be 1.2 or compatible  <- uh... i don't even see opencl on the system?  just a virtual pkg?  what's the deal here this probably already came up right?
[07:12:21 CEST] <psyk> here is the build output.. https://dpaste.de/gB1C
[08:37:23 CEST] <axew3> hello cool people, sorry this not sklled guy, i have a problem passing direct input from javascript, base_64 decoded by php then passed to ffmpeg: on php exec it return me: PHP Warning:  exec(): NULL byte detected. Possible attack in ... i just pass the input with something like this, that maybe isn't the right way: if( $out = exec("ffmpeg -i $stream -y -c:v libx264 F:\\testwwwewewe.mp4 2>&1"))
[08:38:47 CEST] <axew3> if i pass to it a created file .ogg or webm it work, but in this way, passing direct input not work
[08:39:01 CEST] <axew3> what's wrong?
[09:25:47 CEST] <axew3> if i pass $fl = -i blob:http://192.168.1.8/f0348c14-6d24-42b2-bcdf-2af4bf6ca735' it work another time, but i can't pass the direct stream ... i will try further more
[11:36:57 CEST] <JonG_> When using CUVID hardware acceleration, I was expecting: `ffmpeg -hwaccel cuvid -vsync 0 -i input.mp4 -c:v h264_nvenc -preset medium -c:a aac output.mp4` to automatically detect that it should use e.g. `h264_cuvid` or `hevc_cuvid` for the input codec, if possible. Instead it defaults to `h264` or `hevc`. I need to specify e.g. `-c:v h264_cuvid input.mp4` to use hardware decoding (which works fine). Is that intended? Or am I missing so
[12:44:13 CEST] <circ-user-B8SpV> hello there, i have a question: i have sometimes little corruption video (.ts) after streaming over udp on localhost port. What is a cause of it? Is there any option to overcome this problem over udp? I wonder because it is via local port so there could no be any delays and miss-matches?   My feed is from goPro Cam 60HZ 1080p in h264_qsv: ffmpeg -I <input> -c:v h264_qsv -c:a aac -strict -2 -q:v 20  -look_ahead 0 -preset ve
[14:50:08 CEST] <jubalh> hi
[14:51:49 CEST] <jubalh> so a quick question: i'm not very knowledgeable in video/audio things. I'm trying to download a video from vimeo so i can watch it on a a long bus ride. so i checked the firefox network traffic. saw that it loads segment-x.m4s, downloaded all of those. used `cat` to append it all together. and then used `ffmpeg -i all.m4s -c copy out.mp4` now i have sound, but no video. what did i do wrong?
[14:53:25 CEST] <kepstin> jubalh: I wouldn't be surprised if vimeo has separate streams for audio vs. video
[14:53:50 CEST] <kepstin> jubalh: you should probably use 'youtube-dl' tool instead, it knows how to download complete videos from many sites including vimeo
[14:54:27 CEST] <jubalh> kepstin: unfortunately for this site the youtube-dl tool doesnt work
[14:54:41 CEST] <jubalh> it looks a bit different than a usual vimeo video
[14:54:50 CEST] <jubalh> the layout of the page i mean
[14:55:07 CEST] <jubalh> kepstin: shouldnt i be able to see the video streams in the FF network traffic too?
[14:55:38 CEST] <kepstin> no idea.
[14:58:23 CEST] <kepstin> either way, talking the the youtube-dl folks would probably be a good start - they do this sort of reverse engineering stuff regularly. (and it's not really an ffmpeg issue)
[14:59:42 CEST] <kepstin> also, try playing some individual segment files to see if any do contain video. You might have to do something like separately concat all the audio segments into one file and video into another file before combining them into a single file with ffmpeg.
[15:01:37 CEST] <jubalh> okay, i will try
[15:01:40 CEST] <jubalh> thanks
[15:02:13 CEST] <furq> jubalh: what error do you get with youtube-dl
[15:04:10 CEST] <jubalh> furq:  Cannot download embed-only video without embedding URL. Please call youtube-dl with the URL of the page that embeds this video.
[15:05:56 CEST] <furq> try it with the embed player url
[15:06:13 CEST] <furq> https://player.vimeo.com/video/xxxxx
[15:07:10 CEST] <furq> you might need to set --referer as well
[15:08:54 CEST] <jubalh> furq: doesnt work: Because of its privacy settings, this video cannot be played here.
[15:10:45 CEST] <jubalh> in any case i only see m4s, json and html transmitted
[15:18:16 CEST] <jubalh> kepstin: where could i ge thold of the youtube-dl guys? not sure if this is a case for an issue on their github
[15:19:21 CEST] <furq> #youtube-dl
[15:20:44 CEST] <jubalh> hehe :)
[15:28:24 CEST] <dragmore88> anyone know if i can use ffprobe to parse a HEVC file to check if its got HRD parameters enabled or not ?
[15:29:09 CEST] <JEEB> I think it might show it in the stream info, but I'm not sure
[15:29:19 CEST] <JEEB> also there's a bit stream parser that you can utilize with ffmpeg.c
[15:29:29 CEST] <JEEB> for AVC, HEVC and MPEG-2 Video
[15:31:38 CEST] <dragmore88> thx, ill try that now
[15:32:22 CEST] <JEEB> https://www.ffmpeg.org/ffmpeg-all.html#trace_005fheaders
[15:32:27 CEST] <JEEB> I think it seems like was this
[15:33:32 CEST] <dragmore88> so : ffprobe -v error -show_format -show_streams -trace_headers input.mp4 ?
[15:47:23 CEST] <JEEB> dragmore88: if trace_headers works like that...
[15:47:26 CEST] <JEEB> it's a BSF
[15:47:57 CEST] <JEEB> doesn't seem to be there so you'd have to use ffmpeg.c
[15:50:18 CEST] <dragmore88> ok
[18:02:33 CEST] <teratorn> kepstin: yesterday you suggested I could fix my SAR issue by scaling in one direction depending on the SAR... but uh the last example of the 'scale' filter documentation shows how to get square pixels, and it always scales the width only.. do you see that being an issue?
[18:02:53 CEST] <kepstin> teratorn: it depends what you want the final video resolution to me
[18:02:55 CEST] <kepstin> to be*
[18:04:00 CEST] <teratorn> yeah, I don't have a fixed target... it's the minimum size frame that is 16:9 which the input frames will fit inside (they get padded to fit exactly)
[18:04:03 CEST] <kepstin> e.g. if your target is 1920x1080, and you have input video with 1920x1080 sar 1.5:1 scaling width will give you 2880x1080 - when it would be better to have 1920x720 then pad to 1920x1080
[18:04:50 CEST] <teratorn> ok well, yeah, I do calculate my final frame size ahead of time, so I guess I can do this...
[18:05:00 CEST] <teratorn> thanks!
[18:06:30 CEST] <bencoh> did you just say "pad to 1080" ? :/
[18:06:45 CEST] <bencoh> like, black bars and stuff? :(
[18:07:33 CEST] <bencoh> ohwell nevermind
[18:08:15 CEST] <furq> bencoh: he needs to concat videos together
[18:08:27 CEST] <bencoh> Ha ...
[18:12:26 CEST] <HWJ> I have nearly 3000 mp4 and m4a fragments downloaded by youtube-dl. How can I join these in to one mp4 file with video and sound? Many thanks for a hint.
[18:16:03 CEST] <JEEB> if it's fragmented ISOBMFF
[18:16:09 CEST] <JEEB> concatenate them beginning with the init segment
[18:16:13 CEST] <JEEB> and then the rest after that
[18:16:21 CEST] <JEEB> on *nix you can just use "cat"
[18:17:58 CEST] <HWJ> @JEEB What is an init segment?  I am on Linux. Which files should be concatenated?
[18:18:43 CEST] <JEEB> the init segment is what is marked as such in the playlist from which you got the segments
[18:18:48 CEST] <JEEB> or can you play any of the mp4 files?
[18:18:52 CEST] <JEEB> with video
[18:19:04 CEST] <JEEB> the init segment is generally a global "header" which is needed to initialize the decoder properly
[18:21:27 CEST] <teratorn> kepstin: are you suggesting that if my pixels are fatter than they are tall, I should scale height only, or otherwise scale width only?
[18:21:42 CEST] <teratorn> the actual algorithm I need is hurting my head :(
[18:22:03 CEST] <HWJ> Where do I get such a "header" from. I have no playlist, just thousands of *.mp4-Frag* and *.m4a-Frag* files. I can play the video segments with vlc or mpv.
[18:22:33 CEST] <kepstin> teratorn: if the video's input dar is wider than your output dar, scale by width. if your video's input dar is taller than your output dar, scale by height.
[18:22:34 CEST] <JEEB> ok, then the header is in each
[18:22:46 CEST] <JEEB> HWJ: then you should be able to just concatenate the video segments together
[18:22:53 CEST] <JEEB> and get one full video
[18:23:51 CEST] <teratorn> kepstin: ahhh, thx
[18:23:51 CEST] <kepstin> teratorn: you might end up scaling both height and width, of course.
[18:24:43 CEST] <kepstin> "scale by width" means "set the scale width to the output width, then set the scale height to the value that gives you 1:1 sar given that width"
[18:26:36 CEST] <HWJ> @JEEB When I try to play the file generated by 'cat', I get [ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Failed to add index entry
[18:26:52 CEST] <teratorn> I don't know what my target res is until I've calculated what all my input frame sizes are (the target res is the smallest 16:9 frame that fits them)
[18:28:25 CEST] <teratorn> well I know my output DAR is 16:9
[18:28:30 CEST] <teratorn> ok... :)
[19:07:59 CEST] <acresearch> is it possible to live stream with ffmpeg?
[19:47:00 CEST] <DHE> acresearch: yes, but ffmpeg itself isn't going to be the one clients connect to. run some streaming server (nginx-rtmp is popular, or an HTTP-based service with a static content HTTP server) and have ffmpeg feed it
[19:48:21 CEST] <kepstin> you can also use ffmpeg as a source to drive an external streaming site like twitch or youtube
[19:48:34 CEST] <acresearch> kepstin: ohhhh nice
[19:48:47 CEST] <acresearch> i want to know how i can do that, i stream on twitch but i use OBS
[19:49:16 CEST] <teratorn> acresearch: I doubt ffmpeg will give you teh same performance as OBS
[19:49:26 CEST] <kepstin> for many use cases, obs is a better option - it has easier to use compositing, and better performing screen capture
[19:49:37 CEST] <teratorn> but I would love to find out how it works for you
[19:49:52 CEST] <acresearch> i see
[19:49:52 CEST] <DHE> all I heard was "ffmpeg needs to incorporate the screen capture functionality of obs" :)
[19:50:06 CEST] <teratorn> DHE: right :)
[19:50:31 CEST] <atomnuker> teratorn: it'll be faster than obs on linux if you use kmsgrab
[19:50:39 CEST] <atomnuker> 0% cpu streaming is possible
[19:50:51 CEST] <atomnuker> with overlay no less
[19:51:12 CEST] <acresearch> wow
[19:52:26 CEST] <teratorn> intersting
[19:54:06 CEST] <kepstin> well, not *exactly* 0%, you still gotta mux and do networking and stuff :)
[19:54:09 CEST] <kepstin> but close enough.
[19:54:23 CEST] <acresearch> i have to restart my computer  brbr
[20:44:18 CEST] <akkad> if you have a monoscopic 3d video file with the two fish eyes, is there anyway to stitch them together?
[20:50:03 CEST] <kepstin> I think google's been doing some research on that? :)
[21:02:59 CEST] <akkad> yeah lmgtfy.com did not work for me
[21:23:29 CEST] <degenerate> Hey guys, is there any way, i can speed up this fmmpeg processing time? example command: ffmpeg -i no-audio.mp4 -filter_complex "crop=w=iw:h=1440:x=0:y=n*(ih-oh)/(7243), pad=2559:1440:(ow-iw)/2:(oh-ih)/2:black" -r 30 test.mp4
[21:24:45 CEST] <degenerate> would this type of command benefit at all from GPU ?
[21:25:23 CEST] <atomnuker> not unless the frames are on the gpu
[21:26:13 CEST] <degenerate> not sure i follow what you mean. the input is a video uploaded to my server.
[21:26:29 CEST] <kepstin> you're not setting an encoder specifically, but it's probably defaulting to using x264. There's a bunch of tuning options for that which can make it run faster, but lower encoding efficiency.
[21:29:04 CEST] <ChocolateArmpits> degenerate, try -preset veryfast
[21:31:04 CEST] <degenerate> thanks!
[21:31:25 CEST] <degenerate> just tried ultrafast before you suggested that and it seems like it dropped an keyframe
[21:32:14 CEST] <degenerate> nevermind it was my crappy input
[21:38:45 CEST] <degenerate> i literally cannot see the difference between the results that fast, veryfast, and ultrafast produce.  Does this depend on the input video a bit? i.e. if the input video was very poor quality would this have a bigger impact?
[21:39:10 CEST] <degenerate> but there is a significant speed increase, 1.x with fast, 3.x with veryfast, 5.5x with ultrafast
[21:39:35 CEST] <ChocolateArmpits> degenerate, video quality should visibly drop if you used same bitrate
[21:39:44 CEST] <ChocolateArmpits> for each preset
[21:40:02 CEST] <kepstin> you aren't setting any other options, so it's using -crf 23 (iirc)
[21:40:22 CEST] <kepstin> which should give fairly similar quality when changing presets, but the file will probably be larger with faster presets
[21:41:00 CEST] <ChocolateArmpits> each preset toggles different settings, ultrafast dropping a lot of efficiency for speed
[21:42:14 CEST] <furq> 20:40:22 ( kepstin) which should give fairly similar quality when changing presets, but the file will probably be larger with faster presets
[21:42:17 CEST] <furq> uhh
[21:42:43 CEST] <degenerate> im getting the oposite
[21:42:48 CEST] <degenerate> bigger files at lower preset settings
[21:42:58 CEST] <degenerate> but i must be blind or something i see very very little difference in quality if at all.
[21:44:02 CEST] <furq> you should be able to see the difference between ultrafast and fast at crf 23
[21:44:07 CEST] <furq> ultrafast turns pretty much everything off
[22:24:18 CEST] <kupi> hi
[22:24:59 CEST] <kupi> how can I convert x265 10bit to 8bit?
[22:25:11 CEST] <kupi> loselessly?
[22:25:31 CEST] <kupi> i mean loseless with no visible difference on a 8bit screen
[22:31:47 CEST] <DHE> kupi: you can't. there's automatically some colour precision loss, and a transcode is required which will result in some quality degradation unless you request lossless mode (which is nuts by itself)
[22:32:26 CEST] <klaxa> "no visible difference" is highly subjective
[22:32:41 CEST] <klaxa> my dad probably can't tell the difference between x264 crf 23 and 18
[22:33:34 CEST] <kupi> DHE: I mean that by having the same color data with the original and the new on a 8bit screen
[22:33:59 CEST] <kupi> I don't want to have it looking worse than the original on a 8bit screen
[22:34:37 CEST] <klaxa> no can do, best bet is re-encode samples for quality-checks and then re-encode the while file
[22:34:41 CEST] <klaxa> *whole
[22:35:22 CEST] <kupi> can I specify the max file size?
[22:36:01 CEST] <klaxa> with two-pass encoding i think, not really "state-of-the-art" since x264 though
[22:45:09 CEST] <kepstin> if you specify file size, the encoder will pick a quality level needed to get that file size as close as possible
[22:45:24 CEST] <kepstin> so you get predictable filesize, less predictable quality level
[22:45:59 CEST] <kepstin> alternately, x264 lets you specify a quality level to maintain through the encode - then you get predictable quality level, and less predictable file size
[22:47:48 CEST] <TheAMM> Is there some built-in way to have a minimum-difference for paletteuse?
[22:48:01 CEST] <TheAMM> Badly worded, but you know the old gif deal https://cdn.discordapp.com/attachments/96953853034926080/433729103435268099/unknown.png
[22:48:55 CEST] <TheAMM> Tiny changes in lossly video (which you won't normally notice) being added on the frame diffs
[22:49:22 CEST] <kepstin> the paletteuse filter has a few selectable dithering modes, and an option to try to minimize the area updated, but it sounds like you want a threshold of difference needed before triggering an update?
[22:49:49 CEST] <kepstin> there might be something you can do by pre-processing the frames with noise removal filters, but nothing builtin atm.
[22:52:34 CEST] <TheAMM> Yes, threshold, that's the word
[22:53:15 CEST] <TheAMM> I'll see if any of the denoisers have nice easy results
[22:53:49 CEST] <TheAMM> (this is just "hmm what if" experimenting, doesn't matter if I can't make nice gifs in 2018)
[22:54:18 CEST] <kepstin> i mean, it probably wouldn't be that hard to add some sort of thresholding to the filter, of course.
[23:16:08 CEST] <teratorn> If I scale maintaining the same pixel aspect ratio, I should still end up with an output that has the same SAR and DAR right?
[23:16:42 CEST] <kepstin> sar is the same thing as pixel aspect ratio
[23:17:00 CEST] <kepstin> so yes
[23:17:03 CEST] <teratorn> ok I said it wrong
[23:17:12 CEST] <teratorn> I just meant I'm keeping the X/Y ratio the same
[23:18:00 CEST] <kepstin> the scale filter *may* adjust the sar slightly depending on rounding in that case, but it should be close.
[23:19:52 CEST] <kepstin> the dar will be preserved, and the sar will be recalculated from the dar and frame width/height values.
[23:20:14 CEST] <teratorn> kepstin: perfect, I'll just have to setsar=1/1 after I'm done
[23:20:55 CEST] <kepstin> teratorn: yeah, if you decide to just not worry about minor rounding errors, that'll work great.
[00:00:00 CEST] --- Thu Apr 12 2018


More information about the Ffmpeg-devel-irc mailing list