[Ffmpeg-devel-irc] ffmpeg.log.20180529
burek
burek021 at gmail.com
Wed May 30 03:05:01 EEST 2018
[00:00:46 CEST] <lays147> Hello all, I need some help. I need to concatenate n videos that needs to have 8 audio channels each. Non necessary they will come with 8 channels, so I think that I need to normalize the video to have 8 channels and then concat them. I would like to know if this is the right approach, because this is my first try with ffmpeg.
[00:01:40 CEST] <lays147> i would appreciate any help on this,
[00:06:14 CEST] <user24> Q: I'm using `ffmpeg -re -f lavfi -i "sine=frequency=1000:duration=10" test.wav` to generate a sine wave in real time and write it to a file. How can I make ffmpeg flush the file every n bytes (my chunk size)?
[00:07:31 CEST] <user24> Right now, when I look at the output file size in real time it's first at 78 bytes for a few seconds, then 262222, then 524366. I'd like to write/flush the file every 2048 bytes.
[00:08:52 CEST] <klaxa> https://ffmpeg.org/ffmpeg-protocols.html#file
[00:09:00 CEST] <klaxa> looks like you can set it with -blocksize 2048
[00:09:37 CEST] <klaxa> lays147: sounds sane, you want to upmix from whatever to 8 channels then
[00:10:00 CEST] <klaxa> not sure if it can be done with filters only or if you have to script around a bit
[00:12:46 CEST] <user24> klaxa: this doesn't seem to have an effect
[00:12:48 CEST] <lays147> klaxa: I'm using python to run the ffmpeg because is a flow that I'm working on.
[00:14:05 CEST] <user24> https://gist.github.com/void4/070ea1e8fee9e5e25164b62d8c0dacb0
[00:15:33 CEST] <klaxa> hmm yeah... i'm testing around myself right now
[00:22:44 CEST] <klaxa> hmm an "easy hack" that (probably?) doesn't exactly write 2048 bytes but writes much faster would be using a pipe
[00:22:58 CEST] <klaxa> doesn't look like the -blocksize option gets applied correctly
[00:23:37 CEST] <klaxa> to use a pipe you can run: ffmpeg -re -f lavfi -i "sine=frequency=1000:duration=10" -f wav pipe: > test.wav
[00:23:48 CEST] <klaxa> note that this overwrites test.wav regardless of whether it exists or not
[00:24:28 CEST] <furq> lays147: just -ac 8
[00:24:43 CEST] <furq> it's a noop on 7.1 and it'll upmix anything else
[00:24:56 CEST] <furq> idk how well it'll upmix it but it should at least work
[00:25:10 CEST] <user24> klaxa: that works! :D thank you very much!
[00:25:45 CEST] <klaxa> great! but like i said, it's a hack
[00:26:12 CEST] <user24> yeah, good enough for me. I'm going to ask on stackoverflow to see if there's another way
[00:26:32 CEST] <klaxa> it's documented it should work, maybe later i can even take a look and check why it's not working as described
[00:28:03 CEST] <fa0> Well I finally found something to cut it, ffmpeg -i input.mkv -ss 00:00:06 -strict -2 -t 01:00:00 output.mkv
[00:30:21 CEST] <user24> https://stackoverflow.com/questions/50574086/ffmpeg-flushing-output-file-every-chunk
[00:31:10 CEST] <lays147> furq: I tried that, I used a video mono with 5 tracks, and the output was a 8 channel, but the audio was mixed in the third channel. and the others channels was empty
[00:31:12 CEST] <user24> klaxa: Thank you for the offer, your approach seems to work well
[00:31:24 CEST] <furq> oh
[00:31:35 CEST] <furq> if you have multiple audio tracks you want to mix then you need to use filters
[00:31:55 CEST] <furq> !filter amix @lays147
[00:31:55 CEST] <nfobot> lays147: http://ffmpeg.org/ffmpeg-filters.html#amix
[00:32:39 CEST] <furq> so presumably -af amix=inputs=5,aresample=och=8
[00:35:09 CEST] <lays147> furq: I'm confused. What I need is to concat N videos, that have between 1 and 8 channels of audio. this single output, how can I manage the channels?
[00:40:05 CEST] <lays147> I think that what I need to know first is that if I need to normalize the videos that doesnt have 8 channels of audio, to add silence to them, and then concat.
[00:43:17 CEST] <lays147> furq: klaxa would be something like this? https://pastebin.com/t49FkWXg
[01:26:12 CEST] <fa0> damm I finally split a video into 3 sections and joined it LOL
[01:26:14 CEST] <fa0> sheesh
[03:49:28 CEST] <sickcure> alright, so I've been advised ffmpeg might be what I need to fix some corrupted camcorder files. after a bit of guesswork on other channels, I've ended up here.
[03:49:51 CEST] <sickcure> I suppose the number one issue I'm having is I can't figure out how to actually *use* ffmpeg
[03:50:59 CEST] <furq> do you by any chance have mp4 files with missing headers
[03:57:06 CEST] <sickcure> believe that's exactly the issue
[03:58:02 CEST] <sickcure> one batch of the files are MP4s, one batch are MTS, all encoded in x264.
[04:00:49 CEST] <sickcure> I've tried a number of programs and have met my wit's end.
[04:03:47 CEST] <furq> yeah ffmpeg can't fix that
[04:04:06 CEST] <furq> i assume the ts files work and the mp4s don't
[04:04:23 CEST] <furq> if the ts files are broken then you probably have a different issue
[04:29:07 CEST] <not_sickcure> furq, the TS files are encoded the same way
[04:29:13 CEST] <not_sickcure> just a different container
[04:29:29 CEST] <furq> yeah if those are broken as well then you have a different issue
[04:30:21 CEST] <furq> the missing header issue is specific to mp4
[04:32:17 CEST] <sickcure> furq, what do I need to do to send you a private message here?
[04:32:32 CEST] <furq> you're better off asking in here
[04:32:35 CEST] <furq> most people in here are much smarter than i am
[04:33:49 CEST] <sickcure> I'm really at a loss with these, and am to the point that if I can pay someone to get these working, I'll be thrilled
[04:34:26 CEST] <sickcure> I don't have a ton of money going into these, because these were a zero budget production and the budget is entirely coming out of my pocket, but I could spare enough to make it worth while
[16:07:32 CEST] <foobarry> hi, compiling from source and want nvenc, i'm getting "ERROR: cuda requested, but not all dependencies are satisfied: ffnvcodec" even though i pulled "https://git.videolan.org/git/ffmpeg/nv-codec-headers.git" and make installed it too. i also tried using the intructions at https://www.metaask.com/8752/error-cuvid-requested-dependencies-satisfied-cuda-ffnvcodec but still get the error, any suggestions?
[16:08:32 CEST] <foobarry> the headers do get installed in /usr/local/include/ffnvcodec, but either the configure script isn't picking it up or wants something else?
[16:12:04 CEST] <foobarry> oh i was missing pkg-config package. that's a bit of a misleading error from the configure script
[16:51:08 CEST] <Zexaron> Hello
[16:52:17 CEST] <Zexaron> so it was suggested I that a program use ffmpeg's GPU encoders in order to relese CPU workload, but isn't that GPU specific right in terms of codec name ?
[16:53:33 CEST] <Zexaron> so resulting video would be different depending on GPU right, still usable/playable just would take more coding effort, but I guess it's worth it if it proves to relieve the CPU
[16:54:40 CEST] <Nacht> Zexaron: For more info I suggest looking here: https://trac.ffmpeg.org/wiki/HWAccelIntro
[16:55:52 CEST] <Mario____> Hi. I have a question about equalizer filter. What is a Q-factor? (https://ffmpeg.org/ffmpeg-filters.html#equalizer)
[17:03:04 CEST] <Nacht> Mario____: My guess is, https://en.wikipedia.org/wiki/Q_factor
[17:05:12 CEST] <Mario____> thanks
[17:27:29 CEST] <Mario___> I have another question with audio equalizer. If I add overlapping ranges, will they sum or just one of them will work?
[18:48:52 CEST] <acresearch> hello people, i have a video with a strange audio encoding, it works in my computer but not my TV, how can i re-encode the audio without loosing any video quality?
[18:55:32 CEST] <Blacker47> acresearch, with something like ffmpeg -i input.file -v:codec copy -a:codec target output.file with apropriate target codec...
[18:56:03 CEST] <acresearch> Blacker47: hmm i am not very good at audio encoding, what would be something good?
[18:56:23 CEST] <Blacker47> acresearch, you probably should start at finding out what audio codec is used now.
[18:56:43 CEST] <Blacker47> something good != something that your TV supports.
[18:56:51 CEST] <acresearch> Blacker47: i see
[18:56:59 CEST] <acresearch> ok 1 moment let me see how i can find out
[18:57:20 CEST] <Blacker47> also not all container supports all codecs.
[18:58:13 CEST] <acresearch> i have .mp4 (this is the container?) its audio is MPEG-4 AAC Surround 5.1 48000 Hz 384 kbps
[18:59:51 CEST] <acresearch> Blacker47: the strang part is that i have other videos with the extact same audio setup and .mp4 but they work with my TV ?!?! confused
[19:01:36 CEST] <Blacker47> try (+install) "mediainfo filem.mp4" and compare the output.
[19:03:11 CEST] <acresearch> ok 1 moment
[19:06:59 CEST] <Blacker47> acresearch, you can maybe try MP3 as audio codec: https://en.wikipedia.org/wiki/Comparison_of_video_container_formats#Audio_formats_supported
[19:07:24 CEST] <Blacker47> acresearch, you also may try to contact the vendor of your tv.
[19:07:57 CEST] <acresearch> Blacker47: samsung, i doubt it, it is a tv from 2014, also in my country we do not have customer services
[19:08:12 CEST] <acresearch> anyway the difference is in the format profile,
[19:08:58 CEST] <acresearch> format profile: main seems to not work but LC works
[19:09:17 CEST] <Blacker47> is this for audio or for the video stream?
[19:10:36 CEST] <acresearch> Blacker47: audio
[19:11:34 CEST] <Blacker47> ok. didn't know they can have profiles too.
[19:13:06 CEST] <acresearch> so how can i change the profile? or reencode the file with something that will work?
[19:17:30 CEST] <acresearch> i am getting Invalid loglevel "copy"
[19:17:56 CEST] <Blacker47> acresearch something like that: https://superuser.com/a/1082211
[19:18:03 CEST] <Blacker47> just with .mp4 files...
[19:19:04 CEST] <acresearch> ok
[20:57:26 CEST] <^Neo> hello friends, I'm interested in how the codec parameters channel layout versus the frame channel layout gets set and parsed?
[20:57:37 CEST] <^Neo> i.e. when I open an AC3 codec, and say it returns 2.0
[20:57:50 CEST] <^Neo> and I get a frame from a source that has a channel layout 5.1
[20:58:00 CEST] <^Neo> is there no enforcement of the codecpars from the AVStream?
[20:58:12 CEST] <JEEB> always trust the AVFrame, the codecpar is just the information the decoder had when it got created
[20:58:27 CEST] <JEEB> a lot of decoders can be dynamic due to the nature of formats you're dealing with
[20:58:56 CEST] <JEEB> I've got plenty of broadcast channels that switch between stereo and 5.1 in f.ex. AC3, and that's 100% valid
[20:59:25 CEST] <JEEB> if you want to make sure you get the audio stuff in a certain format, you add filtering (which then utilizes swresample to remix)
[20:59:52 CEST] <JEEB> I hope you understand what I'm trying to convey :P
[21:00:50 CEST] <^Neo> I do :0
[21:00:53 CEST] <^Neo> :)
[21:01:15 CEST] <^Neo> side question about swresample
[21:01:18 CEST] <^Neo> can you make it generic?
[21:01:30 CEST] <^Neo> and basically say I don't care about the input, give me 5.1 on the output?
[21:02:00 CEST] <JEEB> you will have to reconfigure it when the sample rate/channel layout switches, but other than that you just care about your output
[21:02:10 CEST] <JEEB> I think the libavfilter filter does that for you
[21:02:27 CEST] <JEEB> you just say "I want 5.1, 48000kHz on the output" and you get that
[21:03:35 CEST] <JEEB> there's literally a function in swresample that takes in an AVFrame (which decoders give out and encoders take in) for both in and output
[21:03:42 CEST] <JEEB> which reconfigures the swresample chain
[21:04:03 CEST] <JEEB> https://www.ffmpeg.org/doxygen/trunk/swresample_8h.html
[21:04:06 CEST] <^Neo> is there one for av_filter_graph?
[21:04:08 CEST] <JEEB> AVFrame based API
[21:04:21 CEST] <JEEB> ^Neo: for avfilter you can just keep feedin'
[21:04:31 CEST] <^Neo> I've found that's not the cause
[21:04:35 CEST] <^Neo> I've found that's not the case
[21:04:48 CEST] <JEEB> interesting, I remember in my tests it worked but it might depend on the filters
[21:04:57 CEST] <^Neo> I was doing some ebur128 stuff
[21:05:04 CEST] <JEEB> oh, eburc128
[21:05:06 CEST] <^Neo> but the buffersrc would reject it
[21:05:13 CEST] <JEEB> yea it depends 100% on the filters I think
[21:05:45 CEST] <JEEB> although of course I'm not 100% sure. not sure how much I tested my audio filtering test code when I last poked at it
[21:15:39 CEST] <sickcure> alright, so my the professional data recovery company I was working with has let me down. I have some corrupted video files I desperately need to recover. they were from two different interview shoots I did, sitdown documentary style interviews. Unfortunately my camera decided to output some bad files. The files seem to be complete, but will not play in anything. I am willing to pay for working files! I've got the source files
[21:15:40 CEST] <sickcure> uploaded to my google drive right now and anyone willing to take a look and make an attempt is welcome
[21:59:42 CEST] <alexpigment> sickcure: does mediainfo say anything about the video or audio streams at all?
[22:00:23 CEST] <sickcure> nah, no info found
[22:00:36 CEST] <sickcure> and I've yet to find anything that can even open them
[22:00:37 CEST] <alexpigment> not a good sign
[22:01:07 CEST] <alexpigment> i'm assuming that ffmpeg -i [input] -c copy output.ext does nothing
[22:01:25 CEST] <sickcure> I honestly couldn't figure out how to work ffmpeg
[22:01:31 CEST] <sickcure> and that's how I ended up here
[22:01:49 CEST] <alexpigment> well, pm me a link to the google drive and i'll be happy to take a look
[22:02:03 CEST] <alexpigment> but if mediainfo has no info, it's usually hopeless
[22:02:53 CEST] <klaxa> pretty much
[00:00:00 CEST] --- Wed May 30 2018
More information about the Ffmpeg-devel-irc
mailing list