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

burek burek021 at gmail.com
Sun Feb 18 03:05:02 EET 2018


[06:47:58 CET] <dagwood> hello
[06:56:34 CET] <dagwood> How to modify the source sent to the git server
[08:04:28 CET] <th3_v0ice> Hello guys, can someone please help me understand why decoder is changing time base after decoding few packets? This really messes up some of my code that is relying on the correct time_base value. Thanks!
[08:16:51 CET] <th3_v0ice> First its reported as 1/48, and then it changes to 0/2 and the framerate goes to 90000/1
[08:17:05 CET] <th3_v0ice> Why is this happening?
[08:48:48 CET] <SortaCore> th3_v0ice: the time_base is changed to reflect the smallest fraction that can represent all the frametimes correctly
[08:49:36 CET] <SortaCore> you also have a time_base in avformatcontext, and in the avstream codec
[08:50:10 CET] <SortaCore> what part changes it, I dunno, not that advanced a ffmpeg user, but it'd be based on the pts/dts fed to it
[08:51:35 CET] <th3_v0ice> SortaCore: But why is it changed mid decoding? Shouldn't avcodec_open2 give correct values for the decoder time_base? Because input stream time_base is 1/90000, input_stream->codec->time_base is 1/180000
[08:52:08 CET] <th3_v0ice> and avcodec_open2 assigns time_base to the decoder_ctx->time_base at 1/48
[08:54:56 CET] <th3_v0ice> From other videos, time_base for the decoder is copied over from the input_stream->codec->time_base. Should I just force this?
[09:46:03 CET] <The-Present> Hi, I am streaming videos to youtube but some times I get SIGPIPE broken pipe error. Is it possible to pass some flag to ffmpeg which can ignore SIGPIPE and try again streaming from the same position?
[10:41:23 CET] <th3_v0ice> SortaCore: Do you know what is the correct way to generate the packet PTS?
[11:07:35 CET] <The-Present> I have one another question just for my information. While streaming with ffmpeg, what is the general reason for getting broken pipe error?
[12:33:05 CET] <kepstin> The-Present: a broken pipe error just means that the other end has closed the connection. With youtube, that typically means that they found a problem with your stream, e.g. wrong settings or it's faster/slower than realtime.
[12:41:20 CET] <The-Present> kepstin: Can I assume that its network related or could be ffmpeg command issue that involves transcoding and stream?
[12:41:20 CET] <The-Present> streaming.
[12:50:21 CET] <Delchi_> Hey all,
[12:50:33 CET] <Delchi_> I believe i found something interesting re my problem the other night
[12:50:43 CET] <Delchi_> but I'mnot quite understanding the error message
[12:51:09 CET] <Delchi_> [asf @ 000002781ba04840] Non-monotonous DTS in output stream 0:1; previous: 128, current: 34; changing to 129. This may result in incorrect timestamps in the output file.
[12:51:23 CET] <JEEB> DTS is decoding time stamp
[12:51:30 CET] <Delchi_> ok
[12:51:31 CET] <JEEB> so you got a packet from an ASF file where the timestamps went backwards
[12:51:40 CET] <Delchi_> That's strange
[12:51:55 CET] <JEEB> so previous packet had DTS 128, current is 34
[12:52:19 CET] <JEEB> and instead of erroring out FFmpeg tries to stick it as previous+1
[12:52:32 CET] <JEEB> so it didn't error out there
[12:52:32 CET] <Delchi_> could this be some camera thing that the camera mfg did to obfuscate the files ?
[12:53:26 CET] <Delchi_> My goal is to take a input file, vut a section of audio out ( replacing with silence ) then have the output to a new file , all .asf with no other changes
[12:53:35 CET] <Delchi_> s/vut/cut
[12:54:01 CET] <Delchi_> Cmd line :   ffmpeg -i 01F439232018020715495401.asf -af "volume=enable='between(t,15,18)':volume=0" output.asf
[12:54:26 CET] <Delchi_> however it looks like the output file is quite different from the input, includieng some video changes
[12:54:54 CET] <JEEB> welcome to ffmpeg, if you didn't specify output encoders you will get *something*
[12:55:02 CET] <kepstin> Delchi_: you probably want to be using "-c:v copy" on that
[12:55:04 CET] <JEEB> if you are not poking video at all, I recommend -c:v copy
[12:55:08 CET] <Delchi_> ahhhh ok
[12:55:23 CET] <JEEB> which is short for "codec, video"
[12:55:27 CET] <JEEB> and "copy" is a special value
[12:55:33 CET] <JEEB> in the command line application
[12:55:34 CET] <Delchi_> along with the af , so -c:v copy af .....
[12:55:50 CET] <JEEB> it just has to be after the input somewhere
[12:55:55 CET] <JEEB> and -af , not af
[12:56:00 CET] <Delchi_> er -c:v copy -af ....
[12:56:01 CET] <Delchi_> right
[12:56:37 CET] <Delchi_> Ok, that's better
[12:56:44 CET] <Delchi_> still getting the error msg, but ...
[12:56:55 CET] <JEEB> that message by itself is a warning, not error IIRC
[12:57:03 CET] <JEEB> at least it's not an error that will cause it to error out
[12:57:05 CET] <Delchi_> [asf @ 0000011a9665e400] Non-monotonous DTS in output stream 0:1; previous: 128, current: 34; changing to 129. This may result in incorrect timestamps in the output file. [asf @ 0000011a9665e400] Non-monotonous DTS in output stream 0:1; previous: 129, current: 98; changing to 130. This may result in incorrect timestamps in the output file.
[12:57:10 CET] <Delchi_> Right
[12:57:14 CET] <Delchi_> ok I'm with ya
[12:57:43 CET] <JEEB> it just means that either a) the input contains messed up timestamps or b) the ASF reader read the timestamps wrong
[12:57:55 CET] <JEEB> without prior knowledge I'd bet more on a) but you never know :P
[12:58:09 CET] <Delchi_> Life is strange
[12:58:18 CET] <Delchi_>  the camera also makes a metadata file that I've not totally reversed yet
[12:58:53 CET] <Delchi_> also I'm using gspot to compare the input/output videos to make sure thngs are comig out correctly
[13:11:00 CET] <Delchi_> very close
[13:11:18 CET] <Delchi_> now everything plays properly, but there is no audio at all in the camera playback
[13:11:33 CET] <Delchi_> but in VLC the audio is thre and properly edited as per the cmd line
[13:12:34 CET] <Delchi_> Guessed Channel Layout for Input Stream #0.1 : stereo Input #0, asf, from '01F484222018021709165001.asf':   Duration: 00:00:21.12, start: 0.000000, bitrate: 2372 kb/s     Stream #0:0: Video: mpeg4 (MP4S / 0x5334504D), yuv420p, 640x240 [SAR 1:1 DAR 8:3], SAR 1:2 DAR 4:3, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc     Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, stereo, s16, 256 kb/s Stream mapping:   Stream #0:0 -> #0:0 (
[13:13:20 CET] <Delchi_> Thinking perhaps the camera playback is mono and not stereo , re the ' guessing ' part
[13:15:33 CET] <Delchi_> the orig file says : PCM Audio 0x01 8000hz 256kb/s tot ( 2 chnls )
[13:16:01 CET] <Delchi_> the output file however : 0x02 8000hz 128kb/s tot (2chnls)
[13:16:18 CET] <Delchi_> I'm thinking my cmd line nees a little more tweeking
[13:20:19 CET] <Delchi_> JEEB : Any suggestions ? I'm terying to tell it to copy the audio stream ...
[13:21:13 CET] <Delchi_> lol filtering snd stream copy cannot be used together .. well, yeah
[13:24:30 CET] <kepstin> Delchi_: what output codec did it pick for the audio? it might have encoded to something other than pci which the camera couldn't read
[13:25:07 CET] <kepstin> Delchi_: (if so, using -c:a pcm_s16le should fix it)
[13:25:28 CET] <Delchi_> Yeah I just tried that but gspot is still showing a difference
[13:25:44 CET] <JEEB> it could just be an identifier difference
[13:25:46 CET] <Delchi_> ffmpeg.exe -i 01F484222018021709165001.asf -c:v copy -acodec pcm_s16le -af "volume=enable='between(t,15,18)':volume=0" output.asf
[13:25:48 CET] <JEEB> in the output ASF
[13:25:59 CET] <Delchi_> yeah
[13:26:01 CET] <JEEB> or something very miniscule like that
[13:26:15 CET] <JEEB> I woudl recommend actually using a tool that can show you the innards of an ASF file
[13:26:20 CET] <JEEB> to see the difference
[13:26:26 CET] <JEEB> no idea if there's actually such stuff
[13:26:38 CET] <Delchi_> gspot said for audio PCM audio 0x01 8000hz 256kb/s tot(2chnls) for the original
[13:26:40 CET] <JEEB> esp. if you're trying to play this back on an ekta plastique kind of thing
[13:26:52 CET] <JEEB> like a camera or whatever
[13:26:57 CET] <JEEB> they can be very very hard-coded
[13:27:11 CET] <Delchi_> for the output file it's PCM audio 0x02 8000hz 256kb/s tot(2chls)
[13:27:24 CET] <JEEB> I have no idea what gspot actually outputs
[13:27:24 CET] <Delchi_> so It's similar, but not the same
[13:27:35 CET] <JEEB> you want to know what those values actually mean
[13:27:53 CET] <Delchi_> It's basically a decoder for video files that tells you all aspects of the file including codecs, etc...
[13:27:55 CET] <Delchi_> really handy tool
[13:28:27 CET] <JEEB> well, uhm, it just threw a random number at you and doesn't describe it?
[13:28:32 CET] <JEEB> 0x01 and 0x02
[13:28:36 CET] <JEEB> what be the difference?
[13:28:54 CET] <JEEB> which is why I said you need an actual ASF-specific thing that lets you dig into wtf that stuff is
[13:28:56 CET] <Delchi_> That's a good Q.
[13:29:00 CET] <Delchi_> Aah ok
[13:29:03 CET] <Delchi_> I'm with you
[13:29:14 CET] <Delchi_> Going to test it anyway, see what happens
[13:29:29 CET] <JEEB> also another great thing is mediainfo, which will tell you information but doesn't try to hint you where it thinks it read it
[13:29:49 CET] <JEEB> so then people ask you why a piece of information is shown with file A, but not file B
[13:30:18 CET] <JEEB> and you're like "well it clearly doesn't tell you where exactly it parsed that stuff"
[13:30:27 CET] <JEEB> (or if it was just a guess)
[13:30:33 CET] <JEEB> (but based on what?)
[13:30:45 CET] <Delchi_> Well huzzah
[13:30:47 CET] <Delchi_> it works
[13:30:49 CET] <JEEB> for mp4 files I really like L-SMASH's boxdumper
[13:30:59 CET] <JEEB> well, great :)
[13:31:11 CET] <Delchi_> whatever diff 0x01 and 0x02 is , the camera doesn't care and its playing back the edited file w/out issue
[13:31:20 CET] <Delchi_> Break out the rub
[13:31:22 CET] <Delchi_> tum
[13:31:25 CET] <Delchi_> rum
[13:31:27 CET] <Delchi_> ( I can type )
[13:31:34 CET] <Delchi_> rum drinks for all
[13:32:53 CET] <darsain> I have a zip file with frames as images, and I'm doing "unzip -p | ffmpeg -i pipe:0 ..." to make it into a video, which works most of the time, but sometimes I get "pipe:0: Invalid data found when processing input" error. the zip is fine, files in it are also fine (when I extract them and encode via -f concat it works fine). any idea what might be the issue?
[13:32:55 CET] <JEEB> basically boxdumper for mp4/mov and the likes is basically a text-based representation :) so you get the type of the thing and then the values in it. really great when you want to go down n' dirty and look at actual differences in structure/values
[13:33:13 CET] <Delchi_> Looking forit now
[13:33:26 CET] <JEEB> it's a command line app that is part of the l-smash project
[13:33:33 CET] <JEEB> https://github.com/l-smash/l-smash
[13:34:40 CET] <Delchi_> FYI : http://www.headbands.com/gspot/
[13:34:53 CET] <JEEB> yea, I used to use gspot back in very early 2000s
[13:35:03 CET] <Delchi_> <-- Putting the old in old school
[13:35:04 CET] <JEEB> but it was heavily based on DShow filters then instead of parsing actual data
[13:35:28 CET] <JEEB> ffprobe and mediainfo are the two independent parsers, and then you have mkvinfo for matroska container
[13:36:01 CET] <JEEB> (usually it's a good idea to have some tools for generic media information, and then you have the format-specific tools for more close inspection)
[13:36:34 CET] <JEEB> ffprobe being part of FFmpeg
[13:44:02 CET] <Delchi_> Gotcha
[13:44:25 CET] <Delchi_> I've been using ffprobe ...
[13:53:26 CET] <darsain> so no ideas why ffmpeg denies my input stream?
[14:23:19 CET] <norbert> hm, timeout https://i.imgur.com/ENjk4RL.png
[14:25:01 CET] <norbert> works now
[14:27:20 CET] <norbert> on the "General" tab, when I set my full name (that is also the tab that has an input for the email address) and press "Save changes", it says "Warning: The email address specified is already in use. Please specify a different one."
[16:47:45 CET] <sine0> hey JEEB
[16:48:02 CET] <sine0> remember when I asked in here the other day what was the best command line option to bath resize images
[16:48:17 CET] <sine0> did you say ffmpeg or imgmagick
[16:48:24 CET] <furq> nobody in here would say imagemagick
[16:48:34 CET] <sine0> lmao
[16:49:09 CET] <furq> ffmpeg -v error -i foo.png -vf zscale=123:456:f=lanczos bar.png
[16:49:17 CET] <sine0> ok
[16:51:32 CET] <sine0> I have this dilemma. I have about 3k images that I need to import into an ecommerce, they are of varying sizes. I want to make them 400x400. i want priority on the width, so if the width, so width to 400, and height keeping aspect ratio, if less than 400 i want a 400 height over png and if more i want crop. can I do this my brother
[16:52:13 CET] <sine0> and do you think I need to script this is a for loop
[16:52:33 CET] <furq> yes you'll need a for loop
[16:52:44 CET] <fritsch> and perhaps even two if conditions
[16:52:56 CET] <furq> i'm not entirely clear on what you want
[16:53:15 CET] <furq> you can definitely scale to 400 width and auto height, and you can definitely crop if the height is over 400
[16:53:23 CET] <furq> but i didn't get the middle bit
[16:54:03 CET] <sine0> yea thats it. but if the height is less thank, say its a tube of toothpaste picture sideways.... can it then have it make the image height 400 but with a transparent background for the height. this makes hte display universion when showing products
[16:54:33 CET] <sine0> I can fecking type to save my life on this laptop, sorry folks. normally im on a big old mech keyb
[16:54:38 CET] <sine0> cant*
[16:54:44 CET] <fritsch> you might want to draw it with transparent ink? https://www.youtube.com/watch?v=BKorP55Aqvg
[16:55:09 CET] <furq> so you want everything to be 400x400 and for the height to be either cropped or padding with transparency if it's not 400
[16:55:15 CET] <furq> padded
[16:56:25 CET] <gh0st3d> hey everyone, wanted to check and see if there's anything I can do to speed up this command. It takes ~24s to generate a 10s clip (I'm admittedly not familiar enough to know if that's normal or not). Anywho, here's the command I run:  https://apaste.info/Q2QD
[16:56:34 CET] <sine0> furq: thats right
[16:57:00 CET] <gh0st3d> And in case it's relevant, the image that's being used is a 1280x720 so it's being upscaled to 1920x1080. Not sure if that adds a significant amount to the processing time
[16:58:26 CET] <furq> something like -vf scale=400:-2:f=lanczos,pad=0:if(gt(ih\,400)\,400):0:if(gt(ih\,400)\,(400-ih)/2),crop=400:400:0:0
[16:58:58 CET] <furq> or
[16:59:10 CET] <furq> -vf scale=400:-2:f=lanczos,pad=0:if(gt(ih\,400)\,400):0:if(gt(ih\,400)\,(400-ih)/2):color=0x00000000,crop=400:400:0:0
[16:59:24 CET] <furq> hopefully padding with alpha actually works, otherwise it gets more complicated
[17:01:11 CET] <sine0> furq your a little gangster mate im going to try this out.
[17:01:35 CET] <furq> that pad stuff is broken, hang on
[17:02:19 CET] <furq> -vf scale=400:-2:f=lanczos,pad=400:if(lt(ih\,400)\,400):0:if(lt(ih\,400)\,(400-ih)/2):color=0x00000000,crop=400:400:0:0
[17:02:22 CET] <furq> that should be it
[17:02:43 CET] <furq> also you'll probably want to quote everything after -vf
[17:03:48 CET] <furq> gh0st3d: there's not much you can do other than -preset superfast
[17:03:59 CET] <furq> you could also prescale the image to 1080p
[17:04:28 CET] <furq> i'm pretty sure ffmpeg will scale every frame
[17:04:37 CET] <gh0st3d> Gotcha, thank you very much!
[17:04:54 CET] <furq> i also don't think setdar/setsar are doing anything there
[17:05:05 CET] <furq> that won't give a noticeable performance difference though
[17:05:24 CET] <gh0st3d> The output video is getting merged with another video and I thought I read they had to be exactly the same for easy concatenation
[17:05:32 CET] <furq> oh right
[17:05:40 CET] <furq> well
[17:05:48 CET] <furq> i would have expected that to be the dar/sar regardless
[17:06:05 CET] <furq> also you probably want -framerate 25 before -i, and get rid of -r 25 after i
[17:06:13 CET] <furq> before -i mockup.png obv
[17:07:49 CET] <gh0st3d> This sounds rude but it's a real question haha.  What is the difference between those two?
[17:10:19 CET] <furq> i think it's the default anyway so -r 25 will be a no-op
[17:10:44 CET] <furq> but -framerate before a looped image input is the framerate it'll read at
[17:12:01 CET] <furq> -r as an output option will then drop/duplicate input frames to achieve that output framerate
[17:12:24 CET] <furq> the result is the same in this instance but it's generally a good habit to distinguish the two
[17:12:49 CET] <furq> also i suspect -framerate is slightly faster
[17:16:41 CET] <gh0st3d> Dang, still runs about the same time with both changes.
[17:17:04 CET] <gh0st3d> What if I made a 1second video clip, and then when I merge it with the other video I just merge it 9 more times?
[17:17:17 CET] <gh0st3d> Guess I couldn't really do the fadein at that point
[17:17:31 CET] <furq> by both changes do you mean prescaling the image and -preset superfast
[17:18:29 CET] <gh0st3d> Prescaling & the -framerate before the -i. I'll see how superfast does. I was worried it would ruin the quality too much
[17:21:27 CET] <furq> you can just bump the crf if you're worried about that
[17:21:44 CET] <furq> actually
[17:21:52 CET] <furq> are you using x264 for the video you're concatenating this to
[17:22:03 CET] <furq> if you are then you'll want to use the same preset
[17:24:50 CET] <gh0st3d> hmm, how do I find that if I use ffprobe on the first file?   The code already merges them successfully, if that answers the question
[17:26:00 CET] <furq> it won't show up in ffprobe
[17:26:14 CET] <furq> check the x264 encoder settings in mediainfo and compare it to http://dev.beandog.org/x264_preset_reference.html
[17:26:24 CET] <furq> but yeah if it works now i'd just leave it as is
[17:26:36 CET] <furq> unless you're really desperate to shave four seconds off
[17:27:39 CET] <gh0st3d> I'll see if it can merge with the superfast setting. Switching to that took off 10 seconds which should be good enough assuming the video still looks fine.
[17:27:49 CET] <furq> you can just lower the crf if it looks off
[17:28:38 CET] <furq> if it doesn't work then try -preset superfast -refs 2
[17:30:07 CET] <gh0st3d> Sweet, that worked fine. This should be perfect then! Thank you again!
[17:53:30 CET] <sine0> furq: option f not found
[17:53:36 CET] <sine0> -vf that you pasted earlier
[17:53:54 CET] <furq> zscale, not scale
[17:53:57 CET] <sine0>  sudo apt-get install ffmpeg && libavfilter-dev
[17:54:03 CET] <sine0> k
[17:54:33 CET] <sine0> no such filter zscale what deps do i need to pull in
[17:55:04 CET] <sine0> [AVFilterGraph @ 0x5646c95539a0] No such filter: 'zscale'
[17:56:23 CET] <furq> in that case scale=123:456:sws_flags=lanczos
[17:56:48 CET] <furq> you'd need to rebuild ffmpeg with zscale if you don't have it
[17:57:05 CET] <furq> the regular scaler will be fine
[17:58:06 CET] <sine0> yes that filter worked great. thanks im using debian, I wouldnt want to start building my own ffmpeg at this current time :D
[17:59:12 CET] <sine0> but the transparency didnt work. is that because of zscale or not
[17:59:28 CET] <sine0> isnt transparency FFFFFFF
[17:59:32 CET] <sine0> now thats white
[17:59:41 CET] <furq> it's rgba
[17:59:47 CET] <furq> it doesn't matter what rgb is if a is 00
[18:00:12 CET] <furq> i take it your input and output format supports transparency
[18:00:20 CET] <sine0> would it matter if the source was jpg and the file saved was png
[18:00:28 CET] <furq> probably
[18:00:39 CET] <furq> try adding format=rgba to the start of the filterchain
[18:01:58 CET] <sine0> that works thanks for your time and input, it has given me a real legup. ta
[18:17:53 CET] <leewdch> are there options for libvpx I should take care of when working with still images?
[18:18:23 CET] <leewdch> libx264 has a tune specific for still images, I was wondering if there are options to do the same thing with libvpx
[19:43:31 CET] <JEEB> alexpigment: btw I just checked one of the two UHD BD discs I have and it seems like libbluray is getting language codes from somewhere
[19:43:50 CET] <JEEB> it could be in the playlist file since pointing lavf at the MPEG-TS file doesn't show anything
[19:57:42 CET] <malc_> I'm getting "tests/Makefile:175: tests/fate/xvid.mak: No such file or directory" after successful configure (git head), what's wrong? (configuring xvid out doesn't help)
[22:38:10 CET] <JEEB> kind of surprised I didn't lose mastering display metadata when doing stream copy from MPEG-TS to mp4
[23:45:07 CET] <dystopia_> is there anyway to get ffmpeg to just show it's stats line? instead of video input/output info then it's stats line
[23:45:20 CET] <dystopia_> or someway to do like cls before it's stats line shows
[00:00:00 CET] --- Sun Feb 18 2018


More information about the Ffmpeg-devel-irc mailing list