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

burek burek at teamnet.rs
Mon Aug 26 03:05:03 EEST 2019


[01:08:55 CEST] <dastan> hello people
[01:09:24 CEST] <dastan> i created a script with ffmpeg and youtube-dl
[01:09:50 CEST] <dastan> The script: https://pastebin.com/RM0cmbNz
[01:09:57 CEST] <DHE> what's it do?
[01:10:21 CEST] <dastan> it takes a youtube link
[01:10:39 CEST] <dastan> get the HLS Link with youtube-dl
[01:10:49 CEST] <dastan> insert in a variable
[01:11:07 CEST] <dastan> and then send a command with FFMPEG
[01:11:10 CEST] <BtbN> Since when does YouTube not use DASH anymore?
[01:11:15 CEST] <dastan> but it gives me an error
[01:11:30 CEST] <BtbN> Same questions from earlier still apply.
[01:11:39 CEST] <DHE> I've seen HLS for live streams, and sometimes videos that were generated from live streams...
[01:11:44 CEST] <DHE> at last historically..
[01:11:47 CEST] <DHE> *least
[01:11:56 CEST] <nicolas17> what does it do *at a higher level*?
[01:12:10 CEST] <BtbN> Also why are you trying to make hls with raw pcm?
[01:12:18 CEST] <BtbN> Why are you not just copying the original data?
[01:12:29 CEST] <BtbN> Why are you not giving any quality parameters to nvenc?
[01:12:49 CEST] <nicolas17> looks like you're converting from HLS to HLS
[01:13:30 CEST] <dastan> i am creating a local cache
[01:13:32 CEST] <BtbN> Also, why are you not just letting youtube-dl download it? That's its job after all.
[01:13:40 CEST] <nicolas17> dastan: why transcode then?
[01:13:53 CEST] <DHE> also youtube-dl will call ffmpeg when it needs help
[01:14:11 CEST] <nicolas17> you're re-encoding the video in undefined quality and uncompressing the audio
[01:14:15 CEST] <FooNess> It's why I have ffmpeg.exe in the same folder as youtube-dl.exe in Windows.
[01:14:33 CEST] <BtbN> youtube-dl.exe oO
[01:14:37 CEST] <BtbN> now that sounds shady
[01:14:40 CEST] <FooNess> ?
[01:14:43 CEST] <BtbN> It
[01:14:46 CEST] <FooNess> It's a Windows binary ...
[01:14:46 CEST] <BtbN> It's a python script.
[01:14:46 CEST] <DHE> there is such thing as py2exe
[01:14:53 CEST] <DHE> last time I used it was... 2004 maybe?
[01:14:54 CEST] <FooNess> .exe is the standard extension for binaries on Windows.
[01:15:01 CEST] <FooNess> Why would it be shady?
[01:15:01 CEST] <dastan> to then insert it in a SDI device with a second ffmpeg process and with a third ffmpeg process i will create a mov video wirh prores, that is the fmate we use in my company
[01:15:01 CEST] <BtbN> It's not a binary though
[01:15:05 CEST] <FooNess> It conveniently invokes it when it needs it to put two "incompatible" codecs together.
[01:15:41 CEST] <dastan> the problem is that i am getting this error and i dont know why
[01:15:48 CEST] <nicolas17> you never said what the error was
[01:15:59 CEST] <FooNess> What is "this error"?
[01:16:07 CEST] <FooNess> I scrolled up and I can't see you discussing an error.
[01:16:09 CEST] <Aerroon> are there any tools that i can feed a video into that will find "weird" frames? ie all red or like >90% pure red or pure green or pure black for multiple seconds
[01:16:19 CEST] <Aerroon> basically, frames that show some kind of encoding or other error
[01:16:41 CEST] <dastan> "No such file or directory".
[01:17:08 CEST] <nicolas17> hlslink=$(echo \"$(youtube-dl -f 95 -g $ylink)\") what the hell is that
[01:17:08 CEST] <FooNess> dastan, can you show the whole input and ouput (use a pastebin)
[01:17:12 CEST] <BtbN> So if you are using the thing you download as a master for transcoding afterwards. There is zero point to transcoding it right there
[01:17:17 CEST] <BtbN> that only kills quality for no good reason
[01:17:20 CEST] <nicolas17> why not hlslink=$(youtube-dl -f 95 -g $ylink)
[01:18:14 CEST] <dastan> i will run the command with my computer, i need to change some things because i dont have nvidia card in my cmputer
[01:18:48 CEST] <BtbN> Again, why are you transcoding at all?
[01:19:07 CEST] <nicolas17> just let youtube-dl download the whole video and then feed that to the rest of your chain
[01:19:08 CEST] <furq> lol
[01:19:11 CEST] <furq> this is going well
[01:19:15 CEST] <BtbN> Specially with nvenc, all that does is wreck quality.
[01:19:47 CEST] <dastan> furq: no, because i want to create a local HLS repository
[01:20:05 CEST] <dastan> i am downloading a the video only to make a local cache
[01:20:08 CEST] <nicolas17> use -c:v copy -c:a copy
[01:20:31 CEST] <dastan> all what i am doing has four months of research and like 100 hours of tests
[01:20:56 CEST] <dastan> does someone saw the error?
[01:21:23 CEST] <nicolas17> why not "hlslink=$(youtube-dl -f 95 -g $ylink)"? maybe that's the problem, you're feeding quote signs to ffmpeg -i
[01:22:27 CEST] <dastan> nicolas, because the HLS link are hughe, and you need to passthrough the hls link with wuotes, if not can get a extrange reaction of ffmpeg, sometimes it works, sometimes not
[01:22:45 CEST] <nicolas17> ffmpeg doesn't interpret quotes
[01:22:46 CEST] <nicolas17> your shell does
[01:22:57 CEST] <nicolas17> but it won't if the quotes are in the variable value
[01:23:22 CEST] <dastan> if i send the command without a script it works fine
[01:23:34 CEST] <nicolas17> you mean if you send ffmpeg -i "https://..."?
[01:23:40 CEST] <dastan> yep
[01:23:42 CEST] <nicolas17> yes because then your shell interprets the quotes
[01:23:43 CEST] <dastan> try it
[01:24:35 CEST] <nicolas17> I guess if you don't use quotes in an interactive shell, the & gets interpreted as backgrounding
[01:25:08 CEST] <analogical> how do I remove the title from an mkv file?
[01:25:31 CEST] <nicolas17> if you want to be safe against symbols and even spaces in the URL (which shouldn't happen), do this https://pastebin.com/Gzq67K8B
[01:25:59 CEST] <dastan> ffmpeg -hide_banner -hwaccel cuvid -c:v h264_cuvid -f hls -i "YOUTUBE-HLS-LINK -c:v h264_nvenc -r 50 -acodec pcm_s16le -ac 2 -ar 48000 -f hls -hls_list_size 0  /home/build/temp/tn/tn.m3u8
[01:26:16 CEST] <dastan> replace the nvenc and cuvid with compatible codecs in your pc
[01:26:48 CEST] <nicolas17> ffmpeg -i "foo" is not the same as ffmpeg -i $var where var contains quotes in its value
[01:26:56 CEST] <dastan> and you can get then HLS link with youtube-dl -f 95 -g "youtube.live-link"
[01:27:55 CEST] <dastan> i have another command
[01:28:02 CEST] <dastan> ffmpeg -hide_banner -hwaccel cuvid -c:v h264_cuvid -f hls -i $(youtube-dl -f 95 -g "https://www.youtube.com/watch?v=-1xif50QMr4") -c:v h264_nvenc -r 50 -c:a pcm_s16le -ac 2 -ar 48000 -f hls -hls_list_size 0 /home/catalan63/Escritorio/m3u8/tn/tn.m3u8
[01:28:22 CEST] <nicolas17> yep that should work too
[01:29:19 CEST] <dastan> this one works fine in the shell, bu when you put in a shellscript sometimes gives errors, and is because the HLS link can have things like && or //
[01:29:59 CEST] <nicolas17> did you even look at my pastebin
[01:30:51 CEST] <dastan> i am accessing right now
[01:30:54 CEST] <Classsic> hi, where can upload images to share here?
[01:31:45 CEST] <dastan> without ()?
[01:32:08 CEST] <nicolas17> without the echo thing
[01:32:34 CEST] <nicolas17> your whole problem is more suitable for #bash tbh :P
[01:32:34 CEST] <dastan> i need the () because i need to send the command to the background
[01:32:56 CEST] <dastan> ok, but i tested without the echo
[01:32:58 CEST] <nicolas17> you're not sending any command to the background in your script
[01:34:11 CEST] <dastan> no in this one, this is a small part of another one that is bigger
[01:36:15 CEST] <dastan> i will try without the echo again
[01:37:52 CEST] <dastan> need to connect to the VPN of my company and i will lost connection with irc
[01:38:05 CEST] <dastan> i come back in a few seconds
[01:39:02 CEST] <nicolas17> furq: at least he got a quick reply and didn't need to highlight everyone
[01:39:05 CEST] <nicolas17> *cough*
[02:12:58 CEST] <Classsic> hi, is there a way to get multiple inputs streams an get only one output streams, only mapped as channel
[02:14:23 CEST] <klaxa> like this? https://trac.ffmpeg.org/wiki/AudioChannelManipulation
[02:15:04 CEST] <Classsic> yes, but I need video
[02:16:05 CEST] <klaxa> you can just use -map then to map multiple video streams into one file
[02:16:34 CEST] <klaxa> your player should then show you that there are two video tracks available and you should be able to switch it
[02:16:57 CEST] <klaxa> like so: ffmpeg -i one.mp4 -i two.mp4 -map 0 -map 1 both.mp4
[02:17:02 CEST] <klaxa> note that this ignores audio channels
[02:17:26 CEST] <klaxa> this would just also add both audio streams as streams in the final video
[02:17:47 CEST] <klaxa> so if both have one video and one audio stream you end up with two video and two audio streams in both.mp4
[02:18:56 CEST] <Classsic> yes, but I need stream ouptut
[02:19:03 CEST] <Classsic> like this: ffmpeg -i  rtmp://localhost/live/grid -i rtmp://localhost/live/grid -vcodec libx264 -f flv rtmp://localhost/live/grid2
[02:19:19 CEST] <Classsic> doesn`t work.
[02:19:35 CEST] <klaxa> flv doesn't support more than one video at once, i guess you want hstack or vstack then
[02:19:59 CEST] <Classsic> but I get problem with video sync
[02:20:18 CEST] <klaxa> yeah i would have thought so
[02:21:13 CEST] <Classsic> yes, I stay looking for a solution, for 3 days, and found some patch, but don´t work very well
[02:22:24 CEST] <klaxa> well, live-streaming, low-latency and synchronization just happen to be some of the hardest things to get right
[02:23:01 CEST] <Classsic> yes, I see :(
[02:25:14 CEST] <Diag> damn
[02:27:33 CEST] <Classsic> my best try was this https://gist.github.com/Classsic/49b00d4e68dc54a342f54a6cffb0823f
[02:41:44 CEST] <Diag> huh, im getting weird framerate shifts with ffmpeg but im not seeing it whine about frames dropped
[02:42:02 CEST] <Classsic> dropping frame 581 from stream 0 at ts 12533548472
[02:42:10 CEST] <Diag> me, not you lol
[02:42:38 CEST] <Classsic> what level log use?
[02:43:02 CEST] <Diag> whatever is normal
[02:44:27 CEST] <Classsic> I get this from verbose level
[02:44:46 CEST] <Classsic> not really, just press + key
[02:49:32 CEST] <Classsic> adding -copytb 1 on the output parameters, is smoother, but still not smooth.
[02:55:54 CEST] <Diag> this is confusing as hell
[02:56:02 CEST] <Diag> http://tyronesbeefarm.com/images/201922ea2b14-0e80-47b6-b56e-0b62a373dcd2.mp4
[02:56:10 CEST] <Diag> it starts off so butter smooth then just goes to hell
[02:58:53 CEST] <Diag> its like its running in and out of sync with the screen
[03:38:47 CEST] <Classsic> somebody have example with -use_wall_clock_as_timestamp?
[04:49:37 CEST] <cpusage> If it states x265 [info]: HEVC encoder version 2.6+13-6b079854e56e
[04:50:06 CEST] <cpusage> does it mean that ffmpeg 4.2 (current stable version) is utilizing x265 v2.6, and not the most recently releases v3.1?
[04:50:50 CEST] <furq> yes
[04:52:03 CEST] <nicolas17> cpusage: I assume it uses whatever x265 you compiled it with... are you using official binaries?
[04:52:16 CEST] <furq> there are no official binaries
[04:52:40 CEST] <cpusage> I just grabbed the most recent stable ffmpeg release
[04:52:51 CEST] <nicolas17> then it's not "ffmpeg 4.2 uses x265 2.6" but "your particular compiled binary of 4.2, wherever you got it, uses x265 2.6" :P
[04:53:16 CEST] <furq> it sure is
[04:53:18 CEST] <cpusage> ffmpeg.org :/
[04:54:16 CEST] <nicolas17> "Linux Static Builds"?
[04:54:23 CEST] <furq> the linux and windows builds both have 3.1
[04:55:56 CEST] <cpusage> hm, that's weird, (currently on win 10)
[04:56:20 CEST] <furq> x265 [info]: HEVC encoder version 3.1+11-de920e0a3183
[04:56:24 CEST] <furq> is what i get with zeranoe 4.2
[04:56:37 CEST] <cpusage> I deleted the old ffmpeg folder and replaced it with 4.2
[04:56:47 CEST] <cpusage> I must have the old binaries somewhere else then
[04:56:59 CEST] <furq> ffmpeg -version
[04:57:54 CEST] <cpusage> yep, it's the old one. can't recall where I placed the binaries then. I was under the impression it was simply located c:\ffmpeg
[04:58:21 CEST] <nicolas17> does modern windows have an equivalent to 'which'? :/
[04:58:37 CEST] <furq> https://www.voidtools.com/faq/
[04:58:39 CEST] <nicolas17> or do you have to check each PATH entry by hand?
[04:58:40 CEST] <cpusage> ffmpeg
[04:58:40 CEST] <furq> no but it has that
[04:59:00 CEST] <furq> which works in msys though
[04:59:48 CEST] <nicolas17> "A fresh install of Windows 10 (about 120,000 files) will take about 1 second to index." wtf how
[05:00:11 CEST] <furq> "Everything" requires administrative privileges for low level read access to NTFS volumes for NTFS indexing.
[05:00:23 CEST] <furq> sadly it only works on ntfs so it's no good for network drives
[05:01:30 CEST] <furq> actually i guess it also works on refs since i ill-advisedly have a refs raid1 in my desktop
[05:02:32 CEST] <cpusage> found it :)  thanks
[05:03:32 CEST] <cpusage> x265 [info]: HEVC encoder version 3.1+11-de920e0a3183
[05:03:38 CEST] <cpusage> :D
[05:04:56 CEST] <cpusage> any idea why I get drop=x , which I assume are dropped frames, when I'm simply transcoding a h264 vid to h265?
[05:05:23 CEST] <cpusage> does it indicate issues with the source (h264)?
[09:27:05 CEST] <poutine> If you were de-packetizing MPEG TS packets into elementary streams, With video PES packets, it can say 0 for the PES packet length in the header, I get that if you see another packet in that PID with PUSI set, that you can assume the last PES packet has been fully assembled, but is there a way to determine that otherwise?
[10:31:33 CEST] <rtwld> hi to all. I've downloaded ffmpeg-git-20190821-amd64-static, and i'd like to ask why there isn't ffplay
[10:48:18 CEST] <durandal_1707> rtwld: you downloaded only source?
[11:02:59 CEST] <rtwld> the static git built
[11:03:23 CEST] <durandal_1707> from where?
[11:04:38 CEST] <rtwld> ffmpeg.org
[11:05:25 CEST] <durandal_1707> ffmpeg.org does not provide binaries
[11:06:02 CEST] <durandal_1707> it just links to another site
[11:06:11 CEST] <rtwld> I must have followed a link. https://johnvansickle.com/ffmpeg/
[11:07:14 CEST] <rtwld> the link was on https://ffmpeg.org/download.html
[11:08:33 CEST] <rtwld> ffplay isn't also in deb-multimedia, is there a reason why they aren't interested in ffplay?
[11:09:18 CEST] <durandal_1707> maybe its hard to do static build with sdl
[11:16:35 CEST] <rtwld> ok, but the deb package of deb-multimedia is not static
[11:18:38 CEST] <BtbN> you#re gonnà hàve to àsk the one who uìlt ìt
[11:21:36 CEST] <durandal_1707> BtbN: why such style?
[11:22:24 CEST] <pink_mist> he's stylish
[11:22:32 CEST] <BtbN> Hexchat on Windows sometimes has some kind of seizure and only a restart fixes it...
[11:23:20 CEST] <durandal_1707> one of easter eggs?
[11:23:52 CEST] <BtbN> Seems more like some weirdness in their input method handling
[11:24:08 CEST] <BtbN> Happens mostly if HexChat is started early during boot
[18:18:04 CEST] <cpusage> Quick question, does anyone know what restrictions this x265 warning is referring to?
[18:18:20 CEST] <cpusage> "limit reference options 2 and 3 are not supported with pmode"
[18:19:36 CEST] <furq> https://x265.readthedocs.io/en/default/cli.html#cmdoption-pmode and https://x265.readthedocs.io/en/default/cli.html#cmdoption-limit-refs
[18:27:06 CEST] <cpusage> furq so I just need to disable limit-refs=0
[18:27:27 CEST] <cpusage> *by
[18:32:13 CEST] <cpusage> :]  (y)  seems right, great
[18:33:16 CEST] <cpusage> is it ill-advised to enable both pmode and pme if cpu utilization is low?
[21:20:48 CEST] <Henry151> hi ffmpeg
[21:22:03 CEST] <Henry151> I am trying to get my command right... I previously pulled all the subtitles out of a bunch of .mkv files, so that i had .mkv and .srt files, and then was able to burn the subtitles in to the videos while converting them to mp4
[21:22:21 CEST] <Henry151> i understand that this should be possible as a single operation; that just copies the subtitles from the mkv to the mp4
[21:22:52 CEST] <JEEB> burn-in and copying are two different things that you can do with subtitles
[21:23:02 CEST] <JEEB> or well, not copying but keeping them as subtitles :P
[21:23:19 CEST] <JEEB> (since mp4 only currnetly supports mov_text aka 3gpp text aka mpeg-4 timed text)
[21:24:12 CEST] <Henry151> ok, so the right way is to pull them out into .srt files, then burn those into the mp4?
[21:24:50 CEST] <JEEB> actually you probably want ASS for the ass filter, but yes. I think the subtitle filter might also take srt but I don't remember that by heart, unfortunately.
[21:24:58 CEST] <Henry151> I couldn't control the font size; I was looking here https://stackoverflow.com/questions/21363334/how-to-add-font-size-in-subtitles-in-ffmpeg-video-filter and tried several times and the subtitles come out with a giant font no matter what i tell it to set the font size to
[21:25:11 CEST] <JEEB> http://ffmpeg.org/ffmpeg-filters.html#ass
[21:25:26 CEST] <JEEB> yes, then you want the ASS filter and utilize ASS subtitle format which contains styles
[21:25:40 CEST] <JEEB> you can then modify the style
[21:26:03 CEST] <Henry151> ok
[21:26:07 CEST] <Henry151> time to try again :)
[21:26:16 CEST] <another> 00018102.png:
[21:26:20 CEST] <another> urg
[21:26:22 CEST] <another> https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo
[21:26:57 CEST] <Henry151> yeah i've spent a bit of time there
[21:27:22 CEST] <another> you can use the subtitles in your mkv file directly
[21:28:07 CEST] <Henry151> how do i do that? I have struggled with that part
[21:28:39 CEST] <another> second example
[21:32:53 CEST] <Henry151> thank you for your guidance, but i'm still stuck here
[21:32:54 CEST] <Henry151> https://termbin.com/ffen
[21:33:08 CEST] <Henry151> [Parsed_subtitles_0 @ 0x556d2675ba80] No filename provided!
[21:33:15 CEST] <Henry151> [AVFilterGraph @ 0x556d2662fbc0] Error initializing filter 'subtitles' with args ''
[21:33:20 CEST] <Henry151> is what i'm getting.
[21:44:35 CEST] <another> hmm.. sounds like a bash error
[21:44:51 CEST] <another> can you run: bash -xv script.sh
[21:45:56 CEST] <Henry151> https://bpaste.net/show/EAuy
[21:49:20 CEST] <Henry151> i think i figured it out with some help from #bash, the filename having the square brackets i think is causing the issue
[21:50:01 CEST] <Henry151> i think i have to make it subtitles=\""$f"\"
[21:50:13 CEST] <Henry151> so that it will put $f inside of double-quotes
[21:55:06 CEST] <Henry151> well it's still not working right. But, I can indeed do it from the command line directly one file at a time, so i think it is a bash issue
[22:02:01 CEST] <Diag> I think i need more ffmpeg flags for using more threads on x264
[22:02:23 CEST] <Diag> I saw lookahead threads
[22:04:46 CEST] <another> Henry151: it's actually an not a bash issue, but an layer 8 one
[22:05:39 CEST] <another> the output you linked does not match the script you posted earlier
[22:05:49 CEST] <Henry151> sorry yes i had tweaked it
[22:05:54 CEST] <another> your issue is here: subtitles="$f":0:2
[22:05:58 CEST] <Henry151> i can run again
[22:06:23 CEST] <another> should be:; subtitles="$f":si=2
[22:06:24 CEST] <another> see https://ffmpeg.org/ffmpeg-all.html#subtitles-1
[22:07:07 CEST] <Henry151> i'm now here: https://bpaste.net/show/ho_r
[22:08:30 CEST] <Henry151> i'm pretty sure it's the square brackets in my filenames screwing things up.
[22:08:38 CEST] <another> no
[22:09:22 CEST] <another> you double double quotes is wrong
[22:09:49 CEST] <Henry151> ah fudge
[22:09:53 CEST] <another> it leads to no quotes around $f which leads to word splitting
[22:09:54 CEST] <Henry151> that's just me floundering around like an idiot
[22:09:58 CEST] <Henry151> https://bpaste.net/show/Rasy
[22:11:25 CEST] <Henry151> seems to do that same thing whether subtitles="$f" or subtitles="$f":si=2
[22:12:21 CEST] <Henry151> someone over in #bash suggested trying the ffmpeg option "-pattern_type none"
[22:12:26 CEST] <Henry151> any merit to that idea?
[22:13:05 CEST] <Diag> Is there any way to tell what the limiting factor is in encoding
[22:13:49 CEST] <another> huh. i stand corrected
[22:14:52 CEST] <another> ah
[22:23:02 CEST] <another> apparently it is indeed the brackets [ ]
[22:23:28 CEST] <another> but not due to globbing as i thought
[22:25:13 CEST] <another> seems the subtitles filter needs those escaped
[22:25:52 CEST] <another> subtitles="\[AnimeKayo\] Kaze ga Tsuyoku Fuiteiru Ep 02 1080p Eng Sub HEVC \[Marshall\].mkv":si=6
[22:26:06 CEST] <another> now how to script that....
[22:28:14 CEST] <Henry151> great, i'll just remove the bracketed parts from the filenames i suppose.. thank you for all your time
[00:00:00 CEST] --- Mon Aug 26 2019


More information about the Ffmpeg-devel-irc mailing list