[Ffmpeg-devel-irc] ffmpeg.log.20180803
burek
burek021 at gmail.com
Sat Aug 4 03:05:01 EEST 2018
[01:58:32 CEST] <mindcrimes> does ffmpeg allow google drive streams?
[01:58:34 CEST] <mindcrimes> just curious
[02:00:22 CEST] <DHE> what do you mean by "allow" ?
[02:02:03 CEST] <mindcrimes> is able to? /me shrugs
[02:02:15 CEST] <mindcrimes> I just want to stream stuff from my drive
[02:09:17 CEST] <heating2> Hi! I was wondering if I'm using ffmpeg wrong or if I've found a bug, I was trying to convert a file to s16le using 'ffmpeg -i myfile.webm -f s16le somenewfile', the command runs successfully but after trying to play back the output the audio is slowed down a ton so it's impossible to tell what the original was
[02:11:31 CEST] <DHE> heating2: that's a raw format. there's no sample rate on it. maybe you want a format like wav with that information?
[02:13:54 CEST] <heating2> DHE: Well, I have to convert it to s16le in order to convert it to opus
[02:14:27 CEST] <DHE> wait what?
[02:14:36 CEST] <heating2> (there's a few other steps involved in between otherwise I would be using ffmpeg to convert it to opus in the first place)
[02:16:09 CEST] <Cracki> "somenewfile.wav" please
[02:16:19 CEST] <Cracki> use some container format
[02:16:28 CEST] <Cracki> heating2, ^
[02:16:45 CEST] <heating2> Cracki, in the actual situation it's being piped from stdout
[02:17:40 CEST] <heating2> I tried that as well though and still get the slowed down audio
[02:19:28 CEST] <DHE> so the source is also headerless and you need to set a sample rate
[02:20:08 CEST] <DHE> usually add "-r 48000" or such before the -i parameter
[02:32:08 CEST] <heating2> DHE, doesn't seem to work :/
[02:33:20 CEST] <DHE> well I'm guessing. I'm lacking details here... also having trouble believing the source is actually a webm file on disk...
[02:36:29 CEST] <heating2> DHE, https://hastebin.com/vosijibiru.bash
[02:48:21 CEST] <Cracki> show your script
[02:48:30 CEST] <Cracki> or oneliner or whatever
[02:49:01 CEST] <heating2> to make that output I used 'ffmpeg -r 48000 -i test.webm -f s16le -r 48000 test.wav 2> /tmp/out.txt'
[02:49:06 CEST] <Cracki> according to that log, output should sound like input
[02:49:30 CEST] <heating2> If you'd like I can send you sample inputs and ouputs?
[02:49:31 CEST] <Cracki> how do you play these files
[02:49:38 CEST] <Cracki> upload them, yes
[02:49:45 CEST] <heating2> ffplay -f s16le whatever.wav
[02:49:54 CEST] <Cracki> maybe don't do that
[02:50:09 CEST] <Cracki> -f s16le will probably tell it that the file is raw
[02:50:19 CEST] <Cracki> and will assume 8000 hz or something
[02:50:29 CEST] <Cracki> so it will play the header as audio too
[02:50:38 CEST] <heating2> https://transfer.sh/UZhtP/test2.wav https://transfer.sh/13xUS1/test2.webm
[02:50:40 CEST] <Cracki> just drop the -f s16le for ffplay
[02:51:13 CEST] <heating2> Cracki, when I do that I get 'test2.wav: Invalid data found when processing input'
[02:51:23 CEST] <Cracki> ah... it's not a wav!
[02:51:29 CEST] <Cracki> drop the -f s16le for ffmpeg too!
[02:51:42 CEST] <Cracki> use -c:a ...
[02:51:51 CEST] <heating2> I'm trying to convert the webm to s16le
[02:52:02 CEST] <Cracki> OR use ffplay with -f s16le -r 48000
[02:52:09 CEST] <Cracki> s16le is a raw format
[02:52:15 CEST] <Cracki> you want uncompressed pcm
[02:52:19 CEST] <Cracki> so you want -c:a ...
[02:52:34 CEST] <heating2> Cracki, Failed to set value '48000' for option 'r': Option not found
[02:52:38 CEST] <Cracki> oh well
[02:53:23 CEST] <Cracki> first, DO NOT make ffmpeg save that output as "wav"
[02:53:28 CEST] <Cracki> let it save as .raw or something
[02:53:38 CEST] <Cracki> that makes it clear that that file is NOT a wav, but just raw data
[02:53:44 CEST] <heating2> Oh I was told to use .wav because "it needs a container"
[02:53:47 CEST] <Cracki> it does
[02:54:05 CEST] <Cracki> but as long as you use -f s16le, it will NOT write a container at all, no matter what the file name is
[02:54:09 CEST] <DHE> WAV is a container
[02:54:12 CEST] <Cracki> I told you, use -c:a something
[02:54:25 CEST] <Cracki> DHE, the file he uploaded ends in .wav, but it has no wav header
[02:54:29 CEST] <Cracki> it's just the samples
[02:54:39 CEST] <Cracki> USE -C:A SOMETHING
[02:55:07 CEST] <heating2> Cracki, I used c:a and it gives static
[02:55:10 CEST] <Cracki> https://trac.ffmpeg.org/wiki/audio%20types
[02:55:16 CEST] <Cracki> what exact command?
[02:55:36 CEST] <heating2> ffmpeg -i test2.webm -f s16le -c:a copy test2.raw
[02:55:43 CEST] <Cracki> ffmpeg -i foo.webm -c:a pcm_s16le out.wav
[02:55:44 CEST] <heating2> should I use -c:a s16le ?
[02:55:47 CEST] <heating2> ohhh
[02:55:55 CEST] <Cracki> you need to listen more carefully
[02:56:32 CEST] <Cracki> when I said use -c:a, I meant that IN PLACE OF "-f ...", not in addition
[02:56:41 CEST] <heating2> Alright sorry
[02:56:44 CEST] <heating2> thanks for your help
[02:56:50 CEST] <Cracki> read moar docs
[02:57:09 CEST] <Cracki> docs are life
[02:57:41 CEST] <Cracki> so many critters on my walls, liking the lamp, and then dying when I turn it off...
[03:04:08 CEST] <Cracki> that "listen carefully" part was supposed to be a joke ;)
[10:26:52 CEST] <dadabidet> hello
[10:26:58 CEST] <dadabidet> ffmpeg -i img_%03d.gif output.mp4
[10:27:30 CEST] <dadabidet> img_%03d.gif: No such file or directory
[10:30:08 CEST] <DHE> gif isn't supported by the sequential frames decoder because a gif is believed to already be animated
[10:30:39 CEST] <DHE> and you normally wouldn't use a .gif for a single frame
[10:30:40 CEST] <dadabidet> ok
[10:44:42 CEST] <dadabidet> neither firefox not VLC can read the video
[10:44:51 CEST] <dadabidet> nor
[10:46:14 CEST] <dadabidet> firefox says file is corrupt
[10:46:19 CEST] <dadabidet> wait
[10:47:32 CEST] <dadabidet> actually VLC does show it
[10:47:41 CEST] <dadabidet> not firefox, still corrup
[10:47:42 CEST] <dadabidet> t
[10:49:05 CEST] <dadabidet> might be a format=yuv420p issue
[10:49:19 CEST] <dadabidet> I would have thought firefox had an up to date player
[10:50:19 CEST] <furq> er
[10:50:27 CEST] <dadabidet> yeah I would need to resize those image to a multiple of 2
[10:50:29 CEST] <furq> DHE: is it not supported if you use -f image2
[10:50:55 CEST] <dadabidet> I made it work by converting to PNG with python+pillow
[10:51:35 CEST] <DHE> furq: yeah I know
[10:52:22 CEST] <furq> i know the image2 muxer supports gif so i assume the demuxer does
[10:53:07 CEST] <DHE> I checked the code. it doesn't seem to.
[10:53:12 CEST] <furq> lame
[10:53:15 CEST] <dadabidet> any idea why VLC play that video, and not firefox 61?
[10:53:54 CEST] <furq> which os
[10:54:01 CEST] <DHE> well nobody uses .gif for single frames, and concatenating multiple videos should use the concat filter/demuxer
[10:54:04 CEST] <furq> firefox on windows doesn't support 4:4:4 because wmf doesn't
[10:54:15 CEST] <poutine> what is the url to the video?
[10:54:30 CEST] <poutine> curious what the content type is
[10:54:38 CEST] <dadabidet> ubuntu
[10:55:00 CEST] <poutine> neat url
[10:55:57 CEST] <dadabidet> where could I post a raw video, its less than 200KB
[10:56:08 CEST] <furq> 0x0.st
[10:56:39 CEST] <dadabidet> oh nice
[10:56:58 CEST] <poutine> dadabidet, curl <url> |grep -i "content-type"
[10:57:25 CEST] <poutine> are you putting a file:/// url into firefox?
[10:57:29 CEST] <furq> oh nvm
[10:57:32 CEST] <dadabidet> yeah why
[10:57:40 CEST] <furq> apparently firefox on all platforms removed support for 4:4:4 because it can't be supported on windows or osx
[10:57:44 CEST] <furq> so that's probably the issue
[10:57:47 CEST] <dadabidet> oh
[10:58:35 CEST] <furq> you should really convert it to 4:2:0 if you want it to be viewable on the web anyway
[10:58:42 CEST] <furq> desktop chrome is the only thing that supports 4:4:4
[11:00:31 CEST] <dadabidet> curl -F'file=@output.mp4' http://0x0.st
[11:00:47 CEST] <dadabidet> is that the right command? it returns me http://0x0.st/-k.txt
[11:05:30 CEST] <dadabidet> so to be clear, if I want 4:2:0 I need to change my images size to a 2 multiple?
[11:05:40 CEST] <dadabidet> or is there another way?
[11:10:16 CEST] <dadabidet> I need a reverse crop with pillow
[11:14:37 CEST] <dadabidet> what kind of channel could I go to ask about image manipulation/
[11:14:41 CEST] <dadabidet> ?
[11:57:45 CEST] <feabeaeadd> Hello
[11:58:34 CEST] <feabeaeadd> How can I extract a specific frame from a video? Can I ask FFmpeg to extract "frame number 32" for exemple?
[12:20:33 CEST] <hrvoje> try ffmpeg -i inputfile -vf 'select=eq(n\,32)' -vframes 1 output.png
[12:20:43 CEST] <hrvoje> it might work
[12:23:58 CEST] <feabeaeadd> Hum
[12:24:18 CEST] <feabeaeadd> Thanks hrvoje, I'll try. But why is it so complicated?
[12:26:34 CEST] <hrvoje> It's not that complicated, you just have to get used to it :)
[13:27:44 CEST] <Cracki> video formats are complicated.
[13:27:55 CEST] <Cracki> variable frame rate, ... seeking to non-keyframes, ...
[15:33:10 CEST] <ArsenArsen> can I guess the "best" codec available for a certain format (eg for mp4 it would give me x264 if available) using the libavformat api
[15:47:03 CEST] <DHE> ArsenArsen: if you have it as an AVOutputFormat* object, avof->video_codec contains the codec_id of that codec
[15:47:32 CEST] <DHE> note that H264 is a codec, x264 is an encoder
[16:41:25 CEST] <ArsenArsen> DHE, I am about to write to a file and I just need a codec that is compatible with the given container
[16:43:45 CEST] <DHE> ArsenArsen: assuming that the avof->video_codec field is sane, AVCodec *encoder = avcodec_find_encoder(avof->video_codec); // should be sufficient most of the time
[16:44:43 CEST] <paulk-leonov> hi there
[16:44:58 CEST] <paulk-leonov> is there a way to encode with x265 with only intra frames and declaring main profile?
[16:45:22 CEST] <paulk-leonov> I'm going with: ffmpeg -i "$path" -c:v libx265 -crf 0 -profile:v main -x265-params frame-threads=6:keyint=1:ref=1:no-open-gop=1:weightp=0:weightb=0:cutree=0:rc-lookahead=0:bframes=0:scenecut=0:b-adapt=0:repeat-headers=1 "$path-h265.mp4"
[16:45:32 CEST] <paulk-leonov> but that does not declare main profile in the bitstream
[16:47:43 CEST] <ArsenArsen> okay, I got that DHE, but how do I make sure the codec would be properly initialized and ready to write reencoded video data (in this case from rawvideo to whatever)
[16:48:19 CEST] <DHE> ArsenArsen: have you read the example apps in the doc/examples directory?
[16:48:31 CEST] <ArsenArsen> I'm working off of remuxing.c
[16:49:44 CEST] <DHE> yeah but that's a pure remuxer, converting say MP4 to MKV without any codec processing. such a program would be mainly limited by disk speed
[16:49:59 CEST] <ArsenArsen> ah
[16:50:11 CEST] <ArsenArsen> that's not what I need, I'd also need to reencode it to a different codec
[16:50:54 CEST] <DHE> you might want transcoding.c which does a full transcode from file to file
[16:51:25 CEST] <ArsenArsen> mhm, I'll check that one out, and strip away all the filtering
[16:53:28 CEST] <jkqxz> paulk-leonov: What profile does it get? I think it should be Main by default for any 8-bit 4:2:0 input, but if you supply a 10-bit input or something else then it will have to give you Main10 or RExt instead.
[16:53:42 CEST] <paulk-leonov> jkqxz, it's always rext apparently
[16:54:03 CEST] <paulk-leonov> using -profile:v with mainstillpicture also gives rext
[16:54:34 CEST] <DHE> generally the encoders will examine the parameters of the encoder and write the "true" profile. if you're overriding anything in x265-params that violates the main profile it will write something else...
[16:54:40 CEST] <DHE> (or it could be an x265 bug?)
[16:54:56 CEST] <paulk-leonov> ok so maybe I need to trim down my options
[16:55:17 CEST] <paulk-leonov> but I guess that only intra frames should be compatible with every profile
[16:55:20 CEST] <DHE> conversely if you set the profile to main but set other options low enough I know x264 will write "baseline" to the bitstream....
[16:55:21 CEST] <paulk-leonov> (provided it's 8-bit 420)
[16:56:15 CEST] <jkqxz> Sounds like the input isn't 8-bit 4:2:0, I guess.
[16:57:16 CEST] <jkqxz> "-g 1" should give you intra-only for most codecs, but just trying it it seems not to work at all for libx265.
[16:57:55 CEST] <jkqxz> Yeah, the wrapper doesn't look at gop_size at all. That might be worth fixing...
[16:59:35 CEST] <jkqxz> Ah, it gives you RExt because it decides that you wanted 'Main Intra' profile rather than 'Main' profile.
[17:01:00 CEST] <jkqxz> That's kindof insane.
[17:05:38 CEST] <ArsenArsen> :q
[17:05:45 CEST] <ArsenArsen> wrong window - oops
[17:05:46 CEST] <jkqxz> <https://bitbucket.org/multicoreware/x265/src/eea92165b035db5ebb1f902debba171362fec783/source/encoder/level.cpp?fileviewer=file-view-default#level.cpp-76> The profile supplied explicitly by the user is checked but then mostly ignored (though explicit Intra profiles will give you intra-only).
[17:12:34 CEST] <paulk-leonov> jkqxz, oh, so there are such intra-only profiles?
[17:13:06 CEST] <paulk-leonov> so an intra constraint automatically gives MAINREXT
[17:13:12 CEST] <jkqxz> Yes. Main Intra is a subprofile of RExt.
[17:13:20 CEST] <paulk-leonov> damn
[17:13:31 CEST] <paulk-leonov> I need this to have VAAPI pick it up
[17:13:32 CEST] <jkqxz> But using that by default is completely insance, since it will only mess up compatibility and provide essentially no benefit.
[17:13:50 CEST] <jkqxz> I would go and edit libx265 to not do that.
[17:14:25 CEST] <paulk-leonov> is it usually a shared lib when used with ffmpeg?
[17:14:39 CEST] <jkqxz> (Since Main Intra is a subset of Main, but being marked as RExt will make most decoders reject it.)
[17:14:47 CEST] <jkqxz> Yes.
[17:15:17 CEST] <paulk-leonov> alright, looks like I can get it done in the next 45 mins
[17:18:53 CEST] <jkqxz> I guess if libx265 is making these files then it might be worth editing the hwaccel code in ffmpeg to treat (Main Intra, Main 10 Intra) as (Main, Main 10) for hardware decode purposes.
[17:19:02 CEST] <jkqxz> But that won't help you with any other decoder.
[17:21:29 CEST] <paulk-leonov> yes indeed, that would help a lot
[17:21:45 CEST] <paulk-leonov> I'll try to submit a patch to libx265 next week then
[17:21:55 CEST] <paulk-leonov> for choosing the right profile
[17:22:13 CEST] <paulk-leonov> and to ffmpeg for allowing hwaccel
[17:28:28 CEST] <jkqxz> Oh - Main Intra technically allows greyscale where Main does not. That shouldn't make much difference to the change, though.
[17:41:28 CEST] <ArsenArsen> does anyone have a working screen capture implementation that doesn't utilize deprecated methods (in C)
[17:42:59 CEST] <pi-> Is there anyone around that might be willing to help me through adding 1s of black to the start of a video?
[17:43:17 CEST] <pi-> (happy to offer consultancy rate)
[17:45:24 CEST] <pi-> https://video.stackexchange.com/questions/20717/ffmpeg-add-3-seconds-of-black-to-video-head-and-tail <-- this looks like a healthy solution, but I will struggle to implement it quickly
[17:49:41 CEST] <killown> how do I calc the kbps bitrate from a video?
[17:49:46 CEST] <killown> with ffmpeg*
[18:34:13 CEST] <Cracki> killown, use ffprobe
[18:34:18 CEST] <Cracki> it tells you tons of stuff
[18:35:00 CEST] <DHE> yes but it doesn't consistently tell you the whole video bitrate, usually only audio bitrates (since many codecs are fixed bitrate) and whole file bitrate (file size / duration)
[23:33:33 CEST] <Case_Of> atomnuker: not any release for cyanrip?
[23:49:16 CEST] <atomnuker> no, 3.3 is too old, didn't have flac coverart embedding which I really wanted
[23:50:06 CEST] <atomnuker> just compile 4.0, install it to somewhere and use PKG_CONFIG_PATH to add that directory when you compile cyanrip
[23:50:26 CEST] <atomnuker> doesn't have to be root, could be somewhere in /home
[00:00:00 CEST] --- Sat Aug 4 2018
More information about the Ffmpeg-devel-irc
mailing list