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

burek burek021 at gmail.com
Wed Dec 28 03:05:01 EET 2016


[00:38:31 CET] <Modern13> if i use crf=0,  is it lossless ?
[00:42:51 CET] <furq> with 8-bit x264, es
[00:42:52 CET] <furq> yes
[00:52:52 CET] <Modern13> with 10bit x264 it's not?
[00:53:29 CET] <Modern13> furq with 10bit x264 it's not?
[00:54:53 CET] <JEEB> it isn't
[00:55:05 CET] <JEEB> because crf values go to negative values with >8
[00:56:16 CET] <CoJaBo> Modern13: -qp 0
[02:13:24 CET] <miketo> can ffmpeg split a file into segments based on chapter metadata?
[02:39:54 CET] <Modern13> how come i cannot play  some  incomplete mp4 files but  sometimes i CAN play incomplete mp4 file
[02:40:18 CET] <Modern13> note( i can always play incomplete mkv file)
[02:43:38 CET] <Modern13> how come i cannot play  some  incomplete mp4 files but  sometimes i CAN play incomplete mp4 file ( i can ALWAYS play incomplete mkv file)
[02:56:47 CET] <miketo> Modern13: has to do with how the mp4 format was designed.
[02:57:01 CET] <Modern13> explain why sometimes plays sometimes don't
[02:57:08 CET] <Modern13> with mkv , it always plays
[02:58:14 CET] <miketo> mkv is different from mp4.   in mp4 there's important metadata (i think called moov atom)  usually at the end of file.  it can be put in beginning of file but that requires more work.
[02:59:33 CET] <Modern13> miketo  and with MKV  , it's forced to put atom in the beginning?
[02:59:48 CET] <miketo> Modern13: here's an old discussion that might be relevant:  http://forum.doom9.org/showthread.php?t=169815
[03:00:25 CET] <Modern13> can you put "atom at the end" with MKV file
[03:00:49 CET] <miketo> i don't think moov atom exists in mkv.  remember it's different.
[03:00:54 CET] <Modern13> i see
[03:01:24 CET] <Modern13> if mp4 cannot play incomplete file, how is mp4 even such a popular format:  this make no sense
[03:02:06 CET] <miketo> according to official sources here:  it looks like the seeking/meta info is always in the header (beginning of file)
[03:02:09 CET] <miketo> https://matroska.org/technical/diagram/index.html
[03:02:38 CET] <Modern13> can you imagine if youtube cannot play unless you download the whole file
[03:03:08 CET] <miketo> popular doesn't mean perfect.  mp4 weren't designed to be streamed.
[03:03:26 CET] <Modern13> what does youtube use then
[03:04:32 CET] <miketo> lots of things.  the webpage player (or app) can choose different audio/video formats
[03:05:12 CET] <miketo> each video on youtube is transcoded into different qualities/formats.  that way it can play on different connections(quality) and different devices (format)
[03:05:12 CET] <Modern13> youtube can always play incomplete video files though
[03:07:15 CET] <Modern13> miketo  are you certain that  mp4 with atom at the end are way more popular?
[03:08:01 CET] <miketo> the #1 trending video on youtube now is available as (12 video streams, 5 audio streams, and 5 combined streams)  formats are: webm, mp4, m4a, 3gp
[03:09:32 CET] <miketo> no, i'm not certain.  but from what i've read, it looks like that was the "older, established, or easiest" way.   it can't be moved to beginning until *after* entire file has already been finished once
[03:10:16 CET] <Modern13> but it can always play in youtube
[03:10:59 CET] <miketo> yes, it would make sense that youtube would be smart enough to move the atom to the front.  i'll download a mp4 video file and check if you want
[03:11:33 CET] <Modern13> i have about 30 mp4 files, how do i check  if  atoms are front or end
[03:12:15 CET] <miketo> Modern13: see here http://superuser.com/questions/559372/using-ffmpeg-to-locate-moov-atom
[03:16:56 CET] <miketo> also, small correction.  it looks like youtube doesn't use mp4 container.  it uses DASH (a stream-able container) for all of the non-combined streams.   i'm downloading an older format mp4 (audio+video) version of the same video now to check
[03:18:44 CET] <miketo> yep.  the mp4 youtube format does has moov atom at the beginning of file.
[03:19:30 CET] <Modern13> ffplay.exe -faststart  test.mp4  doesn't work
[03:19:52 CET] <miketo> you can use youtube-dl to list the formats (-F) of a video, then download the one you want (-f ##).   you can use  AtomicParsley -T to list the mp4 atom tree
[03:20:09 CET] <Modern13> atomicparsley, is that part of ffmpeg ?
[03:20:27 CET] <miketo> don't think so.  i came here for a different question.
[03:21:36 CET] <miketo> http://atomicparsley.sourceforge.net/   "AtomicParsley is a lightweight command line program for reading, parsing and setting metadata into MPEG-4 files"
[03:22:38 CET] <furq> dash isn't a container, it uses fragmented mp4 afaik
[03:23:07 CET] <furq> at least on youtube it does
[03:25:39 CET] <Modern13> i just did  AtomicParsley input.mp4 -T
[03:25:49 CET] <Modern13> how do i tell if it's on beginning or end
[03:26:03 CET] <Modern13> i cannot tell from all the numbers it shows on display
[03:26:09 CET] <furq> also browsers can play an mp4 with the moov atom at the end without downloading the whole thing if the http server supports range requests
[03:26:51 CET] <miketo> thanks furq. i wasn't trying to be precise.  it does seem to be some sort of container or stream format.  MediaInfo shows "Format DASH, Codec ID DASH" even though the data is avc1
[03:27:42 CET] <Modern13> http://pastebin.com/yP9Avb9L   is this  end or beginning?
[03:27:54 CET] <furq> mpeg-dash is a streaming protocol, like hls
[03:28:20 CET] <furq> except hls uses mpegts fragments
[03:29:15 CET] <miketo> Modern13: second line says mov is at byte 24, and size 931974 (about 910kb)
[03:29:49 CET] <Modern13> miketo i see, thanks
[03:29:54 CET] <Modern13> so safe to say that's beginning?
[03:30:17 CET] <miketo> yes,
[03:32:28 CET] <miketo> furq: cool, thanks.
[03:35:33 CET] <Modern13> You must be off your block thinking I'm going to tag a file that is at LEAST 4005456973 bytes long.
[03:35:33 CET] <Modern13> AtomicParsley doesn't have full 64-bit support
[03:36:33 CET] <Modern13> what is this error message
[03:37:33 CET] <miketo> furq: looking at hexdump i can see the the string 'ftypedash' after a few nulls at beginning of file.  it doesn't seem entirely honest to say it's only a protocol since it persists into on-disk storage.  media player don't have a problem with it
[03:39:47 CET] <Modern13> how do i use option  faststart with ffmpeg ?
[03:40:07 CET] <Modern13> or ffplay
[03:41:12 CET] <miketo> Modern13: did you check here: https://www.ffmpeg.org/ffmpeg-formats.html#mov_002c-mp4_002c-ismv
[03:41:38 CET] <miketo> Modern13: what are you trying to accomplish?
[03:42:03 CET] <Modern13> i want to see if mp4 is beginning or end  by using ffplay
[03:42:08 CET] <Modern13> atom*
[03:43:10 CET] <Modern13> atomicparsley is too buggy
[03:53:46 CET] <miketo> Modern13:  try this command to see if the moov atom is in the file:   strings <FILE> | grep "moov"
[03:54:07 CET] <Modern13> would that work in cmd.exe ?
[03:54:47 CET] <miketo> probably not. those are unix utilities, but there are versions available for windows
[03:56:05 CET] <Modern13> miketo i think i found a better app
[03:56:25 CET] <Modern13> MP4Box from the gpac package can do that.
[03:56:26 CET] <Modern13> Code:
[03:56:26 CET] <Modern13> MP4Box -info -v file.mp4
[03:56:26 CET] <Modern13> If you only need to check that moov is before mdat, -v (verbose) is not even necessary : MP4Box -info will display "File suitable for progressive download (moov before mdat)".
[03:57:05 CET] <miketo> cool, thanks for the info.  hope that's what you needed
[04:03:48 CET] <Modern13> if i do  ffmpeg -i input.mkv -vcodec copy -acodec copy output.mp4     does that create mp4 with  moov in the beginning or end
[04:04:34 CET] <miketo> there are no moov atoms in mkv files.  the atoms are part of how mp4 container works
[04:04:51 CET] <Modern13> i know
[04:04:59 CET] <Modern13> but look at the question i am asking carefully
[04:05:03 CET] <miketo> oh sorry ^^;
[04:05:20 CET] <miketo> read backwards.  it will (almost certainly!) put it at the end
[04:05:56 CET] <miketo> there's a setting to move it to the beginning that defaults to "disabled"
[04:05:59 CET] <Modern13> does fmpeg support  putting in the beginning ?
[04:06:09 CET] <Modern13> oh?  how?
[04:06:47 CET] <miketo> did you even skim the link i gave about faststart?   (
[04:06:47 CET] <miketo>   https://www.ffmpeg.org/ffmpeg-formats.html#mov_002c-mp4_002c-ismv  )
[04:07:59 CET] <miketo> " it can be moved to the start for better playback by adding faststart to the movflags "     also scroll down to "-movflags faststart"
[04:09:18 CET] <Modern13> ffmpeg -i input.mkv qt-faststart -vcodec copy -acodec copy output.mp4
[04:09:20 CET] <Modern13> is this correct
[04:11:12 CET] <miketo> i can't imagine
[04:11:45 CET] <miketo> use "-movflags faststart"
[04:12:00 CET] <Modern13> oh okay
[04:12:47 CET] <Modern13> is there disadvantage of putting in the beginning?
[04:12:51 CET] <Modern13> or using  -movflags faststart
[04:14:06 CET] <Modern13> miketo  didn't work:   Option movflags not found.
[04:14:28 CET] <Modern13> ffmpeg -movflags faststart -i R:\4-1.mkv -vcodec copy -acodec copy R:\output.mp4
[04:14:36 CET] <miketo> from how i understand it:  the file itself might be better, but it takes more work to make it.
[04:15:40 CET] <miketo> i just tested with "ffmpeg -i input.mkv -c copy -movflags faststart test.mp4" and it worked fine
[04:16:07 CET] <miketo> i'd bet it's an output option (has to be before the output file name *NOT* before the "-i"
[04:16:14 CET] <Modern13> oh
[04:17:46 CET] <Modern13> thanks, it worked
[04:18:09 CET] <miketo> np ^^;
[04:19:51 CET] <Modern13> i see more mp4 files that has movflag in the beginning than end
[04:24:05 CET] <Modern13> i thought  end is more popular
[04:24:58 CET] <miketo> i have no idea about popular.   the end is more "natural"
[04:26:07 CET] <miketo> you can't make the moov atom until you know details like the exact length of the other data.  since you have this information when you're done, it's natural to write it at the end.
[04:29:43 CET] <Modern13> then why do i see more mp4 files that has movflag in the beginning than end
[04:30:13 CET] <Modern13> i just randomly downloaded bunch of mp4 to test
[04:31:59 CET] <miketo> if it's at the front of the file, then the file had to have (at least one) extra processing step.   i'm not surprised that many places will go through the extra step to make files that stream better.   depending on where the file is from, i'd expect it
[04:32:46 CET] <miketo> for example, it seems all youtube mp4 have moov in front.   that's not surprising since we know youtube already spends a lot of cpu to re-encode every uploaded file for the best user experience
[04:34:55 CET] <Hello71> lol, downloaded bunch from youtube
[04:35:36 CET] <Modern13> Hello71 no none of them from youtube
[04:35:48 CET] <Modern13> because that will be pointless, they all will be  on the front
[04:36:04 CET] <Modern13> what other container  supports  x264/aac  other than mp4 and mkv
[04:38:08 CET] <miketo> Modern13: lots.   https://en.wikipedia.org/wiki/Comparison_of_video_container_formats
[04:38:59 CET] <Modern13> what would you recommend to use  if "mp4/mkv" wasn't the one of the choice
[04:39:22 CET] <Modern13> and that ffmpeg supports muxing to
[04:40:42 CET] <miketo> i'm no expert.  but i use mkv.  it supports so much.  if you can't use mkv for some reason, then that reason will probably tell you which to use (example: device doesn't support mkv, but does support mp4)
[04:41:11 CET] <Modern13> miketo  i heard webm is popular, but i don't see that in that wiki site
[04:42:24 CET] <miketo> i'm likely to be wrong, but i think webm is a subtype of mkv (simpler version for mobile or something)
[04:42:49 CET] <Modern13> i never heard that
[04:42:58 CET] <Modern13> does ffmpeg support webm
[04:43:37 CET] <miketo> it seems to decode webm perfectly, but i don't think to can encode into webm
[04:44:32 CET] <miketo> from wiki: "The WebM container is based on a profile of Matroska"  matroska is the name for mkv extension
[04:45:51 CET] <Modern13> miketo what about mux mp4 to  webm
[04:49:10 CET] <miketo> from ffmpeg "Only VP8 or VP9 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM"
[04:50:07 CET] <miketo> so you'd have to re-encode if not using those codecs, but it does seem to work
[04:53:12 CET] <Modern13> ok
[04:57:09 CET] <miketo> i need to go. good luck
[05:03:21 CET] <jay_> hello~!
[05:03:45 CET] <jay_> Somebody help me.
[05:04:13 CET] <jay_> Unrecognized option 'tune'. Error splitting the argument list: Option not found
[05:05:31 CET] <jay_> ffmpeg -i 'pipe:0' -acodec copy -vcodec copy -preset ultrafast -tune zerolatency -f flv rtmp://loacalhost:1935/src/
[05:06:45 CET] <jay_> Can anyone help? I have no idea what to do.
[05:07:11 CET] <jay_> ffmpeg version N-82166-g894e7ef Copyright (c) 2000-2016 the FFmpeg developers   built with gcc 4.8.3 (GCC) 20140911 (Red Hat 4.8.3-9)   configuration: --prefix=/usr/local/ffmpeg_build --extra-cflags=-I/usr/local/ffmpeg_build/include --extra-ldflags=-L/usr/local/ffmpeg_build/lib --bindir=/usr/local/bin   libavutil      55. 35.100 / 55. 35.100   libavcodec     57. 65.100 / 57. 65.100   libavformat    57. 57.100 / 57. 57.100   libavdevice 
[06:03:13 CET] <miketo> jay_: -tune isn't an option for flv format
[06:04:08 CET] <miketo> it's an x264 option, but you're not using x264
[08:18:09 CET] <Janos__> Hi, I am trying to figure out why ffmpeg started to make recording in slower speed and pitch than the original source?
[08:19:37 CET] <Janos__> I've been using kazam to do some screen capturing, I first thought it's an issue with kazam, but now I've tried a few different screen capture tools, and they all produce the same slowed down video/audio
[08:24:39 CET] <Janos__> Has anyone here had a similar experience and knows what to do? I've been searching for a solution but found nothing..
[09:07:05 CET] <torroid> Hi! Im would like to contribute.. Please could I get a starting point?
[09:08:04 CET] <Janos__> maybe try the Development channel
[09:08:16 CET] <Janos__> at: #ffmpeg-devel
[09:09:44 CET] <torroid> thanks a lot!
[09:10:02 CET] <JEEB> just start with building
[09:11:59 CET] <Janos__> I did some cli tests, and the problems seems to be linked to recording from the analog-stereo monitor
[09:12:38 CET] <Janos__> ffmpeg -y -f pulse -i default -r 30 -f x11grab -s 1920x1080 -i ${DISPLAY} -c:v libx264rgb -crf 0 -preset:v ultrafast -c:a pcm_s16le -af aresample=async=1:first_pts=0 out1.mkv
[09:13:00 CET] <Janos__> records from the microphone with perfect speed
[09:13:11 CET] <Janos__> ffmpeg -y -f pulse -i alsa_output.pci-0000_00_14.2.analog-stereo.monitor -r 30 -f x11grab -s 1920x1080 -i ${DISPLAY} -c:v libx264rgb -crf 0 -preset:v ultrafast -c:a pcm_s16le -af aresample=async=1:first_pts=0 out2.mkv
[09:15:57 CET] <Janos__> records from the analog-stereo, the sound is slow and low pitch
[09:51:01 CET] <Janos__> https://ubuntuforums.org/showthread.php?t=2347599
[09:51:43 CET] <Janos__> I started a thread, so I can provide more details and make it easier to discuss the issue... if someone feels like taking a look and/or help me out, I'd greatly appreciate it :)
[09:58:31 CET] <pomaranc> that may be a problem with pulseaudio
[09:58:46 CET] <pomaranc> because pulseaudio sucks
[13:12:49 CET] <zetheroo> I have these videos taken with my DSLR at 1080p. They are pretty big - 1GB = @6 min. I would like to downsize them without loosing quality ... as much as possible. I have been trying with WinFF but the output files are just as larger, or larger, than the originals.
[13:16:53 CET] <ikevin> zetheroo, you can't compress a video without loosing quality
[13:19:10 CET] <zetheroo> ikevin: Handbrake seems to do the trick, except that there is no audio on the file after conversion
[13:20:03 CET] <zetheroo> video is still 1080p and near to the same quality as the original but is less than half the size of the original
[13:20:33 CET] <zetheroo> YouTube seems to also keep the quality while compressing video quite a bit
[13:21:42 CET] <zetheroo> how can I compress my video's with ffmpeg?
[13:22:44 CET] <BtbN> youtube keeping the quality? If you mean getting rid of any quality that might have been in the original video, maybe.
[13:22:47 CET] <DHE> yes. how much to compress is a bit of a black art...
[13:23:06 CET] <zetheroo> I guess so
[13:23:11 CET] <DHE> and yes, BtbN is right. youtube bitrate is actaully rather low. maybe fine for talking faces, but horrible for motion
[13:23:19 CET] <kerio> they keep the quality for themselves
[13:23:22 CET] <zetheroo> there is always going to be a tradeoff I suppose
[13:23:29 CET] <DHE> zetheroo: pastebin the output of "ffprobe $inputfile"
[13:23:30 CET] <BtbN> Unless you go loessless
[13:23:36 CET] <BtbN> -e
[13:23:41 CET] <DHE> just want to see what you're getting. for example you might be getting PCM audio
[13:24:06 CET] <BtbN> x264 with crf 20-22 should be fine for you though, and not too huge
[13:26:36 CET] <zetheroo1> DHE: https://paste.ubuntu.com/23694041/
[13:29:39 CET] <zetheroo1> yes, it does seem to have PCM audio
[13:30:41 CET] <DHE> alrighty then. as an off-the-top-of-my-head command, ffmpeg -i DSC_0265.MOV -c:v libx264 -crf:v 21 -c:a aac -b:a 128k output.mp4
[13:31:00 CET] <zetheroo1> ok, will give that a whirl
[13:31:13 CET] <BtbN> -c:a aac -b:a 196k -c:v libx264 -crf 21 out.mp4
[13:31:44 CET] <BtbN> maybe add -movflags faststart
[13:32:00 CET] <zetheroo1> got some message:
[13:32:01 CET] <zetheroo1> [aac @ 0x15e6cc0] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.
[13:32:01 CET] <zetheroo1> [aac @ 0x15e6cc0] Alternatively use the non experimental encoder 'libvo_aacenc'.
[13:32:09 CET] <DHE> oh you have an old version of ffmpeg
[13:32:17 CET] <zetheroo1> :P
[13:32:32 CET] <BtbN> update it first.
[13:32:44 CET] <DHE> still, you should be able to just replace "aac" with "libvo_aacenc" as indicated and at least have it go
[13:33:00 CET] <zetheroo1> I think it's the latest in the Ubuntu repos
[13:33:16 CET] <zetheroo1> ok, trying with libvo_aacenc
[13:33:47 CET] <DHE> one thing to keep in mind is that distros will often keep the same version (or version branch) as long as possible so as to avoid breaking applications dependent on version-specific features and syntax
[13:33:54 CET] <BtbN> that encoder is even worse
[13:33:58 CET] <BtbN> forget about it, and update ffmpeg.
[13:34:04 CET] <DHE> oh... yeah that makes sense actually
[13:34:19 CET] <zetheroo1> looking for an ffmpeg PPA ;)
[13:34:33 CET] <BtbN> just download a static binary
[13:34:45 CET] <DHE> just make sure it has x264 in it. most do though
[13:36:44 CET] <zetheroo1> updating
[13:38:00 CET] <zetheroo1> ok, updated - how do you see the version etc?
[13:38:11 CET] <BtbN> run without arguments
[13:38:45 CET] <zetheroo1> https://paste.ubuntu.com/23694081/
[13:38:53 CET] <zetheroo1> is that better?
[13:39:02 CET] <BtbN> still just a stable release, but should get the job done
[13:39:05 CET] <DHE> quite a bit better
[13:39:25 CET] <DHE> 2016-12-02 vs... probably 2015 something I'd bet
[13:39:43 CET] <zetheroo1> ok, so going to try again with aac
[13:39:54 CET] <zetheroo1> it's going ...
[13:46:59 CET] <zetheroo1> ok, so the output file is about half the size
[13:47:15 CET] <DHE> raising the crf value will give smaller files but lower image quality
[13:47:23 CET] <zetheroo1> ok
[13:49:43 CET] <zetheroo1> I can't really tell the difference in quality between the orig and the converted video ...
[13:50:47 CET] <zetheroo1> is there any way to see in the file stats/info what the difference in quality is?
[13:54:35 CET] <DHE> not really. it's all perceptual. x264 prints various technical stats but technical reports and what your eyes think don't necessarily relate
[13:55:35 CET] <zetheroo1> ok
[14:01:04 CET] <zetheroo1> is there a way to queue several videos for conversion?
[14:01:14 CET] <BtbN> use your shells capabilities to run loops.
[14:22:08 CET] <xeche> hey guys
[14:22:31 CET] <xeche> anyone seen this before? [hevc_qsv @ blahblah] Could not load the requested plugin: 2fca99749fdb49aeb121a5b63ef568f7
[14:23:38 CET] <xeche> I've been digging around the source code a bit, and it looks like FFMPEG assumes the hash of a dynamically linked plugin (?) should be the hash mentioned above, but there's very little in the Intel Media SDK that suggests a plugin with that hash even exists?
[16:06:10 CET] <FlyingBot> Hello there. I'm trying to burn a timecode using milliseconds and starting at hour '01' (e.g.: '01:00:00.344'). Right now I'm using "text='%%{pts \\: hms}'", but it starts at hour '00'. How could I change that?
[18:19:13 CET] <pbos> Hi, is there a good way to print resolution/fps of a y4m file, I'm automating codec quality comparisons
[18:19:39 CET] <fritsch> mediainfo + grep
[18:19:43 CET] <pbos> and am currently relying on the format file_1280_720.yuv which is a little clunky
[18:19:45 CET] <fritsch> or ffprobe + grep
[18:20:00 CET] <pbos> thanks
[18:24:54 CET] <JEEB> ffprobe can output json
[18:24:59 CET] <JEEB> and you can use whatever scripting language
[18:25:01 CET] <JEEB> but uhh
[18:25:12 CET] <JEEB> .yuv files generally have no headers or anything
[18:25:14 CET] <pbos> json + bash are bffs, right?
[18:25:24 CET] <pbos> yeah, hence I figure y4m would be better
[18:25:33 CET] <pbos> it's also what most (all?) of the derf set is in
[18:25:36 CET] <JEEB> yes
[18:25:49 CET] <JEEB> just noted that if it was raw YCbCr without anything else you wouldn't get any info
[18:26:01 CET] <JEEB> but yes, y4m gives you a few pieces of info
[18:26:08 CET] <pbos> thanks :)
[18:43:20 CET] <FlyingBot> Hello there. I'm trying to burn a timecode using milliseconds and starting at hour '01' (e.g.: '01:00:00.344'). Right now I'm using "text='%%{pts \\: hms}'", but it starts at hour '00'. How could I change that?
[20:47:51 CET] <pbos> Running ffmpeg in a bash script deep in somewhere changes my stty -a, can I make ffmpeg not touch this, am I wielding it wrong?
[20:48:07 CET] <pbos> manifests itself as not being able to echo characters
[20:49:24 CET] <pbos> python script runs shell script using subprocess, the shell script runs ffmpeg, after running ffmpeg -i foo.y4m foo.yuv my tty no longer echoes characters
[20:50:10 CET] <pbos> diff: https://www.diffchecker.com/13srhuhf
[20:50:15 CET] <pbos> -loglevel quiet doesn't help
[20:50:40 CET] <llogan> try adding "-nostdin" ffmpeg option
[20:51:56 CET] <pbos> no luck, even if the shell script calls exit just after that
[20:53:18 CET] <pbos> ffmpeg -i foo bar < /dev/null did it
[20:53:27 CET] <pbos> since I have a shell that's alright
[20:53:57 CET] <llogan> by "did it" you mean it fixed your issue?
[20:54:11 CET] <pbos> yep, stopped mucking up my terminal
[20:54:55 CET] <llogan> -nostdin should have had the same result
[20:55:17 CET] <llogan> i guess
[20:55:38 CET] <pbos> let me double check
[21:00:38 CET] <pbos> nope, -nostdin mucks it, < /dev/null doesn't
[21:35:18 CET] <__raven__> hi
[21:35:23 CET] <__raven__> how to save the best possible quality of 25i pal video captured from analogue input into mp4? to avoid interlacing artifacts into 25p converted mp4 i would like to have a 50p output with doubled odd and even lines. how to do that?
[21:37:04 CET] <pbos> __raven__: Doesn't that simply render out the interlacing artifacts?
[21:37:24 CET] <pbos> __raven__: Have you looked at yadif or any other deinterlacing filter?
[21:39:02 CET] <furq> yadif mode 1 will do that
[21:39:32 CET] <furq> if you want "best possible quality" then you probably want to use a slower deinterlacer like nnedi
[21:39:41 CET] <furq> nnedi in ffmpeg is incredibly slow, though
[21:39:57 CET] <furq> you can use it multithreaded in avisynth/vapoursynth if yadif isn't good enough for you
[21:41:24 CET] <furq> http://avisynth.nl/index.php/QTGMC
[21:41:42 CET] <furq> i use the vapoursynth port of that for interlaced sd stuff, it's great if you can tolerate how slow it is
[21:41:50 CET] <furq> yadif will probably be fine for hd
[21:43:44 CET] <__raven__> furq: main problem now is: mpeg2 at 25mbits kind of blurs and "washes" out the image and adds artifacts from the encoded lines. transcoding to mpeg4 with yadif is even worse due to a blended deinterlacing instead of doing it linear by just double the lines and putting the "full frame fields" into a 50p
[21:44:30 CET] <__raven__> so the main issue here is to find a deinterlacer which does not modify the image by blending lines but just double the lines
[21:45:20 CET] <Mavrik> em
[21:45:29 CET] <Mavrik> shouldn't there be a setting for yadif to do that?
[21:47:30 CET] <pbos> __raven__: If it does exactly what you're describing then you'll probably have bobbing artifacts
[21:47:46 CET] <__raven__> i actually have 1,-1,0 what should "output a frame for a field" but those frames have a blended output. i checked agains a drop-method: those pics are "clean"
[21:47:47 CET] <pbos> or I'm misunderstanding it
[21:48:38 CET] <__raven__> what are those?
[21:50:00 CET] <furq> like i said, yadif mode 1 will give frame-per-field output
[21:50:21 CET] <furq> -vf yadif=1
[21:51:03 CET] <furq> i think it's slightly more smart than just outputting double-height fields, but i couldn't tell you how
[21:51:24 CET] <furq> since that's what -vf bob would do, and it'd be a fair bit faster
[21:51:30 CET] <pbos> if it's just duplicating lines there'll be significant artifacts
[21:52:17 CET] <__raven__> furq: but something is just wrong. in moving sequences with stepping trough the frames i see a frame which seems to be blend together by two "moving" fields. thats not there when i just drop the frames but of course i loose resolution
[21:52:26 CET] <furq> oh wait was there ever a -vf bob
[21:52:41 CET] <pbos> furq: bwdif maybe?
[21:52:51 CET] <furq> either way that's what a bob filter does, and those never look great
[21:52:56 CET] <furq> so i assume yadif is doing some additional magic
[21:53:02 CET] <pbos> otherwise I'll stop googleguessing
[21:53:09 CET] <furq> yadif is designed for playback, though, so it's not the best for non-realtime
[21:53:38 CET] <__raven__> hmmm
[21:53:57 CET] <furq> qtgmc does a great job with that kind of source, but it's slow and it's a lot of work to set it up
[21:54:16 CET] <__raven__> ok so half size would be ok too
[21:54:34 CET] <furq> ffmpeg has a nnedi implementation, but it's really slow because libavfilter doesn't have frame multithreading
[21:54:49 CET] <furq> slow enough to severely bottleneck x264 veryslow
[21:55:07 CET] <__raven__> anything what sorts out artifacts from mpeg suffering trying to encode interlaced frames would be fine for me :)
[21:55:23 CET] <furq> that's more or less what qtgmc was designed to do
[21:55:47 CET] <furq> it uses nnedi as the deinterlacer but it does a lot of additional stuff that's designed for transcoding messy mpeg2 sources
[21:55:59 CET] <furq> i use it for all my interlaced dvd rips, it works a treat
[21:56:48 CET] <__raven__> ingest material is huffyuv now so the first problem is solved by now. next mpeg4 needs to avoid that effect
[21:58:58 CET] <__raven__> so the actual goal should be not more than basically "just" doubling every existing frame to 50p and half even and odd frames next
[21:59:09 CET] <__raven__> correct me if i am wrong
[21:59:56 CET] <furq> https://ffmpeg.org/ffmpeg-filters.html#separatefields-1
[22:00:01 CET] <furq> you could try that and scale afterwards
[22:00:21 CET] <furq> i guess there's no need for a regular bob filter when you can do that and pick your resize filter
[22:00:53 CET] <pbos> You should notice artifacts. :)
[22:01:13 CET] <furq> well yeah i'm not saying it'll look good
[22:01:28 CET] <furq> that's what was asked for, though
[22:01:34 CET] <pbos> true
[22:01:47 CET] <pbos> __raven__: look at it then reconsider reconsidering :)
[22:02:03 CET] <furq> yeah there's only one way to find out if it does the job
[22:02:12 CET] <furq> also when you say "mpeg4" do you mean x264
[22:02:28 CET] <__raven__> right
[22:02:35 CET] <furq> ok good
[22:02:49 CET] <furq> that rules out the problem being that mpeg4 sucks
[22:03:01 CET] <pbos> if you have only k*25hz motion it's probably the best deinterlacing filter ever
[22:03:25 CET] <__raven__> how have broadcast stations been doing this by imx for example? they had 25 - 50mbits mpeg2 and interlaced sd and i never noticed any artifacts?
[22:04:04 CET] <furq> if you mean on your tv, it's because your tv probably has a good deinterlacer
[22:04:23 CET] <__raven__> did they use a 25p mpeg2 fullsize or a 50p halfsize?
[22:04:33 CET] <furq> they use both afaik
[22:04:39 CET] <furq> sport is usually 50i
[22:04:51 CET] <__raven__> furq: sorry i have to say that i was working on a tv station but never had any insights into the playout servers
[22:05:40 CET] <furq> if you mean the theory behind how the good deinterlacer works, i'm not really the man to ask
[22:06:11 CET] <furq> i just hang out in places for long enough to hear about what the best words to type into ffmpeg are
[22:06:14 CET] <Threads> what about -r 50.000 -vf yadif=1,scale=720:404,setsar=1:1,format=yuv420p
[22:06:17 CET] <furq> (or vapoursynth)
[22:06:30 CET] <Threads> im not a quality whore but i use that for 50fps output
[22:06:38 CET] <furq> quite a lot of that seems redundant
[22:06:52 CET] <__raven__> not the interlacer! it was a "natively" sd-pal sdi environment so the only question is, how did they sort out any line artifacts on the files?
[22:07:02 CET] <furq> -vf yadif=1 will already set the output framerate to 50 and scale it correctly
[22:07:10 CET] <furq> and also it won't change the pixel format
[22:07:20 CET] <Threads> furq i like to go the long way round
[22:07:42 CET] <Threads> you say 2 lines i say 15lines
[22:08:14 CET] <furq> well yeah but that'll needlessly fuck up non-25fps sources
[22:08:35 CET] <furq> there is often no harm in being verbose but that just makes your command more specific for no good reason
[22:08:46 CET] <furq> more specific wrt what inputs it'll take
[22:09:12 CET] <furq> __raven__: i'm pretty sure they just broadcasted it interlaced and let the customers' tvs sort it out
[22:09:19 CET] <furq> that's fairly standard
[22:09:38 CET] <furq> s/broadcasted/broadcast/
[22:10:04 CET] <__raven__> furq: i am talking about the mpeg2 files on the broadcast servers. those already had interlaced material "in it"
[22:10:14 CET] <furq> yeah they would just broadcast those as-is
[22:10:23 CET] <MonicleLewinsky> Okay, I've got a stumper (at least for me). I'm trying to remux a .ts video with Closed Captions (EIA-608) into an mkv. ffmpeg keeps losing the captions
[22:10:50 CET] <furq> at least in my limited experience
[22:11:07 CET] <furq> i know all the hd content i get is 50i
[22:11:39 CET] <Threads> MonicleLewinsky tried -c copy ?
[22:11:43 CET] <MonicleLewinsky> Threads: Yes
[22:11:50 CET] <__raven__> so what approach would work for me if i want to have a 720*288 at 50p output from the given 25p interlaced input?
[22:12:12 CET] <furq> if your input is 576p then just use -vf separatefields
[22:12:12 CET] <pbos> __raven__: probably frame by frame, e.g. just stored in half-height frames with some metadata describing which frame is upper and which frame is the lower fields
[22:12:49 CET] <MonicleLewinsky> Threads: -i movie.ts -map 0 -c copy movie.mkv
[22:12:57 CET] <MonicleLewinsky> ^ Is what I've tried
[22:13:05 CET] <furq> closed captions are some kind of side data in the video stream iirc
[22:13:11 CET] <furq> i forget if ffmpeg handles those properly
[22:13:14 CET] <pbos> __raven__: Any reason why you believe yadif would not do it?
[22:13:19 CET] <furq> it's not just a subtitle stream though
[22:13:24 CET] <furq> pbos: he asked for half-height output
[22:13:51 CET] <pbos> oh, uuh, isn't that what you suggested as separatefields?
[22:13:55 CET] <furq> yeah
[22:14:00 CET] <furq> that's exactly what separatefields does
[22:14:01 CET] <pbos> __raven__: ^
[22:14:07 CET] <pbos> -vf separatefields
[22:14:15 CET] <pbos> if my very-beginner ffmpeg foo holds
[22:14:25 CET] <furq> 21:12:12 ( furq) if your input is 576p then just use -vf separatefields
[22:14:28 CET] <furq> looks fine to me
[22:14:48 CET] <pbos> for some definition of fine
[22:14:55 CET] <MonicleLewinsky> furq: How would I check if it handles that?
[22:14:56 CET] Action: pbos ducks.
[22:15:10 CET] <__raven__> yadif did mix two fields and caused kind of ghosting any way
[22:15:21 CET] <pbos> try one of the non-realtime filters
[22:15:25 CET] <__raven__> i will try some of the options and investigate it. tnx so far :)
[22:15:58 CET] <pbos> __raven__: https://ffmpeg.org/ffmpeg-filters.html#nnedi was also suggested
[22:16:13 CET] <pbos> not sure if it doubles your fps or not
[22:16:21 CET] <pbos> consider looking into that though
[22:16:37 CET] <furq> it does by default
[22:16:42 CET] <furq> it's incredibly slow, though
[22:16:50 CET] <furq> i'd never use the ffmpeg implementation until it gets frame multithreading
[22:17:05 CET] <pbos> you could split the input, do it in parallel and merge
[22:17:12 CET] <furq> i think last time i tried to use it i was getting ~3fps encoding sd mpeg2
[22:17:42 CET] <pbos> I'm taking Threads' complicated route.
[22:18:09 CET] <furq> well the complicated route would be setting up vapoursynth and using a multithreaded implementation
[22:18:33 CET] <furq> 15fps is at least tolerable
[22:20:40 CET] <furq> MonicleLewinsky: there appears to be a closed caption decoder but i can't tell how you actually use it
[22:20:57 CET] <MonicleLewinsky> Whoa.  'ffmpeg -f lavfi -i "movie=./video.ts[out0+subcc]" -map s video.srt' seems to be doing something
[22:21:26 CET] <MonicleLewinsky> The time estimates are really jumping around though
[22:22:32 CET] <furq> you might need ffmpeg with libzvbi?
[22:25:42 CET] <MonicleLewinsky> furq: Does that just involve a re-compile with a flag I'm missing?
[22:35:03 CET] <Tommi> hi all... requesting some help on my attempt to compile kdenlive, where ./configure in ffmpeg can't seem to find libtheora. the package shows as installed. recompiled ffmpeg with the latest build, and the problem persists
[22:35:37 CET] <c_14> do you have the -dev version installed?
[22:35:39 CET] <JEEB> check the results of the configure checks
[22:35:50 CET] <JEEB> and yes, if your distro packages the development library and headers separately...
[22:35:53 CET] <JEEB> make sure they are installed
[22:36:12 CET] <furq> MonicleLewinsky: yeah, but bear in mind i have no idea whether that'll do anything
[22:36:29 CET] <furq> google isn't coming back with much of any use
[22:37:25 CET] <Tommi> c_14: the -dev for which package?
[22:37:34 CET] <c_14> libtheora
[22:38:16 CET] <Tommi> let me check!
[22:42:02 CET] <Tommi> let me check!; https://cloud.kjuicer.com/index.php/s/pdfyXglpmDlxp8W
[22:42:27 CET] <Tommi> whoops: the above is the link to my config.log
[22:42:50 CET] <Tommi> the message got messed up, sorry
[22:44:36 CET] <Tommi> JEEB: yesterday I checked the config.log but could not understand/identify what went wrong. the version of libtheora that shows up is libtheora-1.1.1-13.fc23.x86_64
[22:46:22 CET] <JEEB> Tommi: it's the libtheora-devel package then that you need :P
[22:46:53 CET] <JEEB> and you search config.log for theora basically, it does a couple of checks for if the thing is around and usable
[22:47:08 CET] <Tommi> intuitively it does not look like a -dev. does libetheora come from compiling ffmpeg-3.2.2.tar.bz2 or it is a separate package?
[22:48:05 CET] <Tommi> JEEB: ok let me try to install that version + check the log
[22:48:14 CET] <Tommi> thanks!
[22:48:42 CET] <JEEB> libtheora is the library that provides the theora decoding and encoding library, the -devel package of that provides the headers and non-versioned library :P
[22:48:53 CET] <JEEB> FFmpeg can use libtheora to encode theora video
[22:49:09 CET] <JEEB> if you don't need theora video encoding the libtheora is literally useless for you
[22:50:27 CET] <Tommi> mmm... unsure. but I need ffmpeg for kdenlive, which is video
[22:50:39 CET] <__raven__> i made some more tests. results are those: http://picpaste.com/EdMcvmYe.png
[22:50:57 CET] <stringtheory> Hi, I just installed ffmpeg I'm running it through the windows 7 terminal, how do I pull 3rd party libraries?
[22:51:07 CET] <JEEB> Tommi: kdenlive just uses ffmpeg's libraries to encode its output. and theora is probably one of the formats it will give you as the alternative :P
[22:51:19 CET] <JEEB> stringtheory: you have to do that during build time
[22:51:30 CET] <JEEB> at least for most things
[22:51:47 CET] <JEEB> some things like avisynth and cuvid have dynamic loading support I think?
[22:51:58 CET] <__raven__> as you can see, yadif processes the image itself and adds some slightly blur and colour artifacts and separatefields aso seems to be no option due to broken motion
[22:52:55 CET] <stringtheory> @JEEB thanks, so I need the source code, and compile my own build?
[22:53:23 CET] <JEEB> yes
[22:53:36 CET] <pbos> __raven__: Strange clip to use for quality, fwiw
[22:54:02 CET] <__raven__> pbos: thats the best i am able to generate now. thats from the internal character generator of the vhs player
[22:55:20 CET] <pbos> __raven__: This clip will heavily skew you towards wanting to duplicate all the lines
[22:55:27 CET] <pbos> you have no horizontal/vertical motion at all
[22:55:41 CET] <__raven__> pbos: yes
[22:56:47 CET] <stringtheory> JEEB: what language is ffmpeg written in? Python?
[22:56:53 CET] <pbos> __raven__: I'd generate an interleaved clip from 60fps example video, see https://ffmpeg.org/ffmpeg-filters.html#interleave_002c-ainterleave
[22:57:00 CET] <pbos> stringtheory: a lot of c, python is slow
[22:57:46 CET] <__raven__> pbos: i wanted to include the analogue path to add some "stress" to the codec
[22:57:59 CET] <pbos> __raven__: might also be -vf il
[22:58:09 CET] <pbos> I have no ffmpeg experience, more general video stuff
[22:58:20 CET] <__raven__> il?
[22:58:21 CET] <stringtheory> JEEB: Makes sense, good to know I don't need anything extra to compile builds
[22:58:22 CET] <pbos> __raven__: How do you reckon that stresses the codec?
[22:58:28 CET] <pbos> __raven__: https://ffmpeg.org/ffmpeg-filters.html#il
[22:58:34 CET] <pbos> I'm just googling at this point
[22:58:46 CET] <__raven__> pbos: its at least a bit noise in the image
[22:59:48 CET] <pbos> __raven__: There should be some handycam example files that you could find that are interleaved
[22:59:49 CET] <Tommi> JEEB+c_14: well, compiling went much further :) not it seems to be stuck on mlt, which is some progress. thank you
[23:00:00 CET] <Tommi> *now
[23:00:05 CET] <pbos> I don't think the derf set contains any interleaved files
[23:01:32 CET] <pbos> __raven__: or -vf smooth, -vf noise if you want to mess with it
[23:02:01 CET] <pbos> __raven__: Since you're doing this at all, don't you have a clip that you want to solve this for?
[23:03:08 CET] <__raven__> pbos: of course - i need to digitize about 83 vhs tapes 4h each so i need to test the workflow
[23:03:29 CET] <furq> yeah it's best to use a representative sample
[23:03:42 CET] <furq> if you're doing that much stuff then i'd look into vapoursynth and qtgmc
[23:03:49 CET] <furq> it's worth the initial setup costs
[23:23:53 CET] <pbos> __raven__: Can you digitize the first 30 seconds of a VHS tape then use that as your test clip?
[23:23:59 CET] <pbos> I'd also do multiple test clips
[23:24:41 CET] <__raven__> pbos: yes i did already. ff also produces good test interlaces ^^
[23:24:55 CET] <__raven__> but i am not anything near a final solution
[23:25:07 CET] <pbos> __raven__: Then use those as your comparison clips when testing deinterlacing
[23:25:25 CET] <pbos> and you can't do single-frame comparisons if you want to be fair, there's plenty of temporal artifacts when deinterlacing.
[23:25:49 CET] <__raven__> still the drop method had the most clearest image but i do not want to loose half of the lines
[00:00:00 CET] --- Wed Dec 28 2016



More information about the Ffmpeg-devel-irc mailing list