Re: [FFmpeg-user] shuffleframes -- unexpected results

2021-02-21 Thread pdr0
pdr0 wrote
> Mark Filipak (ffmpeg) wrote
>> On 2021-02-21 21:39, pdr0 wrote:
>>> Mark Filipak (ffmpeg) wrote
 I've run some test cases for the shuffleframes filter. I've documented
 shuffleframes via my
 preferred documentation format (below). In the course of my testing, I
 found 2 cases (marked "*
 Expected", below) that produced unexpected results, to wit: If the 1st
 frame is discarded, the
 entire input is discarded, even if the 1st discard is followed by
 frames
 that are supposed to be
 retained.

 -1 1...Blocks the pipeline (discards all frames).
 *
 Expected 1 3 5 7 ..
 -1 1 2   ...Blocks the pipeline (discards all frames).
 * Expected 1 2 4 5 7 8 ..
>>> 
>>> These 2 cases produce the expected result for me
>>> 
>>> If the "entire input is discarded" - do you mean you get no output file
>>> at
>>> all ?
>> 
>> No output file at all. The transcodes complete (they don't hang awaiting
>> end-of-stream) but since 
>> the pipeline contains no frames, the encoder makes nothing and ffmpeg
>> makes no files.
>> 
>>> Post more info, including the console log
>> 
>> First, for context, the scripts:
>> ffmpeg -i 0.mkv -vf shuffleframes="-1" -dn "\-1.mkv"
>> ffmpeg -i 0.mkv -vf shuffleframes="-1 1" -dn "\-1 1.mkv"
>> ffmpeg -i 0.mkv -vf shuffleframes="-1 1 2" -dn "\-1 1 2.mkv"
>> 
>> I had to escape the '-' in the filenames in order to avoid this
>> complaint:
>> "Unrecognized option '1 1 2.mkv'.
>> "Error splitting the argument list: Option not found"
>> 
>> Perhaps it would be expeditious if you showed me your command line that
>> works, eh?
> 
> I didn't need to escape 
> 
> ffmpeg -i input.avs -vf shuffleframes="-1 1" -c:v libx264 -crf 20 -an
> out1.mkv
> ffmpeg -i input.avs -vf shuffleframes="-1 1 2" -c:v libx264 -crf 20 -an
> out2.mkv
> 
> input.avs is a 24.0fps blankclip with showframenumber() to overlay the
> framenumbers so I could examine the output later. 
> 
> (I noticed mp4 container does not work properly for this, there are
> duplicated frames, but mkv output is ok)
> 
> 
> 
> 
> Mark Filipak (ffmpeg) wrote
>> Oh dear. Is there a escaping row between Windows and ffmpeg? Here's the
>> logfile:
>> ffmpeg started on 2021-02-21 at 11:50:29
>> Report written to "ffmpeg-20210221-115029.log"
>> Log level: 32
>> Command line:
>> ffmpeg -i 0.mkv -vf "shuffleframes=-1 1 2" -dn "\\-1 1 2.mkv"
>> ffmpeg version N-100851-g9f38fac053 Copyright (c) 2000-2021 the FFmpeg
>> developers
>>built with gcc 9.3-win32 (GCC) 20200320
>>configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static
>> --pkg-config=pkg-config 
>> --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32
>> --enable-gpl --enable-version3 
>> --disable-debug --disable-w32threads --enable-pthreads --enable-iconv
>> --enable-zlib --enable-libxml2 
>> --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma
>> --enable-fontconfig 
>> --enable-opencl --enable-libvmaf --enable-vulkan --enable-libvorbis
>> --enable-amf --enable-libaom 
>> --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec
>> --enable-cuda-llvm 
>> --enable-libglslang --enable-libass --enable-libbluray
>> --enable-libmp3lame
>> --enable-libopus 
>> --enable-libtheora --enable-libvpx --enable-libwebp --enable-libmfx
>> --enable-libopencore-amrnb 
>> --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e
>> --enable-librubberband 
>> --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt
>> --enable-libsvtav1 
>> --enable-libtwolame --enable-libuavs3d --enable-libvidstab
>> --enable-libx264 --enable-libx26 
>> libavutil  56. 64.100 / 56. 64.100
>>libavcodec 58.119.100 / 58.119.100
>>libavformat58. 65.101 / 58. 65.101
>>libavdevice58. 11.103 / 58. 11.103
>>libavfilter 7.100.100 /  7.100.100
>>libswscale  5.  8.100 /  5.  8.100
>>libswresample   3.  8.100 /  3.  8.100
>>libpostproc55.  8.100 / 55.  8.100
>> Input #0, matroska,webm, from '0.mkv':
>>Metadata:
>>  ENCODER : Lavf58.65.101
>>Duration: 00:00:05.76, start: 0.00, bitrate: 295 kb/s
>>  Stream #0:0: Video: h264 (High), yuv420p(tv, smpte170m,
>> progressive),
>> 240x236 [SAR 32:27 DAR 
>> 640:531], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
>>  Metadata:
>>ENCODER : Lavc58.119.100 libx264
>>DURATION: 00:00:05.75600
>>  Stream #0:1: Audio: vorbis, 48000 Hz, stereo, fltp (default)
>>  Metadata:
>>_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES
>> NUMBER_OF_BYTES
>>BPS-eng : 80531
>>DURATION-eng: 00:00:05.73600
>>NUMBER_OF_FRAMES-eng: 338
>>NUMBER_OF_BYTES-eng: 57741
>>_STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
>>_STATISTICS_WRITING_DATE_UTC-eng: 2020-12-21 04:14:21
>>ENCODER : Lavc58.119.100 

Re: [FFmpeg-user] shuffleframes -- unexpected results

2021-02-21 Thread pdr0
Mark Filipak (ffmpeg) wrote
> On 2021-02-21 21:39, pdr0 wrote:
>> Mark Filipak (ffmpeg) wrote
>>> I've run some test cases for the shuffleframes filter. I've documented
>>> shuffleframes via my
>>> preferred documentation format (below). In the course of my testing, I
>>> found 2 cases (marked "*
>>> Expected", below) that produced unexpected results, to wit: If the 1st
>>> frame is discarded, the
>>> entire input is discarded, even if the 1st discard is followed by frames
>>> that are supposed to be
>>> retained.
>>>
>>> -1 1...Blocks the pipeline (discards all frames).
>>> *
>>> Expected 1 3 5 7 ..
>>> -1 1 2   ...Blocks the pipeline (discards all frames).
>>> * Expected 1 2 4 5 7 8 ..
>> 
>> These 2 cases produce the expected result for me
>> 
>> If the "entire input is discarded" - do you mean you get no output file
>> at
>> all ?
> 
> No output file at all. The transcodes complete (they don't hang awaiting
> end-of-stream) but since 
> the pipeline contains no frames, the encoder makes nothing and ffmpeg
> makes no files.
> 
>> Post more info, including the console log
> 
> First, for context, the scripts:
> ffmpeg -i 0.mkv -vf shuffleframes="-1" -dn "\-1.mkv"
> ffmpeg -i 0.mkv -vf shuffleframes="-1 1" -dn "\-1 1.mkv"
> ffmpeg -i 0.mkv -vf shuffleframes="-1 1 2" -dn "\-1 1 2.mkv"
> 
> I had to escape the '-' in the filenames in order to avoid this complaint:
> "Unrecognized option '1 1 2.mkv'.
> "Error splitting the argument list: Option not found"
> 
> Perhaps it would be expeditious if you showed me your command line that
> works, eh?

I didn't need to escape 

ffmpeg -i input.avs -vf shuffleframes="-1 1" -c:v libx264 -crf 20 -an
out1.mkv
ffmpeg -i input.avs -vf shuffleframes="-1 1 2" -c:v libx264 -crf 20 -an
out2.mkv

input.avs is a 24.0fps blankclip with showframenumber() to overlay the
framenumbers so I could examine the output later. 

(I noticed mp4 container does not work properly for this, there are
duplicated frames, but mkv output is ok)




Mark Filipak (ffmpeg) wrote
> Oh dear. Is there a escaping row between Windows and ffmpeg? Here's the
> logfile:
> ffmpeg started on 2021-02-21 at 11:50:29
> Report written to "ffmpeg-20210221-115029.log"
> Log level: 32
> Command line:
> ffmpeg -i 0.mkv -vf "shuffleframes=-1 1 2" -dn "\\-1 1 2.mkv"
> ffmpeg version N-100851-g9f38fac053 Copyright (c) 2000-2021 the FFmpeg
> developers
>built with gcc 9.3-win32 (GCC) 20200320
>configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static
> --pkg-config=pkg-config 
> --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32
> --enable-gpl --enable-version3 
> --disable-debug --disable-w32threads --enable-pthreads --enable-iconv
> --enable-zlib --enable-libxml2 
> --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma
> --enable-fontconfig 
> --enable-opencl --enable-libvmaf --enable-vulkan --enable-libvorbis
> --enable-amf --enable-libaom 
> --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec
> --enable-cuda-llvm 
> --enable-libglslang --enable-libass --enable-libbluray --enable-libmp3lame
> --enable-libopus 
> --enable-libtheora --enable-libvpx --enable-libwebp --enable-libmfx
> --enable-libopencore-amrnb 
> --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e
> --enable-librubberband 
> --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt
> --enable-libsvtav1 
> --enable-libtwolame --enable-libuavs3d --enable-libvidstab
> --enable-libx264 --enable-libx26 
> libavutil  56. 64.100 / 56. 64.100
>libavcodec 58.119.100 / 58.119.100
>libavformat58. 65.101 / 58. 65.101
>libavdevice58. 11.103 / 58. 11.103
>libavfilter 7.100.100 /  7.100.100
>libswscale  5.  8.100 /  5.  8.100
>libswresample   3.  8.100 /  3.  8.100
>libpostproc55.  8.100 / 55.  8.100
> Input #0, matroska,webm, from '0.mkv':
>Metadata:
>  ENCODER : Lavf58.65.101
>Duration: 00:00:05.76, start: 0.00, bitrate: 295 kb/s
>  Stream #0:0: Video: h264 (High), yuv420p(tv, smpte170m, progressive),
> 240x236 [SAR 32:27 DAR 
> 640:531], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
>  Metadata:
>ENCODER : Lavc58.119.100 libx264
>DURATION: 00:00:05.75600
>  Stream #0:1: Audio: vorbis, 48000 Hz, stereo, fltp (default)
>  Metadata:
>_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
>BPS-eng : 80531
>DURATION-eng: 00:00:05.73600
>NUMBER_OF_FRAMES-eng: 338
>NUMBER_OF_BYTES-eng: 57741
>_STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
>_STATISTICS_WRITING_DATE_UTC-eng: 2020-12-21 04:14:21
>ENCODER : Lavc58.119.100 libvorbis
>DURATION: 00:00:05.71900
> Stream mapping:
>Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
>Stream #0:1 -> #0:1 (vorbis 

Re: [FFmpeg-user] shuffleframes -- unexpected results

2021-02-21 Thread Mark Filipak (ffmpeg)

On 2021-02-21 22:17, Mark Filipak (ffmpeg) wrote:

On 2021-02-21 21:39, pdr0 wrote:

Mark Filipak (ffmpeg) wrote

I've run some test cases for the shuffleframes filter. I've documented
shuffleframes via my
preferred documentation format (below). In the course of my testing, I
found 2 cases (marked "*
Expected", below) that produced unexpected results, to wit: If the 1st
frame is discarded, the
entire input is discarded, even if the 1st discard is followed by frames
that are supposed to be
retained.

    -1 1    ...Blocks the pipeline (discards all frames). *
Expected 1 3 5 7 ..
    -1 1 2   ...Blocks the pipeline (discards all frames).
* Expected 1 2 4 5 7 8 ..


These 2 cases produce the expected result for me

If the "entire input is discarded" - do you mean you get no output file at
all ?


No output file at all. The transcodes complete (they don't hang awaiting end-of-stream) but since 
the pipeline contains no frames, the encoder makes nothing and ffmpeg makes no files.



Post more info, including the console log


First, for context, the scripts:
ffmpeg -i 0.mkv -vf shuffleframes="-1" -dn "\-1.mkv"
ffmpeg -i 0.mkv -vf shuffleframes="-1 1" -dn "\-1 1.mkv"
ffmpeg -i 0.mkv -vf shuffleframes="-1 1 2" -dn "\-1 1 2.mkv"

I had to escape the '-' in the filenames in order to avoid this complaint:
"Unrecognized option '1 1 2.mkv'.
"Error splitting the argument list: Option not found"

Perhaps it would be expeditious if you showed me your command line that works, 
eh?


Oh dear. Is there a escaping row between Windows and ffmpeg? Here's the logfile:
ffmpeg started on 2021-02-21 at 11:50:29
Report written to "ffmpeg-20210221-115029.log"
Log level: 32
Command line:
ffmpeg -i 0.mkv -vf "shuffleframes=-1 1 2" -dn "\\-1 1 2.mkv"
ffmpeg version N-100851-g9f38fac053 Copyright (c) 2000-2021 the FFmpeg 
developers
  built with gcc 9.3-win32 (GCC) 20200320
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config 
--cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 
--disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-zlib --enable-libxml2 
--enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig 
--enable-opencl --enable-libvmaf --enable-vulkan --enable-libvorbis --enable-amf --enable-libaom 
--enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm 
--enable-libglslang --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus 
--enable-libtheora --enable-libvpx --enable-libwebp --enable-libmfx --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband 
--enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 
--enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx26 
libavutil  56. 64.100 / 56. 64.100

  libavcodec 58.119.100 / 58.119.100
  libavformat58. 65.101 / 58. 65.101
  libavdevice58. 11.103 / 58. 11.103
  libavfilter 7.100.100 /  7.100.100
  libswscale  5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc55.  8.100 / 55.  8.100
Input #0, matroska,webm, from '0.mkv':
  Metadata:
ENCODER : Lavf58.65.101
  Duration: 00:00:05.76, start: 0.00, bitrate: 295 kb/s
Stream #0:0: Video: h264 (High), yuv420p(tv, smpte170m, progressive), 240x236 [SAR 32:27 DAR 
640:531], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)

Metadata:
  ENCODER : Lavc58.119.100 libx264
  DURATION: 00:00:05.75600
Stream #0:1: Audio: vorbis, 48000 Hz, stereo, fltp (default)
Metadata:
  _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  BPS-eng : 80531
  DURATION-eng: 00:00:05.73600
  NUMBER_OF_FRAMES-eng: 338
  NUMBER_OF_BYTES-eng: 57741
  _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
  _STATISTICS_WRITING_DATE_UTC-eng: 2020-12-21 04:14:21
  ENCODER : Lavc58.119.100 libvorbis
  DURATION: 00:00:05.71900
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (vorbis (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
[libvorbis @ 01b0c4130a80] Queue input is backward in time
[libx264 @ 01b0c2399140] using SAR=32/27
[libx264 @ 01b0c2399140] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 
AVX FMA3 BMI2 AVX2
[libx264 @ 01b0c2399140] profile High, level 1.2, 4:2:0, 8-bit
[libx264 @ 01b0c2399140] 264 - core 161 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - 
http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex 
subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 
deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=7 

Re: [FFmpeg-user] shuffleframes -- unexpected results

2021-02-21 Thread Mark Filipak (ffmpeg)

On 2021-02-21 21:39, pdr0 wrote:

Mark Filipak (ffmpeg) wrote

I've run some test cases for the shuffleframes filter. I've documented
shuffleframes via my
preferred documentation format (below). In the course of my testing, I
found 2 cases (marked "*
Expected", below) that produced unexpected results, to wit: If the 1st
frame is discarded, the
entire input is discarded, even if the 1st discard is followed by frames
that are supposed to be
retained.

-1 1...Blocks the pipeline (discards all frames). *
Expected 1 3 5 7 ..
-1 1 2   ...Blocks the pipeline (discards all frames).
* Expected 1 2 4 5 7 8 ..


These 2 cases produce the expected result for me

If the "entire input is discarded" - do you mean you get no output file at
all ?


No output file at all. The transcodes complete (they don't hang awaiting end-of-stream) but since 
the pipeline contains no frames, the encoder makes nothing and ffmpeg makes no files.



Post more info, including the console log


First, for context, the scripts:
ffmpeg -i 0.mkv -vf shuffleframes="-1" -dn "\-1.mkv"
ffmpeg -i 0.mkv -vf shuffleframes="-1 1" -dn "\-1 1.mkv"
ffmpeg -i 0.mkv -vf shuffleframes="-1 1 2" -dn "\-1 1 2.mkv"

I had to escape the '-' in the filenames in order to avoid this complaint:
"Unrecognized option '1 1 2.mkv'.
"Error splitting the argument list: Option not found"

Perhaps it would be expeditious if you showed me your command line that works, 
eh?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] shuffleframes -- unexpected results

2021-02-21 Thread Paul B Mahol
On Mon, Feb 22, 2021 at 3:40 AM pdr0  wrote:

> Mark Filipak (ffmpeg) wrote
> > I've run some test cases for the shuffleframes filter. I've documented
> > shuffleframes via my
> > preferred documentation format (below). In the course of my testing, I
> > found 2 cases (marked "*
> > Expected", below) that produced unexpected results, to wit: If the 1st
> > frame is discarded, the
> > entire input is discarded, even if the 1st discard is followed by frames
> > that are supposed to be
> > retained.
> >
> >-1 1...Blocks the pipeline (discards all frames).
> *
> > Expected 1 3 5 7 ..
> >-1 1 2   ...Blocks the pipeline (discards all frames).
> > * Expected 1 2 4 5 7 8 ..
>
> These 2 cases produce the expected result for me
>
> If the "entire input is discarded" - do you mean you get no output file at
> all ?
>
> Post more info, including the console log
>

Beating same old dead horse again and again?


>
>
>
>
>
> --
> Sent from: http://ffmpeg-users.933282.n4.nabble.com/
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] shuffleframes -- unexpected results

2021-02-21 Thread pdr0
Mark Filipak (ffmpeg) wrote
> I've run some test cases for the shuffleframes filter. I've documented
> shuffleframes via my 
> preferred documentation format (below). In the course of my testing, I
> found 2 cases (marked "* 
> Expected", below) that produced unexpected results, to wit: If the 1st
> frame is discarded, the 
> entire input is discarded, even if the 1st discard is followed by frames
> that are supposed to be 
> retained.
> 
>-1 1...Blocks the pipeline (discards all frames). *
> Expected 1 3 5 7 ..
>-1 1 2   ...Blocks the pipeline (discards all frames).
> * Expected 1 2 4 5 7 8 ..

These 2 cases produce the expected result for me

If the "entire input is discarded" - do you mean you get no output file at
all ?

Post more info, including the console log





--
Sent from: http://ffmpeg-users.933282.n4.nabble.com/
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".