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

burek burek021 at gmail.com
Fri Jan 25 03:05:03 EET 2019


[00:11:26 CET] <Zexaron> oh
[00:14:34 CET] <Zexaron> I also get warning:
[00:14:35 CET] <Zexaron> Codec AVOption b (set bitrate (in bits/s)) specified for output file #0 (DCS 2019-01-23 21-50-35-16.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
[00:18:09 CET] <Zexaron> something wrong with the file, it's buggy, doesn't want to play or finish, i'll fiddle it next time
[00:20:58 CET] <MichaelJoel> is there some options I need to set when converting a .mov to .mp4 to get it to work right in windows media player? Possibly something everyone else knows that I dont?
[00:28:37 CET] <relaxed> MichaelJoel: ffmpeg -i input.mov -c copy -movflags +faststart output.mp4
[00:29:03 CET] <relaxed> you mean it won't play at all?
[00:31:23 CET] <MichaelJoel> it plays the audio with a black screen. if I run it with ffplay it works or if I play it over html5 video tag it works, just not windows media player
[00:31:41 CET] <relaxed> windows version?
[00:32:46 CET] <relaxed> pastebin.com the ffmpeg -i output on the file that won't play
[00:33:51 CET] <MichaelJoel> 7
[00:38:58 CET] <relaxed> MichaelJoel: pastebin ^^
[00:42:46 CET] <MichaelJoel> https://parksandsonspiano.com/ffmpeg.html
[00:43:39 CET] <Mavrik> 4:2:2 ? What was that captured on? :)
[00:44:19 CET] <MichaelJoel> lower cost digital camera
[00:44:19 CET] <MichaelJoel> :D
[00:44:30 CET] <relaxed> yeah, ffmpeg -i input.mov -c copy -c:v libx264 -pix_fmt yuv420p -crf 18 -movflags +faststart output.mp4
[00:44:31 CET] <Mavrik> Neat.
[00:44:54 CET] <Mavrik> Yeah, you'll have to reencode to YUV 4:2:0 for maximum compatibility. What relaxed posted :)
[00:45:07 CET] <MichaelJoel> ok thanks
[00:45:20 CET] <relaxed> https://trac.ffmpeg.org/wiki/Encode/H.264
[00:45:27 CET] <MichaelJoel> I'll put this information somewhere safe :D
[00:46:15 CET] <Mavrik> mhm, maybe even check camera settings if you can just record to 420 by default
[02:08:02 CET] <Lightsword> anyone know why Im not able to get ffmpeg to write mjpeg to v4l2loopback? Im trying ffmpeg -f v4l2 -input_format mjpeg -video_size 1280x720 -framerate 30 -i /dev/ffcamera -codec copy -f v4l2 /dev/ffrtpcam but I get this error https://0bin.net/paste/Wv4U9qS5kP8E6wFr#WuSWyia+FRcX0cQBNxYsOJBp4HxImuhRNcWL0Wyon0-
[02:10:02 CET] <Lightsword> sending YUV with this command does work ffmpeg -f v4l2 -input_format mjpeg -video_size 1280x720 -framerate 30 -i /dev/ffcamera -codec rawvideo -pix_fmt yuv420p -f v4l2 /dev/ffrtpcam however it seems to have significant CPU overhead that I would like to eliminate by not having to transcode
[06:48:41 CET] <TheDcoder> I am looking for a way to capture the screen/desktop in my program easily, I came across a stackoverflow answer mentioning that ffmpeg is capable of doing that. I looked into the library documentation but I cannot find anything in particular, but I imagine ffmpeg would have some special devices for the screen which I can use
[06:49:11 CET] <TheDcoder> My question is, is ffmpeg good at recording the screen in a cross-platform manner? I am targeting Windows, Linux and macOS
[06:50:22 CET] <furq> TheDcoder: https://www.ffmpeg.org/ffmpeg-devices.html
[06:50:38 CET] <furq> avfoundation on osx, dshow/gdigrab on windows, x11grab/xcbgrab/kmsgrab on linux
[06:51:33 CET] <furq> and alsa/pulse/jack for audio on linux
[06:51:53 CET] <TheDcoder> very nice
[06:51:59 CET] <TheDcoder> thanks furq!
[06:52:04 CET] <TheDcoder> :)
[08:50:50 CET] <nadermx> I'm having a weird error, when I make a mp4 with two inputs, if I have a redirect in each input, the mp4 is unplayble, using quickstart.  But if I use the inputs without a redirect, it works fine
[08:52:20 CET] <nadermx> it also is unplayable if one has a redirect and the other does not
[09:32:59 CET] <trysten> So, i've got a video that plays properly in vlc, but in firefox it has the wrong aspect ratio
[09:35:54 CET] <trysten> dang! it plays correctly in chrome!
[09:36:50 CET] <JEEB> you can check with L-SMASH's boxdumper regarding the values in the mp4 file itself (`boxdumper --box file.mp4`)
[09:37:11 CET] <JEEB> and then if there's nothing weird in there you can poke the firefox people on where they're parsing the aspect ratio from
[09:45:24 CET] <trysten> I don't have boxdumper (debian testing) but I got some info from `ffprobe -show_streams`. Where to get boxdumper?
[09:46:15 CET] <furq> https://github.com/l-smash/l-smash
[09:54:46 CET] <trysten> Ok it looks like firefox video player is ignoring the aspect ratio of 16:9 and displaying it at 5:4. To work around this, how should I re-encode at 5:4? Am I thinking about this right?
[09:57:27 CET] <JEEB> no
[10:26:49 CET] <trysten> :| JEEB, where can I learn more about DAR?
[10:29:39 CET] <trysten> You were right, firefox seems to be ignoring the mp4's DAR.
[10:30:05 CET] <trysten> Fine, I will compile lsmash >.>
[10:43:00 CET] <trysten> Alright, the file has to be scaled to look right. it's actual resolution is 5:4 but it must be displayed at 16:9. How do I un-noob myself here?
[10:43:12 CET] <trysten> I mean, where do I go to learn about this stuff so I know what I'm doing?
[10:43:51 CET] <Mavrik> So you have anamorphic video? :)
[10:44:11 CET] <Mavrik> Pastebin ffprobe output for your file and we can continue from there :)
[10:45:46 CET] <trysten> http://paste.debian.net/1062251
[10:46:23 CET] <trysten> Note the time stamp, I was being shy :) Thank you for answering
[10:47:06 CET] <furq> that ought to work just fine in firefox
[10:47:24 CET] <furq> i've never had issues with it respecting the container dar flag
[10:47:38 CET] <furq> and i don't think h264 has a stream dar flag, only sar
[10:47:51 CET] <furq> you might want to just remux it to ensure it's set everywhere though
[10:48:02 CET] <furq> -i foo.mp4 -map 0 -c copy -aspect 16:9 bar.mp4
[10:49:43 CET] <Mavrik> Yeah... or reencode to 1:1 pixels? :)
[10:50:04 CET] <furq> ew
[10:51:59 CET] <trysten> furq: remuxing with your command didn't seem to work. Here is the result if you want to try: http://tube.sleepyowl.com/aspect.mp4
[11:00:26 CET] <trysten> It would be cool if I could figure it out without re-encoding. I bet it's something weird with my source encoding
[11:01:39 CET] <th3_v0ice> What goes into the header of an x264 I frame?
[11:05:32 CET] <furq> trysten: that was unexpectedly annoying
[11:05:55 CET] <furq> -i foo.mp4 -map 0 -c copy -bsf:v h264_metadata=sample_aspect_ratio=16/11 bar.mp4
[11:06:52 CET] <trysten> furq: what was annoything, the video clip? Sorry, if so
[11:07:07 CET] <furq> no just figuring it out
[11:07:19 CET] <furq> i only watched the first two seconds
[11:07:27 CET] <trysten> oh! Did you?! *trying remux*
[11:08:43 CET] <trysten> You did it! Great job! So how did you find h264_metadata? Where did you get 16/11?
[11:09:23 CET] <furq> 16:11 is just the correct PAR for pal widescreen
[11:10:11 CET] <furq> i normally flake out and just set -aspect but setting the sar is the "correct" way to do it
[11:13:02 CET] <trysten> So thought something like "we need to change the stream properties. bsf does that, so let's use the h264 bsf"?
[11:13:45 CET] <furq> sure
[11:13:57 CET] <trysten> Then you ran ffmpeg -h bsf=h264_metadata and saw the option, and knew from your wisdom check roll that the PAL PAR was 16/11
[11:14:03 CET] <furq> that should really have been the first thing i did but i was too lazy to look up the correct par
[11:16:48 CET] <trysten> Thank you so much furq! Your experience is invaluable. I set the silly 64/45 PAR from the source file and now get the exact same dimensions that the video plays with in chrome. Problem solved!
[11:17:55 CET] <furq> oh right yeah
[11:18:00 CET] <furq> 64:45 is correct for 720 width
[11:18:05 CET] <furq> 16:11 is for 704 width
[11:18:15 CET] <furq> you probably wouldn't notice any difference but it's good to be accurate
[11:19:52 CET] <trysten> :) long live the tube! haha
[12:10:59 CET] <th3_v0ice> Is there a specific option while opening x264 encoder that will set pic_init_qp_minus26 ?
[12:17:17 CET] <DHE> what's that? I don't see it in the x264 source
[12:20:01 CET] <DHE> at the end of the day you can always do av_dict_set(&dict, "x264-params", "args that the x264 binary accepts", 0);   avcodec_open2(context, x264codec, &dict); // and set any x264 option you want
[13:07:03 CET] <th3_v0ice> Its a parameter in PPS of an I frame. For some reason ZIXI broadcaster is changing it for my particular stream, I am not sure why. Thought that someone might have a hint
[14:24:24 CET] <atbd> hi, i'm using ffmpeg api to add metadata to AVFrame and side-data to AVPacket. It seems to work ok but when i'm reading the file i just generated i do not found my metadata and side data. I'm using av_dict_set to add metadata to AVFrame and av_packet_new_side_data for AVPacket
[14:24:37 CET] <atbd> Is there a specific moment to do it or method?
[14:27:04 CET] <DHE> it does depend on the codec involved. I don't think there's really an "arbitrary data alongside existing data" feature in, say, h264.
[14:27:58 CET] <atbd> i'm using h264 and libfdk_aac
[14:41:23 CET] <atbd> the lifetime of AVPacket::side_data depends on the format too?
[14:45:07 CET] <DHE> it rather depends.  for example the A53 Closed Captions side data has a specific format inside h264 and the encoder will insert them appropriately. but that's only 1 of 2 types of side data it understands
[14:49:37 CET] <sn00ker> hi all
[14:50:28 CET] <sn00ker> how calculate the REAL target size? i have a script .. that runs fine.. but the movie dont have my target filesize
[14:51:46 CET] <sn00ker> https://nopaste.linux-dev.org/?1191832
[14:51:52 CET] <sn00ker> line 10, i set the target size
[14:52:18 CET] <sn00ker> 82 - 102 i calculate the bitrate
[15:28:29 CET] <atbd> thanks, i just read ffmpeg code/examples and it seems to be no way to add private data/metadata to AVPacket :/
[15:39:13 CET] <DHE> atbd: it may be possible to add your own private stream and then build your own AVPackets in the first place, but you can't reliably put your own metadata into existing AVFrames
[15:46:45 CET] <BtbN> That's a weird way of calculating the bitrate. Why do you multiply by 8192?
[15:46:50 CET] <BtbN> What unit is SSIZE?
[15:47:17 CET] <sn00ker> BtbN, SSIZE is du -m so size im MB
[15:47:38 CET] <BtbN> And why do you multiply that by 8192?
[15:47:41 CET] <sn00ker> BtbN, the 8192 i have from an website...
[15:48:52 CET] <BtbN> your two commandslines are also not very identical
[15:48:58 CET] <BtbN> particularily the first one is missing -c:v
[15:49:08 CET] <BtbN> and you are using different -map
[15:50:49 CET] <BtbN> 8192 might actually be correct, since you are passing ${bitrate}k. So from megabyte * 8 * 1024 you get kilobit
[15:52:59 CET] <sn00ker> ok, yes so the result is almost yes. So the video size is right but just the size plus the audio stream. So I have to subtract somehow the audio size of my SSIZE
[15:53:25 CET] <sn00ker> and map ... I need video 0: 0 and then I want only the German audio track
[15:55:19 CET] <BtbN> It's probably easier to just substract the audio bitrate from your final bitrate, since audio usually has fixed constant rate
[15:56:00 CET] <BtbN> Is the resulting movie larger or smaller than your target size?
[15:56:10 CET] <BtbN> Cause smaller is very well possible, if x264 can get by with less, it will
[15:56:44 CET] <sn00ker> So my wish would be that I then have the new video just with audio + video = $ SIZE and not like now video = $ SIZE + audio
[15:57:54 CET] <sn00ker> So there is still one missing. if file is larger than SSIZE then shrink to SSIZE else skip file and take the next one
[15:58:39 CET] <sn00ker> so at the end all files are less than or equal to SSIZE
[15:59:35 CET] <sn00ker> and the quality. yes, I'm currently playing with preset. So ultrafast is cruel. medium, I think ok. takes at 40min film but good 2 hours
[16:01:36 CET] <sn00ker> and before I forget it. ffmpeg creates yes ffmpeg.log ... and ffmpeg.log.mbtree but always where I start the script. how can I have them written in my $ WORKDIR?
[16:02:51 CET] <pink_mist> cd $WORKDIR; ffmpeg ...; cd - # :P
[16:03:07 CET] <sn00ker> xD
[16:06:15 CET] <atbd> DHE: okay thanks, i may try that
[17:10:38 CET] <sn00ker> how can i use snd_aloop with ffmpeg?
[17:12:02 CET] <sn00ker> ffmpeg -f alsa -ac 2 -i hw:0,0
[17:12:12 CET] <sn00ker> is ok.. but how i "send" audio to it?
[18:13:32 CET] <sn00ker> [alsa @ 0x561084dff640] sample format 0x15001 is not supported
[18:13:32 CET] <sn00ker> Could not write header for output file #1 (incorrect codec parameters ?): Function not implementedStream mapping:
[18:13:32 CET] <sn00ker>   Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
[18:13:32 CET] <sn00ker>   Stream #0:1 -> #1:0 (aac (native) -> mp3 (libmp3lame))
[18:13:36 CET] <sn00ker> i dont understand the error
[18:13:40 CET] <sn00ker> everyone can help?
[18:19:06 CET] <tdr> you'd need to paste the command you tried etc
[18:26:14 CET] <sn00ker> ok, so it works now .. so half .. now I have no sound and get such errors
[18:26:33 CET] <sn00ker> Past duration 0.898170 too large
[18:26:33 CET] <sn00ker> Past duration 0.932686 too large   11071kB time=00:03:20.78 bitrate= 451.7kbits/
[18:26:33 CET] <sn00ker> [alsa @ 0x557e58d46200] ALSA buffer xrun.
[18:26:33 CET] <sn00ker> Past duration 0.953667 too large   11080kB
[18:26:39 CET] <sn00ker> and the stream lags
[18:27:48 CET] <sn00ker> ffmpeg -f video4linux2 -i /dev/video0 -f alsa -acodec pcm_s32le -i hw:0 -f flv -vcodec libx264 -acodec aac -r 25 -s 640x260 rtmp://XXXXXXXXX:1935/live/test
[18:27:51 CET] <sn00ker> thats my command
[18:56:01 CET] <th3_v0ice> Are these two flags mutualy exclusive AV_CODEC_FLAG2_LOCAL_HEADER and AV_CODEC_FLAG_GLOBAL_HEADER?
[18:56:31 CET] <th3_v0ice> Their description hints at that, but they are set at flags2 and flags respectivly
[19:28:24 CET] <sn00ker> ok now it runs :)
[19:28:45 CET] <sn00ker> but next....im .... head -> table ...
[19:34:27 CET] <tdr> set the spike on the table, it helps to dull the pain
[19:59:40 CET] <sn00ker> ffmpeg -re -y -i "$DATEI" -c:v libx264 -vf "fps=25,scale=640:480,setdar=4:3" -map 0:0 -f v4l2 -vcodec rawvideo /dev/video0 -f alsa default
[19:59:56 CET] <sn00ker> i want add an watermark.. but then error with -vf ....
[20:12:52 CET] <oerg866> Hi
[20:13:11 CET] <oerg866> got a quick question, how can I maximise CPU optimization when encoding wiht libx264?
[20:13:29 CET] <oerg866> i cant make it exceed 60% on this here 16c32t threadripper
[20:13:41 CET] <oerg866> even with -threads 32
[20:14:34 CET] <ritsuka> x264 can't use that many threads
[20:14:59 CET] <ritsuka> but you can run two or more encodes simultaneously
[20:16:32 CET] <sn00ker> Past duration 0.603035 too large
[20:16:35 CET] <sn00ker> wat is this?
[20:18:47 CET] <oerg866> hm but then for example why doesn't it saturate by making each thread encode like a 32nd of the file
[20:19:22 CET] <oerg866> my previous system had 10 cores / 20 threads and i managed to max out ffmpeg encoding x264 there
[20:19:31 CET] <oerg866> though I can't remember how
[20:33:19 CET] <w1kl4s> i maxed x264 as well but that was a meme encode from /dev/random
[20:48:36 CET] <hans__> w1kl4s, that must have been slow
[20:48:51 CET] <w1kl4s> not really
[20:49:04 CET] <hans__> do you have a hardware rng or something? :o
[20:49:30 CET] <w1kl4s> a lot of entropy
[20:49:41 CET] <hans__> o i c (or running mac/bsd?)
[20:50:00 CET] <hans__> (iirc mac & bsd just alias /dev/random to /dev/urandom)
[20:51:00 CET] <w1kl4s> i regularly dump random to files for some testing
[20:51:28 CET] <w1kl4s> after few months of running i saw the folder reached over 100GB so it needs to be cleaned
[21:19:18 CET] <tdr> keeping your radomness so none is wasted? ;)
[21:27:01 CET] <maudd> hello people, i have a question about ffmpeg filters, and specifically minterpolate, can anyone here answer such a question?
[21:33:00 CET] <maudd> in essence, my question is this: i have a video that's at say 30 fps @ 600 kb/s~ and i want to use minterpolate to make it 60 fps..
[21:33:36 CET] <maudd> do i in this case double my bitrate to have it maintain it's quality?
[21:35:01 CET] <maudd> https://pastebin.com/hPNDSVK0
[21:35:12 CET] <maudd> basically i use this script to calculate the bitrate right now
[21:36:47 CET] <maudd> but what's confusing me, i used to just use: ffmpeg -i $f -c:a copy -filter:v "minterpolate=fps=60:mi_mode=mci:mc_mode=aobmc:me_mode=bidir:vsbmc=1" "output.mp4"
[21:37:50 CET] <maudd> and there's no visible quality difference, and i think the ffmpeg uses the average bitrate of the input stream when none is supplied?
[21:50:41 CET] <maudd> anyone? ;_;
[21:57:02 CET] <JEEB> maudd: default rate control is 100% dependant on the encoder
[21:58:07 CET] <JEEB> the default bit rate in AVCodecContext in FFmpeg is 200 (!) kbps, so if it's looking good I have a hunch that it might be libx264 that's getting used, which has its own default in the module as CRF (not bit rate constrained rate control) at value 23 (which can look OK depending on how much your eyes can see artifacts, as well as how zoomed you're watching the content)
[22:04:45 CET] <maudd> hmm okay
[22:05:20 CET] <JEEB> it really doesn't make sense to look at anything in the input for the output compression, since the two generally aren't in any way or form related
[22:05:38 CET] <JEEB> using the same average bit rate will not help you keep the same quality level, etc etc
[22:05:46 CET] <JEEB> thus rate control modes like CRF are much more useful
[22:06:39 CET] <maudd> I see
[22:07:25 CET] <maudd> it's just strange to me that a lot of the files i changed from 30 fps to 60 fps only have like 10-20% higher filesize
[22:07:49 CET] <maudd> when it used the CRF 23 value
[22:08:14 CET] <maudd> when it has double the frames
[22:08:27 CET] <maudd> from the original
[22:09:04 CET] <hollyx82> hello @all, can anybody tell me if the ffserver and ffplay programms included to the sources i can download from the ffmpeg.git?
[22:09:43 CET] <JEEB> ffplay is part of the main code repo, ffserver was removed due to issues with it
[22:12:34 CET] <hollyx82> ok, thats not a good news. is there an other way to stream an ffmpeg output like ffserver?
[22:13:08 CET] <hollyx82> or can i install ffserver seperatly?
[22:19:36 CET] <JEEB> hollyx82: you can do multicast etc with just ffmpeg.c or the libraries themselves, or for stuff like HLS or DASH you can just output to a web server with HTTP POST output with ffmpeg.c or the libraries
[22:19:51 CET] <JEEB> since generally I don't think you want an *encoder* to be doing your media serving :P
[22:25:23 CET] <hollyx82> ok thats new for me. I did my streaming in the past from my capture device by using ffmpeg to encode to h264 and send it to ffserver. is there any manpage where i can read what i have to do?
[22:26:15 CET] <JEEB> ffmpeg-all.html is the man page fully as a web page on ffmpeg.org
[22:26:22 CET] <hollyx82> the output with HTTP POST is very interesting
[22:26:36 CET] <JEEB> yea, check the parameters for the hls and dash muxers
[22:26:56 CET] <hollyx82> thanks for the useful hints.
[22:27:28 CET] <JEEB> and then generally setting the output URL to your web server that does accept POST from the encoder
[22:27:31 CET] <JEEB> generally should do it
[22:27:48 CET] <JEEB> (and then on the "other side" you can share that through the same web server)
[22:30:42 CET] <hollyx82> ok, i try. I hope my small hardwaresetup can handle this.
[22:30:56 CET] <maudd> JEEB thank you for helping me
[22:31:00 CET] <maudd> i figured out my stuff
[22:57:04 CET] <hollyx82> JEEB: thx for help, it looks like more comfortable then the way trough ffserver.
[22:57:25 CET] <JEEB> np
[00:00:00 CET] --- Fri Jan 25 2019


More information about the Ffmpeg-devel-irc mailing list