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

burek burek021 at gmail.com
Fri Jul 19 03:05:01 EEST 2019


[01:26:13 CEST] <nine_milli> blb
[03:07:45 CEST] <k-man> how would you suggest I check if libfdk_aac is available as a codec in a bash script ?
[03:13:46 CEST] <furq> ffmpeg -codecs | grep libfdk_aac
[03:13:59 CEST] <furq> i would have said ffmpeg -h encoder=libfdk_aac but that returns 0 for some reason
[03:29:19 CEST] <k-man> furq: yeah, i found the same
[03:29:22 CEST] <k-man> thanks for your help
[04:13:31 CEST] <Henry151> hi folks
[04:13:33 CEST] <Henry151> http://i.imgur.com/OdFa7sn.png
[04:13:49 CEST] <Henry151> anyone know why i'm gettin stuck on this file?
[04:14:57 CEST] <Henry151> that "unknown shorten function -1 speed= 119x" makes me think something is going wrong, like maybe the filename or file path has some weirdness to it that is making it pass part of the file name as an option or something
[04:19:46 CEST] <furq> Henry151: that message is from the shn decoder
[04:19:51 CEST] <furq> so presumably the file is broken in some way
[04:20:38 CEST] <furq> or 52,293 ways
[04:22:39 CEST] <Henry151> hm
[04:22:44 CEST] <Henry151> thank you for the insight
[04:23:27 CEST] <Henry151> i will re-copy the .shn file from one of the backups and try it again. But in the meantime, is there a way I can tell ffmpeg to give an error message and skip on to the next file in that sort of circumstance?
[04:23:53 CEST] <furq> -xerror
[04:24:08 CEST] <Henry151> ok
[04:25:32 CEST] <Henry151> https://termbin.com/piyo this is my command currently, as works.. I am figuring I would modify it to this: https://termbin.com/6cpb loook about right?
[04:26:35 CEST] <Henry151> i want it to exit in such a way that it does not perform the next thing after the next && symbol in bash
[04:26:49 CEST] <Henry151> so.. with an error code or sommat like that
[04:26:49 CEST] <furq> looks ok other than >> won't do anything
[04:26:54 CEST] <furq> you probably want 2>>
[04:27:02 CEST] <Henry151> ah, yep.
[04:27:19 CEST] <Henry151> i wondered why that wasn't doing anything XD
[04:27:22 CEST] <furq> but yeah ffmpeg will exit 1 on error
[04:27:28 CEST] <furq> or >0 anyway
[04:28:01 CEST] <furq> you might also want to use -compression_level 10 for flac, i forget what it defaults to
[04:28:58 CEST] <Henry151> does that impact the audio quality? it's fairly important to maintain maximum audio quality here, to keep my cousin happy
[04:29:08 CEST] <furq> it's flac, it's always lossless
[04:29:13 CEST] <Henry151> oh
[04:29:16 CEST] <furq> it'll take more cpu time though
[04:29:19 CEST] <Henry151> i see
[04:29:22 CEST] <furq> and may not save very much
[04:30:29 CEST] <Henry151> one other thing, i have 8 cpus and this seems to be only using one of them at a time. Maybe I would have to ask in #bash for help with this, but do you know any easy way I could tell it to maybe, work on multiple files at once, one with each processor? or like, 8 threads or something, however you describe that
[04:31:18 CEST] <Henry151> because i have like 2TB+ of files to convert and it seems foolish to be operating at 1/8th the possible speed
[04:31:33 CEST] <Henry151> 8 cpus i mean 8 cores
[04:31:48 CEST] <furq> https://clbin.com/GKhnC
[04:31:49 CEST] <furq> something like that
[04:32:01 CEST] <furq> replace -P4 with however many cores you want to use
[04:32:12 CEST] <Henry151> thank you immensely
[04:34:18 CEST] <furq> definitely don't remove that `exit $?` unless you want to fork bomb yourself
[04:42:42 CEST] <nine_milli> blb
[06:01:09 CEST] <viete> Hello, is there an official repository of mp4 test files to use with FFmpeg? I'm specifically looking for a mp4 file that contains b-frames.
[06:13:14 CEST] <furq> viete: you could just generate one
[06:13:28 CEST] <furq> ffmpeg -f lavfi -i testsrc=d=1 test.mp4
[06:13:35 CEST] <furq> that'll contain h264 bframes
[06:13:43 CEST] <viete> awesome, thanks!
[06:14:17 CEST] <furq> https://samples.ffmpeg.org/
[06:14:30 CEST] <furq> there's also this but it's mostly for broken files or stuff with obscure features
[06:15:30 CEST] <viete> yeah I came across that link and avoid it because the readme said exactly what you said.
[07:21:22 CEST] <nine_milli> blb
[08:49:15 CEST] <ChrisJW> Is there a way to get ffmpeg.exe to print the AVCodecContext info? It would be super handy because I can't get libavcodec to do what I want
[09:06:38 CEST] <JEEB> ChrisJW: I don't think you can do much more than bump verbosity, and for timestamps -debug_ts. if you need custom print-outs you'll have to add av_log lines where you need 'em
[09:07:11 CEST] <ChrisJW> OK JEEB, thanks for the help
[09:07:34 CEST] <JEEB> also if you have general API usage questions they also fit this channel
[09:10:01 CEST] <ChrisJW> I'm trying to get CUDA/NVDEC decoding working. ffmpeg.exe works great, I'll keep battling on my own for a few more hours
[09:10:19 CEST] <JEEB> I think we had some hwdec examples under doc/examples
[09:10:40 CEST] <JEEB> I would guess the nvdec stuff is similar in that it uses one of those hwaccel contexts an you request an nvdec one
[09:12:50 CEST] <ChrisJW> I've been staring at hwaccel examples for a couple of days
[09:14:06 CEST] <ChrisJW> ffmpeg.exe is definitely able to do it, I can see that the GPU is working hard decoding
[09:14:29 CEST] <ChrisJW> I recently found that Task Manager has a "Video Decode" graph which shoots up
[09:14:53 CEST] <JEEB> just make sure whatever you're linking against FFmpeg-wise is actually built against the nvdec headers
[09:15:04 CEST] <JEEB> aka "make sure that yhe hwaccel is enabled"
[09:15:32 CEST] <JEEB> http://git.videolan.org/?p=ffmpeg/nv-codec-headers.git;a=summary
[09:15:33 CEST] <ChrisJW> It took me about a day to get ffmpeg building with support for qsv and cuda on windows
[09:16:01 CEST] <ChrisJW> yea I've got all that done, ffmpeg.exe is able to utilise both qsv and cuda for sure
[09:16:30 CEST] <JEEB> just trying to make sure that you're testing against the same libraries that your ffmpeg.c binary is utilizing :P
[09:16:41 CEST] <JEEB> because that's one of the most common issues, unfortunately
[09:17:17 CEST] <ChrisJW> the ffmpeg logging dumps lots of CUDA success stuff which looks good
[09:17:32 CEST] <ChrisJW> but when it comes to decoding, it crashes because I don't think it has setup the context correctly
[09:18:55 CEST] <ChrisJW> the strange part I notice is when I call avcodec_open2, hw_frames_ctx and hw_device_ctx both get set to nullptr in the context
[09:19:10 CEST] <ChrisJW> I *think* that is my problem, but not sure...
[09:19:54 CEST] <JEEB> looking at the main() of doc/examples/vaapi_transcode.c the first thing you make sure is that you can call av_hwdevice_ctx_create with your API
[09:20:13 CEST] <ChrisJW> yep, definitely do that!
[09:21:27 CEST] <JEEB> anyways, I would check that vaapi transcode example since it's relatively recent and possibly not insane. it's vaapi specific, but it might work by just switching the device context type
[09:22:32 CEST] <JEEB> haven't made API clients myself yet for hwaccel, but building/poking at at least one app that has support for hw decoding :)
[09:22:57 CEST] <ChrisJW> ok thanks for the help
[09:36:03 CEST] <ChrisJW> ok I think the vaapi example has made it fairly clear that my problem is that hw_frames_ctx is null after calling avcodec_open2
[09:36:14 CEST] <ChrisJW> which I think strongly suggest my context isn't setup correctly before I call avcodec_open2
[09:37:06 CEST] <ChrisJW> the example uses avcodec_parameters_to_context to setup the majority of the context which I can't really use because my data is coming over the network
[09:37:25 CEST] <JEEB> yea, when you are using demuxing from lavf you can utilize that
[09:38:41 CEST] <ChrisJW> I think my best chance might be to write a bunch of log statements inside ffmpeg.exe before it calls avcodec_open2 to see what its context looks like
[09:38:51 CEST] <ChrisJW> because I know it's working inside there
[09:40:00 CEST] <ChrisJW> https://github.com/FFmpeg/FFmpeg/blob/master/fftools/ffmpeg.c#L2939
[09:40:07 CEST] <ChrisJW> does that look like the right place to spam AV_LOG?
[10:49:57 CEST] <ChrisJW> yep, ffmpeg.exe doesn't null off the hwaccel pointers surprisingly
[10:50:07 CEST] <ChrisJW> just have to find out which context parameter is different and set it up accordingly
[11:02:10 CEST] <ChrisJW> ok so I wasn't expecting that... it opens the "h264" decoder and still uses hardware acceleration
[11:02:21 CEST] <ChrisJW> I am opening the h264_cuvid decoder, am I not supposed to grab it directly or something?
[11:08:09 CEST] <ChrisJW> o boy I'm decoding on the gpu
[11:08:34 CEST] <ChrisJW> thanks for the support gentlemen, hopefully I can help someone like me in the future!
[11:58:03 CEST] <termos> just found an issue similar to mine https://trac.ffmpeg.org/ticket/7924 but is this even supported by ffmpeg? it seems like the jetson nano GPU is only supported by gstreamer right now
[12:05:51 CEST] <ChrisJW> check the .pc files are in the right place, and PKG_CONFIG_PATH are correct, I had similar problems recently
[13:03:12 CEST] <pk08> hi
[13:03:12 CEST] <pk08> i am made dummy screen in ubuntu server using xserver (https://techoverflow.net/2019/02/23/how-to-run-x-server-using-xserver-xorg-video-dummy-driver-on-ubuntu/)
[13:03:12 CEST] <pk08> but when i play video from ffplay, i am getting this error:
[13:03:12 CEST] <pk08> "Failed to initialize a hardware accelerated renderer: Couldn't find matching render driver"
[13:03:12 CEST] <pk08> am I getting this because of dummy screen or is it because of something else?
[13:03:29 CEST] <pk08> i made dummy screen in ubuntu server using xserver (https://techoverflow.net/2019/02/23/how-to-run-x-server-using-xserver-xorg-video-dummy-driver-on-ubuntu/)
[13:05:35 CEST] <pk08> and when i try to set fullscreen (by pressing 'f' key) its not working
[13:07:19 CEST] <ChrisJW> ffplay uses SDL, which *probably* wants opengl, which may not be available in a dummy xserver, ffplay should fallback to the software renderer I think
[13:08:21 CEST] <pk08> ChrisJW: yes, its fallback to software renderer
[13:09:04 CEST] <pk08> so is there any way to force to use hardware renderer?
[13:09:54 CEST] <ChrisJW> I would say it is unlikely you can get hardware acceleration with your setup
[13:09:56 CEST] <pk08> actually its not hardware but some how we can make fool and use that...
[13:11:05 CEST] <JEEB> you might want to open up what you're actually trying to do :P
[13:11:13 CEST] <JEEB> what led you to the path of trying to do this
[13:12:18 CEST] <pk08> i want to play small videos on signal display
[13:12:31 CEST] <pk08> something like this: "DISPLAY=:0 ffplay -loglevel 40 -i udp://235.1.1.1:1234 -top 0 -left 0 -x 480 -y 270"
[13:12:38 CEST] <pk08> in dummy screen
[13:13:04 CEST] <pk08> and now if i want to make full screen of particular video
[13:13:12 CEST] <pk08> i am not able to make that
[13:13:43 CEST] <pk08> single display*
[13:15:09 CEST] <pk08> JEEB: did you get my problem and what am i trying to achieve?
[13:51:38 CEST] <kepstin> pk08: without  hardware scaler, ffplay can't fullscreen. Try using mpv instead, it might have some fallback code. Alternately, you could use a scale filter to resize the video to you screen size.
[13:56:37 CEST] <pk08> kepstin: thanks, i will try using mpv and i want to make fullscreen run time so scale will not work...
[14:36:56 CEST] <_Vi> How do I build FFMpeg with a patchwork's patch merged? Is there option in patchwork to view the patch as a plaintext diff?
[14:38:56 CEST] <_Vi> Now I see: "download patch | download mbox".
[14:50:14 CEST] <JEEB> curl -L "MBOX_URL" | git am
[14:50:18 CEST] <JEEB> that should apply the mbox
[14:50:49 CEST] <JEEB> if that doesn't work, move to the patch, and utilize git apply instead of git am
[15:49:56 CEST] <ChrisJW> av_hwdevice_ctx_create has a parameter for specifying the "device", is there a function to iterate the possible devices available on the local system?
[15:50:25 CEST] <ChrisJW> For instance if a user has two graphics cards, I might want to use one, or distribute the load accross both
[15:53:46 CEST] <JEEB> I don't think there is
[15:53:58 CEST] <JEEB> the documentation only notes that >  * @param device A type-specific string identifying the device to open.
[15:54:16 CEST] <ChrisJW> Doesn't seem obvious what the format of it is either
[15:54:41 CEST] <JEEB> that is also probably dependant on the actual hwaccel
[15:57:23 CEST] <JEEB> yea, it's just passed to the underlying implementation as a parameter for device_create
[15:57:55 CEST] <JEEB> git grep "device_create" -- libavutil/
[15:57:59 CEST] <JEEB> is the relevant internals
[15:58:39 CEST] <JEEB> for example with cuda it just strtols the value :P
[15:58:39 CEST] <ChrisJW> ok thanks
[15:58:50 CEST] <ChrisJW> exciting stuff...
[15:58:53 CEST] <JEEB> and uses that as the index
[15:59:53 CEST] <ChrisJW> not a comment in sight
[16:00:37 CEST] <ChrisJW> looks like I can call cuDeviceGetCount directly from CUDA API
[16:02:35 CEST] <JEEB> I think with windows graphics the best part is that the UUIDs they use for the stuff are not static :P
[16:02:49 CEST] <JEEB> so in the end I ended up having the user define the name of the GPU
[16:03:16 CEST] Action: JEEB implemented a PoC for GPU selection with d3d11 in mpv
[16:03:48 CEST] <ChrisJW> I feel your pain
[16:04:28 CEST] <ChrisJW> The Windows API is alright in some places, others it was designed by committees
[16:04:42 CEST] <JEEB> d3d11 in general seems quite alright
[16:05:15 CEST] <JEEB> and I guess GPUs became something that can come and go so giving them an ID at plug-in time makes sense
[16:05:26 CEST] <JEEB> and they do export the driver name so not all is lost
[16:05:47 CEST] <ChrisJW> I think network adapter UUIDs are fluid too
[16:06:23 CEST] <ChrisJW> I think Windows just don't guarantee anything, but people rely on it
[16:08:55 CEST] <ChrisJW> now I have to convert to NV12 to RGB, I already have a YUV converter running as a shader, so this hopefully won't be too painful
[16:21:16 CEST] <JEEB> ChrisJW: if you're interested, take a look at libplacebo
[16:21:29 CEST] <JEEB> I think that handles NV12 as well, as well as handles a lot of video rendering
[16:30:18 CEST] <ChrisJW> https://gist.github.com/crearo/0d50442145b63c6c288d1c1675909990
[16:30:21 CEST] <ChrisJW> looks like this might do me
[16:31:59 CEST] <ChrisJW> my next task after CUDA is to get QSV working
[16:32:09 CEST] <ChrisJW> I have a lack of diversity in my computers to even test it
[16:32:29 CEST] <ChrisJW> am I right in my understanding that QSV requires the local machine to be using the IGP?
[16:39:09 CEST] <kepstin> not using, but it has to be enabled (some computers let you enable it when using an external gpu via a bios setting)
[16:42:56 CEST] <ChrisJW> ok thanks
[17:28:55 CEST] <nine_milli> blb
[17:49:49 CEST] <another> nine_milli: could you please stop spamming "blb" every couple of hours? it's getting annoying
[17:54:32 CEST] <AppleTor> anyone know how to merge all vtt links inside m3u8 playlist into a single vtt file?
[17:55:05 CEST] <AppleTor> usually for video it's very easy, just use the copy command
[18:18:11 CEST] <steve___> another: amen
[18:27:46 CEST] <AppleTor> https://stackoverflow.com/questions/54337264/how-to-merge-segmented-webvtt-subtitle-files-and-output-a-single-file similar issue like me, ping me if anyone know how to solve it :)
[19:04:01 CEST] <nine_milli> blb
[19:41:11 CEST] <SpeakerToMeat> Hello room.
[19:41:59 CEST] <SpeakerToMeat> Help me think a second.... if I'm gonna move from 1.85 to 1.77 (flat to 16:9) and 2k -> 720, what shoudl be the best quality? crop first and resize later, or resize frist crop later?
[19:42:06 CEST] <SpeakerToMeat> My instinct says crop frist
[19:42:33 CEST] <SpeakerToMeat> So the extra pixels don't "push" the ones in between unnecessarily... but....
[19:43:14 CEST] <DHE> there is another option. most codecs or containers support specifying an aspect ratio and have client stretch the image to the desired screen aspect ratio regardless of the decoded pixel resolution. is that not acceptable?
[19:43:53 CEST] <DHE> oh, you're also downsampling...
[19:44:08 CEST] <DHE> still, you can do both
[19:47:24 CEST] <SpeakerToMeat> hmmm
[21:39:16 CEST] <nine_milli> blb
[21:45:12 CEST] <steve___> Can someone with ops kick that goofball?
[21:46:37 CEST] <SpeakerToMeat> is 4.1 considered stable?
[21:48:53 CEST] <furq> there isn't really any conception of stable releases
[21:49:02 CEST] <furq> releases are mostly cut to satisfy distro package maintainers
[22:04:53 CEST] <gumnos> According to https://ffmpeg.org/ffmpeg-formats.html#mp3 using -write_id3v1 "is not recommended". Are there details on the degree of "not recommended"?
[22:05:52 CEST] <gumnos> Is this a "might totally hose your file silently" or just a "you're not gonna get all the breadth of tags that ID3v2 offers" or a "if it breaks you get to keep the pieces" sorta un-recommendatation?
[22:06:42 CEST] <c_14> 2nd probably
[22:07:18 CEST] <furq> it says "as its capabilities are very limited, its usage is not recommended"
[22:07:21 CEST] <c_14> It's just old
[22:07:24 CEST] <furq> so yeah, the second one
[22:07:32 CEST] <Mavrik> Also some players will read the wrong one
[22:07:44 CEST] <Mavrik> And then you'll get broken names displaye
[22:07:46 CEST] <Mavrik> *displayed
[22:08:00 CEST] <furq> id3v2 is 21 years old
[22:08:07 CEST] <furq> i think it's safe to assume you don't need legacy support
[22:09:06 CEST] <gumnos> Mavrik: that was part of what had me chasing this: files created with ffmpeg lacked an ID3v1 (all 0xAA chars) so somehow the id3v2(1) CLI utility was reporting no ID3 info even though the file has ID3v2 data at the front.
[22:10:00 CEST] <gumnos> (by "id3v2(1)" I mean http://id3v2.sourceforge.net/ because it could have been a bit confusing there)
[22:11:27 CEST] <gumnos> It's likely more an issue with id3v2(1) than with ffmpeg but I wanted to check if using -write_id3v1 would at least write something useful that id3v2(1) might find
[22:11:46 CEST] <gumnos> Sounds like it's crusty-but-functional. Thanks!
[22:15:51 CEST] <SpeakerToMeat> there's no semi/offitial ffmpeg flatpak/appimage/etc that would save me from havign to upgrade my distro or capture everythign by hand and compile form scratch, no?
[22:16:06 CEST] <furq> https://www.johnvansickle.com/ffmpeg/
[22:16:08 CEST] <furq> there's this
[22:16:13 CEST] <SpeakerToMeat> I'll check, thanks
[22:16:20 CEST] <cehoyos> You could download a binary that a third party kindly offers, see the link
[22:16:25 CEST] <SpeakerToMeat> Though it may be a good idea to move from oldstable anyhow
[22:17:33 CEST] <furq> yes it is
[22:18:10 CEST] <SpeakerToMeat> Those static build look nice, thanks to John for them
[22:18:52 CEST] <relaxed> SpeakerToMeat: you're welcome :)
[22:18:56 CEST] <SpeakerToMeat> I'd thank him in channel but the bugging might outweight the gratitude felt
[22:19:01 CEST] <SpeakerToMeat> Ah good.
[22:19:07 CEST] <SpeakerToMeat> relaxed: Thank you
[22:21:35 CEST] <SpeakerToMeat> One of these days I WILL set up my build though, as I want to test dragging in the blackmagic library, and other things best left unsaid
[22:21:53 CEST] <SpeakerToMeat> But, that would be easier based off a "newer" distro source package than git :/
[22:23:04 CEST] <furq> it'd be exactly the same unless dependencies you want to use have broken their apis in the last two years
[23:22:24 CEST] <Henry151> hi folks
[23:22:46 CEST] <Henry151> i'm using this https://termbin.com/vcek little bash script i built to convert a huge collection of .shn files to .flac
[23:23:04 CEST] <Henry151> it keeps getting stuck like this: http://i.imgur.com/q0dVf94.png
[23:23:42 CEST] <Henry151> I was told if i included the -xerror that it would skip over the affected files and give an exit code higher than 0
[23:23:53 CEST] <Henry151> however, after including -xerror, it is still happening
[23:24:12 CEST] <Henry151> i think perhaps bash is trying again each time?
[23:24:27 CEST] <Henry151> or maybe, that the error is due to dashes in the filename.
[23:24:30 CEST] <Henry151> any ideas?
[23:33:52 CEST] <cehoyos> First idea: Do not paste screenshots, instead paste the console output to make everybody's lifes (including your own?) easier
[23:34:30 CEST] <cehoyos> Second idea: Please provide tab2001-07-18d3t08.shn
[23:34:48 CEST] <Henry151> cehoyos: thanks, one sec and i will do so
[23:41:29 CEST] <Henry151> https://bpaste.net/show/WuOI there's the console output, and i'm moving uploading the .shn file to share that
[23:42:08 CEST] <Henry151> however, it has happened with several .shn files, i've been just skipping over them manually but just want to allow my script to automatically skip over them and leave me an error log or similar so i can go back to them later and try to resolve the problem.
[23:42:24 CEST] <Henry151> https://romp.network/nextcloud/index.php/s/SBEbNP5L36ZmmNo
[23:42:28 CEST] <Henry151> there's the .shn file.
[23:44:36 CEST] <Henry151> i think the problem is a corrupt .shn file.
[23:45:02 CEST] <Henry151> However, I want to simply skip over the corrupt files, log which ones they are, and then later, I will go get fresh copies of them from an earlier backup and try again.
[23:56:18 CEST] <cehoyos> The shorten file is corrupt afaict.
[23:56:44 CEST] <cehoyos> I believe you have to fix your script to not abort if ffmpeg returns an error.
[00:00:00 CEST] --- Fri Jul 19 2019


More information about the Ffmpeg-devel-irc mailing list