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

burek burek021 at gmail.com
Fri Feb 16 03:05:02 EET 2018


[00:16:20 CET] <AppAraat> hello, I shot some videos with my Nexus 5x (mediainfo: https://bpaste.net/show/2c37a9dd2929) but it's apparently a difficult format for Blender VSE to handle primarily because of its variable framerate. So I was wondering how I could convert this video format to a format with a constant framerate with minimal quality loss if possible.
[00:47:29 CET] <sfan5> AppAraat: you can probably just ffmpeg -i input.mp4 -vf fps=30 -crf 18 output.mp4
[00:47:38 CET] <sfan5> oh, add -c:a copy somewhere in the middle
[00:48:24 CET] <AppAraat> ty, I'll try that in a bit.
[00:52:40 CET] <AppAraat> sfan5: like this? ffmpeg -i input.mp4 -vf -c:a copy fps=30 -crf 18 gvfd_processed.mp4
[00:54:20 CET] <AppAraat> ah no, apparently ffmpeg -i input.mp4 -c:a copy -vf fps=30 -crf 18 output.mp4
[00:54:44 CET] <AppAraat> cpu = ded
[01:06:03 CET] <zerodefect> I'm using C-API, to do H.264 live encoding at CBR. I'm struggling to understand the applicable settings in AVCodecContext that are apply to quality other than bitrate.
[01:06:19 CET] <JEEB> depends on the exact encoder
[01:07:11 CET] <zerodefect> @JEEB can you elaborate on that, please?
[01:07:25 CET] <zerodefect> I thought there was one :)
[01:07:39 CET] <zerodefect> X.264
[01:08:03 CET] <JEEB> libx264 is one of the possible H.264 encoders that can be utilized through libavcodec at this point
[01:08:23 CET] <JEEB> in addition to the standard AVCodecContext variables, each other has a bunch of AVOptions
[01:08:35 CET] <JEEB> for libx264 preset is probably quite useful
[01:08:57 CET] <JEEB> which is the option that in the libx264 library controls speed VS compression
[01:09:16 CET] <JEEB> then you have stuff like the gop length, which is a AVCodecContext parameter
[01:09:42 CET] <JEEB> and then you have maxrate/bufsize that you are probably setting already for CBR purposes :P (albeit very useful for constrainted VBR as well)
[01:10:44 CET] <zerodefect> Thanks! Does global_quality in AVCodecContext apply when nal-hrd=cbr ?
[01:10:54 CET] <JEEB> no
[01:10:57 CET] <zerodefect> I'm guessing that is more for crf?
[01:11:13 CET] <JEEB> global_quality I don't even know if it maps to anything in libx264
[01:11:26 CET] <JEEB> for nal-hrd=cbr you want to use x264-params AVOption
[01:11:43 CET] <JEEB> although it seems to have its own AVOption as well
[01:11:54 CET] <JEEB> (random things have had AVOptions added)
[01:17:03 CET] <zerodefect> Do you ever find a need to tinker with the motion estimation?
[01:17:21 CET] <JEEB> no
[01:17:40 CET] <JEEB> generally speaking unless you have a real need, you tweak the preset, and maybe tune
[01:18:21 CET] <JEEB> the rest is generally just rate control etc
[01:19:42 CET] <zerodefect> Presumably, I set the preset/tune after setting things like width/height/gop-size, etc.
[01:20:56 CET] <JEEB> libx264 was quite well set up for not to be hard to use in the end
[01:21:07 CET] Action: JEEB remembers ye "good" old days where presets weren't a thing :P
[01:21:50 CET] <zerodefect> Sounds like I missed out ;)
[01:31:47 CET] <AppAraat> sfan5: it converted but it lost the audio
[01:53:35 CET] <AppAraat> https://bpaste.net/show/3b0ebfbd632f
[01:54:24 CET] <AppAraat> Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 96 kb/s (default)
[01:54:34 CET] <AppAraat> so I guess it saw the audio stream, but did nothing with it
[02:20:28 CET] <SortaCore> I have a m3u8 chunklist video stream, but last time I recorded it with copy codec, the ending was missing
[02:20:39 CET] <SortaCore> *video livestream
[04:04:19 CET] <therage3> what version of the LAME encoder is in ffmpeg stable?
[04:20:43 CET] <furq> whichever one you build it with
[04:30:15 CET] <therage3> I see
[04:34:39 CET] <furq> there weren't actually any sound quality improvements in 3.100 and the last release before that was 2012
[04:35:15 CET] <furq> so i wouldn't worry too much
[05:18:28 CET] <ddo_> HI everyone, I'm having issues with x264 PKG_CONFIG_PATH being different from everything else. Is it okay if I ./configure --enable-libx264 separately? Or do I need to do everything at once?
[05:20:50 CET] <furq> you need to do everything at once
[05:21:23 CET] <furq> i'm guessing you don't have a libx264.pc in your PKG_CONFIG_PATH so it's falling back to the default
[05:24:31 CET] <ddo_> yah its not showing when i do pkg-config --list-all
[05:25:29 CET] <ddo_> if I know the location of libx264.pc, is there anyway I can correct this?
[05:37:59 CET] <ddo_> nm after I reinstalled like 3x it took to the right path
[05:38:01 CET] <ddo_> thanks
[06:02:08 CET] <ddo> okay, so ffmpeg successfully compiled and installed. But when I try to find the version or location (ffmpeg -version or which ffmpeg) nothing can be found. Any ideas how to check if its actually installed/
[10:01:37 CET] <AppAraat> hi, I'm trying to convert a format with variable fps (https://bpaste.net/show/2c37a9dd2929) to a format with constant fps, but it doesn't seem to get the audio into the output format - https://bpaste.net/show/3b0ebfbd632f
[10:47:20 CET] <veenu> Hey i am new here,i want to contribute to ffmpeg.Can someone help me find a project to work on.
[11:30:33 CET] <Nacht> -filter_complex '[0:a:0]asetpts=PTS-STARTPTS' should set the first PTS, of the audio, to zero shouldnt it ?
[14:36:18 CET] <kepstin> AppAraat: You'll have to clarify what "seems" means there - according to the output you pasted, ffmpeg copied the audio over just like oyu asked it to.
[14:41:46 CET] <AppAraat> sorry, should have clarified even further. I updated ffmpeg to the latest stable and it works now.
[16:21:47 CET] <Guisch> Hey evreryone
[16:22:24 CET] <Guisch> Need some help after an ffmpeg installation in a docker
[16:22:47 CET] <Guisch> If someone is avaible let me know ! Thx
[16:23:05 CET] <DHE> ask a specific question, don't ask "someone is available"
[16:23:41 CET] <Guisch> Ok sorry
[16:26:32 CET] <Guisch> I follow this guide https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu to install ffmpeg on a docker. When i exec ~/bin/ffmeg it work but the when i directly exec ffmpeg command it does not work. Even if ran source ~/.profile. I don't know if it's a ffmpeg or docker problem. Thx by advance ! :)
[16:32:10 CET] <BtbN> souds more like you just never setup your PATH properly
[17:50:48 CET] <circ-user-0kzVF> Morning all
[17:51:51 CET] <Delchi> So here is my situation : I've got a camera that records in .asf , and I want to use ffmpeg to make an adjustment to the audio by having a small segment of the audio drop to 0 volume, then back up. HEre is how I'm basically doing it :
[17:52:09 CET] <Delchi> ffmpeg -i video.mp4 -af "volume=enable='between(t,5,10)':volume=0, volume=enable='between(t,15,20)':volume=0" ...
[17:52:20 CET] <Delchi> ( sub asf for mp4 )
[17:53:04 CET] <Delchi> ffmpeg -i 901.asf -af "volume=enable='between(t,15,18)':volume=0" 901edited.asf
[17:53:15 CET] <Delchi> This works w/out error.
[17:53:33 CET] <Delchi> when I play back the resulting asf file in VLC , the effect is exactly what I want
[17:54:00 CET] <Delchi> now when I transfer the file back to my camera and play it, it acts as if the volume change never happened
[17:54:25 CET] <Delchi> and the audio track plays straight through
[17:54:35 CET] <Delchi> Any thoughts on what might cause this ?
[17:56:56 CET] <durandal_1707> Delchi: you are playing wrong file?
[17:57:03 CET] <Delchi> No
[17:57:32 CET] <Delchi> At least not to my knowledge, my output file is a different name from my input file so I don't confuse them
[17:58:36 CET] <Delchi> Is it possible that the volume change is being written to some kind a metadata file, and my only copying over the asf file , I'm not copying the metadata file and there fore no change happens ?
[17:58:46 CET] <kepstin> well, the output from that ffmpeg command will have only 1 audio track, and it has replaced the sound in the muted sections with silence, so there's nothing to recover
[17:59:18 CET] <Delchi> That's my thinking as well
[17:59:26 CET] <Delchi> but I was unsure so I came here
[17:59:39 CET] <Delchi> the camera does have a metadata file ( .mtd ) but I'mnot touching that
[17:59:59 CET] <kepstin> so... it sounds like you're playing the wrong file (I'd suggest deleting the original off the camera to confirm - after backing it up, of course)
[18:00:43 CET] <Delchi> Have tried that - I'll do it again now to ensure.
[18:02:27 CET] <furq> if it is something to do with the metadata then it's the camera that's screwing it up, not ffmpeg
[18:02:50 CET] <furq> -af volume will modify the actual audio stream
[18:06:01 CET] <friki_> Hi, I'm using the following command to capture from BlackMagic Decklink device, encode ProRes+aac and store into a matroska file. The problem is that the command is using more than 2 threads (taking more than 12 CPU threads!). Any tip? -> ffmpeg -threads 2 -loglevel info -f decklink -list_devices 0 -list_formats 0 -i "DeckLink Duo (1)" -video_input sdi -audio_input embedded -draw_bars false -channels 16 -format_code Hi50 -vcodec prores_ks -profile:v 3 -vendor
[18:06:02 CET] <friki_> ap10 -pix_fmt yuv422p10le -acodec aac -b:a 96k -n out.mkv
[18:06:35 CET] <furq> friki_: -threads before -i just sets the number of decode threads
[18:06:59 CET] <Delchi> furq : Thanks , that's what I was trying to confirm. I have not used ffmpg before so I wanted to be sure i was using it correctly.
[18:07:47 CET] <Delchi> now I need to track down the format of this metadata file :)
[18:08:14 CET] <friki_> furq: so I can put 2 "-threads" options one before -i and one after? cool!
[18:08:56 CET] <furq> yeah
[18:09:07 CET] <furq> but if you set -threads 2 twice then you'll end up with four
[18:09:25 CET] <furq> or more likely three because that decoder is probably only singlethreaded anyway
[18:09:48 CET] <friki_> like a glove, THANKS
[18:09:50 CET] <furq> plus you then have libavfilter threads which are separate
[18:10:01 CET] <furq> although i don't see any filters there so that probably won't matter
[18:10:30 CET] <friki_> may be i'll add yadif filter later
[18:11:49 CET] <Delchi> Is it possible that there is metadata IN the .asf file that is being elimianted by ffmpeg in the process?
[18:16:18 CET] <kepstin> possibly, yes, but removing metadata wouldn't cause audio to magically be restored to a blanked track.
[18:16:56 CET] <kepstin> ffmpeg prints out the metadata it finds and copies when it runs.
[18:17:10 CET] <Delchi> True.
[18:17:22 CET] <Delchi> Now the camera is not playing the file back at all. Mmmmmm Interesting
[18:18:23 CET] <Delchi> Must be something in that .mtd file
[19:40:31 CET] <shincode> is h.264 codec parameter CRF a made up meaning for quantization parameter?
[19:42:22 CET] <DHE> it's not a quantization parameter. at best it's a codec option that aims for a quality target despite a variable qp
[19:44:29 CET] <kepstin> really, it's an internal implementation detail of the x264 codec
[19:45:35 CET] <kepstin> (it's actually originally part of how the 2-pass bitrate target encoding mode in that codec worked)
[19:48:45 CET] <AppAraat> a container format should not have any quality effect, right? It's the encoder that decides that mostly?
[19:48:57 CET] <furq> if by mostly you mean entirely then yes
[19:49:53 CET] <AppAraat> oh, cool :)
[19:50:11 CET] <shincode> So your saying CRF and QP are two seperate things
[19:50:16 CET] <AppAraat> yeah for some reason Blender can't output as mp4 (which youtube recommends) so I'm outputting it to mkv now
[19:50:22 CET] <shincode> as if CRF is the final parameter
[19:50:46 CET] <kepstin> shincode: crf encoding mode and constant qp encoding mode are completely different things, yes
[19:50:54 CET] <kepstin> there's no relation between the two
[19:51:56 CET] <shincode> i used h264 a lot with ffmpeg now im diving deep
[19:52:36 CET] <shincode> if you have any links that talks about h264 in good detail like to reconstruct the codec myself; i'd appreciate it
[19:52:38 CET] <kepstin> keep in mind that crf is something internal to the libx264 encoder specifically, and is not a property of the h264 codec in general.
[19:53:12 CET] <furq> the value you pass to crf isn't actually a quantiser value
[19:53:18 CET] <furq> it just happens to use the same range as cqp
[19:55:17 CET] <kepstin> in crf mode the x264 encoder dynamically adjusts the bit allocation/qp based on how complex the visuals are and how much motion there is to maintain approximately constant visual quality over the length of the video, according to their psy optimizations.
[19:55:38 CET] <shincode> now vlc had some sort of switch between libx264 and some other library for the format.
[19:56:09 CET] <shincode> did crf work on that other format... and maybe you know what i mean by other format
[19:56:16 CET] <shincode> if not forget it.
[19:56:44 CET] <furq> it was probably openh264 and if it was then no
[19:56:54 CET] <shincode> yes thats right
[19:56:58 CET] <shincode> that was the name of it.
[19:57:06 CET] <furq> ffmpeg can use that as well if you want
[19:57:10 CET] <furq> you probably don't want to though
[19:57:34 CET] <shincode> nah, when doing streaming shit over rtsp we receieved h264 from traffic cameras
[19:57:56 CET] <shincode> and sometimes the quality would screw up big time and someone in this channel or another said your bandwidth sucks.
[19:58:25 CET] <shincode> I agreed, but higher ups refused to tell the customer it admin to do anything about it and always fell back on us to make shitty connections work better
[19:58:28 CET] <furq> the whole point of openh264 is that it's a baseline-only encoder for webrtc in browsers that cisco have paid the license fee for
[19:58:36 CET] <furq> in order to drive adoption of webrtc
[19:58:39 CET] <shincode> i experiemented with crf before only a little bit
[19:58:48 CET] <furq> so if you really need a free baseline-only encoder then great, but you probably don't
[20:00:42 CET] <shincode> One thing that confuses me is I see some companies want av programmers
[20:01:27 CET] <shincode> the only examples I see of this kinds is oh take one stream here scale it bicubic and a stream over there and do the same and reencode to a new stream to send to someone else.... Wala you have skype? or something similar
[20:01:56 CET] <shincode> Is there a demand for these programmers? I don't understand why it just seems like they could take gstreamer, ffmpeg, or vlc of a like make a app and be done
[20:05:06 CET] <kepstin> well, in real life, the "just take ffmpeg and make an app" step is surprisingly hard and requires lots of engineering decisions based on experience, and then you're not really done because you have to handle supporting infrastructure as well.
[20:08:13 CET] <shincode> Its true...
[20:10:50 CET] <shincode> I used with security cameras and doing something to the resultant image. FFmpeg(rather the libavcodec, libavformat) was dealt with mostly in the beginning then only had seldom issues later on.
[20:11:11 CET] <shincode> and the resultant image... the doing something was where the massive amounts of work was done.
[20:11:17 CET] <shincode> So if that really a av programmer?
[22:41:16 CET] <AppAraat> furq: so that means if you're going to convert an mp4 to an mkv and vice versa there's not going to be any quality loss, right?
[22:41:45 CET] <JEEB> if you are remuxing, true
[22:42:51 CET] <AppAraat> ah ok, so remuxing = lossless and re-encoding = lossy (unless re-encoding from one lossless encoding to another lossless encoding) ?
[22:43:10 CET] <JEEB> your source doesn't have to be lossless, but yes - lossless coding is lossless :)
[22:43:42 CET] <JEEB> (basically whatever your source is, exactly the same thing pops out after a lossless encoder's result is decoded
[22:43:43 CET] <AppAraat> ah ok, well TIL :)
[22:43:45 CET] <AppAraat> ty
[00:00:00 CET] --- Fri Feb 16 2018


More information about the Ffmpeg-devel-irc mailing list