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

burek burek021 at gmail.com
Tue Apr 10 03:05:02 EEST 2018


[00:59:34 CEST] <ArsenArsen> How do I get the codec I need for a file based on it's extension?
[01:00:24 CEST] <ArsenArsen> (in C)
[01:02:26 CEST] <JEEB> you can't look it up by just the extension since many media formats are containers
[01:02:46 CEST] <JEEB> but you can use the libavformat APIs to find out what the container is as well as which streams it contains
[01:02:59 CEST] <JEEB> see the demuxing example under docs/examples in the FFmpeg repository
[01:03:20 CEST] <JEEB> you can roll over the streams after opening and probing/finding the informat of the file
[01:04:16 CEST] <kepstin> ArsenArsen: in general you should use avformat_open_input, which will automatically detect the format to use, then avformat_find_stream_info which probes what streams are present in the file and what codecs they use
[01:04:33 CEST] <JEEB> yup, those are specifical APIs
[01:05:35 CEST] <kepstin> that's if you're reading a file, of course. If you're writing a file it's different.
[01:07:48 CEST] <kepstin> for writing a file, av_guess_format will pick a format based on filename/extension/etc., and av_guess_codec will give you the default codecs for that format (although with most formats there are additional codecs supported other than the defaults)
[01:09:51 CEST] <ArsenArsen> kepstin, for writing files
[01:09:58 CEST] <ArsenArsen> oh oops, I didnt see the second part, sorry
[01:11:15 CEST] <ArsenArsen> SO, I'd use avformat_alloc_output_context2 and av_guess_codec to get the default codec for a filename I have?
[01:18:06 CEST] <kepstin> yeah, that should do it.
[01:18:22 CEST] <ArsenArsen> aight, gonna try it, thanks
[01:19:31 CEST] <Li> I asked earlier ...
[01:19:37 CEST] <Li> what cvlc command on linux to turn /dev/video0 to form possible to embed within html src of a video tag?
[01:19:42 CEST] <Li> viewer of the page will over ethernet will be looking through a video camera connected to another machine served over http
[01:20:23 CEST] <Li> suggest to use hls, javascript and flash but I want to create a bit more functionality
[01:21:01 CEST] <Li> authorization to login and use the camera remotely
[01:21:18 CEST] <Li> recording and uploading footage remotely
[01:22:10 CEST] <ArsenArsen> kepstin, avformat_find_stream_info seems to not be cooperating with x11grab, I might be doing something wrong though
[01:22:14 CEST] <Li> so I'm wondering again if ffmpeg is capable of providing such features within its streaming function
[01:23:35 CEST] <kepstin> Li: no, you'd want to build a separate web application to perform authentication, and manage stream permissions in whatever webserver you're using to serve the HLS segments
[01:24:07 CEST] <kepstin> Li: for this use case ffmpeg isn't streaming anything out by itself at all, it's relying on a separate webserver to do that
[01:24:59 CEST] <DHE> ffmpeg is not a mass streaming application. it can feed a server that does it
[01:25:51 CEST] <ArsenArsen> just make sure you don't make an ffmpeg instance per stream
[01:25:55 CEST] <ArsenArsen> that'd probably be unwanted
[01:26:51 CEST] <zumba_addict> can I still make a nice slow motion if my source media was recorded in 24fps?
[01:27:14 CEST] <ArsenArsen> nope
[01:27:16 CEST] <DHE> HLS and DASH are nice because a simple apache server with defaults can be used to serve it to users.
[01:27:33 CEST] <kepstin> zumba_addict: you could try using minterpolate, but the results will probably be kinda meh.
[01:27:36 CEST] <ArsenArsen> slow mo means increasing the time base, and with lower framerates, that just makes choppy videos
[01:27:43 CEST] <zumba_addict> thanks kepstin
[01:28:05 CEST] <Cracki> advanced slow motion algorithms use optical flow to interpolate new frames
[01:28:23 CEST] <Cracki> even some deinterlacing filters use optical flow
[01:28:25 CEST] <ArsenArsen> ah
[01:28:31 CEST] <ArsenArsen> new fangled tech
[01:28:53 CEST] <zumba_addict> i'd like to achieve something similar to sports capture where someone runs very fast and once he's about this step on a puddle, the video is slowed down in a very nice smooth way
[01:28:55 CEST] <Cracki> eh, been around for a decade at least, but commercially (adobe) only recently got acceptable quality
[01:29:14 CEST] <Cracki> hah better use some NLE program for that
[01:29:29 CEST] <zumba_addict> can ffmpeg do that or do I need another tool?
[01:29:36 CEST] <ArsenArsen> prob. another tool
[01:29:45 CEST] <atomnuker> you can use minterpolate
[01:29:50 CEST] <atomnuker> the filter
[01:29:56 CEST] <Cracki> found this too https://github.com/dthpham/butterflow
[01:29:57 CEST] <zumba_addict> ok, i'll check it out
[01:29:59 CEST] <Li> ArsenArsen: I'm using it to stream camera on rPi to only one connect machine
[01:30:05 CEST] <ArsenArsen> wait it's n ffmpeg?
[01:30:15 CEST] <Cracki> https://ffmpeg.org/ffmpeg-filters.html#minterpolate
[01:30:18 CEST] <Li> kepstin: what do you mean by "separate webserver"?
[01:30:24 CEST] <Cracki> minterpolate is standard
[01:30:31 CEST] <Cracki> and it does motion interpolation
[01:30:34 CEST] <ArsenArsen> ffserver Li?
[01:30:43 CEST] <ArsenArsen> you could use it and reverse proxy it with nginx
[01:31:09 CEST] <Li> I saw examples for ffmpeg opening ports itself but I'm not sure if webserver included within or do I have to install apache2
[01:31:34 CEST] <ArsenArsen> ffserver might do it
[01:32:10 CEST] <Li> ArsenArsen: so ffserver is streams camera to webapp?
[01:32:30 CEST] <ArsenArsen> ffserver is a http server
[01:32:51 CEST] <ArsenArsen> you'd probably want to reverse proxy it if you're adding some more content to the server
[01:33:06 CEST] <ArsenArsen> if you're on linux or mac you could read it's manual: man ffserver
[01:34:20 CEST] <zumba_addict> wow, the butterflow tool is phenomenal!
[01:35:17 CEST] <Li> ArsenArsen: Ok, I saw this syntax before but it didn't make any sense to me. now that you mentioned ffserver I see this example explains it https://organicdesign.nz/Simple_video_streaming_with_ffserver
[01:35:39 CEST] <Li> both ffmpeg and ffserver should be tailored together to achieve this solution
[01:36:04 CEST] <ArsenArsen> dunno, I'm just bouncing ideas :)
[01:36:18 CEST] <zumba_addict> another question. I used vf scale=3840 the other day to make a 4k from a 1080p video. It looked decent. Is there a way we can make it a little sharper?
[01:36:38 CEST] <Li> ArsenArsen: the point is, I was wondering if I can use apache instead of ffserver to provide this part of the syntax http://localhost:8090/feed1.ffm
[01:36:44 CEST] <zumba_addict> This was the command i used - ffmpeg -i sunsetsept27.mp4 -vf scale=3840:-1 new.mp4
[01:36:51 CEST] <ArsenArsen> there's some new neural network based thing, but again, youre pulling data out of nowhere, it won't look too well
[01:37:04 CEST] <ArsenArsen> you could reverse proxy ffserver from apache
[01:39:00 CEST] <zumba_addict> another question. Do you folks know of a tool that can help with identifying media type of a file?
[01:40:10 CEST] <zumba_addict> the video stream comes from a panasonic g7 camera. The info I gathered about this camera says it's an mjpeg
[01:40:31 CEST] <ArsenArsen> what exactly do you want
[01:40:36 CEST] <ArsenArsen> like, what data
[01:40:47 CEST] <zumba_addict> however, I tried playing the mjpeg saved it as mp4 and used mplayer, didn't play well
[01:40:56 CEST] <zumba_addict> I want to play it
[01:41:20 CEST] <ArsenArsen> mjpeg isnt mp4 though
[01:41:24 CEST] <zumba_addict> I am able to control my panasonic camera using http calls. It starts streaming to my machine using udp packets
[01:42:21 CEST] <zumba_addict> i used netcat to redirect stream from my camera to a file. nc -ul 23432 > somefile.mp4
[01:42:38 CEST] <zumba_addict> oh
[01:42:46 CEST] <zumba_addict> that's why mplayer wasn't playing it
[01:43:12 CEST] <ArsenArsen> if you're on linux the `file' command should be of assistance
[01:43:17 CEST] <zumba_addict> i also tried this with little luck - ffmpeg -f mjpeg -i - -c:v mjpeg -q:v 3  -an output.mov
[01:43:31 CEST] <ArsenArsen> kepstin, what do I use to get an input's codec
[01:43:33 CEST] <zumba_addict> I saw about 20 pixels rows of my recording
[01:44:38 CEST] <ArsenArsen> https://trac.ffmpeg.org/wiki/StreamingGuide
[01:45:24 CEST] <zumba_addict> output of `file` - ISO Media, MP4 Base Media v1 [IS0 14496-12:2003]
[01:45:33 CEST] <zumba_addict> ok, i'll check it out
[01:46:19 CEST] <ArsenArsen> mp4 is ISO/IEC 14496-14:2003
[01:46:30 CEST] <ArsenArsen> so, that's mp4
[01:48:00 CEST] <zumba_addict> but it isn't playing
[01:48:11 CEST] <zumba_addict> i couldn't remember if I processed this file with ffmpeg
[01:48:23 CEST] <JEEB> 14496-14 is officially superceded by just -12 I'm pretty sure by now
[01:48:32 CEST] <JEEB> as by just ISOBMFF
[01:48:42 CEST] <JEEB> since -14 has been left to rot
[01:48:52 CEST] <zumba_addict> https://pastebin.com/iPEnnB41
[01:49:06 CEST] <JEEB> also what an ISOBMFF/MOV derivative actually is varies most heavily by the identifiers the file contains
[01:49:12 CEST] <JEEB> in the brand/compatible brands lists
[01:52:37 CEST] <zumba_addict> when I play the file, 95% of the output is green
[01:52:40 CEST] <ArsenArsen> question, when I want to get a codec from a stream, do I make a new one or use the deprecated codec variable
[01:53:38 CEST] <zumba_addict> or do I need a specific player for mjpeg files?
[01:53:58 CEST] <ArsenArsen> ffplay
[01:54:08 CEST] <ArsenArsen> odds are you have it
[01:55:20 CEST] <zumba_addict> ok, trying
[01:55:52 CEST] <zumba_addict> output is the same as mplayer
[01:56:16 CEST] <ArsenArsen> corrupt file probably then
[01:56:53 CEST] <zumba_addict> got it
[01:57:37 CEST] <zumba_addict> are mjpeg files meant to be played though?
[01:58:06 CEST] <zumba_addict> my guess is possible since I can see some parts of it
[02:07:45 CEST] <ArsenArsen> What could cause av_dump_format to fail?
[02:08:08 CEST] <JEEB> not enough data, unsupported format etc
[02:08:14 CEST] <ArsenArsen> as in, segmentation fault
[02:08:14 CEST] <JEEB> or lack of probing
[02:08:17 CEST] <JEEB> :D
[02:08:23 CEST] <JEEB> time to take on your gloves
[02:08:25 CEST] <JEEB> and gdb it
[02:08:34 CEST] <ArsenArsen> I have
[02:08:48 CEST] <ArsenArsen> The failing one is uh
[02:08:53 CEST] <zumba_addict> i love to learn gdb but it's hard
[02:09:04 CEST] <JEEB> the quickstart for gdb is
[02:09:06 CEST] <ArsenArsen> one that's supposed to print x11grab's one
[02:09:09 CEST] <JEEB> gdb ./your_binary
[02:09:14 CEST] <JEEB> or whatever (the path to it)
[02:09:15 CEST] <zumba_addict> that's true
[02:09:20 CEST] <JEEB> then wait for it to load the binary
[02:09:25 CEST] <JEEB> and make sure it says it could read symbols
[02:09:31 CEST] <zumba_addict> i've always wanted to dissect a malware :D
[02:09:34 CEST] <ArsenArsen> I assumed stream 0 exists though so that might be a problem
[02:09:35 CEST] <JEEB> then "run your command lines"
[02:09:41 CEST] <JEEB> oh, for that sort of debugging
[02:09:47 CEST] <JEEB> you don't necessarily want to run it :P
[02:09:51 CEST] <zumba_addict> yup :D I want to become a better security dude
[02:09:53 CEST] <JEEB> you want to use something like IDA
[02:10:00 CEST] <JEEB> or dumpobj
[02:10:05 CEST] <JEEB> objdump I guess?
[02:10:09 CEST] <zumba_addict> oh so gdb is bad for it then
[02:10:15 CEST] <ArsenArsen> gdb can be used for it
[02:10:21 CEST] <ArsenArsen> radare is a good option
[02:10:27 CEST] <ArsenArsen> ida is worth the 3k
[02:10:28 CEST] <zumba_addict> yeah, i read radare
[02:11:26 CEST] <zumba_addict> i really think that once I become better at this tools, I can distinguish myself from other security engineers. Am I right?
[02:11:43 CEST] <ArsenArsen> once you become better, youre better
[02:11:47 CEST] <zumba_addict> :D
[02:12:08 CEST] <zumba_addict> i've talked to few security folks and they can't troubleshoot networking issues
[02:13:11 CEST] <zumba_addict> I want to spent the remaining hours of the day to study tools like you folks mentioned(dumpob, gdb, radare etc) Do you have any cool tutorials I can follow?
[02:13:15 CEST] <zumba_addict> spend
[02:15:32 CEST] <ArsenArsen> protostar
[02:15:34 CEST] <ArsenArsen> trial and error
[02:15:41 CEST] <ArsenArsen> trail*
[02:15:52 CEST] <zumba_addict> ok, i'll check out protostart
[02:16:37 CEST] <zumba_addict> https://exploit-exercises.com/ :D
[02:16:45 CEST] <zumba_addict> thanks brother!
[02:17:20 CEST] <zumba_addict> looks like I should do this on my personal machine, hahaha
[02:20:27 CEST] <ArsenArsen> dont
[02:20:32 CEST] <ArsenArsen> download the images
[02:20:55 CEST] <ArsenArsen> modern systems have way too good preventons of what protostar ams to teach
[02:22:15 CEST] <ArsenArsen> okay JEEB, I've got some debug info set up, seems to be failing on av_log
[02:22:23 CEST] <ArsenArsen> line 569 in dump.c
[02:24:30 CEST] <ArsenArsen> oh it works!
[03:13:16 CEST] <mistym> Is there a way to set the audio packet size on the CLI when using raw PCM?
[04:04:02 CEST] <hiihiii> hi. I've got two vids that are of same duration same resolution same size same fps and same codec
[04:04:19 CEST] <hiihiii> the first is generated through an emulator
[04:04:31 CEST] <hiihiii> the second is screen captured
[04:04:57 CEST] <hiihiii> one has my inputs and the other has the gameplay
[04:06:44 CEST] <hiihiii> they are supposed to be parallel ie. in sync. you'd think that a slight desync could be solved an -itsoffset
[04:07:23 CEST] <hiihiii> but the input vid has some weird desync I can get around
[04:08:39 CEST] <hiihiii> at first the desync is about a few frames, then it slowly gets worse. 1/2 duration it'll be 10 seconds of desync.
[04:09:18 CEST] <zumba_addict> just saw your comment ArsenArsen. What do you mean by "modern systems have way too good preventons of what protostar ams to teach"?
[04:09:47 CEST] <hiihiii> at the end it can reach 20+ seconds of desync
[09:34:40 CEST] <mlok> Hey, I'm trying to configure a stream for a specific set top box, the sound works but constantly cuts out, if I lower the bitrate it is better but still cuts out
[09:35:08 CEST] <mlok> if anybody could advise me on the best way to tune audio, it would be amazing, thanks!
[11:42:25 CEST] <mlok> anybody around?
[12:08:16 CEST] <Li> exit
[15:38:03 CEST] <ayum> Hi, anyone knows the "-look_ahead" option in h264_qsv and the "-rc-lookahead" option in h264_nvenc? I think it's used to control the bitrate, but I am not sure should I enable it or not? will it increase some quality in same bitrate?
[15:39:50 CEST] <Mavrik> That parameter sets how far ahead the encoder tries to look for similarities in the frame
[15:40:03 CEST] <ayum> and I found if I don't set "-rc-lookahead" option, seem it's use -1 in default. and I can encoding 1080@ in 450 fps. but when I set it to 0 ~32, it will increase some performance. and I can get 550~600 fps.
[15:40:05 CEST] <Mavrik> Larger numbers increase quality (to an extent) at the expense of resource use
[15:40:44 CEST] <ayum> @Mavrik, so I I set it to 32 or perhaps more large value is good choice, right?
[15:41:09 CEST] <Mavrik> no idea what the default for your encodesr is
[15:41:15 CEST] <Mavrik> for x264 it's 40
[15:41:31 CEST] <Mavrik> According to your observations, 32 is probably less than default :)
[15:41:54 CEST] <ayum> I am using h264_nvenc
[15:42:57 CEST] <pimpind_> what does it mean when the console shows "Past Duration 0.9999992 too large"
[15:43:08 CEST] <ayum> but I did a test before, it does will increase a very very small quality.
[15:43:49 CEST] <Mavrik> pimpind_: are you using the API?
[15:43:59 CEST] <pimpind_> do not think so?
[15:44:06 CEST] <pimpind_> im streaming live to youtube
[15:44:14 CEST] <pimpind_> from an ip camera (rtsp)
[15:45:08 CEST] <Mavrik> Hmm, probably the camera does something funny with timestamps
[15:45:17 CEST] <Mavrik> If the video is fine, don't worry about it
[15:45:19 CEST] <furq> there's a bunch of different things that cause that warning
[15:45:28 CEST] <furq> it's usually harmless but if not you can try -vsync passthrough or -vsync drop
[15:45:43 CEST] <furq> obviously being aware of what those do
[15:46:07 CEST] <pimpind_> https://pastebin.com/q0rN1ecJ
[15:46:22 CEST] <pimpind_> im trying to track down why the stream seems to die at 5am daily lol
[15:46:27 CEST] <furq> for starters, turn zerolatency off
[15:46:45 CEST] <furq> that's not going to do anything for you other than make the video look worse
[15:48:12 CEST] <furq> if it's roughly once a day then maybe that has something to do with mpegts timestamp rollovers
[15:48:16 CEST] <furq> idk how ffmpeg handles those
[15:48:42 CEST] <fgmp> Hello I have a question regarding video overlays
[15:48:49 CEST] <fgmp> I have the following command: S:\Watermark\water_video.png -filter_complex [0:v]scale=512:-1[bg];[bg][1:v]overlay=x=(main_w-overlay_w):y=(main_h-overlay_h)/2
[15:49:05 CEST] <fgmp> the overlay is placed in the middle on the right side
[15:49:37 CEST] <fgmp> Now I would like to prevent the command from crashing when (main_h-overlay_h)/2 isn't possible
[15:49:53 CEST] <fgmp> when it is not able to divide by two
[15:49:57 CEST] <fgmp> any ideas, thx!!
[15:50:18 CEST] <c_14> it should always be able to divide by 2?
[15:50:38 CEST] <c_14> (I'm not understanding where the problem is)
[15:50:42 CEST] <Mavrik> furq: it pretty much doesn't :/
[15:50:51 CEST] <furq> Mavrik: fun
[15:50:51 CEST] <Mavrik> Had to patch a few things to make those work in my project.
[15:51:13 CEST] <Mavrik> I mean... it does handle them in some extent, but there are a few filters and edges which really don't like PTS going backwards :)
[15:51:15 CEST] <furq> fgmp: y=ceil((main_h-overlay_h)/2)
[15:51:19 CEST] <furq> if i'm understanding the question correctly
[15:51:26 CEST] <furq> https://ffmpeg.org/ffmpeg-utils.html#Expression-Evaluation
[15:52:14 CEST] <furq> you could also change the scale to 512:-2
[15:52:25 CEST] <furq> that might be why you're ending up with odd numbers in the first place
[15:55:10 CEST] <fgmp> aha ok
[15:55:12 CEST] <fgmp> sounds good
[15:55:55 CEST] <c_14> furq: does overlay abort on float values? (it doesn't for me)
[15:56:06 CEST] <furq> idk i've never tried
[15:56:15 CEST] <furq> i can't see any other way to read the questiont hough
[15:56:29 CEST] <fgmp> it is in my case
[15:56:33 CEST] <c_14> it might just be the scale and then the video encoder barfing
[15:56:42 CEST] <furq> yeah i was about to say
[15:56:49 CEST] <furq> are you sure the error is coming from overlay and not just from the scale
[15:57:08 CEST] <fgmp> could also be the case, let me find a test case
[15:57:49 CEST] <furq> actually yeah you're scaling the background aren't you
[15:57:55 CEST] <furq> that'll probably be it then
[16:23:09 CEST] <pimpind_> console spits out max delay reach need to consume packet
[16:23:16 CEST] <pimpind_> RTP: missed 250 packets
[16:32:04 CEST] <User__> Hello! I'm trying to concat 2 video files via ffmpeg, and getting some errors with DTS. I tried to google, but couldn't find the solution... Is it possible somehow to reset those DTS, that by processing they would be calculated again?
[16:33:59 CEST] <c_14> -fflags +igndts
[17:05:56 CEST] <User__> Doesn't works :( If I use -c copy, it changes DTS that video doesn't work, but if I recompress it, then it start to drop frames from second file :(
[17:09:30 CEST] <mlok> Trying to transcode rtmp to hls, audio works but keeps stuttering, using aac - best way to tune it?
[17:11:10 CEST] <BtbN> There is no need to transcode for that at all.
[17:31:18 CEST] <mlok> BtbN: then how else can I stream live?
[17:31:28 CEST] <BtbN> just remux it
[17:31:35 CEST] <BtbN> whatever rtmp can transport, hls can as well
[17:31:50 CEST] <mlok> the issue is, this is for a set top box
[17:31:57 CEST] <mlok> which only supports certain AAC audio
[17:32:38 CEST] <mort> So, chromium's webrtc uses ffmpeg to decode video. When ffmpeg defaults to the software h264 decoder, everything works, but when I build a version of ffmpeg which defaults to v4l2_m2m_dec, it crashes after casting the AVFrame's buffer to its own VideoFrame type.
[17:33:13 CEST] <BtbN> That's not overly surprising, as it suddenly gets hardware frames which it has no clue what to do with
[17:33:46 CEST] <mort> shouldn't ffmpeg expose the two decoders through the same interface?
[17:34:40 CEST] <mort> or does ffmpeg do no conversion, such that when webrtc assumes it gets yuv420 buts actually gets nv12 or something it crashes
[17:34:47 CEST] <mlok> BtbN: do you recommend any settings for tuning AAC audio? e.g. using libfdk_aac
[17:35:06 CEST] <BtbN> How would I know what settings your specific hardware needs?
[17:36:04 CEST] <mlok> BtbN: It supports only this AAC LC, AAC LC+SBR Level 2,AAC HE Level 2, AAC HE Level 4
[17:36:12 CEST] <mort> you don't, but a combination of the v4l2_m2m decoder and the hardware decoder's driver probably should..?
[17:36:24 CEST] <BtbN> AAC LC is what you commonly get. Unless you are doing very weird things, it's what you already have.
[17:37:18 CEST] <BtbN> mort, it's the same interface, but with a different output format
[17:37:35 CEST] <mlok> BtBn: I see, when I play the stream via the set top box, the sound works but constantly stutters, unless I lower the bitrate then it improves a little
[17:37:55 CEST] <mort> so chromium is then presumably just _assuming_ it gets yuv420 from ffmpeg, without doing anything to make sure that assumption actually holds, and just segfaults
[17:37:57 CEST] <mort> that's nice of it
[17:37:57 CEST] <BtbN> if it plays fine in a normal player, I'd blame the hardware
[17:38:18 CEST] <mlok> BtbN: the hardware is shitty, but I can't really tell the person to change the hardware for all his clients
[17:39:27 CEST] <mlok> BtbN: so are there any specific paramters I could play with before I give up?
[17:39:45 CEST] <BtbN> The default without any extra parameters gives you AAC LC for every encoder
[17:40:22 CEST] <mlok> BtbN: ok, how about using libfdk_aac
[17:40:32 CEST] <BtbN> It produces AAC LC as well.
[17:41:33 CEST] <mlok> BtbN: this set top box is for a ready made iptv solution and works with the supplied software (setplex) but fails with everything else
[17:41:42 CEST] <mlok> BtbN: sound origin is m4a
[17:41:50 CEST] <BtbN> m4a is just mp4 with aac in it.
[17:42:00 CEST] <furq> it doesn't even have to be aac
[17:42:03 CEST] <furq> it probably is though
[17:42:30 CEST] <furq> i take it you've already tried just remuxing the rtmp stream
[17:42:41 CEST] <mlok> furq: yes
[17:43:03 CEST] <mlok> furq: only cutoff lowered the cutting out
[17:43:26 CEST] <furq> do you have a sample that does work on the hardware
[17:44:43 CEST] <mlok> furq: would take a while to obtain, I thought about this though
[17:45:01 CEST] <mlok> BtbN: thanks for helo
[17:45:09 CEST] <mlok> BtbN: help
[17:46:38 CEST] <mlok> furq: any audio profiles I could make use of or additional tuning settings?
[17:47:23 CEST] <furq> i couldn't really suggest anything other than comparing to a working sample
[17:47:40 CEST] <furq> if it doesn't work properly with 128k cbr aac-lc then that's really not a good sign
[17:47:47 CEST] <furq> that's the most basic thing you can get really
[17:48:10 CEST] <mlok> furq: yes I agree, I'll send the command I am using
[17:48:29 CEST] <furq> also i take it you've tried the stream in a normal player and it works fine
[17:48:48 CEST] <mlok> furq: yes it works fine
[17:50:46 CEST] <mlok> /root/ffmpeg/ffmpeg  -i rtmp://source -vcodec libx264 -s 1280x720 -aspect 16:9 -tune zerolatency -preset superfast -b:v 1000k -profile:v high -vlevel 4.0 -acodec aac -profile:a aac_low -cutoff 6400  -f flv rtmp://127.0.0.1:1935/show/a
[17:50:56 CEST] <mlok> furq: this is the command I am using
[17:52:27 CEST] <mlok> furq: maybe there is something wrong with it
[17:52:59 CEST] <furq> https://github.com/FFmpeg/FFmpeg/blob/b0644c3e1a96397ee5e2448c542fa4c3bc319537/libavcodec/options_table.h#L283-L292
[17:53:04 CEST] <furq> those are all the aac profile names
[17:53:09 CEST] <furq> idk if fdk supports them all
[17:54:04 CEST] <mlok> furq: good observation, thanks
[17:55:50 CEST] <mlok> furq: any other possible tuning or is this everything?
[17:56:07 CEST] <furq> nothing i know of
[17:56:20 CEST] <furq> i'm not really an expert though
[17:56:39 CEST] <mlok> furq: thanks so much for the help anyway
[18:14:32 CEST] <shangul> What are valid values for -b:a for Ogg?
[18:14:41 CEST] <shangul> a link to wiki would be fine
[18:16:59 CEST] <furq> anything up to 500 iirc
[18:17:05 CEST] <furq> you should use quality mode for libvorbis though
[18:19:14 CEST] <shangul> quality is something [1,100]?
[18:20:42 CEST] <DHE> -b is bitrate, so something like 8k through 256k sounds sane.
[18:20:51 CEST] <furq> q goes from -2 to 10
[18:20:55 CEST] <furq> don't ask me why
[18:21:31 CEST] <DHE> historically 0 was the lowest quality/bitrate. then they added a lower quality encoder based on 3rd party work which was -1. then I guess -2 came along as well...
[18:21:38 CEST] <DHE> and 0-10 accepts fractions iirc
[18:21:50 CEST] <furq> yeah
[18:22:19 CEST] <furq> 6 is nominally 192k so that's probably a good one to pick
[18:23:34 CEST] <furq> i just checked and 500k is as high as it'll go
[18:25:56 CEST] <shangul> How could I reduce size of audio files?
[18:26:28 CEST] <shangul> with -2 quality, It is 23KB. I want less
[18:26:37 CEST] <furq> use libopus then
[18:27:16 CEST] <furq> opus will do 6kbps 48k stereo iirc
[18:27:22 CEST] <shangul> I just need to install the library?
[18:27:23 CEST] <DHE> regrettably Vorbis is actually rather old. 15+ years now
[18:27:25 CEST] <furq> maybe even lower at lower sample rates and/or mono
[18:27:35 CEST] <furq> your ffmpeg probably already has libopus built in
[18:28:34 CEST] <shangul> DHE, any suggestion which ffmpeg supports it and I could have a file smaller than ogg?
[18:29:40 CEST] <DHE> according to git there's been a native opus encoder for a year now. libopus might do better but still...
[18:30:30 CEST] <shangul> furq, so what should I try? it is "ffmpeg -i in.ogg -q:a -2 -ac 1 -f ogg out.ogg" now
[18:30:48 CEST] <shangul> DHE, still what? if you have a format in your mind. tell!
[18:30:51 CEST] <furq> -i foo.ogg -c:a libopux -b:a 6k bar.ogg
[18:30:54 CEST] <furq> libopus
[18:31:17 CEST] <furq> probably add -ac 1 and maybe add -ar 24000 or
[18:31:20 CEST] <furq> something
[18:31:35 CEST] <DHE> or just "opus" to use the built-in opus encoder. that's likely to be available, but likely less good than libopus
[18:31:44 CEST] <alexpigment> isn't opus one of those that only supports one sampling rate?
[18:32:00 CEST] <furq> opus is still marked as experimental
[18:32:02 CEST] <furq> so it's probably shit
[18:32:06 CEST] <furq> stick with libopus
[18:32:11 CEST] <shangul> okay
[18:32:25 CEST] <furq> alexpigment: it supports multiple sample rates, just not 44.1
[18:32:32 CEST] <furq> it does 8, 12, 16 and 24 iirc
[18:32:39 CEST] <furq> and 48 obviously
[18:32:39 CEST] <alexpigment> hmmm, i was thinking it only supported 48khz
[18:32:52 CEST] <alexpigment> tjat
[18:32:54 CEST] <alexpigment> er
[18:33:01 CEST] <alexpigment> that's with the built in opus encoder
[18:33:37 CEST] <furq> i have no idea what the builtin opus encoder does
[18:33:48 CEST] <furq> libopus does 8, 12, 16, 24 and 48
[18:34:01 CEST] <alexpigment> aight, well then i'll say that it only supports 48khz
[18:34:25 CEST] <furq> 48 is the only useful one for music at listenable bitrates
[18:34:25 CEST] <shangul> how could I get a list of supported bitrates?
[18:34:37 CEST] <furq> there is no such thing
[18:34:50 CEST] <furq> 6kbps is as low as opus can go iirc
[18:36:26 CEST] <furq> you probably want -i foo.ogg -c:a libopus -ar 8000 -ac 1 -b:a 6k bar.ogg
[18:36:46 CEST] <furq> and you probably want to mess with -vbr (off/on/constrained)
[18:37:01 CEST] <furq> the default is on which is quality-based
[18:37:05 CEST] <furq> constrained is abr and off is cbr
[18:39:50 CEST] <alexpigment> side note: i just now realized why i thought opus only supported 48khz. i had a script that i used to generate a bunch of test files in various formats. it was designed to do 48,44,32,22, and 11
[18:40:28 CEST] <alexpigment> i find it extremely weird that opus wouldn't have parity with existing sample rate standards
[18:40:29 CEST] <alexpigment> oh well
[18:40:48 CEST] <alexpigment> anything below 44 is garbage anyway
[18:41:11 CEST] <alexpigment> well, realistically anything below 32, but still
[18:48:47 CEST] <shangul> I went as low as 1K for bitrate and it didn't throw an error message back to me. however seems it gave me a blank file!
[18:50:30 CEST] <shangul> seems lower than 6K(except 1K) are the same
[19:07:15 CEST] <scooter_de> can't compile current ffmpeg under Ubuntu. x264 fails to link. is that known, shall I asked somewhere else?
[19:07:55 CEST] <BtbN> Your x264 is probably old
[19:09:25 CEST] <DHE> or if you build x264 yourself you might have version mismatches. the .h and .a/.so are versioned and must match
[19:28:11 CEST] <kepstin> alexpigment: with the way the libopus api is built, you basically treat the codec as if everything is just 48KHz, and it'll do any conversions needed
[19:28:54 CEST] <kepstin> alexpigment: and the actual sample rate in the file is decided by the codec - based mostly on bitrate - not as much by what you provide as input
[19:29:53 CEST] <alexpigment> yeah i get that. i guess i'm in theory just not sure why you'd want to force a sample rate conversion by not honoring existing sample rates
[19:31:04 CEST] <kepstin> there's some discussion on this in some of the opus blog posts
[19:31:49 CEST] <alexpigment> honestly, it doesn't affect me in any way. it's more of an academic thing i guess
[19:47:08 CEST] <scooter_de> I followed the ffmpeg compile guide and downloaded everything "from scratch"
[19:49:00 CEST] <scooter_de> I'm going to plough through my system and see whether there are old versions dangling
[19:52:41 CEST] <scooter_de> I followed this guide https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
[19:58:41 CEST] <scooter_de> output for compilation error for x264 here https://pastebin.com/MLJTJmXK
[21:46:12 CEST] <squirrel> is this a suitable channel for general questions about video?
[21:47:25 CEST] <squirrel> no, wait, i'm an idiot
[21:49:36 CEST] <ChocolateArmpits> maybe
[23:37:00 CEST] <pyBlob> I'm using "ffplay -f f32le -ar 48000 -ac 1 -vn -" to output a raw audio file, however it doesn't close the window after all audio from the stream has been played, ading "-autoexit" doesn't help
[23:43:16 CEST] <kepstin> pyBlob: what's the input?
[23:44:40 CEST] <kepstin> pyBlob: -autoexit should work as long as ffplay actually gets an EOF when reading the input
[00:00:00 CEST] --- Tue Apr 10 2018


More information about the Ffmpeg-devel-irc mailing list