[FFmpeg-user] Statics when record with ffmpeg

2015-07-11 Thread MrNice
Hello,

For few months, I have an issue when I record sound on my Linux fedora
22 desktop. I never got the fix but now I need it to be fixed, so here I am:

Hardware and software:
Motherboard ASRock 970 Extreme4
CPU AMD FX-8120 Eight-Core Processor
Fedora 22
ffmpeg version 2.6.3 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 5.1.1 (GCC) 20150422 (Red Hat 5.1.1-1)
configuration: --prefix=/usr --bindir=/usr/bin
--datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg
--libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64
--optflags='-O2 -g -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic'
--enable-bzlib --disable-crystalhd --enable-frei0r --enable-gnutls
--enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394
--disable-indev=jack --enable-libfreetype --enable-libgsm
--enable-libmp3lame --enable-openal --enable-libopencv
--enable-libopenjpeg --enable-libopus --enable-libpulse
--enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx
--enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab
--enable-avfilter --enable-avresample --enable-postproc
--enable-pthreads --disable-static --enable-shared --enable-gpl
--disable-debug --disable-stripping --shlibdir=/usr/lib64
--enable-runtime-cpudetect
libavutil  54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat56. 25.101 / 56. 25.101
libavdevice56.  4.100 / 56.  4.100
libavfilter 5. 11.102 /  5. 11.102
libavresample   2.  1.  0 /  2.  1.  0
libswscale  3.  1.101 /  3.  1.101
libswresample   1.  1.100 /  1.  1.100
libpostproc53.  3.100 / 53.  3.100

The problem:
When I record with ffmpeg a sound from the Line in, I get statics just
after every sound impulsion. I have a mp3 file with "bip" every second
playing from a mp3 player connected to Line in. Command Line is:
ffmpeg -debug 1 -vn -f alsa -ac 2 -channel_layout stereo -i hw:0,0 -c:a
pcm_s16le /Store3/Test/pcm_`date +%m%d_%H%M`.wav

Same issue with ffplay:
ffplay -debug 1 -f alsa -ac 2 -i hw:0,0
Statics after almost every bip

Same issue with VLC (input hw:0,0),statics after every bip.

When I record and play with Audacity with Alsa, Recording device:
default then pulse then ALC892 (hw:0,0), sound is perfect.
When I record with gnome-sound-recorder 3.16.0-1.fc22, format flac, ogg,
sound is perfect.
When I record with arecord, CL: arecord -f cd -t wav out.wav, sound is
perfect.

Something strange I noticed:
I start the player, then I run command ffmpeg.
After few seconds, music is playing, I stop ffmpeg (type q) then I stop
the player.(first file)
Then I run again ffmpeg (no music, no sound is playing), I wait few
seconds then I stop ffmpeg.(second file)
When I listen the first file, I have music with distortion/statics then
stop suddenly.(OK)
The I listen the second file (the second file should be only silence but
here is the most important): I can listen at the beginning around 1 full
second of the end of the previous recording with a lot of
distortion/statics. Looks like there is a recording memory overflow.

I have tried to adjust all the levels and can say for sure this is not
an over-level saturation issue.
When I listen directly from line in, sound is perfect.

I don't know what to do more.
Let me know a site to upload an audio file if you want a sample of the
issue.
Let me know any info you need to help me to get rid of this annoying
problem.

Many thanks for your help
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Statics when record with ffmpeg

2015-07-11 Thread MrNice
On 11/07/15 08:42, Carl Eugen Hoyos wrote:
> MrNice  iol.ie> writes:
> 
>> ffmpeg version 2.6.3
> 
> Please test current FFmpeg git head and please 
> provide the command line you use for recording 
> together with the complete, uncut console 
> output.
> And please provide the output of:
> $ ffmpeg -devices
> 
> Carl Eugen
> 

First, install the last version: I'll need some help.
Last year, I could not use the Linux Static Builds because input from
integrated audio card was not implemented.
Is it still the same?
Could you provide a link to the version to install and an Howto install.
Sorry I am not very skilled.


> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Statics when record with ffmpeg

2015-07-11 Thread MrNice
On 11/07/15 10:53, Carl Eugen Hoyos wrote:

> If this is still the case (I don't know), 
> please download the snapshot (!) from 
> http://ffmpeg.org/download.html and 
> run "./configure" in the source directory.
> The bottom of the output ("Enabled indevs:") 
> will show you if alsa was detected.
> If alsa was detected, run "make ffmpeg".
> You should also try with "--enable-libpulse".
> 
> Carl Eugen


Looks like no alsa:
Enabled indevs:
dv1394  lavfi   v4l2
fbdev   oss x11grab_xcb

Enabled outdevs:
fbdev   oss v4l2

and with

 ./configure --enable-libpulse
ERROR: libpulse not found using pkg-config

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Statics when record with ffmpeg

2015-07-11 Thread MrNice


On 11/07/15 12:20, Carl Eugen Hoyos wrote:
> MrNice  iol.ie> writes:
> 
>> Looks like no alsa:
> 
> Try something like 
> $ yum install alsa-utils alsa-lib
> 
>> Enabled indevs:
>> dv1394   lavfi   v4l2
>> fbdevoss x11grab_xcb
> 
> You could also test oss.
> 
>>  ./configure --enable-libpulse
>> ERROR: libpulse not found using pkg-config
> 
> You need something like pulseaudio 
> or pulseaudio-core-libs
> 
> Carl Eugen
> 

I'd guess you mean installed package.

$ yum list installed 'alsa*'
Installed Packages
alsa-firmware.noarch1.0.29-1.fc22
alsa-lib.i686   1.0.29-1.fc22
alsa-lib.x86_64 1.0.29-1.fc22
alsa-plugins-pulseaudio.x86_64  1.0.29-1.fc22
alsa-tools.x86_64   1.0.29-1.fc22
alsa-tools-firmware.x86_64  1.0.29-1.fc22
alsa-utils.x86_64   1.0.29-1.fc22

$ yum list installed 'pulseaudio*'
Installed Packages
pulseaudio.x86_64   6.0-4.fc22
pulseaudio-libs.i6866.0-4.fc22
pulseaudio-libs.x86_64  6.0-4.fc22
pulseaudio-libs-glib2.x86_646.0-4.fc22
pulseaudio-module-bluetooth.x86_64  6.0-4.fc22
pulseaudio-module-x11.x86_646.0-4.fc22
pulseaudio-utils.x86_64 6.0-4.fc22

So alsa and pulseaudio are installed
???

JP


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Statics when record with ffmpeg

2015-07-12 Thread MrNice


On 11/07/15 12:20, Carl Eugen Hoyos wrote:
> MrNice  iol.ie> writes:
> 
>> Looks like no alsa:
> 
> Try something like 
> $ yum install alsa-utils alsa-lib
> 
>> Enabled indevs:
>> dv1394   lavfi   v4l2
>> fbdevoss x11grab_xcb
> 
> You could also test oss.
> 
>>  ./configure --enable-libpulse
>> ERROR: libpulse not found using pkg-config
> 
> You need something like pulseaudio 
> or pulseaudio-core-libs
> 
> Carl Eugen


$ ./ffmpeg -devices
ffmpeg version N-73517-g47d0773 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration:
  libavutil  54. 28.100 / 54. 28.100
  libavcodec 56. 47.100 / 56. 47.100
  libavformat56. 40.100 / 56. 40.100
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 21.100 /  5. 21.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
Devices:
 D. = Demuxing supported
 .E = Muxing supported
 --
 DE alsaALSA audio output
 D  dv1394  DV1394 A/V grab
 DE fbdev   Linux framebuffer
 D  lavfi   Libavfilter virtual input device
 DE oss OSS (Open Sound System) playback
  E v4l2Video4Linux2 output device
 D  video4linux2,v4l2 Video4Linux2 device grab
 D  x11grab X11 screen capture, using XCB


New test, same issue.

$ ./ffmpeg -debug 1 -vn -f alsa -ac 2 -channel_layout stereo -i hw:0,0
-c:a pcm_s16le /Store3/Test/pcm_`date +%m%d_%H%M`.wav
ffmpeg version N-73517-g47d0773 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration:
  libavutil  54. 28.100 / 54. 28.100
  libavcodec 56. 47.100 / 56. 47.100
  libavformat56. 40.100 / 56. 40.100
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 21.100 /  5. 21.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-vn' ... matched as option 'vn' (disable video) with
argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'alsa'.
Reading option '-ac' ... matched as option 'ac' (set number of audio
channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout'
(set channel layout) with argument 'stereo'.
Reading option '-i' ... matched as input file with argument 'hw:0,0'.
Reading option '-c:a' ... matched as option 'c' (codec name) with
argument 'pcm_s16le'.
Reading option '/Store3/Test/pcm_0712_2040.wav' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file hw:0,0.
Applying option vn (disable video) with argument 1.
Applying option f (force format) with argument alsa.
Applying option ac (set number of audio channels) with argument 2.
Applying option channel_layout (set channel layout) with argument stereo.
Successfully parsed a group of options.
Opening an input file: hw:0,0.
[alsa @ 0x3835340] All info found
Input #0, alsa, from 'hw:0,0':
  Duration: N/A, start: 1436730025.838410, bitrate: 1536 kb/s
Stream #0:0, 1, 1/100: Audio: pcm_s16le, 48000 Hz, stereo, s16,
1536 kb/s
Successfully opened the file.
Parsing a group of options: output file /Store3/Test/pcm_0712_2040.wav.
Applying option c:a (codec name) with argument pcm_s16le.
Successfully parsed a group of options.
Opening an output file: /Store3/Test/pcm_0712_2040.wav.
Successfully opened the file.
detected 8 logical cores
[graph 0 input from stream 0:0 @ 0x3834ea0] Setting 'time_base' to value
'1/48000'
[graph 0 input from stream 0:0 @ 0x3834ea0] Setting 'sample_rate' to
value '48000'
[graph 0 input from stream 0:0 @ 0x3834ea0] Setting 'sample_fmt' to
value 's16'
[graph 0 input from stream 0:0 @ 0x3834ea0] Setting 'channel_layout' to
value '0x3'
[graph 0 input from stream 0:0 @ 0x3834ea0] tb:1/48000 samplefmt:s16
samplerate:48000 chlayout:0x3
[audio format for output stream 0:0 @ 0x382aec0] Setting 'sample_fmts'
to value 's16'
[AVFilterGraph @ 0x38206e0] query_formats: 4 queried, 9 merged, 0
already done, 0 delayed
Output #0, wav, to '/Store3/Test/pcm_0712_2040.wav':
  Metadata:
ISFT: Lavf56.40.100
Stream #0:0, 0, 1/48000: Audio: pcm_s16le ([1][0][0][0] / 0x0001),
48000 Hz, stereo, s16, 1536 kb/s
Metadata:
  encoder : Lavc56.47.100 pcm_s16le
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
P

Re: [FFmpeg-user] Statics when record with ffmpeg

2015-07-13 Thread MrNice

Great improvement...


I had a look on the other thread "Converting a cassette audio tape" and
I had the idea to try to use pulseaudio. I never did.

So I installed pulseaudio-libs-devel x86_64 then compile again  with

$ ./configure --enable-libpulse then $ ./make ffmpeg

Then

./ffmpeg -devices | grep -E "alsa|pulse"
ffmpeg version N-73517-g47d0773 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse
  libavutil  54. 28.100 / 54. 28.100
  libavcodec 56. 47.100 / 56. 47.100
  libavformat56. 40.100 / 56. 40.100
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 21.100 /  5. 21.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
 DE alsaALSA audio output
 DE pulse   Pulse audio output

pulseaudio and alsa are present.
then

$ pacmd list-sources
2 source(s) available.
index: 0
name: 
driver: 
flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 1950
volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100%
/ 0.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max rewind: 0 KiB
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
 Stereo
used by: 0
linked by: 0
configured latency: 0.00 ms; range is 0.50 .. 1837.33 ms
monitor_of: 0
card: 1 
module: 7
properties:
device.description = "Monitor of Built-in Audio Analog Stereo"
device.class = "monitor"
alsa.card = "0"
alsa.card_name = "HDA ATI SB"
alsa.long_card_name = "HDA ATI SB at 0xfe40 irq 16"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-:00:14.2"
sysfs.path = "/devices/pci:00/:00:14.2/sound/card0"
device.bus = "pci"
device.vendor.id = "1002"
device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
device.product.id = "4383"
device.product.name = "SBx00 Azalia (Intel HDA)"
device.form_factor = "internal"
device.string = "0"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
  * index: 1
name: 
driver: 
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 9959
volume: front-left: 6554 /  10% / -60.00 dB,   front-right: 6554 /  10%
/ -60.00 dB
balance 0.00
base volume: 6554 /  10% / -60.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max rewind: 0 KiB
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
 Stereo
used by: 0
linked by: 0
configured latency: 0.00 ms; range is 0.50 .. 1837.33 ms
card: 1 
module: 7
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "ALC892 Analog"
alsa.id = "ALC892 Analog"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "HDA ATI SB"
alsa.long_card_name = "HDA ATI SB at 0xfe40 irq 16"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-:00:14.2"
sysfs.path = "/devices/pci:00/:00:14.2/sound/card0"
device.bus = "pci"
device.vendor.id = "1002"
device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
device.product.id = "4383"
device.product.name = "SBx00 Azalia (Intel HDA)"
device.form_factor = "internal"
device.string = "front:0"
device.buffering.buffer_size = "352768"
device.buffering.fragment_size = "176384"
device.access_mode = "mmap+timer"
device.profile.name = "analog-stereo"
device.profile.description = "Analog Stereo"
device.description = "Built-in Audio Analog Stereo"
alsa.mixer_name = "Realtek ALC892"
alsa.components = "HDA:10ec0892,18497892,00100302"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
   

[FFmpeg-user] Could not write header for output file #0 (incorrect codec parameters ?)

2015-07-19 Thread MrNice
Hello everybody,

I want to record audio and video from a analogue to digital converter
Pinnacle Dazzle DVC100.

Command :
 ./ffmpeg -debug 1 -f pulse -i alsa_input.pci-_00_14.2.analog-stereo
-f v4l2 -i /dev/video0 /Store3/Test/copy_`date +%m%d_%H%M`.avi
ffmpeg version N-73517-g47d0773 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse
  libavutil  54. 28.100 / 54. 28.100
  libavcodec 56. 47.100 / 56. 47.100
  libavformat56. 40.100 / 56. 40.100
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 21.100 /  5. 21.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'pulse'.
Reading option '-i' ... matched as input file with argument
'alsa_input.pci-_00_14.2.analog-stereo'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'v4l2'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '/Store3/Test/copy_0719_1905.avi' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file
alsa_input.pci-_00_14.2.analog-stereo.
Applying option f (force format) with argument pulse.
Successfully parsed a group of options.
Opening an input file: alsa_input.pci-_00_14.2.analog-stereo.
[pulse @ 0x2757ba0] All info found
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, pulse, from 'alsa_input.pci-_00_14.2.analog-stereo':
  Duration: N/A, start: 1437329119.928277, bitrate: 1536 kb/s
Stream #0:0, 1, 1/100: Audio: pcm_s16le, 48000 Hz, 2 channels,
s16, 1536 kb/s
Successfully opened the file.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument v4l2.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x2770c40] fd:6 capabilities:85220001
[video4linux2,v4l2 @ 0x2770c40] Current input_channel: 1, input_name:
S-Video, input_std: ff
[video4linux2,v4l2 @ 0x2770c40] Querying the device for the current
frame size
[video4linux2,v4l2 @ 0x2770c40] Setting frame size to 720x576
[video4linux2,v4l2 @ 0x2770c40] Trying to set codec:rawvideo pix_fmt:yuv420p
Last message repeated 1 times
[video4linux2,v4l2 @ 0x2770c40] Trying to set codec:rawvideo pix_fmt:yuv422p
[video4linux2,v4l2 @ 0x2770c40] Trying to set codec:rawvideo pix_fmt:yuyv422
[video4linux2,v4l2 @ 0x2770c40] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x2770c40] Current standard: PAL, id: ff,
frameperiod: 1/25
[video4linux2,v4l2 @ 0x2770c40] interrupted
Input #1, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, bitrate: 165888 kb/s
Stream #1:0, 0, 1/100: Video: rawvideo, 1 reference frame (YUY2
/ 0x32595559), yuyv422, 720x576 (0x0), 1/100, 165888 kb/s, 25 fps,
25 tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: output file /Store3/Test/copy_0719_1905.avi.
Successfully parsed a group of options.
Opening an output file: /Store3/Test/copy_0719_1905.avi.
Successfully opened the file.
detected 8 logical cores
[graph 0 input from stream 1:0 @ 0x2743dc0] Setting 'video_size' to
value '720x576'
[graph 0 input from stream 1:0 @ 0x2743dc0] Setting 'pix_fmt' to value '1'
[graph 0 input from stream 1:0 @ 0x2743dc0] Setting 'time_base' to value
'1/100'
[graph 0 input from stream 1:0 @ 0x2743dc0] Setting 'pixel_aspect' to
value '0/1'
[graph 0 input from stream 1:0 @ 0x2743dc0] Setting 'sws_param' to value
'flags=2'
[graph 0 input from stream 1:0 @ 0x2743dc0] Setting 'frame_rate' to
value '25/1'
[graph 0 input from stream 1:0 @ 0x2743dc0] w:720 h:576 pixfmt:yuyv422
tb:1/100 fr:25/1 sar:0/1 sws_param:flags=2
[format @ 0x274df00] compat: called with args=[yuv420p]
[format @ 0x274df00] Setting 'pix_fmts' to value 'yuv420p'
[auto-inserted scaler 0 @ 0x27324c0] Setting 'flags' to value '0x4'
[auto-inserted scaler 0 @ 0x27324c0] w:iw h:ih flags:'0x4' interl:0
[format @ 0x274df00] auto-inserting filter 'auto-inserted scaler 0'
between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x2739a40] query_formats: 4 queried, 2 merged, 1
already done, 0 delayed
[auto-inserted scaler 0 @ 0x27324c0] w:720 h:576 fmt:yuyv422 sar:0/1 ->
w:720 h:576 fmt:yuv420p sar:0/1 flags:0x4
[graph 1 input from stream 0:0 @ 0x274d6e0] Setting 'time_base' to value
'1/48000'
[graph 1 input from stream 0:0 @ 0x274d6e0] Setting 'sample_rate' to
value '48000'
[graph 1 input from stream 0:0 @ 0x274d6e0] Setting 'sample_fmt' to
value 's16'
[graph 1 input from stream 0:0 @ 0x274d6e0] Setting 'channel_layout' to
value '0x3'
[graph 1 input from stream 0:0 @ 0x274d6e0] tb:1/48000 samplefmt:s16
samplerate:48000 chlayout:0x3
[audio format for output stream 0:1 @ 0x2743

Re: [FFmpeg-user] Could not write header for output file #0 (incorrect codec parameters ?)

2015-07-20 Thread MrNice
On 19/07/15 19:59, Carl Eugen Hoyos wrote:
> ffmpeg -i /dev/video0 out.avi

Boot my desktop this morning and first try:

 ./ffmpeg -i /dev/video0 out.avi
ffmpeg version N-73517-g47d0773 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse
  libavutil  54. 28.100 / 54. 28.100
  libavcodec 56. 47.100 / 56. 47.100
  libavformat56. 40.100 / 56. 40.100
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 21.100 /  5. 21.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 2338.288325, bitrate: 165888 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 720x576,
165888 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Output #0, avi, to 'out.avi':
  Metadata:
ISFT: Lavf56.40.100
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 720x576,
q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
  encoder : Lavc56.47.100 mpeg4
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
frame=  214 fps= 25 q=2.0 Lsize= 183kB time=00:00:08.56 bitrate=
175.4kbits/s
video:173kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 6.181012%
***

Record started, the file has no video (black screen), I think it's OK.
I tried with other recording commands to be sure but didn't change any
set-up then I did a second try:

 ./ffmpeg -i /dev/video0 out.avi
ffmpeg version N-73517-g47d0773 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse
  libavutil  54. 28.100 / 54. 28.100
  libavcodec 56. 47.100 / 56. 47.100
  libavformat56. 40.100 / 56. 40.100
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 21.100 /  5. 21.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, bitrate: 165888 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 720x576,
165888 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Output #0, avi, to 'out.avi':
  Metadata:
ISFT: Lavf56.40.100
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 720x576,
q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
  encoder : Lavc56.47.100 mpeg4
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
Could not write header for output file #0 (incorrect codec parameters
?): Immediate exit requested
Exiting normally, received signal 2.
**

I tried few times I got the same error.
I don't know what has done the issue.
I reboot the desktop then try again.
Now no error. Any idea what has caused the issue? Where I could have a
look if it happen again?

So I try my original command and I have some questions at the very bottom:

 ./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo -i
alsa_input.pci-_00_14.2.analog-stereo -f v4l2 -channel 1 -i
/dev/video0 -c:a copy /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
ffmpeg version N-73517-g47d0773 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse
  libavutil  54. 28.100 / 54. 28.100
  libavcodec 56. 47.100 / 56. 47.100
  libavformat56. 40.100 / 56. 40.100
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 21.100 /  5. 21.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'pulse'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate
(in Hz)) with argument '44100'.
Reading option '-ac' ... matched as option 'ac' (set number of audio
channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout'
(set channel layout) with argument 'stereo'.
Reading option '-i' ... matched as input file with argument
'alsa_input.pci-_00_14.2.analog-stereo'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'v4l2'.
Reading option '-channel' ... matched as AVOption 'channel' with
argument '1'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-c:a' ... matched as option 'c' (codec name) with
argument 'copy'.
Reading option '/Store3/Test/t_20150720_1419.mkv' ... matched as output
file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file
alsa_input.pci-_00_14.2.analog-stereo.
Applying option f (force format) with argument pulse.
Applying option ar (se

Re: [FFmpeg-user] Could not write header for output file #0 (incorrect codec parameters ?)

2015-07-24 Thread MrNice
On 20/07/15 16:02, Carl Eugen Hoyos wrote:
> MrNice  iol.ie> writes:
> 
>> [video4linux2,v4l20x1d33fa0] Thread 
>> message queue blocking; consider raising the 
>> thread_queue_size option (current value: 8)
> 
>> Thread message queue blocking;
>> What does this warning mean? 
> 
>> How to remove it?
> 
> Are you sure that you read the message?
> 
>> The objective is to get lossless audio and video 
> 
> Just to make sure: Do you mean video and 
> lossless audio?
> 
>> from what the Dazzle DVC100 provide.
> 
>> AFAIK, yuyv422 is better than yuv420p. I tried to 
>> use yuyv422 but I have the error:
>> Incompatible pixel format 'yuyv422' for codec 
>> 'mpeg4', auto-selecting format 'yuv420p'
>>
>> What is the codec I could use the get 422?
> 
> -vcodec mpeg2video supports 4:2:2 subsampling.
> 
>> Is my ffmpeg command good to get the best quality?
> 
> No, it is missing -qscale 2 -mbd 2
> (if you don't want to use libx264).
> 
> Carl Eugen


>> Thread message queue blocking;
>> What does this warning mean?
With some trails, I found the limit at 20. On site forums, they set at
512 or 1024. So I try at 512 but I don't know the up limit. What do you
think?

> (if you don't want to use libx264).
I installed libx264.
So here my new command, unfortunately with errors.

**
./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
-thread_queue_size 512 -i alsa_input.pci-_00_14.2.analog-stereo -f
v4l2 -channel 1 -pix_fmt yuyv422 -thread_queue_size 512 -i /dev/video0
-c:v libx264 -pix_fmt yuv422p -c:a pcm_s16le /Store3/Test/t_`date
+%Y%m%d_%H%M`.mkv
ffmpeg version N-73832-g736a386 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil  54. 28.100 / 54. 28.100
  libavcodec 56. 49.101 / 56. 49.101
  libavformat56. 40.101 / 56. 40.101
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 25.100 /  5. 25.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc53.  3.100 / 53.  3.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'pulse'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate
(in Hz)) with argument '44100'.
Reading option '-ac' ... matched as option 'ac' (set number of audio
channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout'
(set channel layout) with argument 'stereo'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument
'alsa_input.pci-_00_14.2.analog-stereo'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'v4l2'.
Reading option '-channel' ... matched as AVOption 'channel' with
argument '1'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuyv422'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-c:v' ... matched as option 'c' (codec name) with
argument 'libx264'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuv422p'.
Reading option '-c:a' ... matched as option 'c' (codec name) with
argument 'pcm_s16le'.
Reading option '/Store3/Test/t_20150724_0849.mkv' ... matched as output
file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file
alsa_input.pci-_00_14.2.analog-stereo.
Applying option f (force format) with argument pulse.
Applying option ar (set audio sampling rate (in Hz)) with argument 44100.
Applying option ac (set number of audio channels) with argument 2.
Applying option channel_layout (set channel layout) with argument stereo.
Applying option thread_queue_size (set the maximum number of queued
packets from the demuxer) with argument 512.
Successfully parsed a group of options.
Open

Re: [FFmpeg-user] Running multiple ffmpeg commands with minimal loss in quality

2015-07-25 Thread MrNice
On 25/07/15 09:54, Francois Visagie wrote:
>> -Original Message-
>> From: ffmpeg-user [mailto:ffmpeg-user-boun...@ffmpeg.org] On Behalf Of
>> Michael Nolan
>> Sent: 25 July 2015 01:02
>> To: ffmpeg-user@ffmpeg.org
>> Subject: [FFmpeg-user] Running multiple ffmpeg commands with minimal
>> loss in quality
>>
>> Hi everyone,
>>
>> I'm writing a video editor which will push out a large json file that
>> includes the videos and a series of edits that were performed upon them. I
>> have a python application which parses the json and runs ffmpeg commands
>> to
>> do things like overlay, scale and trim videos, render text, render images,
>> etc.
>>
>> The biggest issue that I have is that the application that I run has to run
>> ffmpeg multiple times, thus re-encoding the video(s) and making the end
>> video look much lower quality than the original content. The original
>> videos are .webm and encoded using QTmuxingAppLibWebM-0.0.1.
>>
>> Is there any way that I can help prevent this sort of thing or is there any
>> existing tooling for taking a series of edits and running them in one
>> command (meaning I don't have to re-encode multiple times)?
>>
>> Any help would be appreciated.
> 
> The standard approach to this kind of issue is to use (as close to) 
> losslessly encoded intermediate files as possible. I.e. either use a codec 
> designed for lossless encoding such as "HuffYUV", or use something like x264 
> with "lossless" settings.
> 
>>

Sorry to interfere,
>
> The standard approach to this kind of issue is to use (as close to)
losslessly encoded intermediate files as possible. I.e. either use a
codec designed for lossless encoding such as "HuffYUV", or use something
like x264 with "lossless" settings.
>
Why do you add " " around lossless for x264. Is x264 still lossy even
with "lossless" setting?
BTW what is/are it/they?

Thanks François
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Could not write header for output file #0 (incorrect codec parameters ?)

2015-07-25 Thread MrNice
> 0-
>>> The objective is to get lossless audio and video
>>
>> Just to make sure: Do you mean video and
>> lossless audio?
> Yes of course. This was a short way (in a wrong order indeed) to say
> "...to get and keep the best Dazzle can provide without adding artefacts".
> 
> 1- I read the video stream with -pix_fmt yuyv422 then write with
> -pix_fmt yuv422p. No choice, as you wrote,
> “As said, you cannot use PIX_FMT_YUYV422 because no encoder supports it.”
> I think there is no lost but only a different way to organise. Do you agree?
> 
> 2- There are clipping and drops (Highlighted by ). I
> don't know why. Could you help?
> 
> 3- With libx264 are there some options I could add to improve the
> quality? (libx264 has a lot of options hard for me to understand)
> ___

@Carl

In another thread you wrote:

>> I.e. either use a codec designed for lossless encoding
>> such as "HuffYUV", or use something like x264 with
>> "lossless" settings.

> FFv1 should be superior in (nearly) every regard, for
> example you would need several different x264 libraries
> to support all possible colour spaces and they are not
> supported by Huffyuv at all.
>
> Carl Eugen


I am confused. What should be the best codec for my usage: FFV1, x264,
Huffyuv, other?
Could you tell me the good options for this codec?

JP

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Could not write header for output file #0 (incorrect codec parameters ?)

2015-07-26 Thread MrNice


On 25/07/15 16:21, Carl Eugen Hoyos wrote:
> MrNice  iol.ie> writes:
> 
>> Input #0, pulse, from 'alsa_input.pci-_00_14.2.analog-stereo':
>>   Duration: N/A, start: 1437724175.042321
> 
>> Input #1, video4linux2,v4l2, from '/dev/video0':
>>   Duration: N/A, start: 1349.084272
> 
> This is a major issue, you may try options like 
> the following that may fix it:
> -ts abs
> -ts mono2abs
> 
> -wallclock 0
> 
> (And it is of course possible that this issue 
> disappears with alsa, I don't know...)
> 
> 
> Carl Eugen
> 

Really I have no luck: For months I try to find fix for ffmpeg with
alsa, as I got statics in the audio. Ubuntu, Ubuntu studio, Mint,
Centos, Stella, Fedora, have the same issue (New OS install on a spare
HD for each of them).

This month, I found out that with pulse, audio is good. I was happy.

Now I have an error with Duration...
I tried -ts abs then -ts mono2abs, (wallclock is the same as abs)

Duration: N/A, start: 1437900701.356327
Duration: N/A, start: 1437900702.504357
...
Cliping frame in rate conversion by 0.08
Cliping frame in rate conversion by 0.199486
...
Past duration 0.600685 too large


I even tried -force_key_frames 00:00:00.000 (found in another forum),
same issue.
Same issue with alsa (+ statics)

So, I am a bit hopeless, and it's raining again outside. :-(
I am sorry, I don't want to take advantage of your kindness, Carl,
Moritz, but I'll need your help again.

So, what do you want I do?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Could not write header for output file #0 (incorrect codec parameters ?)

2015-07-26 Thread MrNice


On 26/07/15 11:27, Carl Eugen Hoyos wrote:
> MrNice  iol.ie> writes:
> 
>> I tried -ts abs then -ts mono2abs, (wallclock is the same as abs)
>>
>> Duration: N/A, start: 1437900701.356327
>> Duration: N/A, start: 1437900702.504357
> 
> This looks correct to me...
> 
> Carl Eugen
> 

But the error messages are still here:
Past duration 0.802895 too large
*** dropping frame 10 from stream 0 at ts 8
Cliping frame in rate conversion by


./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
-thread_queue_size 512 -i alsa_input.pci-_00_14.2.analog-stereo -f
v4l2 -ts mono2abs -channel 1 -pix_fmt yuyv422 -thread_queue_size 512 -i
/dev/video0 -c:v ffv1 -pix_fmt yuv422p -c:a pcm_s16le
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
ffmpeg version N-73832-g736a386 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil  54. 28.100 / 54. 28.100
  libavcodec 56. 49.101 / 56. 49.101
  libavformat56. 40.101 / 56. 40.101
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 25.100 /  5. 25.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc53.  3.100 / 53.  3.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'pulse'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate
(in Hz)) with argument '44100'.
Reading option '-ac' ... matched as option 'ac' (set number of audio
channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout'
(set channel layout) with argument 'stereo'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument
'alsa_input.pci-_00_14.2.analog-stereo'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'v4l2'.
Reading option '-ts' ... matched as AVOption 'ts' with argument 'mono2abs'.
Reading option '-channel' ... matched as AVOption 'channel' with
argument '1'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuyv422'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-c:v' ... matched as option 'c' (codec name) with
argument 'ffv1'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuv422p'.
Reading option '-c:a' ... matched as option 'c' (codec name) with
argument 'pcm_s16le'.
Reading option '/Store3/Test/t_20150726_0953.mkv' ... matched as output
file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file
alsa_input.pci-_00_14.2.analog-stereo.
Applying option f (force format) with argument pulse.
Applying option ar (set audio sampling rate (in Hz)) with argument 44100.
Applying option ac (set number of audio channels) with argument 2.
Applying option channel_layout (set channel layout) with argument stereo.
Applying option thread_queue_size (set the maximum number of queued
packets from the demuxer) with argument 512.
Successfully parsed a group of options.
Opening an input file: alsa_input.pci-_00_14.2.analog-stereo.
[pulse @ 0x34d3200] All info found
Input #0, pulse, from 'alsa_input.pci-_00_14.2.analog-stereo':
  Duration: N/A, start: 1437900797.180740, bitrate: 1411 kb/s
Stream #0:0, 1, 1/100: Audio: pcm_s16le, 44100 Hz, stereo, s16,
1411 kb/s
Successfully opened the file.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument v4l2.
Applying option pix_fmt (set pixel format) with argument yuyv422.
Applying option thread_queue_size (set the maximum number of queued
packets from the demuxer) with argument 512.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x34ebfc0] fd:6 capabilities:85220001
[video4linux2,v4l2 @ 0x34ebfc0] Selecting input_channel: 1
[video4linux2,v4l2 @ 0x34ebfc0] Current input_channel: 1, input_name:
S-Video, input_std: ff
[video4linux2,v4l2 @ 0x34ebfc0] Quer

Re: [FFmpeg-user] Running multiple ffmpeg commands with minimal loss in quality

2015-07-28 Thread MrNice
On 27/07/15 11:54, Peter B. wrote:
> On 07/25/2015 11:53 AM, MrNice wrote:
>>> The standard approach to this kind of issue is to use (as close to)
>> losslessly encoded intermediate files as possible. I.e. either use a
>> codec designed for lossless encoding such as "HuffYUV", or use something
>> like x264 with "lossless" settings.
>> Why do you add " " around lossless for x264. Is x264 still lossy even
>> with "lossless" setting?
> 
> Don't worry: x264-lossless is really lossless.
> 
> At least, according to my tests:
> http://download.das-werkstatt.com/pb/mthk/info/video/comparison_video_codecs_containers.html#codec_tests
> 
> What might also be interesting is, that these tests show that FFV1.3
> encodes and decodes a lot faster than x264-lossless:
> 
> encoding/decoding FPS:
> x264: 94 / 190 fps
> FFV1.3: 216 / 277 fps
> 
> 
> 
>> BTW what is/are it/they?
> 
> What do you mean?
> 
> 
> Kind regards,
> Pb

So 2 questions:
- What are the command options to add to get x264 lossless?
-preset fast -qp 0 , only/good?

- How I can know FFV1 is version 1.3?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] Capture from USB Dazzle: *** dropping frames

2015-07-30 Thread MrNice
After 2 issues along this month (Statics when record with ffmpeg and
Could not write header for output file #0 (incorrect codec parameters ?))
my command is still not very good:

3 question about the following output:
- How to avoid
"*** dropping frame 9 from stream 0 at ts 7
*** dropping frame 14 from stream 0 at ts 12"
and more

- "Cliping frame in rate conversion by "
What does that mean? How to avoid?

- I use -ts mono2abs or -ts abs to sync audio and video. I don't see any
difference between them, only a message
"[video4linux2,v4l2 @ 0x1fc8f00] Detected monotonic timestamps, converting"
when mono2abs.
What is the best for my usage?

At this time, the output image is not good at all; It looks like a lot
of lines are missing, white areas are ribbed by black lines. I hope the
above fix will improve the image.

Thanks again.

JP


 ./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
-thread_queue_size 512 -i alsa_input.pci-_00_14.2.analog-stereo -f
v4l2 -ts mono2abs -channel 1 -pix_fmt yuyv422 -thread_queue_size 512 -i
/dev/video0 -c:v ffv1 -level 3 -pix_fmt yuv422p -c:a pcm_s16le
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
ffmpeg version N-73832-g736a386 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil  54. 28.100 / 54. 28.100
  libavcodec 56. 49.101 / 56. 49.101
  libavformat56. 40.101 / 56. 40.101
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 25.100 /  5. 25.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc53.  3.100 / 53.  3.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'pulse'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate
(in Hz)) with argument '44100'.
Reading option '-ac' ... matched as option 'ac' (set number of audio
channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout'
(set channel layout) with argument 'stereo'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument
'alsa_input.pci-_00_14.2.analog-stereo'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'v4l2'.
Reading option '-ts' ... matched as AVOption 'ts' with argument 'mono2abs'.
Reading option '-channel' ... matched as AVOption 'channel' with
argument '1'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuyv422'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-c:v' ... matched as option 'c' (codec name) with
argument 'ffv1'.
Reading option '-level' ... matched as AVOption 'level' with argument '3'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuv422p'.
Reading option '-c:a' ... matched as option 'c' (codec name) with
argument 'pcm_s16le'.
Reading option '/Store3/Test/t_20150730_1150.mkv' ... matched as output
file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file
alsa_input.pci-_00_14.2.analog-stereo.
Applying option f (force format) with argument pulse.
Applying option ar (set audio sampling rate (in Hz)) with argument 44100.
Applying option ac (set number of audio channels) with argument 2.
Applying option channel_layout (set channel layout) with argument stereo.
Applying option thread_queue_size (set the maximum number of queued
packets from the demuxer) with argument 512.
Successfully parsed a group of options.
Opening an input file: alsa_input.pci-_00_14.2.analog-stereo.
[pulse @ 0x1fafdc0] All info found
Input #0, pulse, from 'alsa_input.pci-_00_14.2.analog-stereo':
  Duration: N/A, start: 1438253429.645509, bitrate: 1411 kb/s
Stream #0:0, 1, 1/100: Audio: pcm_s16le, 44100 Hz, stereo, s16,
1411 kb/s
Successfully opened the file.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument v4l2.
Applying option pix_fmt (set pixel format) with argument yuyv422.
Applying option thread_queue_size (set the maximum number of queued
packets from the demuxer) with argument 512.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x1fc8f00] fd:6 capabilities:85220001
[video4linux2,v4l2 @ 0x1fc8f00] Selecting input_channel: 1
[video4linux2,v4l2 @ 0x1fc8f00] Current input_channel: 1, input_name:
S-Video, input_std: ff
[video4linux2,v4l2 @ 0x1fc8f00] Querying the device for the curren

Re: [FFmpeg-user] Capture from USB Dazzle: *** dropping frames

2015-07-30 Thread MrNice
On 30/07/15 12:28, Carl Eugen Hoyos wrote:
> MrNice  iol.ie> writes:
> 
>> At this time, the output image is not good at all; 
>> It looks like a lot of lines are missing, white 
>> areas are ribbed by black lines.
> 
> Is this also reproducible if you record without 
> audio, something like:
> $ ffmpeg -channel 1 -i /dev/video0 -qscale 2 out.avi
> ?
> 
> Carl Eugen
> 

Yes, same issue

./ffmpeg -channel 1 -i /dev/video0 -qscale 2 out.avi
ffmpeg version N-73832-g736a386 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil  54. 28.100 / 54. 28.100
  libavcodec 56. 49.101 / 56. 49.101
  libavformat56. 40.101 / 56. 40.101
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 25.100 /  5. 25.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc53.  3.100 / 53.  3.100
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 5087.713285, bitrate: 165888 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 720x576,
165888 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Please use -q:a or -q:v, -qscale is ambiguous
Output #0, avi, to 'out.avi':
  Metadata:
ISFT: Lavf56.40.101
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 720x576,
q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
  encoder : Lavc56.49.101 mpeg4
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
Past duration 0.798866 too large
Past duration 0.802269 too large
Past duration 0.801369 too large
Past duration 0.601936 too large 75kB time=00:00:00.56
bitrate=1098.4kbits/s dup=0 drop=1
Past duration 0.801949 too large
Past duration 0.602592 too large
Past duration 0.802589 too large
Past duration 0.603249 too large
Past duration 0.803017 too large
Past duration 0.605598 too large112kB time=00:00:01.12 bitrate=
822.2kbits/s dup=0 drop=4
Past duration 0.803474 too large
Past duration 0.604515 too large
Past duration 0.804222 too large
Past duration 0.804695 too large150kB time=00:00:01.60 bitrate=
769.7kbits/s dup=0 drop=6
Past duration 0.805443 too large
Past duration 0.806023 too large
Past duration 0.806664 too large187kB time=00:00:02.12 bitrate=
721.1kbits/s dup=0 drop=9
Past duration 0.807198 too large
Past duration 0.807747 too large224kB time=00:00:02.60 bitrate=
707.2kbits/s dup=0 drop=11
Past duration 0.808342 too large
Past duration 0.808922 too large
Past duration 0.809517 too large261kB time=00:00:03.12 bitrate=
685.0kbits/s dup=0 drop=14
Past duration 0.810066 too large
Past duration 0.810692 too large299kB time=00:00:03.60 bitrate=
680.8kbits/s dup=0 drop=16
frame=   92 fps= 26 q=2.0 Lsize= 302kB time=00:00:03.68 bitrate=
671.6kbits/s dup=0 drop=17
video:294kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 2.637751%
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Capture from USB Dazzle: *** dropping frames

2015-07-31 Thread MrNice


On 30/07/15 13:14, MrNice wrote:
> On 30/07/15 12:28, Carl Eugen Hoyos wrote:
>> MrNice  iol.ie> writes:
>>
>>> At this time, the output image is not good at all; 
>>> It looks like a lot of lines are missing, white 
>>> areas are ribbed by black lines.
>>
>> Is this also reproducible if you record without 
>> audio, something like:
>> $ ffmpeg -channel 1 -i /dev/video0 -qscale 2 out.avi
>> ?
>>
>> Carl Eugen
>>
> 
> Yes, same issue
> 

BIG new problem.

So far I did all the tests with my laptop as player (output Y/C), the
Dazzle and my desktop as recorder.
I played a B&W file with a flashing square and in the same time a bip
every second to check sync.

I just tested with other files with colours: The output video files are
Black and White!
I tried with (see output below)
./ffmpeg -channel 1 -i /dev/video0 -qscale 2 /Store3/Test/out_`date
+%Y%m%d_%H%M`.avi
in the desktop or laptop, same problem.
I am sure the output of the laptop is coloured because I test with a
small monitor with Y/C input.

With VLC, Capture Device, I have B&W video as well.

Is the Dazzle dead? How to be sure?


./ffmpeg -channel 1 -i /dev/video0 -qscale 2 /Store3/Test/out_`date
+%Y%m%d_%H%M`.avi
ffmpeg version N-73832-g736a386 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil  54. 28.100 / 54. 28.100
  libavcodec 56. 49.101 / 56. 49.101
  libavformat56. 40.101 / 56. 40.101
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 25.100 /  5. 25.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc53.  3.100 / 53.  3.100
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 3336.677338, bitrate: 165888 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 720x576,
165888 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Please use -q:a or -q:v, -qscale is ambiguous
Output #0, avi, to '/Store3/Test/out_20150731_1116.avi':
  Metadata:
ISFT: Lavf56.40.101
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 720x576,
q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
  encoder : Lavc56.49.101 mpeg4
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
Past duration 0.601036 too large
Past duration 0.800774 too large
Past duration 0.801247 too large
Past duration 0.801918 too large109kB time=00:00:00.60
bitrate=1482.1kbits/s dup=0 drop=1
Past duration 0.802467 too large
Past duration 0.803062 too large
Past duration 0.806221 too large
Past duration 0.803566 too large163kB time=00:00:01.08
bitrate=1240.0kbits/s dup=0 drop=4
Past duration 0.805336 too large
Past duration 0.804115 too large
Past duration 0.805946 too large
Past duration 0.804771 too large219kB time=00:00:01.60
bitrate=1122.1kbits/s dup=0 drop=6
Past duration 0.806572 too large
Past duration 0.804924 too large
Past duration 0.807167 too large
Past duration 0.805885 too large
Past duration 0.807823 too large
Past duration 0.608360 too large274kB time=00:00:02.08
bitrate=1079.9kbits/s dup=0 drop=9
Past duration 0.808418 too large
Past duration 0.608986 too large
Past duration 0.809013 too large
Past duration 0.609642 too large330kB time=00:00:02.60
bitrate=1040.4kbits/s dup=0 drop=11
Past duration 0.810997 too large
frame=   70 fps= 25 q=2.0 Lsize= 335kB time=00:00:02.80 bitrate=
979.5kbits/s dup=0 drop=13
video:328kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 2.205871%
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Capture from USB Dazzle: *** dropping frames

2015-07-31 Thread MrNice


On 31/07/15 12:53, MrNice wrote:
> 
> 
> On 30/07/15 13:14, MrNice wrote:
>> On 30/07/15 12:28, Carl Eugen Hoyos wrote:
>>> MrNice  iol.ie> writes:
>>>
>>>> At this time, the output image is not good at all; 
>>>> It looks like a lot of lines are missing, white 
>>>> areas are ribbed by black lines.
>>>
>>> Is this also reproducible if you record without 
>>> audio, something like:
>>> $ ffmpeg -channel 1 -i /dev/video0 -qscale 2 out.avi
>>> ?
>>>
>>> Carl Eugen
>>>
>>
>> Yes, same issue
>>
> 
> BIG new problem.
> 
> So far I did all the tests with my laptop as player (output Y/C), the
> Dazzle and my desktop as recorder.
> I played a B&W file with a flashing square and in the same time a bip
> every second to check sync.
> 
> I just tested with other files with colours: The output video files are
> Black and White!
> I tried with (see output below)
> ./ffmpeg -channel 1 -i /dev/video0 -qscale 2 /Store3/Test/out_`date
> +%Y%m%d_%H%M`.avi
> in the desktop or laptop, same problem.
> I am sure the output of the laptop is coloured because I test with a
> small monitor with Y/C input.
> 
> With VLC, Capture Device, I have B&W video as well.
> 
> Is the Dazzle dead? How to be sure?
> 

False alert!
In fact I can get colours when the videotape player plays a tape. For
some raison the Y/C output of my laptop display colours to the external
Y/C monitor but not to the Dazzle.

So, never mind for the previous post.

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Capture from USB Dazzle: *** dropping frames

2015-08-01 Thread MrNice
I managed to get an "old" DVD player to test again.
Now the only issue I get is a lot of
"Cliping frame in rate conversion by "

As the text is green, I'd say this is not important.
Could you please confirm and shortly explain what means this sentence.
I could not understand when reading the source code.


Second question
I had to add -ts to sync audio and video. I tried with -ts abs and -ts
mono2abs. I have read the documentation but a bit hard to understand.
Both are working but what is the difference, which one do you advice?

Thanks

 ./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
-thread_queue_size 512 -i alsa_input.pci-_00_14.2.analog-stereo -f
v4l2 -ts mono2abs -channel 1 -video_size 720x576 -pix_fmt yuyv422
-thread_queue_size 512 -i /dev/video0 -c:v ffv1 -level 3 -pix_fmt
yuv422p -c:a pcm_s16le /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
ffmpeg version N-73832-g736a386 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil  54. 28.100 / 54. 28.100
  libavcodec 56. 49.101 / 56. 49.101
  libavformat56. 40.101 / 56. 40.101
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 25.100 /  5. 25.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc53.  3.100 / 53.  3.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'pulse'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate
(in Hz)) with argument '44100'.
Reading option '-ac' ... matched as option 'ac' (set number of audio
channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout'
(set channel layout) with argument 'stereo'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument
'alsa_input.pci-_00_14.2.analog-stereo'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'v4l2'.
Reading option '-ts' ... matched as AVOption 'ts' with argument 'mono2abs'.
Reading option '-channel' ... matched as AVOption 'channel' with
argument '1'.
Reading option '-video_size' ... matched as AVOption 'video_size' with
argument '720x576'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuyv422'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-c:v' ... matched as option 'c' (codec name) with
argument 'ffv1'.
Reading option '-level' ... matched as AVOption 'level' with argument '3'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuv422p'.
Reading option '-c:a' ... matched as option 'c' (codec name) with
argument 'pcm_s16le'.
Reading option '/Store3/Test/t_20150801_1735.mkv' ... matched as output
file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file
alsa_input.pci-_00_14.2.analog-stereo.
Applying option f (force format) with argument pulse.
Applying option ar (set audio sampling rate (in Hz)) with argument 44100.
Applying option ac (set number of audio channels) with argument 2.
Applying option channel_layout (set channel layout) with argument stereo.
Applying option thread_queue_size (set the maximum number of queued
packets from the demuxer) with argument 512.
Successfully parsed a group of options.
Opening an input file: alsa_input.pci-_00_14.2.analog-stereo.
[pulse @ 0x28f7dc0] All info found
Input #0, pulse, from 'alsa_input.pci-_00_14.2.analog-stereo':
  Duration: N/A, start: 1438446921.636832, bitrate: 1411 kb/s
Stream #0:0, 1, 1/100: Audio: pcm_s16le, 44100 Hz, stereo, s16,
1411 kb/s
Successfully opened the file.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument v4l2.
Applying option pix_fmt (set pixel format) with argument yuyv422.
Applying option thread_queue_size (set the maximum number of queued
packets from the demuxer) with argument 512.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x2910ec0] fd:6 capabilities:85220001
[video4linux2,v4l2 @ 0x2910ec0] Selecting input_channel: 1
[video4linux2,v4l2 @ 0x2910ec0] Current input_channel: 1, input_name:
S-Video, input_std: ff
[video4linux2,v4l2 @ 0x2910ec0] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x2910ec0] Current standard: PAL, id: ff,
frameperiod: 1/25
[video4linux2,v4l2 @ 0x2910ec0] Detected monotonic timestamps, converting
[video4linux2,v4l2 @ 0x

Re: [FFmpeg-user] Capture from USB Dazzle: *** dropping frames

2015-08-02 Thread MrNice
On 02/08/15 18:12, Carl Eugen Hoyos wrote:
> MrNice  iol.ie> writes:
> 
>> I had to add -ts to sync audio and video.
> 
> Are they in sync?
> (This is the most important question.)
> 
>> I tried with -ts abs and -ts mono2abs. I have 
>> read the documentation but a bit hard to understand.
>> Both are working but what is the difference, which 
>> one do you advice?
> 
> I cannot answer, sorry.
> 
>> Input #0, pulse, from 'alsa_input.pci-_00_14.2.analog-stereo':
>>   Duration: N/A, start: 1438446921.636832, bitrate: 1411 kb/s
> 
>> Input #1, video4linux2,v4l2, from '/dev/video0':
>>   Duration: N/A, start: 1438446922.767573, bitrate: 165888 kb/s
> 
> This looks ok to me.
> 
> When looking at the output, do you think that 
> frames are dropped?
> (You cut the console output, so I cannot know.)
> 
> Carl Eugen
> 

Thanks Carl,

Yes audio and video are sync, this is OK.

I can answer 1 of my questions:
Cliping frame in rate conversion by
doesn't mean the frame is dropped.
I can see that at the end of the output
See bellow
My question is what does this sentence mean?
As the text is green, I'd say this is not very important and should not
remove quality.


./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
-thread_queue_size 512 -i alsa_input.pci-_00_14.2.analog-stereo -f
v4l2 -ts mono2abs -channel 1 -video_size 720x576 -pix_fmt yuyv422
-thread_queue_size 512 -i /dev/video0 -c:v ffv1 -level 3 -pix_fmt
yuv422p -c:a pcm_s16le /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
ffmpeg version N-73832-g736a386 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil  54. 28.100 / 54. 28.100
  libavcodec 56. 49.101 / 56. 49.101
  libavformat56. 40.101 / 56. 40.101
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 25.100 /  5. 25.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc53.  3.100 / 53.  3.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'pulse'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate
(in Hz)) with argument '44100'.
Reading option '-ac' ... matched as option 'ac' (set number of audio
channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout'
(set channel layout) with argument 'stereo'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument
'alsa_input.pci-_00_14.2.analog-stereo'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'v4l2'.
Reading option '-ts' ... matched as AVOption 'ts' with argument 'mono2abs'.
Reading option '-channel' ... matched as AVOption 'channel' with
argument '1'.
Reading option '-video_size' ... matched as AVOption 'video_size' with
argument '720x576'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuyv422'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-c:v' ... matched as option 'c' (codec name) with
argument 'ffv1'.
Reading option '-level' ... matched as AVOption 'level' with argument '3'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuv422p'.
Reading option '-c:a' ... matched as option 'c' (codec name) with
argument 'pcm_s16le'.
Reading option '/Store3/Test/t_20150802_0950.mkv' ... matched as output
file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file
alsa_input.pci-_00_14.2.analog-stereo.
Applying option f (force format) with argument pulse.
Applying option ar (set audio sampling rate (in Hz)) with argument 44100.
Applying option ac (set number of audio channels) with argument 2.
Applying option channel_layout (set channel layout) with argument stereo.
Applying option t

Re: [FFmpeg-user] ffmpeg and multiple outputs

2015-08-03 Thread MrNice


On 03/08/15 09:23, Christian Ebert wrote:
> * Moritz Barsnick on Monday, August 03, 2015 at 09:48:20 +0200
>> On Sun, Aug 02, 2015 at 17:51:39 -0700, Ricardo Kleemann wrote:
>>> Good point, how would I display ffmpeg on OS X? I’m not quite sure
>>> what the output device would be?
>>
>> The output device "sdl" is the first that comes to mind.
>>
>> $ ffmpeg -i $infile -f sdl "SDL output"
>> and you can add another output, i.e. to file, after those arguments.
>>
>> Moritz
>>
>> P.S.: You may have to add "-pix_fmt yuv420p" to get it to work,
>>  depending on the input format. I believe my sdl didn't like
>>  another format, and ffmpeg didn't convert automatically.
> 
> Almost, it needs yuyv422:
> 
> $ ffmpeg -i $infile -pix_fmt yuyv422 -f sdl "SDL Output"
> 

This a feature I need as well!
I tried on my Fedora 22 PC but I get the error:

./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
-thread_queue_size 512 -i alsa_input.pci-_00_14.2.analog-stereo -f
v4l2 -ts mono2abs -channel 1 -video_size 720x576 -pix_fmt yuyv422
-thread_queue_size 512 -i /dev/video0 -f sdl "SDL output" -c:v libx264
-preset slower -qp 0 -pix_fmt yuv422p -c:a pcm_s16le
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv

Successfully opened the file.
Parsing a group of options: output file SDL output.
Applying option f (force format) with argument sdl.
Successfully parsed a group of options.
Opening an output file: SDL output.
[NULL @ 0x3142b80] Requested output format 'sdl' is not a suitable
output format
SDL output: Invalid argument

SDL is installed. Do I need to compile with a SDL option? or there is
another output format?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] ffmpeg and multiple outputs

2015-08-03 Thread MrNice
On 03/08/15 11:49, MrNice wrote:
> 
> 
> On 03/08/15 09:23, Christian Ebert wrote:
>> * Moritz Barsnick on Monday, August 03, 2015 at 09:48:20 +0200
>>> On Sun, Aug 02, 2015 at 17:51:39 -0700, Ricardo Kleemann wrote:
>>>> Good point, how would I display ffmpeg on OS X? I’m not quite sure
>>>> what the output device would be?
>>>
>>> The output device "sdl" is the first that comes to mind.
>>>
>>> $ ffmpeg -i $infile -f sdl "SDL output"
>>> and you can add another output, i.e. to file, after those arguments.
>>>
>>> Moritz
>>>
>>> P.S.: You may have to add "-pix_fmt yuv420p" to get it to work,
>>>  depending on the input format. I believe my sdl didn't like
>>>  another format, and ffmpeg didn't convert automatically.
>>
>> Almost, it needs yuyv422:
>>
>> $ ffmpeg -i $infile -pix_fmt yuyv422 -f sdl "SDL Output"
>>
> 
> This a feature I need as well!
> I tried on my Fedora 22 PC but I get the error:
> 
> ./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
> -thread_queue_size 512 -i alsa_input.pci-_00_14.2.analog-stereo -f
> v4l2 -ts mono2abs -channel 1 -video_size 720x576 -pix_fmt yuyv422
> -thread_queue_size 512 -i /dev/video0 -f sdl "SDL output" -c:v libx264
> -preset slower -qp 0 -pix_fmt yuv422p -c:a pcm_s16le
> /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
> 
> Successfully opened the file.
> Parsing a group of options: output file SDL output.
> Applying option f (force format) with argument sdl.
> Successfully parsed a group of options.
> Opening an output file: SDL output.
> [NULL @ 0x3142b80] Requested output format 'sdl' is not a suitable
> output format
> SDL output: Invalid argument
> 
> SDL is installed. Do I need to compile with a SDL option? or there is
> another output format?
> ___


Obviously I don't have SDL output:

./ffmpeg -formats | grep SDL
ffmpeg version N-73832-g736a386 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil  54. 28.100 / 54. 28.100
  libavcodec 56. 49.101 / 56. 49.101
  libavformat56. 40.101 / 56. 40.101
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 25.100 /  5. 25.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc53.  3.100 / 53.  3.100
 DE smjpeg  Loki SDL MJPEG

What is the compile option?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] ffmpeg and multiple outputs

2015-08-03 Thread MrNice


On 03/08/15 14:35, Christian Ebert wrote:
> * MrNice on Monday, August 03, 2015 at 12:06:20 +0100
>> Obviously I don't have SDL output:
>>
>> ./ffmpeg -formats | grep SDL
> 
> ffmpeg -devices
> 
> narrows it down better for this purpose imho.
> 

Thanks Moritz and Christian
I installed SDL-devel and recompiled the last snapshot, working fine now :-)
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] Is FFV1 able to encode interlaced video?

2015-08-09 Thread MrNice
Hi

From an interlaced input (video tape) is it possible to capture
interlaced video file encoded with FFV1 (using -flags +ilme+ildct)?

I can't find an answer after long search.
All my captures seem to be converted to progressive.

Thanks
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Is FFV1 able to encode interlaced video?

2015-08-09 Thread MrNice

On 09/08/15 15:54, Paul B Mahol wrote:
> Dana 9. 8. 2015. 15:31 osoba "MrNice"  napisala je:
>>
>> Hi
>>
>> From an interlaced input (video tape) is it possible to capture
>> interlaced video file encoded with FFV1 (using -flags +ilme+ildct)?
>>
>> I can't find an answer after long search.
>> All my captures seem to be converted to progressive.
> 
> With what command?
> 
>>
>> Thanks
>> ___
>> ffmpeg-user mailing list
>> ffmpeg-user@ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 


I use the following command.
I am not sure if the output file is interlaced because mediainfo says
nothing about that for FFV1 encoder.

./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
-thread_queue_size 512 -i alsa_input.pci-_00_14.2.analog-stereo -f
v4l2 -ts mono2abs -channel 1 -video_size 720x576 -pix_fmt yuyv422
-thread_queue_size 512 -i /dev/video0 -c:v ffv1 -level 3 -flags
+ilme+ildct -aspect 4:3 -pix_fmt yuv422p -c:a pcm_s16le
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"
ffmpeg version N-74246-ga0044be Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil  54. 30.100 / 54. 30.100
  libavcodec 56. 56.101 / 56. 56.101
  libavformat56. 40.101 / 56. 40.101
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 32.100 /  5. 32.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc53.  3.100 / 53.  3.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'pulse'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate
(in Hz)) with argument '44100'.
Reading option '-ac' ... matched as option 'ac' (set number of audio
channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout'
(set channel layout) with argument 'stereo'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument
'alsa_input.pci-_00_14.2.analog-stereo'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'v4l2'.
Reading option '-ts' ... matched as AVOption 'ts' with argument 'mono2abs'.
Reading option '-channel' ... matched as AVOption 'channel' with
argument '1'.
Reading option '-video_size' ... matched as AVOption 'video_size' with
argument '720x576'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuyv422'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-c:v' ... matched as option 'c' (codec name) with
argument 'ffv1'.
Reading option '-level' ... matched as AVOption 'level' with argument '3'.
Reading option '-flags' ... matched as AVOption 'flags' with argument
'+ilme+ildct'.
Reading option '-aspect' ... matched as option 'aspect' (set aspect
ratio (4:3, 16:9 or 1., 1.)) with argument '4:3'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuv422p'.
Reading option '-c:a' ... matched as option 'c' (codec name) with
argument 'pcm_s16le'.
Reading option '/Store3/Test/t_20150809_1557.mkv' ... matched as output
file.
Reading option '-aspect' ... matched as option 'aspect' (set aspect
ratio (4:3, 16:9 or 1., 1.)) with argument '4:3'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'sdl'.
Reading option 'Dazzle output' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file
alsa_input.pci

Re: [FFmpeg-user] Is FFV1 able to encode interlaced video?

2015-08-09 Thread MrNice
I found this thread interesting
https://ffmpeg.org/pipermail/ffmpeg-user/2013-May/015470.html

It seems to no have an interlaced mode with FFV1 (at least in 2013)

Carl, could you confirm it?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Is FFV1 able to encode interlaced video?

2015-08-10 Thread MrNice

On 10/08/15 08:44, Carl Eugen Hoyos wrote:
> MrNice  iol.ie> writes:
> 
>> From an interlaced input (video tape) is it 
>> possible to capture interlaced video file 
>> encoded with FFV1
> 
> What device or software is delivering the input 
> to FFmpeg? Whatever it is, it will provide frames 
> (because FFmpeg only accepts frames as input).
> 
>> (using -flags +ilme+ildct)?
> 
> These are flags intended to optimize encoding for 
> some codecs. The test in the mailing list thread 
> you linked indicated that there would be no gain 
> implementing such flags.
> 
> The more important question is:
> You are encoding frames with a lossless codec.
> Why do want to capture "interlaced video"?
> The lossless codec will encode your video and 
> it will be interlaced after decoding if it was 
> interlaced before encoding.
> 
> Please understand that there is a difference 
> between interlaced content and interlaced 
> encoding. There is no interlaced encoding 
> with FFv1 because it appears not to save any 
> bytes in the output file and if you have 
> interlaced content it will be still be 
> interlaced.
> 
> Most TV stations always use interlaced encoding 
> where I live, no matter if the content is 
> progressive or not.
> 
> Carl Eugen
> 
> 
>

- I am using a S-VHS tapes/player, Dazzle DVC 100 for the video and
direct audio to the PC integrated audio card.

The command is
./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
-thread_queue_size 512 -i alsa_input.pci-_00_14.2.analog-stereo -f
v4l2 -ts mono2abs -channel 1 -video_size 720x576 -pix_fmt yuyv422
-thread_queue_size 512 -i /dev/video0 -c:v ffv1 -level 3 -aspect 4:3
-pix_fmt yuv422p -c:a pcm_s16le /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
-aspect 4:3 -f sdl "Dazzle output"

So, AFAIK, the input to ffmpeg is interlaced.

- All the readings I did say interlaced input should be kept interlaced.
In this blog the guy tried FFV1 and FFV1 interlaced
http://linux.goeszen.com/comparison-of-lossless-video-compression-options.html
But I don't know if there are special options to do interlaced. Reading
your answer, there is no need for option.

- With mediainfo, a file encoded with x264 is noted as progressive or
interlaced, whereas FFV1 as no information.

- I tried to play FFV1 files and look the image to guess with VLC
(de-interlace disabled) and it looks progressive. Seems to be odds with
your answer.

- In your answer, do you mean that if I take the FFV1 file in a video
editor then render encoded with a encoder that can handle interlaced
video (x264), I will get interlaced?

- Is it better to encode the capture in x264 instead FFV1? I saw a big
difference in the CPU usage it's what I stay so far with FFV1.

- I can read in the output:
[video4linux2,v4l2 @ 0x24fdd80] The V4L2 driver is using the interlaced mode
For my information what does mean this (interl:0) in the output?:
[auto-inserted scaler 0 @ 0x24d3260] w:iw h:ih flags:'0x4' interl:0

- I need to learn more and I do thanks to you ;-)



./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
-thread_queue_size 512 -i alsa_input.pci-_00_14.2.analog-stereo -f
v4l2 -ts mono2abs -channel 1 -video_size 720x576 -pix_fmt yuyv422
-thread_queue_size 512 -i /dev/video0 -c:v ffv1 -level 3 -aspect 4:3
-pix_fmt yuv422p -c:a pcm_s16le /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
-aspect 4:3 -f sdl "Dazzle output"
ffmpeg version N-74246-ga0044be Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil  54. 30.100 / 54. 30.100
  libavcodec 56. 56.101 / 56. 56.101
  libavformat56. 40.101 / 56. 40.101
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 32.100 /  5. 32.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc53.  3.100 / 53.  3.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'pulse'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate
(in Hz)) with argument '44100'.
Reading option '-ac' ... matched as option 'ac' (set number of audio
channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout'
(set channel layout) with argument 'stereo'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument
'alsa_input.pci-_00_14.2.analog-stereo&#

Re: [FFmpeg-user] Is FFV1 able to encode interlaced video?

2015-08-10 Thread MrNice


On 10/08/15 11:53, Andy Furniss wrote:
> MrNice wrote:
> 
>> I use the following command. I am not sure if the output file is
>> interlaced because mediainfo says nothing about that for FFV1
>> encoder.
>>
>> ./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
>> -thread_queue_size 512 -i alsa_input.pci-_00_14.2.analog-stereo
>> -f v4l2 -ts mono2abs -channel 1 -video_size 720x576 -pix_fmt yuyv422
> 
> Different issue, but as you are using 422 if you ever want to make a dvd
> or something that needs 420 you will need to be very careful to make
> sure you do an interlaced aware conversion.
> 
> -vf scale=interl=1,format=pix_fmts=yuv420p
> 
> for example.
> 
> Historically at least there are potential issues with this.
> 
> IIRC it just won't(didn't) work if you use
> 
> ffmpeg . -target pal-dvd -flags +ilme+ildct ... as a scaler gets
> auto inserted and does a progressive conversion even if you try to
> specify interlaced.
> 
> This may not apply now - or there may have always been a way I didn't
> find. (what I did was avoid using target of course, but that meant
> working out the other params the target set).
> 
> 
> 

I did a test with FFV1 input file and x264 output:
./ffmpeg -debug 1 -i /Store3/Test/t_20150810_1016.mkv -c:v libx264
-preset slow -qp 0 -flags +ilme+ildct -aspect 4:3 -pix_fmt yuv422p -c:a
wmav2 /Store3/Test/test2_interlaced.mkv

ffprobe says:
interlaced_frame=1
Very good, I keep FFV1 encoder for intermediate files

I'll no bake dvds but record mp4 or mkv files in dvd supports.

Many thanks to all of you
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Is FFV1 able to encode interlaced video?

2015-08-10 Thread MrNice


On 10/08/15 19:11, Carl Eugen Hoyos wrote:
> MrNice  iol.ie> writes:
> 
>> ./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
>> -thread_queue_size 512 -i alsa_input.pci-_00_14.2.analog-stereo -f
>> v4l2 -ts mono2abs -channel 1 -video_size 720x576 -pix_fmt yuyv422
>> -thread_queue_size 512 -i /dev/video0 -c:v ffv1 -level 3 -aspect 4:3
>> -pix_fmt yuv422p -c:a pcm_s16le /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
>> -aspect 4:3 -f sdl "Dazzle output"
>>
>> So, AFAIK, the input to ffmpeg is interlaced.
> 
> No.
> 
> What I mean is: This command cannot tell you 
> if the input is interlaced or not, you can 
> only look at the actual content as shown by 
> sdl to find out or use the idet filter.
> 
>> - All the readings I did say interlaced 
>> input should be kept interlaced.
> 
> And I tried to explain that ffv1 - because 
> it is a lossless codec - cannot make the 
> interlacing go away.
> 
> But what is actually meant with above is:
> If you use a lossy codec (and you are interested 
> in high quality with low bitrate) then you have 
> to tell your encoder that the input is interlaced 
> if it is because quality will suffer a lot.
> If you tell your encoder that your progressive 
> content is interlaced, quality will only suffer a 
> little, this is why TV stations always encode as 
> interlaced (here).
> 
> [...]
> 
>> - With mediainfo, a file encoded with x264 is 
>> noted as progressive or interlaced, whereas FFV1 
>> as no information.
> 
> mediainfo cannot tell you if your video is 
> interlaced or not. It can tell you if the encoder 
> was called with the option "interlaced encoding".
> 
>> - I tried to play FFV1 files and look the image 
>> to guess with VLC (de-interlace disabled) and it 
>> looks progressive. Seems to be odds with your 
>> answer.
> 
> Did you also look at the input?
> 
>> - In your answer, do you mean that if I take the 
>> FFV1 file in a video editor then render encoded 
>> with a encoder that can handle interlaced video 
>> (x264), I will get interlaced?
> 
> (I may misunderstand this question.)
> It is possible to interlace progressive video and 
> it is possible to de-interlace interlaced video.
> In both cases, quality will generally suffer.
> 
>> - Is it better to encode the capture in x264 
>> instead FFV1?
> 
> Only you can answer.
> (But the answer should not be: I use x264 for 
> lossless encoding because it is standardized.)
> 
>> I saw a big difference in the CPU usage it's 
>> what I stay so far with FFV1.
> 
> Sounds like one possible criterion.
> 
>> - I can read in the output:
>> The V4L2 driver is using the interlaced mode
> 
> This may mean that the content actually is 
> interlaced, I don't know.
> 
>> For my information what does mean this 
>> (interl:0) in the output?:
>> w:iw h:ih flags:'0x4' interl:0
> 
> If you use w == iw and h == ih I don't think it 
> matters.
> 
> Carl Eugen
> 
>


I added -vf idet to the command and got

...
[matroska @ 0x241da80] end duration = 19435
frame=  476 fps= 25 q=-0.0 Lq=-0.0 size=  127596kB time=00:00:19.43
bitrate=53782.7kbits/s
video:510611kB audio:3348kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: unknown
Input file #0 (alsa_input.pci-_00_14.2.analog-stereo):
  Input stream #0:0 (audio): 73 packets read (3428456 bytes); 73 frames
decoded (857114 samples);
  Total: 73 packets (3428456 bytes) demuxed
Input file #1 (/dev/video0):
  Input stream #1:0 (video): 477 packets read (395642880 bytes); 477
frames decoded;
  Total: 477 packets (395642880 bytes) demuxed
Output file #0 (/Store3/Test/t_20150810_2131.mkv):
  Output stream #0:0 (video): 476 frames encoded; 476 packets muxed
(127223223 bytes);
  Output stream #0:1 (audio): 73 frames encoded (857114 samples); 73
packets muxed (3428456 bytes);
  Total: 549 packets (130651679 bytes) muxed
Output file #1 (Dazzle output):
  Output stream #1:0 (video): 477 frames encoded; 477 packets muxed
(395642880 bytes);
  Total: 477 packets (395642880 bytes) muxed
550 frames successfully decoded, 0 decoding errors
[Parsed_idet_0 @ 0x23e46c0] Repeated Fields: Neither:   473 Top: 2
Bottom: 1
[Parsed_idet_0 @ 0x23e46c0] Single frame detection: TFF:   475 BFF:
1 Progressive: 0 Undetermined: 0
[Parsed_idet_0 @ 0x23e46c0] Multi frame detection: TFF:   476 BFF: 0
Progressive: 0 Undetermined: 0
[AVIOContext @ 0x2429600] Statistics: 258 seeks, 4358 writeouts
Conversion failed!

So, the input is interlaced, top first.
=> FFV1 file will be interlaced.
I hope the video editor will keep the interlace and render the final
files interlaced. I'll keep an eye on that.
Some files will be played on DVD player that can play mp3 or mkv
container, H264/MPEG4 video, DTS or AAC audio.

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] Audio/video capture out of synchronisation. Is my fix right?

2015-08-30 Thread MrNice
Hello

I use the following command:
./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
-thread_queue_size 512 -i alsa_input.pci-_00_14.2.analog-stereo -f
v4l2 -ts mono2abs -channel 1 -video_size 720x576 -pix_fmt yuyv422
-thread_queue_size 512 -i /dev/video0 -vf
drawbox=0:0:3:576:black@1:t=max,drawbox=718:0:3:576:black@1:t=max,drawbox=0:0:720:3:black@1:t=max,drawbox=0:565:720:11:black@1:t=max
-c:v ffv1 -level 3 -aspect 4:3 -pix_fmt yuv422p -c:a pcm_s16le
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"
See 1st output below

However even with -ts mon2abs option, I have a de-sync late audio of
around 150ms when I play the file with ffplay
I found a fix adding
-itsoffset -0.15
before
-i alsa_input.pci-_00_14.2.analog-stereo
See 2nd output below

This seems to work, remove the de-sinc but I have some very short
freezes in the sdl window. I checked the number of input and output
frames and packets, there are equal. Maybe this is only a display
freeze. Average CPU usage with System Monitor shows around 25-30%.

I want to know if this fix is OK.

BTW if I add -itsoffset -0.15 and I remove -ts mono2abs all is sync even
if start: of audio and start: of video are widely different:
  Duration: N/A, start: 1440954817.205196, bitrate: 1411 kb/s
  Duration: N/A, start: 34816.905351, bitrate: 165888 kb/s


Many thanks

1st output
 ./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
-thread_queue_size 512 -i alsa_input.pci-_00_14.2.analog-stereo -f
v4l2 -ts mono2abs -channel 1 -video_size 720x576 -pix_fmt yuyv422
-thread_queue_size 512 -i /dev/video0 -vf
drawbox=0:0:3:576:black@1:t=max,drawbox=718:0:3:576:black@1:t=max,drawbox=0:0:720:3:black@1:t=max,drawbox=0:565:720:11:black@1:t=max
-c:v ffv1 -level 3 -aspect 4:3 -pix_fmt yuv422p -c:a pcm_s16le
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"
ffmpeg version N-74714-g47b41fe Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil  54. 31.100 / 54. 31.100
  libavcodec 56. 59.100 / 56. 59.100
  libavformat56. 40.101 / 56. 40.101
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 40.100 /  5. 40.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc53.  3.100 / 53.  3.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'pulse'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate
(in Hz)) with argument '44100'.
Reading option '-ac' ... matched as option 'ac' (set number of audio
channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout'
(set channel layout) with argument 'stereo'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument
'alsa_input.pci-_00_14.2.analog-stereo'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'v4l2'.
Reading option '-ts' ... matched as AVOption 'ts' with argument 'mono2abs'.
Reading option '-channel' ... matched as AVOption 'channel' with
argument '1'.
Reading option '-video_size' ... matched as AVOption 'video_size' with
argument '720x576'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuyv422'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-vf' ... matched as option 'vf' (set video filters) with
argument
'drawbox=0:0:3:576:black@1:t=max,drawbox=718:0:3:576:black@1:t=max,drawbox=0:0:720:3:black@1:t=max,drawbox=0:565:720:11:black@1:t=max'.
Reading option '-c:v' ... matched as option 'c' (codec name) with
argument 'ffv1'.
Reading option '-level' ... matched as AVOption 'level' with argument '3'.
Reading option '-aspect' ... matched as option 'aspect' (set aspect
ratio (4:3, 16:9 or 1., 1.)) with argument '4:3'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuv422p'.
Reading option '-c:a' ... matched as option 'c' (codec name) with
argument 'pcm_s16le'.
Reading option '/Store3/Test/t_20150830_1901.mkv' ... matched as output
file.
Reading option '-aspect' ... matched as option 'aspect' (set aspect
ratio (4:3, 16:9 or 1., 1.)) with argument '4:3'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'sdl'.
Reading option 'Dazzle output' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file
al

Re: [FFmpeg-user] Audio/video capture out of synchronisation. Is my fix right?

2015-08-31 Thread MrNice

On 31/08/15 09:46, Carl Eugen Hoyos wrote:
> MrNice  iol.ie> writes:
> 
>> BTW if I add -itsoffset -0.15 and I remove -ts mono2abs 
>> all is sync even if start: of audio and start: of video 
>> are widely different:
> 
> Then this sounds like the best solution to me.
> (although unexpected)
> 
> Carl Eugen
> 

Thanks Carl

Last question:
Did you notice the message
Cliping frame in rate conversion by
in the output?

In the second output, the first is
Cliping frame in rate conversion by 0.08
and the value increases, the last is
Cliping frame in rate conversion by 0.008064
When I capture for few minutes, the value increases more and sometime
stop and restarts later.
As the text is is green, I'd guess this doesn't impact he quality, but I
am not sure.
AFAIK, cliping (I think there is a spelling mistake, right is clipping)
means something cut or saturated/overloaded (this is more audio context)
but I don't know in this case with what I thing is a time value.

Do you have any idea what is it?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-09-14 Thread MrNice
Hello,

When I run the following command, I get the error messages in red:
Application provided invalid, non monotonically increasing dts to muxer
in stream

Theses messages are in group of 4-5 and happen around every minute.
Sometime there is frames drop, see second part output bellow 4 drops are
dropped, or no drop.
Drops seem to lead to audio/video de-sync.

How to fix that?
Thanks

./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
-thread_queue_size 512 -itsoffset -0.20 -i
alsa_input.pci-_00_14.2.analog-stereo -f v4l2 -ts mono2abs -channel
1 -video_size 720x576 -pix_fmt yuyv422 -thread_queue_size 512 -i
/dev/video0 -vf
drawbox=0:0:3:576:black@1:t=max,drawbox=718:0:3:576:black@1:t=max,drawbox=0:0:720:3:black@1:t=max,drawbox=0:564:720:12:black@1:t=max
-c:v ffv1 -level 3 -aspect 4:3 -pix_fmt yuv422p -c:a pcm_s16le
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"
ffmpeg version N-75272-g5629143 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil  55.  2.100 / 55.  2.100
  libavcodec 57.  1.100 / 57.  1.100
  libavformat57.  0.100 / 57.  0.100
  libavdevice57.  0.100 / 57.  0.100
  libavfilter 6.  2.100 /  6.  2.100
  libswscale  4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc54.  0.100 / 54.  0.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'pulse'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate
(in Hz)) with argument '44100'.
Reading option '-ac' ... matched as option 'ac' (set number of audio
channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout'
(set channel layout) with argument 'stereo'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-itsoffset' ... matched as option 'itsoffset' (set the
input ts offset) with argument '-0.20'.
Reading option '-i' ... matched as input file with argument
'alsa_input.pci-_00_14.2.analog-stereo'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'v4l2'.
Reading option '-ts' ... matched as AVOption 'ts' with argument 'mono2abs'.
Reading option '-channel' ... matched as AVOption 'channel' with
argument '1'.
Reading option '-video_size' ... matched as AVOption 'video_size' with
argument '720x576'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuyv422'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-vf' ... matched as option 'vf' (set video filters) with
argument
'drawbox=0:0:3:576:black@1:t=max,drawbox=718:0:3:576:black@1:t=max,drawbox=0:0:720:3:black@1:t=max,drawbox=0:564:720:12:black@1:t=max'.
Reading option '-c:v' ... matched as option 'c' (codec name) with
argument 'ffv1'.
Reading option '-level' ... matched as AVOption 'level' with argument '3'.
Reading option '-aspect' ... matched as option 'aspect' (set aspect
ratio (4:3, 16:9 or 1., 1.)) with argument '4:3'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuv422p'.
Reading option '-c:a' ... matched as option 'c' (codec name) with
argument 'pcm_s16le'.
Reading option '/Store3/Test/t_20150914_1311.mkv' ... matched as output
file.
Reading option '-aspect' ... matched as option 'aspect' (set aspect
ratio (4:3, 16:9 or 1., 1.)) with argument '4:3'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'sdl'.
Reading option 'Dazzle output' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file
alsa_input.pci-_00_14.2.analog-stereo.
Applying option f (force format) with argument pulse.
Applying option ar (set audio sampling rate (in Hz)) with argument 44100.
Applying option ac (set number of audio channels) with argument 2.
Applying option channel_layout (set channel layout) with argument stereo.
Applying option thread_queue_size (set the maximum number of queued
packets from the demuxer) with argument 512.
Applying option itsoffset (set the input ts offset) with argument -0.20.
Successfully parsed a group of options.
Opening an input file: alsa_input.pci-_00_14.2.analog-stereo.
[pulse @ 0x2045d20] All info found
Input #0, pulse, from 'alsa_input.pci-_00_14.2.analog-stereo':
  Duration: N/A, start: 1442232706.479814, bitrate: 1411 kb/s
Stream #0:0, 1, 1/100: Audio: pcm_s16le, 44100 Hz, stereo, s16,
1411 kb/s
Successfully opened 

Re: [FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-09-15 Thread MrNice

On 14/09/15 13:54, MrNice wrote:
> Hello,
> 
> When I run the following command, I get the error messages in red:
> Application provided invalid, non monotonically increasing dts to muxer
> in stream
> 
> Theses messages are in group of 4-5 and happen around every minute.
> Sometime there is frames drop, see second part output bellow 4 drops are
> dropped, or no drop.
> Drops seem to lead to audio/video de-sync.
> 
> How to fix that?
> Thanks
> 

DTS is for Display Time Stamp (nothing to do with DTS audio codec)
I found some info

http://ffmpeg.org/pipermail/ffmpeg-user/2011-November/003389.html

https://trac.ffmpeg.org/ticket/1154

http://trac.ffmpeg.org/ticket/2212

http://forum.videohelp.com/threads/343741-Is-there-a-solution-to-this-monotonically-increasing-dts-winff-error?p=2147202#post2147202


Is it a bug?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-09-16 Thread MrNice


On 16/09/15 08:55, Robert Krüger wrote:
> On Tue, Sep 15, 2015 at 9:56 PM, MrNice  wrote:
> 
>>
>> On 14/09/15 13:54, MrNice wrote:
>>> Hello,
>>>
>>> When I run the following command, I get the error messages in red:
>>> Application provided invalid, non monotonically increasing dts to muxer
>>> in stream
>>>
>>> Theses messages are in group of 4-5 and happen around every minute.
>>> Sometime there is frames drop, see second part output bellow 4 drops are
>>> dropped, or no drop.
>>> Drops seem to lead to audio/video de-sync.
>>>
>>> How to fix that?
>>> Thanks
>>>
>>
>> DTS is for Display Time Stamp (nothing to do with DTS audio codec)
>>
> 
> No, DTS stands for "decoding timestamp" (time when this buffer will be
> decoded on the same time axis used for presentation time) in this case as
> opposed to "presentation timestamp" (time when the data will be displayed
> in the case of video or played in the case of audio).
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 

Thanks Robert for this correction.
You should have knowledge in this field, any other info? Is it a bug?
How to fix?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-09-17 Thread MrNice
On 16/09/15 10:08, Carl Eugen Hoyos wrote:
> MrNice  iol.ie> writes:
> 
>> When I run the following command, I get the 
>> error messages in red: Application provided 
>> invalid, non monotonically increasing dts to 
>> muxer in stream
> 
> The error is not unusual for transport streams 
> containing h264, it is unexpected for alsa input.
> I wonder if this is a driver issue.
> 
> Does it also happen if you only record audio?
> If not, does it also happen if you reduce the 
> resolution of the video recording significantly?
> (100x100)
> 
> Carl Eugen
> 
> _


> Does it also happen if you only record audio?

Yes it happen with the command
./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
-thread_queue_size 512 -itsoffset -0.20 -i
alsa_input.pci-_00_14.2.analog-stereo -f v4l2 -ts mono2abs -channel
1 -video_size 720x576 -pix_fmt yuyv422 -thread_queue_size 512 -i
/dev/video0 -vn -c:a pcm_s16le /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
-aspect 4:3 -f sdl "Dazzle output"

...
[matroska @ 0x208adc0] Writing block at offset 521906220, size 20780,
pts 2958117, dts 2958117, duration 118, keyframe 1
[matroska @ 0x208adc0] Writing block at offset 521927008, size 65472,
pts 2958235, dts 2958235, duration 371, keyframe 1
[matroska @ 0x208adc0] Writing block at offset 521992488, size 65472,
pts 2958606, dts 2958606, duration 371, keyframe 1
[sdl @ 0x2094a60] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 73964 >= 73964
[sdl @ 0x2094a60] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 73967 >= 73967
[matroska @ 0x208adc0] Writing block at offset 522057968, size 41948,
pts 2958977, dts 2958977, duration 238, keyframe 1
[sdl @ 0x2094a60] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 73970 >= 73970
[sdl @ 0x2094a60] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 73974 >= 73974
[matroska @ 0x208adc0] Writing block at offset 522099924, size 65472,
pts 2959215, dts 2959215, duration 371, keyframe 1
[matroska @ 0x208adc0] Writing block at offset 522165404, size 26340,
pts 2959586, dts 2959586, duration 149, keyframe 1
[matroska @ 0x208adc0] Writing block at offset 522191752, size 1812, pts
2959736, dts 2959736, duration 10, keyframe 1
[matroska @ 0x208adc0] Starting new cluster at offset 522193571 bytes,
pts 2960117dts 2960117
[matroska @ 0x208adc0] Writing block at offset 522193588, size 65472,
pts 2959746, dts 2959746, duration 371, keyframe 1
[matroska @ 0x208adc0] Writing block at offset 522259068, size 65472,
pts 2960117, dts 2960117, duration 371, keyframe 1
[matroska @ 0x208adc0] Writing block at offset 522324548, size 40136,
pts 2960488, dts 2960488, duration 228, keyframe 1
[matroska @ 0x208adc0
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-09-17 Thread MrNice


On 17/09/15 12:00, Carl Eugen Hoyos wrote:
> MrNice  iol.ie> writes:
> 
>>> Does it also happen if you only record audio?
>>
>> Yes it happen with the command
>> ./ffmpeg 
> 
>> -f v4l2 -ts mono2abs -channel 1 -video_size 720x576 
>> -pix_fmt yuyv422 -thread_queue_size 512 -i /dev/video0
> 
> Does it also happen if you only provide audio 
> input to FFmpeg?
> 
> Carl Eugen
> 
>

No error in a 50 mn recording with command
./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
-thread_queue_size 512 -itsoffset -0.20 -i
alsa_input.pci-_00_14.2.analog-stereo -vn -c:a pcm_s16le
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Best settings for FFV1

2015-09-18 Thread MrNice


On 17/09/15 23:45, Dave Rice wrote:
> Hi,
> 
>> On Sep 14, 2015, at 11:56 PM, Etienne Desautels 
>>  wrote:
>>
>> Hi,
>>
>> I will start using FFV1 to archive video for a museum and I will like to 
>> know what's the best settings to get smaller files. I will use version 3 
>> with checksums. From the few tests I did I found that those settings were 
>> the best for smaller files:
>>- coder 1
>>- context 0
>>- g 1
> 
> I believe using -g 1 would require more size than not. On the other hand this 
> is usually one of the parameters for ffv1 I recommend the most as it 
> increases the resilience of the file which is particularly relevant for 
> archival use.
> 
>>- slices 4
>>
>> I really don't know what to think about context size. Somewhere else I saw 
>> that large context create smaller files. But in my tests that was the 
>> inverse.
>>
>> I also tried 2 pass without any success. The final file were exactly the 
>> same size as the one created with 1 pass. And the log of the 2 pass was 
>> filled only with 0 except for the last number that was something like 843?
> 
> Can you show your process? Have you tried the directions according to the 
> wiki? http://trac.ffmpeg.org/wiki/Encode/FFV1
> 
> If the file size is a bigger issue than the options used, you could examine 
> the test suite results at 
> http://download.das-werkstatt.com/pb/mthk/ffv1_stats/latest/ 
> . The labels 
> such as v3c01s4 document the version (3), coder (0), context (1), and slices 
> (4).
> Best Regards,
> Dave Rice
> 
> 
>> Any advices?
>>
>> Regards,
>> Etienne Desautels
>> ___

I don't want to interfere but only to understand the parameters.
2nd link, FFv1 results GOP=1 vs. GOP=300

Documentation says:
Slices  -slices 4, 6, 9, 12, 16, 24, 30 Each frame is split 
into this
number of slices. This affects multithreading performance, as well as
filesize: Increasing the number of slices might speed up performance,
but also increases the filesize.

What I understand in the result, ie: first line
v3c11s4: -16.68% means the resulting file is smaller by this value
compared to the original
v3c11s30: -17.33% means the resulting file is smaller by this value
compared to the original

Conclusion: s30 has a smaller filesize than with s4 (for all the lines)
=> opposite what says the documentation.

Am I right?

BTW what are the default values of all these parameters in the first
link? I can't find any user documentation, I mean not too hard to
understand.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-09-19 Thread MrNice


On 17/09/15 14:51, MrNice wrote:
> 
> 
> On 17/09/15 12:00, Carl Eugen Hoyos wrote:
>> MrNice  iol.ie> writes:
>>
>>>> Does it also happen if you only record audio?
>>>
>>> Yes it happen with the command
>>> ./ffmpeg 
>>
>>> -f v4l2 -ts mono2abs -channel 1 -video_size 720x576 
>>> -pix_fmt yuyv422 -thread_queue_size 512 -i /dev/video0
>>
>> Does it also happen if you only provide audio 
>> input to FFmpeg?
>>
>> Carl Eugen
>>
>>
> 
> No error in a 50 mn recording with command
> ./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
> -thread_queue_size 512 -itsoffset -0.20 -i
> alsa_input.pci-_00_14.2.analog-stereo -vn -c:a pcm_s16le
> /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
> 


More info after long tests.
The error
Application provided invalid, non monotonically increasing dts to muxer
in stream 0:
happens after at least 30 minutes recording. ie: Last time at 33:12
Few seconds before or after happens warning message
Past duration 0. too large

Following this link
http://ffmpeg.org/pipermail/ffmpeg-user/2014-December/024695.html
I tried with -af aresample=async=1 but still I get the error with 1
frame dropped.

[matroska @ 0x25d9de0] Writing block at offset 9113825634, size 179818,
pts 2026200, dts 2026200, duration 40, keyframe 0
[matroska @ 0x25d9de0] Writing block at offset 9114005460, size 176978,
pts 2026240, dts 2026240, duration 40, keyframe 0
Past duration 0.602318 too large
*** dropping frame 50652 from stream 0 at ts 50650
[matroska @ 0x25d9de0] Starting new cluster at offset 9114182446 bytes,
pts 2026280dts 2026280
[matroska @ 0x25d9de0] Writing block at offset 9114182463, size 180336,
pts 2026280, dts 2026280, duration 40, keyframe 1
Past duration 0.601341 too large

What more to do?

As the errors are after 30 minutes, I could try to record by smaller
parts. To be sure, I would like a way to stop recording if an error
occurs. I tried -xerror but it's not working with this error.
Any idea how to do?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-09-19 Thread MrNice


On 19/09/15 18:02, MrNice wrote:
> 
> 
> On 17/09/15 14:51, MrNice wrote:
>>
>>
>> On 17/09/15 12:00, Carl Eugen Hoyos wrote:
>>> MrNice  iol.ie> writes:
>>>
>>>>> Does it also happen if you only record audio?
>>>>
>>>> Yes it happen with the command
>>>> ./ffmpeg 
>>>
>>>> -f v4l2 -ts mono2abs -channel 1 -video_size 720x576 
>>>> -pix_fmt yuyv422 -thread_queue_size 512 -i /dev/video0
>>>
>>> Does it also happen if you only provide audio 
>>> input to FFmpeg?
>>>
>>> Carl Eugen
>>>
>>>
>>
>> No error in a 50 mn recording with command
>> ./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
>> -thread_queue_size 512 -itsoffset -0.20 -i
>> alsa_input.pci-_00_14.2.analog-stereo -vn -c:a pcm_s16le
>> /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
>>
> 
> 
> More info after long tests.
> The error
> Application provided invalid, non monotonically increasing dts to muxer
> in stream 0:
> happens after at least 30 minutes recording. ie: Last time at 33:12
> Few seconds before or after happens warning message
> Past duration 0. too large
> 
> Following this link
> http://ffmpeg.org/pipermail/ffmpeg-user/2014-December/024695.html
> I tried with -af aresample=async=1 but still I get the error with 1
> frame dropped.
> 
> [matroska @ 0x25d9de0] Writing block at offset 9113825634, size 179818,
> pts 2026200, dts 2026200, duration 40, keyframe 0
> [matroska @ 0x25d9de0] Writing block at offset 9114005460, size 176978,
> pts 2026240, dts 2026240, duration 40, keyframe 0
> Past duration 0.602318 too large
> *** dropping frame 50652 from stream 0 at ts 50650
> [matroska @ 0x25d9de0] Starting new cluster at offset 9114182446 bytes,
> pts 2026280dts 2026280
> [matroska @ 0x25d9de0] Writing block at offset 9114182463, size 180336,
> pts 2026280, dts 2026280, duration 40, keyframe 1
> Past duration 0.601341 too large
> 
> What more to do?
> 
> As the errors are after 30 minutes, I could try to record by smaller
> parts. To be sure, I would like a way to stop recording if an error
> occurs. I tried -xerror but it's not working with this error.
> Any idea how to do?
> _


I was wrong: One more try and I got the error at 8:07

I need help!!!

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-09-20 Thread MrNice
On 19/09/15 18:16, MrNice wrote:
> 
> 
> On 19/09/15 18:02, MrNice wrote:
>>
>>
>> On 17/09/15 14:51, MrNice wrote:
>>>
>>>
>>> On 17/09/15 12:00, Carl Eugen Hoyos wrote:
>>>> MrNice  iol.ie> writes:
>>>>
>>>>>> Does it also happen if you only record audio?
>>>>>
>>>>> Yes it happen with the command
>>>>> ./ffmpeg 
>>>>
>>>>> -f v4l2 -ts mono2abs -channel 1 -video_size 720x576 
>>>>> -pix_fmt yuyv422 -thread_queue_size 512 -i /dev/video0
>>>>
>>>> Does it also happen if you only provide audio 
>>>> input to FFmpeg?
>>>>
>>>> Carl Eugen
>>>>
>>>>
>>>
>>> No error in a 50 mn recording with command
>>> ./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
>>> -thread_queue_size 512 -itsoffset -0.20 -i
>>> alsa_input.pci-_00_14.2.analog-stereo -vn -c:a pcm_s16le
>>> /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
>>>
>>
>>
>> More info after long tests.
>> The error
>> Application provided invalid, non monotonically increasing dts to muxer
>> in stream 0:
>> happens after at least 30 minutes recording. ie: Last time at 33:12
>> Few seconds before or after happens warning message
>> Past duration 0. too large
>>
>> Following this link
>> http://ffmpeg.org/pipermail/ffmpeg-user/2014-December/024695.html
>> I tried with -af aresample=async=1 but still I get the error with 1
>> frame dropped.
>>
>> [matroska @ 0x25d9de0] Writing block at offset 9113825634, size 179818,
>> pts 2026200, dts 2026200, duration 40, keyframe 0
>> [matroska @ 0x25d9de0] Writing block at offset 9114005460, size 176978,
>> pts 2026240, dts 2026240, duration 40, keyframe 0
>> Past duration 0.602318 too large
>> *** dropping frame 50652 from stream 0 at ts 50650
>> [matroska @ 0x25d9de0] Starting new cluster at offset 9114182446 bytes,
>> pts 2026280dts 2026280
>> [matroska @ 0x25d9de0] Writing block at offset 9114182463, size 180336,
>> pts 2026280, dts 2026280, duration 40, keyframe 1
>> Past duration 0.601341 too large
>>
>> What more to do?
>>
>> As the errors are after 30 minutes, I could try to record by smaller
>> parts. To be sure, I would like a way to stop recording if an error
>> occurs. I tried -xerror but it's not working with this error.
>> Any idea how to do?
>> _
> 
> 
> I was wrong: One more try and I got the error at 8:07
> 
> I need help!!!
> 
>

More info, hope this will help to find a fix or a workaround.

So far I used a DVD player to test and I had usually the errors after 30
minutes capture.
In fact the use case is with a S-VHS player. When I capture from blank
tape (statics before the images appear) I get a lot of errors and frame
drops, then errors stop when the images appear.
Same appends as well (not always) when there is a change betweens 2
takes or when there is a drop in the tape.

Is it the right behaviour?

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-09-20 Thread MrNice
On 20/09/15 11:41, MrNice wrote:
> On 19/09/15 18:16, MrNice wrote:
>>
>>
>> On 19/09/15 18:02, MrNice wrote:
>>>
>>>
>>> On 17/09/15 14:51, MrNice wrote:
>>>>
>>>>
>>>> On 17/09/15 12:00, Carl Eugen Hoyos wrote:
>>>>> MrNice  iol.ie> writes:
>>>>>
>>>>>>> Does it also happen if you only record audio?
>>>>>>
>>>>>> Yes it happen with the command
>>>>>> ./ffmpeg 
>>>>>
>>>>>> -f v4l2 -ts mono2abs -channel 1 -video_size 720x576 
>>>>>> -pix_fmt yuyv422 -thread_queue_size 512 -i /dev/video0
>>>>>
>>>>> Does it also happen if you only provide audio 
>>>>> input to FFmpeg?
>>>>>
>>>>> Carl Eugen
>>>>>
>>>>>
>>>>
>>>> No error in a 50 mn recording with command
>>>> ./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
>>>> -thread_queue_size 512 -itsoffset -0.20 -i
>>>> alsa_input.pci-_00_14.2.analog-stereo -vn -c:a pcm_s16le
>>>> /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
>>>>
>>>
>>>
>>> More info after long tests.
>>> The error
>>> Application provided invalid, non monotonically increasing dts to muxer
>>> in stream 0:
>>> happens after at least 30 minutes recording. ie: Last time at 33:12
>>> Few seconds before or after happens warning message
>>> Past duration 0. too large
>>>
>>> Following this link
>>> http://ffmpeg.org/pipermail/ffmpeg-user/2014-December/024695.html
>>> I tried with -af aresample=async=1 but still I get the error with 1
>>> frame dropped.
>>>
>>> [matroska @ 0x25d9de0] Writing block at offset 9113825634, size 179818,
>>> pts 2026200, dts 2026200, duration 40, keyframe 0
>>> [matroska @ 0x25d9de0] Writing block at offset 9114005460, size 176978,
>>> pts 2026240, dts 2026240, duration 40, keyframe 0
>>> Past duration 0.602318 too large
>>> *** dropping frame 50652 from stream 0 at ts 50650
>>> [matroska @ 0x25d9de0] Starting new cluster at offset 9114182446 bytes,
>>> pts 2026280dts 2026280
>>> [matroska @ 0x25d9de0] Writing block at offset 9114182463, size 180336,
>>> pts 2026280, dts 2026280, duration 40, keyframe 1
>>> Past duration 0.601341 too large
>>>
>>> What more to do?
>>>
>>> As the errors are after 30 minutes, I could try to record by smaller
>>> parts. To be sure, I would like a way to stop recording if an error
>>> occurs. I tried -xerror but it's not working with this error.
>>> Any idea how to do?
>>> _
>>
>>
>> I was wrong: One more try and I got the error at 8:07
>>
>> I need help!!!
>>
>>
> 
> More info, hope this will help to find a fix or a workaround.
> 
> So far I used a DVD player to test and I had usually the errors after 30
> minutes capture.
> In fact the use case is with a S-VHS player. When I capture from blank
> tape (statics before the images appear) I get a lot of errors and frame
> drops, then errors stop when the images appear.
> Same appends as well (not always) when there is a change betweens 2
> takes or when there is a drop in the tape.
> 
> Is it the right behaviour?
> 
> 


More info, new test.

From my S-VHS player, when there is no tape inside, there is a blue
image with program number in white. This is a still image, stable
without any static.
I captured this image and got errors and drops at very regular time.
Looking at the output log, I took the time for 15 errors. All of them
are separated by 16-17 seconds.
Between the errors there are warning messages
Past duration 0.x too large
where 0.x increase at a regular time.


./ffmpeg -loglevel info -xerror -f pulse -ar 44100 -ac 2 -channel_layout
stereo -thread_queue_size 512 -itsoffset -0.20 -i
alsa_input.pci-_00_14.2.analog-stereo -f v4l2 -ts mono2abs -channel
1 -video_size 720x576 -pix_fmt yuyv422 -thread_queue_size 512 -i
/dev/video0 -vf
drawbox=0:0:3:576:black@1:t=max,drawbox=718:0:3:576:black@1:t=max,drawbox=0:0:720:3:black@1:t=max,drawbox=0:564:720:12:black@1:t=max
-c:v ffv1 -level 3 -aspect 4:3 -pix_fmt yuv422p -c:a pcm_s16le
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"
ffmpeg version N-75272-g5629143 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil  55.  2.100 / 55. 

Re: [FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-09-24 Thread MrNice
On 20/09/15 13:06, MrNice wrote:
> On 20/09/15 11:41, MrNice wrote:
>> On 19/09/15 18:16, MrNice wrote:
>>>
>>>
>>> On 19/09/15 18:02, MrNice wrote:
>>>>
>>>>
>>>> On 17/09/15 14:51, MrNice wrote:
>>>>>
>>>>>
>>>>> On 17/09/15 12:00, Carl Eugen Hoyos wrote:
>>>>>> MrNice  iol.ie> writes:
>>>>>>
>>>>>>>> Does it also happen if you only record audio?
>>>>>>>
>>>>>>> Yes it happen with the command
>>>>>>> ./ffmpeg 
>>>>>>
>>>>>>> -f v4l2 -ts mono2abs -channel 1 -video_size 720x576 
>>>>>>> -pix_fmt yuyv422 -thread_queue_size 512 -i /dev/video0
>>>>>>
>>>>>> Does it also happen if you only provide audio 
>>>>>> input to FFmpeg?
>>>>>>
>>>>>> Carl Eugen
>>>>>>
>>>>>>
>>>>>
>>>>> No error in a 50 mn recording with command
>>>>> ./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
>>>>> -thread_queue_size 512 -itsoffset -0.20 -i
>>>>> alsa_input.pci-_00_14.2.analog-stereo -vn -c:a pcm_s16le
>>>>> /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
>>>>>
>>>>
>>>>
>>>> More info after long tests.
>>>> The error
>>>> Application provided invalid, non monotonically increasing dts to muxer
>>>> in stream 0:
>>>> happens after at least 30 minutes recording. ie: Last time at 33:12
>>>> Few seconds before or after happens warning message
>>>> Past duration 0. too large
>>>>
>>>> Following this link
>>>> http://ffmpeg.org/pipermail/ffmpeg-user/2014-December/024695.html
>>>> I tried with -af aresample=async=1 but still I get the error with 1
>>>> frame dropped.
>>>>
>>>> [matroska @ 0x25d9de0] Writing block at offset 9113825634, size 179818,
>>>> pts 2026200, dts 2026200, duration 40, keyframe 0
>>>> [matroska @ 0x25d9de0] Writing block at offset 9114005460, size 176978,
>>>> pts 2026240, dts 2026240, duration 40, keyframe 0
>>>> Past duration 0.602318 too large
>>>> *** dropping frame 50652 from stream 0 at ts 50650
>>>> [matroska @ 0x25d9de0] Starting new cluster at offset 9114182446 bytes,
>>>> pts 2026280dts 2026280
>>>> [matroska @ 0x25d9de0] Writing block at offset 9114182463, size 180336,
>>>> pts 2026280, dts 2026280, duration 40, keyframe 1
>>>> Past duration 0.601341 too large
>>>>
>>>> What more to do?
>>>>
>>>> As the errors are after 30 minutes, I could try to record by smaller
>>>> parts. To be sure, I would like a way to stop recording if an error
>>>> occurs. I tried -xerror but it's not working with this error.
>>>> Any idea how to do?
>>>> _
>>>
>>>
>>> I was wrong: One more try and I got the error at 8:07
>>>
>>> I need help!!!
>>>
>>>
>>
>> More info, hope this will help to find a fix or a workaround.
>>
>> So far I used a DVD player to test and I had usually the errors after 30
>> minutes capture.
>> In fact the use case is with a S-VHS player. When I capture from blank
>> tape (statics before the images appear) I get a lot of errors and frame
>> drops, then errors stop when the images appear.
>> Same appends as well (not always) when there is a change betweens 2
>> takes or when there is a drop in the tape.
>>
>> Is it the right behaviour?
>>
>>
> 
> 
> More info, new test.
> 
> From my S-VHS player, when there is no tape inside, there is a blue
> image with program number in white. This is a still image, stable
> without any static.
> I captured this image and got errors and drops at very regular time.
> Looking at the output log, I took the time for 15 errors. All of them
> are separated by 16-17 seconds.
> Between the errors there are warning messages
> Past duration 0.x too large
> where 0.x increase at a regular time.
> 



Carl Eugen:
If not, does it also happen if you reduce the
resolution of the video recording significantly?
(100x100)


Yes it happen as well in a regular manner (like a pattern of time)
I am stuck, can't go further in my project. What I could do to help
finding a fix or workaround?


./ffmpeg -xerror -f pulse -ar 44100 -ac 2 -channel_layout

Re: [FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-09-26 Thread MrNice
Attention to Carl Eugen
and other experts,

I did lot of tests and answered your last question.
I didn't get any feedback so far, maybe you missed them.
I need to go further in my project but I don't know what to do now to
avoid the errors.

Thank you to have a look and advice.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-09-27 Thread MrNice


On 26/09/15 14:14, MrNice wrote:
> Attention to Carl Eugen
> and other experts,
> 
> I did lot of tests and answered your last question.
> I didn't get any feedback so far, maybe you missed them.
> I need to go further in my project but I don't know what to do now to
> avoid the errors.
> 
> Thank you to have a look and advice.
> 


More tests:

So far I used the CL:

./ffmpeg -debug 1 -xerror -f pulse -ar 44100 -ac 2 -channel_layout
stereo -thread_queue_size 512 -itsoffset -0.20 -i
alsa_input.pci-_00_14.2.analog-stereo -f v4l2 -ts mono2abs -channel
1 -video_size 720x576 -pix_fmt yuyv422 -thread_queue_size 512 -i
/dev/video0 -vf
drawbox=0:0:3:576:black@1:t=max,drawbox=718:0:3:576:black@1:t=max,drawbox=0:0:720:3:black@1:t=max,drawbox=0:564:720:12:black@1:t=max
-c:v ffv1 -level 3 -g 1 -aspect 4:3 -pix_fmt yuv422p -c:a pcm_s16le
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"

I get errors, ie: 8133 input video packets (around 5 minutes) and drop=4

[matroska @ 0x3910d80] Writing block at offset 2449025254, size 53920,
pts 325664, dts 325664, duration 306, keyframe 1
[matroska @ 0x3910d80] end duration = 325970
[matroska @ 0x3910d80] stream 0 end duration = 325600
[matroska @ 0x3910d80] stream 1 end duration = 325970
frame= 8129 fps= 25 q=-0.0 Lq=-0.0 size= 2391845kB time=00:05:25.76
bitrate=60146.9kbits/s dup=0 drop=4
video:8923049kB audio:56154kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: unknown
Input file #0 (alsa_input.pci-_00_14.2.analog-stereo):
  Input stream #0:0 (audio): 1173 packets read (57501184 bytes); 1173
frames decoded (14375296 samples);
  Total: 1173 packets (57501184 bytes) demuxed
Input file #1 (/dev/video0):
  Input stream #1:0 (video): 8133 packets read (6745835520 bytes); 8133
frames decoded;
  Total: 8133 packets (6745835520 bytes) demuxed
Output file #0 (/Store3/Test/t_20150927_0925.mkv):
  Output stream #0:0 (video): 8129 frames encoded; 8129 packets muxed
(2391366165 bytes);
  Output stream #0:1 (audio): 1173 frames encoded (14375296 samples);
1173 packets muxed (57501184 bytes);
  Total: 9302 packets (2448867349 bytes) muxed
Output file #1 (Dazzle output):
  Output stream #1:0 (video): 8133 frames encoded; 8133 packets muxed
(6745835520 bytes);
  Total: 8133 packets (6745835520 bytes) muxed
9306 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x391da40] Statistics: 48794 seeks, 111065 writeouts
Conversion failed!


When I write video first in the CL:

./ffmpeg -debug 1 -xerror -f v4l2 -ts mono2abs -channel 1 -video_size
720x576 -pix_fmt yuyv422 -thread_queue_size 512 -i /dev/video0 -f pulse
-ar 44100 -ac 2 -channel_layout stereo -thread_queue_size 512 -itsoffset
-0.20 -i alsa_input.pci-_00_14.2.analog-stereo -vf
drawbox=0:0:3:576:black@1:t=max,drawbox=718:0:3:576:black@1:t=max,drawbox=0:0:720:3:black@1:t=max,drawbox=0:564:720:12:black@1:t=max
-c:v ffv1 -level 3 -g 1 -aspect 4:3 -pix_fmt yuv422p -c:a pcm_s16le
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"

I get errors, ie: 97 input video packets (around 5 seconds)) and drop=13

[matroska @ 0x2360ce0] Writing block at offset 19532162, size 65472, pts
4059, dts 4059, duration 371, keyframe 1
[matroska @ 0x2360ce0] end duration = 4430
[matroska @ 0x2360ce0] stream 0 end duration = 4080
[matroska @ 0x2360ce0] stream 1 end duration = 4430
frame=   84 fps= 17 q=-0.0 Lq=-0.0 size=   19140kB time=00:00:04.23
bitrate=37067.2kbits/s dup=0 drop=13
video:96942kB audio:763kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: unknown
Input file #0 (/dev/video0):
  Input stream #0:0 (video): 97 packets read (80455680 bytes); 97 frames
decoded;
  Total: 97 packets (80455680 bytes) demuxed
Input file #1 (alsa_input.pci-_00_14.2.analog-stereo):
  Input stream #1:0 (audio): 15 packets read (781464 bytes); 15 frames
decoded (195366 samples);
  Total: 15 packets (781464 bytes) demuxed
Output file #0 (/Store3/Test/t_20150927_0933.mkv):
  Output stream #0:0 (video): 84 frames encoded; 84 packets muxed
(18813101 bytes);
  Output stream #0:1 (audio): 15 frames encoded (195366 samples); 15
packets muxed (781464 bytes);
  Total: 99 packets (19594565 bytes) muxed
Output file #1 (Dazzle output):
  Output stream #1:0 (video): 97 frames encoded; 97 packets muxed
(80455680 bytes);
  Total: 97 packets (80455680 bytes) muxed
112 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x2375b60] Statistics: 524 seeks, 968 writeouts
Conversion failed!


Video first leads to a lot more errors and dropped frames.

BTW, 1 week ago, I opened a bug, so far no answer
https://trac.ffmpeg.org/ticket/4869#no1
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-09-27 Thread MrNice


On 27/09/15 09:47, MrNice wrote:
> 
> 
> On 26/09/15 14:14, MrNice wrote:
>> Attention to Carl Eugen
>> and other experts,
>>
>> I did lot of tests and answered your last question.
>> I didn't get any feedback so far, maybe you missed them.
>> I need to go further in my project but I don't know what to do now to
>> avoid the errors.
>>
>> Thank you to have a look and advice.
>>
> 
> 
> More tests:
> 
> So far I used the CL:
> 
> ./ffmpeg -debug 1 -xerror -f pulse -ar 44100 -ac 2 -channel_layout
> stereo -thread_queue_size 512 -itsoffset -0.20 -i
> alsa_input.pci-_00_14.2.analog-stereo -f v4l2 -ts mono2abs -channel
> 1 -video_size 720x576 -pix_fmt yuyv422 -thread_queue_size 512 -i
> /dev/video0 -vf
> drawbox=0:0:3:576:black@1:t=max,drawbox=718:0:3:576:black@1:t=max,drawbox=0:0:720:3:black@1:t=max,drawbox=0:564:720:12:black@1:t=max
> -c:v ffv1 -level 3 -g 1 -aspect 4:3 -pix_fmt yuv422p -c:a pcm_s16le
> /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"
> 
> I get errors, ie: 8133 input video packets (around 5 minutes) and drop=4
> 
> [matroska @ 0x3910d80] Writing block at offset 2449025254, size 53920,
> pts 325664, dts 325664, duration 306, keyframe 1
> [matroska @ 0x3910d80] end duration = 325970
> [matroska @ 0x3910d80] stream 0 end duration = 325600
> [matroska @ 0x3910d80] stream 1 end duration = 325970
> frame= 8129 fps= 25 q=-0.0 Lq=-0.0 size= 2391845kB time=00:05:25.76
> bitrate=60146.9kbits/s dup=0 drop=4
> video:8923049kB audio:56154kB subtitle:0kB other streams:0kB global
> headers:0kB muxing overhead: unknown
> Input file #0 (alsa_input.pci-_00_14.2.analog-stereo):
>   Input stream #0:0 (audio): 1173 packets read (57501184 bytes); 1173
> frames decoded (14375296 samples);
>   Total: 1173 packets (57501184 bytes) demuxed
> Input file #1 (/dev/video0):
>   Input stream #1:0 (video): 8133 packets read (6745835520 bytes); 8133
> frames decoded;
>   Total: 8133 packets (6745835520 bytes) demuxed
> Output file #0 (/Store3/Test/t_20150927_0925.mkv):
>   Output stream #0:0 (video): 8129 frames encoded; 8129 packets muxed
> (2391366165 bytes);
>   Output stream #0:1 (audio): 1173 frames encoded (14375296 samples);
> 1173 packets muxed (57501184 bytes);
>   Total: 9302 packets (2448867349 bytes) muxed
> Output file #1 (Dazzle output):
>   Output stream #1:0 (video): 8133 frames encoded; 8133 packets muxed
> (6745835520 bytes);
>   Total: 8133 packets (6745835520 bytes) muxed
> 9306 frames successfully decoded, 0 decoding errors
> [AVIOContext @ 0x391da40] Statistics: 48794 seeks, 111065 writeouts
> Conversion failed!
> 
> 
> When I write video first in the CL:
> 
> ./ffmpeg -debug 1 -xerror -f v4l2 -ts mono2abs -channel 1 -video_size
> 720x576 -pix_fmt yuyv422 -thread_queue_size 512 -i /dev/video0 -f pulse
> -ar 44100 -ac 2 -channel_layout stereo -thread_queue_size 512 -itsoffset
> -0.20 -i alsa_input.pci-_00_14.2.analog-stereo -vf
> drawbox=0:0:3:576:black@1:t=max,drawbox=718:0:3:576:black@1:t=max,drawbox=0:0:720:3:black@1:t=max,drawbox=0:564:720:12:black@1:t=max
> -c:v ffv1 -level 3 -g 1 -aspect 4:3 -pix_fmt yuv422p -c:a pcm_s16le
> /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"
> 
> I get errors, ie: 97 input video packets (around 5 seconds)) and drop=13
> 
> [matroska @ 0x2360ce0] Writing block at offset 19532162, size 65472, pts
> 4059, dts 4059, duration 371, keyframe 1
> [matroska @ 0x2360ce0] end duration = 4430
> [matroska @ 0x2360ce0] stream 0 end duration = 4080
> [matroska @ 0x2360ce0] stream 1 end duration = 4430
> frame=   84 fps= 17 q=-0.0 Lq=-0.0 size=   19140kB time=00:00:04.23
> bitrate=37067.2kbits/s dup=0 drop=13
> video:96942kB audio:763kB subtitle:0kB other streams:0kB global
> headers:0kB muxing overhead: unknown
> Input file #0 (/dev/video0):
>   Input stream #0:0 (video): 97 packets read (80455680 bytes); 97 frames
> decoded;
>   Total: 97 packets (80455680 bytes) demuxed
> Input file #1 (alsa_input.pci-_00_14.2.analog-stereo):
>   Input stream #1:0 (audio): 15 packets read (781464 bytes); 15 frames
> decoded (195366 samples);
>   Total: 15 packets (781464 bytes) demuxed
> Output file #0 (/Store3/Test/t_20150927_0933.mkv):
>   Output stream #0:0 (video): 84 frames encoded; 84 packets muxed
> (18813101 bytes);
>   Output stream #0:1 (audio): 15 frames encoded (195366 samples); 15
> packets muxed (781464 bytes);
>   Total: 99 packets (19594565 bytes) muxed
> Output file #1 (Dazzle output):
>   Output stream #1:0 (video): 97 frames encoded; 97 packets muxed
> (80455680 bytes);
>   Total: 97 packets (80455680 bytes) muxed
> 112 frames successfully decod

Re: [FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-10-24 Thread MrNice

> More tests
> 
> I did 12 tests with the CL
> 
> ./ffmpeg -debug 1 -f v4l2 -ts mono2abs -channel 1 -video_size 720x576
> -pix_fmt yuyv422 -thread_queue_size 512 -i /dev/video0 -c:v ffv1 -level
> 3 -g 1 -aspect 4:3 -pix_fmt yuv422p /Store3/Test/t_`date
> +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"
> 
> I always get the same pattern:
> One first red error message
> Few seconds correct
> Around 60 yellow warning messages
> Few seconds correct, a bit longer than the previous
> A second red error message
> 
> I wrote down:
> 1- The value at the end of the first red error message
> Application provided invalid, non monotonically increasing dts to muxer
> in stream 0: xxx >= xxx
> 
> 2 & 3- The offset and the pts at the message
> Starting new cluster at offset  bytes, pts x
> just after the first yellow warning message
> Past duration 0.xxx too large
> 
> 4- The value at the end of the second red error message
> Application provided invalid, non monotonically increasing dts to muxer
> in stream 0: xxx >= xxx
> 
> 
> 
> Test|First error|Too large @bytes|Too large @pts|Second error
>   |  1  | 2|3  |  4
> 1 | 192 | 51808270 | 10760 | 570
> 2 | 183 | 50130991 | 10400 | 561
> 3 | 219 | 56954209 | 11800 | 597
> 4 | 192 | 51911648 | 10760 | 570
> 5 | 161 | 45894575 | 9520  | 539
> 6 | 204 | 54028812 | 11200 | 582
> 7 | 213 | 55996679 | 11600 | 591
> 8 | 176 | 48726442 | 10080 | 554
> 9 | 197 | 52595957 | 10920 | 575
> 10| 224 | 58047439 | 12000 | 602
> 11| 179 | 19117311 | 10200 | 557
> 12| 223 | 58023111 | 12000 | 601
> 
> 
> If you subtract the value of the 1st error to the value of the 2nd error
> you always get 378.
> All the values are proportional and start around the same time.
> This is not a random error but a predictable error => bug.
> 
> Hope this will help
> 
> 

Hi,

I did the same test/CL with the last update.
Same issue, same drops.
I am waiting for an answer in the ffmpeg-trac, 5 weeks pass and no news.
Please, cehoyos / Carl Eugen, could you tell me; Did you come to a
conclusion regarding this bug?
Without any info, I don't know if I should wait or find another way.

https://trac.ffmpeg.org/ticket/4869

Thanks
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-10-24 Thread MrNice


I didn't notice the answer above, I thought my answer will got in the
September folder with the same name.

So to answer Claudiu, the simplest CL:

./ffmpeg -debug 1 -f v4l2 -i /dev/video0 -c:v ffv1 /Store3/Test/t_`date
+%Y%m%d_%H%M`.mkv -f sdl "Dazzle output"
give the same issue/pattern/drops

and the CL without sdl
./ffmpeg -debug 1 -f v4l2 -i /dev/video0 -c:v ffv1 /Store3/Test/t_`date
+%Y%m%d_%H%M`.mkv
output the yellow messages,
not the red message "Application provided invalid, non monotonically
increasing dts to muxer in stream 0: xxx >= xxx",
BUT still has drops.

CPU AMD FX8120 3.1MHz, about 25, 30% usage, nothing noticeable.
I don't have another capture device.

I hope to get an answer, I am stuck in my project.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] Capture from USB Dazzle: Interlaced or not interlaced. FFV1 level3 vs h264

2015-10-29 Thread MrNice
Hi,

When I capture some video with the CL
./ffmpeg -debug 1 -f v4l2 -ts mono2abs -channel 1 -video_size 720x576
-pix_fmt yuyv422 -thread_queue_size 512 -i /dev/video0 -c:v ffv1 -level
3 -g 1 -aspect 4:3 -pix_fmt yuv422p /Store3/Test/t_`date
+%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"

from a S-VHS tape and Dazzle DVC100, I was thinking to get an interlaced
video file.
When I check with
ffprobe -show_frames t_20151029_1430.mkv
ffprobe version 2.6.4 Copyright (c) 2007-2015 the FFmpeg developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --prefix=/usr --bindir=/usr/bin
--datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg
--libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64
--optflags='-O2 -g -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic'
--enable-bzlib --disable-crystalhd --enable-frei0r --enable-gnutls
--enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394
--disable-indev=jack --enable-libfreetype --enable-libgsm
--enable-libmp3lame --enable-openal --enable-libopencv
--enable-libopenjpeg --enable-libopus --enable-libpulse
--enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx
--enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab
--enable-avfilter --enable-avresample --enable-postproc
--enable-pthreads --disable-static --enable-shared --enable-gpl
--disable-debug --disable-stripping --shlibdir=/usr/lib64
--enable-runtime-cpudetect
  libavutil  54. 20.100 / 54. 20.100
  libavcodec 56. 26.100 / 56. 26.100
  libavformat56. 25.101 / 56. 25.101
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 11.102 /  5. 11.102
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  3.100 / 53.  3.100
Input #0, matroska,webm, from 't_20151029_1430.mkv':
  Metadata:
ENCODER : Lavf57.10.101
  Duration: 00:00:02.20, start: 0.00, bitrate: 36231 kb/s
Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), yuv422p, 720x576, SAR
16:15 DAR 4:3, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)
Metadata:
  ENCODER : Lavc57.9.100 ffv1
  DURATION: 00:00:02.2
[FRAME]
media_type=video
key_frame=1
pkt_pts=0
pkt_pts_time=0.00
pkt_dts=0
pkt_dts_time=0.00
best_effort_timestamp=0
best_effort_timestamp_time=0.00
pkt_duration=40
pkt_duration_time=0.04
pkt_pos=760
pkt_size=186767
width=720
height=576
pix_fmt=yuv422p
sample_aspect_ratio=16:15
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
[/FRAME]

I was expecting "interlaced_frame" set to 1


I check again with mediainfo
 mediainfo t_20151029_1430.mkv
General
Unique ID:
156290806743187840040559793487750112396 (0x759483B48FFCFC5E381A877E288C248C)
Complete name: t_20151029_1430.mkv
Format   : Matroska
Format version   : Version 4 / Version 2
File size: 9.50 MiB
Duration : 2s 200ms
Overall bit rate : 36.2 Mbps
Writing application  : Lavf57.10.101
Writing library  : Lavf57.10.101

Video
ID   : 1
Format   : FFV1
Format version   : Version 3.4
Format settings, GOP : N=1
Codec ID : V_MS/VFW/FOURCC / FFV1
Duration : 2s 200ms
Bit rate : 35.5 Mbps
Width: 720 pixels
Height   : 576 pixels
Display aspect ratio : 4:3
Frame rate mode  : Constant
Frame rate   : 25.000 fps
Standard : PAL
Color space  : YUV
Chroma subsampling   : 4:2:2
Bit depth: 8 bits
Compression mode : Lossless
Bits/(Pixel*Frame)   : 3.425
Stream size  : 9.31 MiB (98%)
Writing library  : Lavc57.9.100 ffv1
Default  : Yes
Forced   : No
DURATION : 00:00:02.2
coder_type   : Golomb Rice
MaxSlicesCount   : 4
ErrorDetectionType   : Per slice

I was expecting "Scan type" set to interlaced

To confirm I have an interlaced USB video, I tried

./ffmpeg -debug 1 -f v4l2 -ts mono2abs -channel 1 -video_size 

Re: [FFmpeg-user] Capture from USB Dazzle: Interlaced or not interlaced. FFV1 level3 vs h264

2015-10-29 Thread MrNice


On 29/10/15 17:49, Carl Eugen Hoyos wrote:
> MrNice  iol.ie> writes:
> 
>> When I capture some video with the CL
>> ./ffmpeg -debug 1 -f v4l2 -ts mono2abs -channel 1 
>> -video_size 720x576 -pix_fmt yuyv422 -thread_queue_size 512 
>> -i /dev/video0 -c:v ffv1 -level 3 -g 1 -aspect 4:3 
>> -pix_fmt yuv422p /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv 
>> -aspect 4:3 -f sdl "Dazzle output"
> 
>> from a S-VHS tape and Dazzle DVC100, I was thinking to 
>> get an interlaced video file.
> 
> Why?
> I mean: How is FFmpeg (or the FFV1 encoder) supposed to know 
> that your v4l input is interlaced? (And why shouldn't your 
> S-VHS recording be low-resolution progressive?)
> Maybe I miss something but in this case please explain.
> 
> Doesn't removing "-flags +ilme+ildct" from your h264 
> command line produces the same output wrt interlacing 
> as above command line?
> Doesn't adding it to the ffv1 command line solve your 
> issue?
> 
> Carl Eugen
> 

> Why?
Output has
[video4linux2,v4l2 @ 0x28d49e0] The V4L2 driver is using the interlaced mode

As S-VHS tape player has interlaced output, and I suppose Dazzle
converter and v4l keep it as it is.
So I suppose FFV1/h264 keep it. Am I wrong?


> Doesn't adding it to the ffv1 command line solve your
> issue?
./ffmpeg -debug 1 -f v4l2 -ts mono2abs -channel 1 -video_size 720x576
-pix_fmt yuyv422 -thread_queue_size 512 -i /dev/video0 -c:v ffv1 -level
3 -g 1 -aspect 4:3 -flags +ilme+ildct -aspect 4:3 -pix_fmt yuv422p
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"
ffmpeg version N-76232-gabae43a Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil  55.  4.100 / 55.  4.100
  libavcodec 57.  9.100 / 57.  9.100
  libavformat57. 10.101 / 57. 10.101
  libavdevice57.  0.100 / 57.  0.100
  libavfilter 6. 13.100 /  6. 13.100
  libswscale  4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc54.  0.100 / 54.  0.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'v4l2'.
Reading option '-ts' ... matched as AVOption 'ts' with argument 'mono2abs'.
Reading option '-channel' ... matched as AVOption 'channel' with
argument '1'.
Reading option '-video_size' ... matched as AVOption 'video_size' with
argument '720x576'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuyv422'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-c:v' ... matched as option 'c' (codec name) with
argument 'ffv1'.
Reading option '-level' ... matched as AVOption 'level' with argument '3'.
Reading option '-g' ... matched as AVOption 'g' with argument '1'.
Reading option '-aspect' ... matched as option 'aspect' (set aspect
ratio (4:3, 16:9 or 1., 1.)) with argument '4:3'.
Reading option '-flags' ... matched as AVOption 'flags' with argument
'+ilme+ildct'.
Reading option '-aspect' ... matched as option 'aspect' (set aspect
ratio (4:3, 16:9 or 1., 1.)) with argument '4:3'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuv422p'.
Reading option '/Store3/Test/t_20151029_1944.mkv' ... matched as output
file.
Reading option '-aspect' ... matched as option 'aspect' (set aspect
ratio (4:3, 16:9 or 1., 1.)) with argument '4:3'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'sdl'.
Reading option 'Dazzle output' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument v4l2.
Applying option pix_fmt (set pixel format) with argument yuyv422.
Applying option thread_queue_size (set the maximum number of queued
packets from the demuxer) with argument 512.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x3457a40] fd:3 capabilities:85220001

Re: [FFmpeg-user] Capture from USB Dazzle: Interlaced or not interlaced. FFV1 level3 vs h264

2015-10-30 Thread MrNice

On 29/10/15 20:09, Andy Furniss wrote:
> Carl Eugen Hoyos wrote:
>> MrNice  iol.ie> writes:
>>
>>> When I capture some video with the CL ./ffmpeg -debug 1 -f v4l2 -ts
>>> mono2abs -channel 1 -video_size 720x576 -pix_fmt yuyv422
>>> -thread_queue_size 512 -i /dev/video0 -c:v ffv1 -level 3 -g 1
>>> -aspect 4:3 -pix_fmt yuv422p /Store3/Test/t_`date
>>> +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"
>>
>>> from a S-VHS tape and Dazzle DVC100, I was thinking to get an
>>> interlaced video file.
>>
>> Why? I mean: How is FFmpeg (or the FFV1 encoder) supposed to know
>> that your v4l input is interlaced?
> 
> Hopefully the device/v4l would pass on this information.
> 
>> (And why shouldn't your S-VHS recording be low-resolution
>> progressive?) Maybe I miss something but in this case please
>> explain.
> 
> I thought s-vhs was like vhs = one field per stripe on the tape.
> 
> Maybe if what was recorded was progressive you wouldn't care assuming
> v4l outputs weaved frames - but a lot of tape contains interlaced so you
> would need the field dominance info for that.
> 
> Random thought - as it's analogue field input, I wonder if it's possible
> that even with a progressive recorded as interlaced you could end up
> with weaved frames that don't "line up".
> ___


Carl Eugen said on Dec 19, 2012: "To the best of my knowledge, only
visual inspection tells you, ..."
so, what I did and all the 4 files, (FFV1/h264, with/without -flags
+ilme+ildct) are definitely interlaced without any doubt.

However tags are not consistent:
FFV1 with -flags: interlaced_frame=0, top_field_first=0
FFV1 without -flags: interlaced_frame=0, top_field_first=0
h264 with -flags: interlaced_frame=1, top_field_first=0
h264 without -flags: interlaced_frame=0, top_field_first=0

Questions:
- How to get interlaced_frame=1 with FFV1?
- Could you confirm top_field_first=0 means bff and really what is in
the file?
- BTW I have read bff is the usual setting for DV, do you agree I should
keep it like that?

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Capture from USB Dazzle: Interlaced or not interlaced. FFV1 level3 vs h264

2015-10-31 Thread MrNice

On 30/10/15 17:09, MrNice wrote:
> 
> On 29/10/15 20:09, Andy Furniss wrote:
>> Carl Eugen Hoyos wrote:
>>> MrNice  iol.ie> writes:
>>>
>>>> When I capture some video with the CL ./ffmpeg -debug 1 -f v4l2 -ts
>>>> mono2abs -channel 1 -video_size 720x576 -pix_fmt yuyv422
>>>> -thread_queue_size 512 -i /dev/video0 -c:v ffv1 -level 3 -g 1
>>>> -aspect 4:3 -pix_fmt yuv422p /Store3/Test/t_`date
>>>> +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"
>>>
>>>> from a S-VHS tape and Dazzle DVC100, I was thinking to get an
>>>> interlaced video file.
>>>
>>> Why? I mean: How is FFmpeg (or the FFV1 encoder) supposed to know
>>> that your v4l input is interlaced?
>>
>> Hopefully the device/v4l would pass on this information.
>>
>>> (And why shouldn't your S-VHS recording be low-resolution
>>> progressive?) Maybe I miss something but in this case please
>>> explain.
>>
>> I thought s-vhs was like vhs = one field per stripe on the tape.
>>
>> Maybe if what was recorded was progressive you wouldn't care assuming
>> v4l outputs weaved frames - but a lot of tape contains interlaced so you
>> would need the field dominance info for that.
>>
>> Random thought - as it's analogue field input, I wonder if it's possible
>> that even with a progressive recorded as interlaced you could end up
>> with weaved frames that don't "line up".
>> ___
> 
> 
> Carl Eugen said on Dec 19, 2012: "To the best of my knowledge, only
> visual inspection tells you, ..."
> so, what I did and all the 4 files, (FFV1/h264, with/without -flags
> +ilme+ildct) are definitely interlaced without any doubt.
> 
> However tags are not consistent:
> FFV1 with -flags: interlaced_frame=0, top_field_first=0
> FFV1 without -flags: interlaced_frame=0, top_field_first=0
> h264 with -flags: interlaced_frame=1, top_field_first=0
> h264 without -flags: interlaced_frame=0, top_field_first=0
> 
> Questions:
> - How to get interlaced_frame=1 with FFV1?
> - Could you confirm top_field_first=0 means bff and really what is in
> the file?
> - BTW I have read bff is the usual setting for DV, do you agree I should
> keep it like that?
> 

The above interlaced dtection was done withg the CL
./ffprobe -show_frames filename.mkv

When I use the following CL, I get:
./ffmpeg -filter:v idet -frames:v 100 -an -f rawvideo -y /dev/null -i
filename.mkv
FFV1 with -flags: Repeated Fields: Neither: 100 Top: 0 Bottom: 1
Single frame detection: TFF: 101 BFF: 0 Progressive: 0 Undetermined: 0
Multi frame detection: TFF: 101 BFF: 0 Progressive: 0 Undetermined:  0

FFV1 without -flags: same

h264 with -flags: Repeated Fields: Neither: 100 Top: 1 Bottom: 0
Single frame detection: TFF: 98 BFF: 3 Progressive: 0 Undetermined: 0
Multi frame detection: TFF: 96 BFF: 5 Progressive: 0 Undetermined: 0

h264 without -flags: Repeated Fields: Neither: 101 Top: 0 Bottom: 0
Single frame detection: TFF: 101 BFF: 0 Progressive: 0 Undetermined: 0
Multi frame detection: TFF: 101 BFF: 0 Progressive: 0 Undetermined: 0


When I use the following CL, I get:
./ffmpeg -i filename.mkv -vf idet -f null /dev/null  2>&1 | grep Parsed_idet
FFV1 with -flags: Repeated Fields: Neither: 436 Top: 0 Bottom: 1
Single frame detection: TFF: 437 BFF: 0 Progressive: 0 Undetermined: 0
Multi frame detection: TFF: 437 BFF: 0 Progressive: 0 Undetermined: 0

FFV1 without -flags: Repeated Fields: Neither: 455 Top: 0 Bottom: 1
Single frame detection: TFF: 456 BFF: 0 Progressive: 0 Undetermined: 0
Multi frame detection: TFF: 456 BFF: 0 Progressive: 0 Undetermined: 0

h264 with -flags: Repeated Fields: Neither: 444 Top: 1 Bottom: 0
Single frame detection: TFF: 441 BFF: 4 Progressive: 0 Undetermined: 0
Multi frame detection: TFF: 440 BFF: 5 Progressive: 0 Undetermined: 0

h264 without -flags: Repeated Fields: Neither: 565 Top: 0 Bottom: 0
Single frame detection: TFF: 565 BFF: 0 Progressive: 0 Undetermined: 0
Multi frame detection: TFF: 565 BFF: 0 Progressive: 0 Undetermined: 0


I'd guess ffmpeg doesn't analyse the same object.
There are really inconsistencies regarding BFF and TFF with the 3 CL.








___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Capture from USB Dazzle: Interlaced or not interlaced. FFV1 level3 vs h264

2015-11-02 Thread MrNice

I had a closer look on what I did previously.
With FFV1, option -flags +ilme+ildct do nothing. Debug see it but do nothing
=> I'll remove it
Moreover, documentation says:
Apply interlaced motion estimation, Use interlaced DCT (MPEG-2 and
MPEG-4 only)

With x264, debug returns a warning:
interlace + weightp is not implemented

This option is not in the CL.
When I remove +ildct, the warning disappears.

=> I'd guess +ildct is useless, I'll remove it

Let me know what you think
Many thanks

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Capture from USB Dazzle: Interlaced or not interlaced. FFV1 level3 vs h264

2015-11-02 Thread MrNice


On 02/11/15 10:26, MrNice wrote:
> 
> I had a closer look on what I did previously.
> With FFV1, option -flags +ilme+ildct do nothing. Debug see it but do nothing
> => I'll remove it
> Moreover, documentation says:
> Apply interlaced motion estimation, Use interlaced DCT (MPEG-2 and
> MPEG-4 only)
> 
> With x264, debug returns a warning:
> interlace + weightp is not implemented
> 
> This option is not in the CL.
> When I remove +ildct, the warning disappears.
> 
> => I'd guess +ildct is useless, I'll remove it
> 
> Let me know what you think
> Many thanks
> 
> ___

However with x264 encoder and -flags +ilme+ildct output is

[libx264 @ 0x2940600] interlace + weightp is not implemented
[libx264 @ 0x2940600] using mv_range_thread = 24
[libx264 @ 0x2940600] using SAR=16/15
[libx264 @ 0x2940600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
AVX XOP FMA4 LZCNT
[libx264 @ 0x2940600] profile High 4:4:4 Predictive, level 3.0, 4:2:2 8-bit
[libx264 @ 0x2940600] 264 - core 142 r2495 6a301b6 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html -
options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7
psy=0 mixed_ref=1 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0
deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=12
lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=tff
bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250
keyint_min=25 scenecut=40 intra_refresh=0 rc=cqp mbtree=0 qp=0

so
interlaced=tff
weightp=0

and ffprobe -show_frames says
interlaced_frame=1
top_field_first=0


with x264 encoder and -flags +ilme output is

[libx264 @ 0x37f47c0] using mv_range_thread = 24
[libx264 @ 0x37f47c0] using SAR=16/15
[libx264 @ 0x37f47c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
AVX XOP FMA4 LZCNT
[libx264 @ 0x37f47c0] profile High 4:4:4 Predictive, level 3.0, 4:2:2 8-bit
[libx264 @ 0x37f47c0] 264 - core 142 r2495 6a301b6 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html -
options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7
psy=0 mixed_ref=1 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0
deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=12
lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=250
keyint_min=25 scenecut=40 intra_refresh=0 rc=cqp mbtree=0 qp=0

So
interlaced=0
weightp=2

and ffprobe -show_frames says
interlaced_frame=0
top_field_first=0

I keep +ildtc to get interlaced even with the warning

Thanks for your patience.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-11-02 Thread MrNice
I didn't get any solution nether workaround for what I think is a bug.
I placed a bug in
https://trac.ffmpeg.org/ticket/4869
6 weeks ago and nothing new.

Could someone tell me how I could get at least the probability for a
fix/workaround.
This bug prevent me to get further in my project. I don't see any other
way to capture my video tapes.

Thanks for your appreciated help
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Capture from USB Dazzle: Interlaced or not interlaced. FFV1 level3 vs h264

2015-11-02 Thread MrNice


On 02/11/15 14:20, Andy Furniss wrote:
> MrNice wrote:
> 
>> However with x264 encoder and -flags +ilme+ildct output is
>>
>> [libx264 @ 0x2940600] interlace + weightp is not implemented [libx264
>> @ 0x2940600] using mv_range_thread = 24 [libx264 @ 0x2940600] using
>> SAR=16/15 [libx264 @ 0x2940600] using cpu capabilities: MMX2 SSE2Fast
>> SSSE3 SSE4.2 AVX XOP FMA4 LZCNT [libx264 @ 0x2940600] profile High
>> 4:4:4 Predictive, level 3.0, 4:2:2 8-bit [libx264 @ 0x2940600] 264 -
>> core 142 r2495 6a301b6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014
>> - http://www.videolan.org/x264.html - options: cabac=1 ref=3
>> deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=0 mixed_ref=1
>> me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11
>> fast_pskip=0 chroma_qp_offset=0 threads=12 lookahead_threads=2
>> sliced_threads=0 nr=0 decimate=1 interlaced=tff bluray_compat=0
>> constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25
>> scenecut=40 intra_refresh=0 rc=cqp mbtree=0 qp=0
>>
>> so interlaced=tff weightp=0
>>
>> and ffprobe -show_frames says interlaced_frame=1 top_field_first=0
> 
> Which is broken! - libx264 says tff ffprobe says bff. As your source is
> tff then trying to de-interlace this will produce broken output.
> 
>> I keep +ildtc to get interlaced even with the warning
> 
> As you now know your input is tff, for libx264 the correct thing to do is -
> 
> ..  -vf setfield=tff -c:v libx264 -preset slow -qp 0 -x264opts tff=1
> .
> 

I changed the CL
Now I get
./ffmpeg -i ../Test/t_20151102_1504.mkv -vf idet -f null /dev/null  2>&1
| grep Parsed_idet
[Parsed_idet_0 @ 0x3b10120] Repeated Fields: Neither:   370 Top: 2
Bottom: 3
[Parsed_idet_0 @ 0x3b10120] Single frame detection: TFF:11 BFF:
0 Progressive: 0 Undetermined:   364
[Parsed_idet_0 @ 0x3b10120] Multi frame detection: TFF:   375 BFF: 0
Progressive: 0 Undetermined: 0

and
 ./ffprobe -show_frames ../Test/t_20151102_1504.mkv
...
interlaced_frame=1
top_field_first=1
Very good!

Many thanks for you help...
May I ask for another favour?
Could you have a look at this thread
http://ffmpeg-users.933282.n4.nabble.com/Application-provided-invalid-non-monotonically-increasing-dts-to-muxer-in-stream-td4672326.html
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-11-02 Thread MrNice


On 02/11/15 12:17, MrNice wrote:
> I didn't get any solution nether workaround for what I think is a bug.
> I placed a bug in
> https://trac.ffmpeg.org/ticket/4869
> 6 weeks ago and nothing new.
> 
> Could someone tell me how I could get at least the probability for a
> fix/workaround.
> This bug prevent me to get further in my project. I don't see any other
> way to capture my video tapes.
> 
> Thanks for your appreciated help
> ___


Same issue/pattern/drops with

./ffmpeg -debug 1 -f v4l2 -channel 1 -i /dev/video0 -vf setfield=tff
-c:v libx264 -preset slow -qp 0 -x264opts tff=1 /Store3/Test/t_`date
+%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Application provided invalid, non monotonically increasing dts to muxer in stream

2015-11-08 Thread MrNice


On 02/11/15 17:51, MrNice wrote:
> 
> 
> On 02/11/15 12:17, MrNice wrote:
>> I didn't get any solution nether workaround for what I think is a bug.
>> I placed a bug in
>> https://trac.ffmpeg.org/ticket/4869
>> 6 weeks ago and nothing new.
>>
>> Could someone tell me how I could get at least the probability for a
>> fix/workaround.
>> This bug prevent me to get further in my project. I don't see any other
>> way to capture my video tapes.
>>
>> Thanks for your appreciated help
>> ___
> 
> 
> Same issue/pattern/drops with
> 
> ./ffmpeg -debug 1 -f v4l2 -channel 1 -i /dev/video0 -vf setfield=tff
> -c:v libx264 -preset slow -qp 0 -x264opts tff=1 /Store3/Test/t_`date
> +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 

I placed a new test on the trac bugs
https://trac.ffmpeg.org/ticket/4869#comment:5

Is there someone to help me? I despair
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] ffmpeg CL translation from Linux to Windows

2015-11-08 Thread MrNice
Hi,

I need to compare ffmpeg behaviour between Linux and Windows.
I installed Virtualbox on my Fedora host and Win 8.1 as guest.
Now I need to translate the Linux CL
./ffmpeg -debug 1 -xerror -f pulse -ar 44100 -ac 2 -channel_layout
stereo -thread_queue_size 512 -i
alsa_input.pci-_00_14.2.analog-stereo -f v4l2 -ts mono2abs -channel
1 -video_size 720x576 -pix_fmt yuyv422 -thread_queue_size 512 -i
/dev/video0 -c:v libx264 -vf setfield=tff -preset slow -qp 0 -x264opts
tff=1 -aspect 4:3 -pix_fmt yuv422p -c:a pcm_s16le -channel_layout stereo
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output".

So far I have the following CL and output but process stop (see
* below) and I have to enter Ctrl-c to carry on

Could you help me?
Many thanks

>ffmpeg -y -debug 1 -f dshow -video_device_number 0
-crossbar_video_input_pin_number 3 -video_size 720x576 -pix_fmt yuyv422
-i video="Dazzle
 DVC100 Video" -c:v libx264 -vf setfield=tff -preset slow -qp 0
-x264opts tff=1 -aspect 4:3 -pix_fmt yuv422p C:\Users\Test\Documents\test\ou
t.mp4

ffmpeg version N-76479-gc878082 Copyright (c) 2000-2015 the FFmpeg
developers

  built with gcc 5.2.0 (GCC)

  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --

enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --

enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb

 --enable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --ena

ble-libtwolame --enable-libvidstab --enable-libvo-aacenc
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --en

able-libwebp --enable-libx264 --enable-libx265 --enable-libxavs
--enable-libxvid --enable-lzma --enable-decklink --enable-zlib

  libavutil  55.  5.100 / 55.  5.100

  libavcodec 57. 14.100 / 57. 14.100

  libavformat57. 14.100 / 57. 14.100

  libavdevice57.  0.100 / 57.  0.100

  libavfilter 6. 14.101 /  6. 14.101

  libswscale  4.  0.100 /  4.  0.100

  libswresample   2.  0.100 /  2.  0.100

  libpostproc54.  0.100 / 54.  0.100

 matched as AVOption 'debug' with argument '1'.

Reading option '-f' ... matched as option 'f' (force format) with
argument 'dshow'.

Reading option '-video_device_number' ... matched as AVOption
'video_device_number' with argument '0'.

Reading option '-crossbar_video_input_pin_number' ... matched as
AVOption 'crossbar_video_input_pin_number' with argument '3'.

Reading option '-video_size' ... matched as AVOption 'video_size' with
argument '720x576'.

Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuyv422'.

Reading option '-i' ... matched as input file with argument
'video=Dazzle DVC100 Video'.

Reading option '-c:v' ... matched as option 'c' (codec name) with
argument 'libx264'.

Reading option '-vf' ... matched as option 'vf' (set video filters) with
argument 'setfield=tff'.

Reading option '-preset' ... matched as AVOption 'preset' with argument
'slow'.

Reading option '-qp' ... matched as AVOption 'qp' with argument '0'.

Reading option '-x264opts' ... matched as AVOption 'x264opts' with
argument 'tff=1'.

Reading option '-aspect' ... matched as option 'aspect' (set aspect
ratio (4:3, 16:9 or 1., 1.)) with argument '4:3'.

Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuv422p'.

Reading option 'C:\Users\Test\Documents\test\out.mp4' ... matched as
output file.

Finished splitting the commandline.

Parsing a group of options: global .

Applying option y (overwrite output files) with argument 1.

Successfully parsed a group of options.

Parsing a group of options: input file video=Dazzle DVC100 Video.

Applying option f (force format) with argument dshow.

Applying option pix_fmt (set pixel format) with argument yuyv422.

Successfully parsed a group of options.

Opening an input file: video=Dazzle DVC100 Video.

[dshow @ 008e6b52b840] Selecting pin Capture on video

[dshow @ 008e6b52b840] Crossbar Switching Information for Dazzle
DVC100 Video:

[dshow @ 008e6b52b840] Routing video input from pin 3

[dshow @ 008e6b52b840]   Crossbar Output pin 0: "Video Decoder"
related output pin: 1 current input pin: 3 compatible input pins: 2 3

[dshow @ 008e6b52b840]   Crossbar Output pin 1: "Audio Decoder"
related output pin: 0 current input pin: -1 compatible input pins: 5

[dshow @ 008e6b52b840]   Crossbar Input pin 0 - "Video AUX" related
input pin: 6

[dshow @ 008e6b52b840]   Crossbar Input pin 1 - "Video Tuner"
related input pin: 4

[dshow @ 008e6b52b840]   Crossbar Input pin 2 - "Video Composite"
related input pin: 5

[dshow @ 008e6b52b840]   Crossbar Input pin 3 - "S-Video

Re: [FFmpeg-user] Specifying Video Stream with V instead of v

2015-11-09 Thread MrNice


On 09/11/15 14:10, Josh Marell wrote:
> Nicolas,
> 
> I'm sorry but I guess I don't understand your answer. How does that relate
> to my question about the use of -c:v vs -c:V? Yes "-map 0" includes all
> streams I want all my streams copied from the input to the output, but I
> only want the video file to be converted. What am I not specifying
> though? It seems like there is information missing from your reply.
> 
> Thank you,
> 
> Josh
> 
> On Monday, November 9, 2015, Nicolas George  wrote:
> 
>> Le nonidi 19 brumaire, an CCXXIV, Josh Marell a écrit :
>>> However, when I carry this convention over to ffmpeg with:
>>> ffmpeg -i filename.mkv -map 0 -c copy -c:V libx265 265_filename.mkv
>>>
>>> It gives the exact same behavior as the lowercase v option, and again
>> tries
>>> to convert all the video streams (including the mpjeg), not just the H264
>>> stream like the ffprobe command does.
>>>
>>> Is this intended behavior? Is it a bug? Am I misunderstanding something
>>> else entirely about the documentation or the two commands?
>>
>> You wrote "-map 0": you are requesting to include all streams. You do not
>> specify, but the default is libx264 anyways.
>>
>> Regards,
>>
>> --
>>   Nicolas George
>> ___
>

Just my small part:
You should add -debug 1 as very first option, I found it very helpful.

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] ffmpeg CL translation from Linux to Windows

2015-11-13 Thread MrNice


On 13/11/15 15:35, Claudiu Rad wrote:
> 
> On 11/8/2015 8:25 PM, MrNice wrote:
>> Hi,
>>
>> I need to compare ffmpeg behaviour between Linux and Windows.
>> I installed Virtualbox on my Fedora host and Win 8.1 as guest.
>> Now I need to translate the Linux CL
>> ./ffmpeg -debug 1 -xerror -f pulse -ar 44100 -ac 2 -channel_layout
>> stereo -thread_queue_size 512 -i
>> alsa_input.pci-_00_14.2.analog-stereo -f v4l2 -ts mono2abs -channel
>> 1 -video_size 720x576 -pix_fmt yuyv422 -thread_queue_size 512 -i
>> /dev/video0 -c:v libx264 -vf setfield=tff -preset slow -qp 0 -x264opts
>> tff=1 -aspect 4:3 -pix_fmt yuv422p -c:a pcm_s16le -channel_layout stereo
>> /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle
>> output".
> 
> so you are trying to compare the capture from a USB device but want to
> run windows inside a VM?
> i surely wouldn't recommend that, there are many many things that may go
> wrong.
> it's way better to install windows side-by-side with linux on a
> different drive/partition, make all updates, install all drivers and let
> him do his job without linux/VM layers.
> 
> and please.. when investigating and posting things, resume to simplest
> command line possible that reproduces the issue.
> 

Thanks Claudiu for you answer and time.

In fact my comparison is related to the bug I found see here
http://ffmpeg-users.933282.n4.nabble.com/Application-provided-invalid-non-monotonically-increasing-dts-to-muxer-in-stream-td4672326.html
(you posted once on it) and the bug I placed see here
https://trac.ffmpeg.org/ticket/4869
For few months, I tried to get the "perfect" command line and I think I
have it. Moreover, I have 2 of them, one with FFV1 the other X264.
However when I tried in the real config I found this @&*%@@#£$% (ban) bug.

I am stuck with this bug and I can't go further in my personal project.
I try to add info, hoping this will help experts in this forum or
developers in the trac.ffmpeg.

To say the truth I tried to find another tool to do the capture but so
far unsuccessfully (I want audio and video "lossless" capture,
interlaced). What is very frustrating to me (this is a personal/family
project) is to post and have to wait long time with hope that someone
will post an answer, even without a solution, just to say "I have read
it but ...". (so far 8 weeks on trac.ffmpeg). Maybe I'll never have an
answer :-( In my case the best should be to get the answer "We will try
to debug in 6 months/1 year/3 years/never". At least I'd find out about it.
Please don't take it for you and all here, I know you are helping a lot
along your free time, you all are doing a very valuable work and I
really appreciate it.
These few above sentences are just to tell you how I am happy to get
your answer and in the same time new hope :-)
So thanks again.

Back to the point; Windows is only to check if the bug occurs as well. I
don't want as much as possible to use Win. Last time I used it was
NT/2000... and I don't have an available computer for it and don't want
to damage my running config. Anyway, first is to know if it's working,
so I need to test.

I don't know what is the culprit and I am wondering if I could change my
capture hardware. Do you know?
I am wondering if I could have a look in the source code, but I even
don't know where to look...
So, I am ready to spend some time but I need support and directives.

Aside, if you know what tool I could use as a replacement (audio and
video "lossless" capture, interlaced), please let me know, first Linux
then Win if there is no choice.

Many thanks to have read this long post.
Hope is here again...
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] Precedence matters: Non-monotonous DTS in output stream 0:0;

2015-11-21 Thread MrNice
Hello,

Precedence matters in the command line.
With the 2 commands, note that audio input is before video input

./ffmpeg -debug 1 -xerror -f pulse -ar 44100 -ac 2 -channel_layout
stereo -thread_queue_size 1024 -i
alsa_input.pci-_00_14.2.analog-stereo -f v4l2 -channel 1 -video_size
720x576 -pix_fmt yuyv422 -thread_queue_size 1024 -i /dev/video0 -c:a
pcm_s16le -channel_layout stereo -c:v ffv1 -level 3 -g 1 -aspect 4:3
-pix_fmt yuv422p -top 0 -vsync passthrough /Store3/Test/t_`date
+%Y%m%d_%H%M`.mkv

./ffmpeg -debug 1 -xerror -f pulse -ar 44100 -ac 2 -channel_layout
stereo -thread_queue_size 1024 -i
alsa_input.pci-_00_14.2.analog-stereo -f v4l2 -channel 1 -video_size
720x576 -pix_fmt yuyv422 -thread_queue_size 1024 -i /dev/video0 -c:v
ffv1 -level 3 -g 1 -aspect 4:3 -pix_fmt yuv422p -top 0 -vsync
passthrough -c:a pcm_s16le -channel_layout stereo /Store3/Test/t_`date
+%Y%m%d_%H%M`.mkv

I don't have any error


With the 2 commands, note that audio input is after video input

./ffmpeg -debug 1 -xerror -f v4l2 -channel 1 -video_size 720x576
-pix_fmt yuyv422 -thread_queue_size 1024 -i /dev/video0 -f pulse -ar
44100 -ac 2 -channel_layout stereo -thread_queue_size 1024 -i
alsa_input.pci-_00_14.2.analog-stereo -c:a pcm_s16le -channel_layout
stereo -c:v ffv1 -level 3 -g 1 -aspect 4:3 -pix_fmt yuv422p -top 0
-vsync passthrough /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
./ffmpeg -debug 1 -xerror -f v4l2 -channel 1 -video_size 720x576
-pix_fmt yuyv422 -thread_queue_size 1024 -i /dev/video0 -f pulse -ar
44100 -ac 2 -channel_layout stereo -thread_queue_size 1024 -i
alsa_input.pci-_00_14.2.analog-stereo -c:v ffv1 -level 3 -g 1
-aspect 4:3 -pix_fmt yuv422p -top 0 -vsync passthrough -c:a pcm_s16le
-channel_layout stereo /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv

I have the following error, always at previous: 1040
Non-monotonous DTS in output stream 0:0; previous: 1040, current:
-11163520; aborting.


When I remove all audio input and output
There is no error

When I only remove
-vsync passthrough
I don't get any error but a lot of dropped frames (28 dropped frames in
5 seconds capture)

One could say I should keep what is working fine. That's right but I am
looking for a way to get the both start timestamps audio and video in
the same value. At this time I get
start: 10452.776387
start: 1448108173.850955
There is the option -ts but after reading the doc I understand the
objective is to change the timestamps type, not to get same start time.
I can't find another option.

So 2 questions:
- Do you know an option to get sync start for audio and video?
- More for information: Why the precedence in the command line leads to
this error?

Thanks

For example with the last full command (note : previous: 1040)

./ffmpeg -debug 1 -xerror -f v4l2 -channel 1 -video_size 720x576
-pix_fmt yuyv422 -thread_queue_size 1024 -i /dev/video0 -f pulse -ar
44100 -ac 2 -channel_layout stereo -thread_queue_size 1024 -i
alsa_input.pci-_00_14.2.analog-stereo -c:v ffv1 -level 3 -g 1
-aspect 4:3 -pix_fmt yuv422p -top 0 -vsync passthrough -c:a pcm_s16le
-channel_layout stereo /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
ffmpeg version N-76674-g7ad698e Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil  55.  6.100 / 55.  6.100
  libavcodec 57. 15.100 / 57. 15.100
  libavformat57. 14.100 / 57. 14.100
  libavdevice57.  0.100 / 57.  0.100
  libavfilter 6. 15.100 /  6. 15.100
  libswscale  4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc54.  0.100 / 54.  0.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-xerror' ... matched as option 'xerror' (exit on error)
with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'v4l2'.
Reading option '-channel' ... matched as AVOption 'channel' with
argument '1'.
Reading option '-video_size' ... matched as AVOption 'video_size' with
argument '720x576'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuyv422'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '1024'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'pulse'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate
(in Hz)) with argument '44100'.
Reading option '-ac' ... matched as option 'ac' (set number of audio
channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout'
(set channel layout) with argument 'stereo'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '1024'.
Reading option '-i' ... matched as input fi

[FFmpeg-user] Audio/Video out of sync: -itsoffset value limit

2015-11-22 Thread MrNice
Hi,

I try to capture with the simplified command
./ffmpeg -debug 1 -f pulse -thread_queue_size 1024 -i
alsa_input.pci-_00_14.2.analog-stereo -f v4l2 -channel 1
-thread_queue_size 1024 -i /dev/video0 -c:v ffv1 -level 3 -g 1 -aspect
4:3 -pix_fmt yuv422p -top 0 -c:a pcm_s16le -channel_layout stereo
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv

I get audio out of sync late by 1.7 second.
If I add -itsoffset 0.70 to video input, I get audio just 1 second late.
But when I rise the value above 1.2, I get a lot of drops. I noticed as
well that above 1.0 the debug lines are output in burst with short
pauses between them. Pauses time increases with value.

What is/does the limit of -itsoffset value?

BTW, I tried with:
-af aresample=async=1 => Nothing better
-ts mono2abs/abs => Do nothing only start audio/video value closer
-Audio output before video output => Nothing
-vsync passthrough => Nothing
-ss 1.70: in video input => /dev/video0: could not seek to position
34725.055 and a lot of drops
-ss 1.70 in audio input => alsa_input.pci-_00_14.2.analog-stereo:
could not seek to position 1448217795.270
-ss 1.70: in output => Nothing
-threads 1 => Nothing

Is there another way to sync audio/video?
Any suggestion welcome.

Many thanks


./ffmpeg -debug 1 -f pulse -thread_queue_size 512 -i
alsa_input.pci-_00_14.2.analog-stereo -f v4l2 -channel 1
-thread_queue_size 2048 -itsoffset 1.70 -i /dev/video0 -c:v ffv1 -level
3 -g 1 -aspect 4:3 -pix_fmt yuv422p -top 0 -c:a pcm_s16le
-channel_layout stereo /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
ffmpeg version N-76674-g7ad698e Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil  55.  6.100 / 55.  6.100
  libavcodec 57. 15.100 / 57. 15.100
  libavformat57. 14.100 / 57. 14.100
  libavdevice57.  0.100 / 57.  0.100
  libavfilter 6. 15.100 /  6. 15.100
  libswscale  4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc54.  0.100 / 54.  0.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'pulse'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument
'alsa_input.pci-_00_14.2.analog-stereo'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'v4l2'.
Reading option '-channel' ... matched as AVOption 'channel' with
argument '1'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '2048'.
Reading option '-itsoffset' ... matched as option 'itsoffset' (set the
input ts offset) with argument '1.70'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-c:v' ... matched as option 'c' (codec name) with
argument 'ffv1'.
Reading option '-level' ... matched as AVOption 'level' with argument '3'.
Reading option '-g' ... matched as AVOption 'g' with argument '1'.
Reading option '-aspect' ... matched as option 'aspect' (set aspect
ratio (4:3, 16:9 or 1., 1.)) with argument '4:3'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuv422p'.
Reading option '-top' ... matched as option 'top'
(top=1/bottom=0/auto=-1 field first) with argument '0'.
Reading option '-c:a' ... matched as option 'c' (codec name) with
argument 'pcm_s16le'.
Reading option '-channel_layout' ... matched as option 'channel_layout'
(set channel layout) with argument 'stereo'.
Reading option '/Store3/Test/t_20151122_2006.mkv' ... matched as output
file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file
alsa_input.pci-_00_14.2.analog-stereo.
Applying option f (force format) with argument pulse.
Applying option thread_queue_size (set the maximum number of queued
packets from the demuxer) with argument 512.
Successfully parsed a group of options.
Opening an input file: alsa_input.pci-_00_14.2.analog-stereo.
[pulse @ 0x20c68e0] All info found
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, pulse, from 'alsa_input.pci-_00_14.2.analog-stereo':
  Duration: N/A, start: 1448222773.462464, bitrate: 1536 kb/s
Stream #0:0, 1, 1/100: Audio: pcm_s16le, 48000 Hz, 2 channels,
s16, 1536 kb/s
Successfully opened the file.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument v4l2.
Applying option thread_queue_size (set the maximum number of queued
packets from the demuxer) with argument 2048.
Applying option itsoffset (set the input ts offset) with argument 1.70.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4

Re: [FFmpeg-user] Audio/Video out of sync: -itsoffset value limit

2015-11-23 Thread MrNice


On 22/11/15 20:15, MrNice wrote:
> Hi,
> 
> I try to capture with the simplified command
> ./ffmpeg -debug 1 -f pulse -thread_queue_size 1024 -i
> alsa_input.pci-_00_14.2.analog-stereo -f v4l2 -channel 1
> -thread_queue_size 1024 -i /dev/video0 -c:v ffv1 -level 3 -g 1 -aspect
> 4:3 -pix_fmt yuv422p -top 0 -c:a pcm_s16le -channel_layout stereo
> /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
> 
> I get audio out of sync late by 1.7 second.
> If I add -itsoffset 0.70 to video input, I get audio just 1 second late.
> But when I rise the value above 1.2, I get a lot of drops. I noticed as
> well that above 1.0 the debug lines are output in burst with short
> pauses between them. Pauses time increases with value.
> 
> What is/does the limit of -itsoffset value?
> 
> BTW, I tried with:
> -af aresample=async=1 => Nothing better
> -ts mono2abs/abs => Do nothing only start audio/video value closer
> -Audio output before video output => Nothing
> -vsync passthrough => Nothing
> -ss 1.70: in video input => /dev/video0: could not seek to position
> 34725.055 and a lot of drops
> -ss 1.70 in audio input => alsa_input.pci-_00_14.2.analog-stereo:
> could not seek to position 1448217795.270
> -ss 1.70: in output => Nothing
> -threads 1 => Nothing
> 
> Is there another way to sync audio/video?
> Any suggestion welcome.
> 
> Many thanks
> 

I'd like to add some more info.
When I use sdl to preview while recording
./ffmpeg -debug 1 -f pulse -thread_queue_size 1024 -i
alsa_input.pci-_00_14.2.analog-stereo -f v4l2 -channel 1
-thread_queue_size 1024 -i /dev/video0 -c:a pcm_s16le -channel_layout
stereo -c:v ffv1 -level 3 -g 1 -aspect 4:3 -pix_fmt yuv422p -top 0
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"

Preview audio/video is perfectly sync even with or without -itsoffset
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] Pipe to ffplay when recording: syntax

2015-11-26 Thread MrNice
Hi,

When I run the command

./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
-thread_queue_size 1024 -i alsa_input.pci-_00_14.2.analog-stereo -f
v4l2 -use_wallclock_as_timestamps 1 -itsoffset 1.70 -channel 1
-video_size 720x576 -pix_fmt yuyv422 -thread_queue_size 1024 -i
/dev/video0 -c:a pcm_s16le -channel_layout stereo -c:v ffv1 -level 3 -g
1 -aspect 4:3 -pix_fmt yuv422p -top 0 -vsync passthrough
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv

I have a perfect output without any error but I don't have preview.
When I add

-aspect 4:3 -f sdl "Dazzle output"
at any position I get the well known RED error message

Application provided invalid, non monotonically increasing dts to muxer
in stream 0:

I know it's very difficult to get ride of this error, so there could be
a workaround: pipe the output file to ffplay.

Unfortunately I can't find the syntax when the output is a file but only
when this is a raw video stream.
Could you help me for that?

Many thanks
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Pipe to ffplay when recording: syntax

2015-11-28 Thread MrNice


On 26/11/15 11:38, MrNice wrote:
> Hi,
> 
> When I run the command
> 
> ./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
> -thread_queue_size 1024 -i alsa_input.pci-_00_14.2.analog-stereo -f
> v4l2 -use_wallclock_as_timestamps 1 -itsoffset 1.70 -channel 1
> -video_size 720x576 -pix_fmt yuyv422 -thread_queue_size 1024 -i
> /dev/video0 -c:a pcm_s16le -channel_layout stereo -c:v ffv1 -level 3 -g
> 1 -aspect 4:3 -pix_fmt yuv422p -top 0 -vsync passthrough
> /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
> 
> I have a perfect output without any error but I don't have preview.
> When I add
> 
> -aspect 4:3 -f sdl "Dazzle output"
> at any position I get the well known RED error message
> 
> Application provided invalid, non monotonically increasing dts to muxer
> in stream 0:
> 
> I know it's very difficult to get ride of this error, so there could be
> a workaround: pipe the output file to ffplay.
> 
> Unfortunately I can't find the syntax when the output is a file but only
> when this is a raw video stream.
> Could you help me for that?
> 
> Many thanks
> 

I was thinking the answer easy but maybe not.

I tried all combinations in this page but didn't succeed
http://superuser.com/questions/322216/how-can-i-pipe-output-of-ffmpeg-to-ffplay

-f rawvideo - | ffplay -f rawvideo -
pipe:1 | ffplay -i -
-f matroska - | ffplay -
pipe:play | ffplay -i pipe:play
and more

Is it so difficult to get it?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] Understanding stats infos

2015-11-29 Thread MrNice
Hi,

When I record from v4l2 in debug mode, I get no error message, only
green lines.
./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
-thread_queue_size 1024 -i alsa_input.pci-_00_14.2.analog-stereo -f
v4l2 -use_wallclock_as_timestamps 1 -itsoffset 1.69 -channel 1
-video_size 720x576 -pix_fmt yuyv422 -thread_queue_size 1024 -i
/dev/video0 -c:a pcm_s16le -channel_layout stereo -c:v ffv1 -level 3 -g
1 -aspect 4:3 -pix_fmt yuv422p -top 0 -vsync passthrough
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv


Then when I run the following command on the file I get a lot of same
errors in red.
Are these errors recorded in the file or are they generated when reading?

./ffmpeg -i /Store3/Test/t_20151129_1015.mkv -f null /dev/nullffmpeg
version N-76674-g7ad698e Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil  55.  6.100 / 55.  6.100
  libavcodec 57. 15.100 / 57. 15.100
  libavformat57. 14.100 / 57. 14.100
  libavdevice57.  0.100 / 57.  0.100
  libavfilter 6. 15.100 /  6. 15.100
  libswscale  4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc54.  0.100 / 54.  0.100
Guessed Channel Layout for  Input Stream #0.1 : stereo
Input #0, matroska,webm, from '/Store3/Test/t_20151129_1015.mkv':
  Metadata:
ENCODER : Lavf57.14.100
  Duration: 00:03:01.33, start: 0.00, bitrate: 37498 kb/s
Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), yuv422p, 720x576, SAR
16:15 DAR 4:3, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)
Metadata:
  ENCODER : Lavc57.15.100 ffv1
  DURATION: 00:03:01.2
Stream #0:1: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
(default)
Metadata:
  ENCODER : Lavc57.15.100 pcm_s16le
  DURATION: 00:03:01.32500
Output #0, null, to '/dev/null':
  Metadata:
encoder : Lavf57.14.100
Stream #0:0: Video: wrapped_avframe, yuv422p, 720x576 [SAR 16:15 DAR
4:3], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
Metadata:
  DURATION: 00:03:01.2
  encoder : Lavc57.15.100 wrapped_avframe
Stream #0:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
(default)
Metadata:
  DURATION: 00:03:01.32500
  encoder : Lavc57.15.100 pcm_s16le
Stream mapping:
  Stream #0:0 -> #0:0 (ffv1 (native) -> wrapped_avframe (native))
  Stream #0:1 -> #0:1 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[null @ 0x3101c20] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 131 >= 131
[null @ 0x3101c20] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 173 >= 173
[null @ 0x3101c20] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 210 >= 210
[null @ 0x3101c20] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 817 >= 817
[null @ 0x3101c20] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 836 >= 836
[null @ 0x3101c20] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 849 >= 849
[null @ 0x3101c20] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 868 >= 868
[null @ 0x3101c20] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 881 >= 881
[null @ 0x3101c20] Application provided invalid, non monotonically
increasing dts to muxer in stream 0
... and more
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Pipe to ffplay when recording: syntax

2015-11-29 Thread MrNice

>> I was thinking the answer easy but maybe not.
>>
>> I tried all combinations in this page but didn't succeed
>> http://superuser.com/questions/322216/how-can-i-pipe-output-of-ffmpeg-to-ffplay
>>
>>
>> -f rawvideo - | ffplay -f rawvideo -
>> pipe:1 | ffplay -i -
>> -f matroska - | ffplay -
>> pipe:play | ffplay -i pipe:play
>> and more
>>
>> Is it so difficult to get it?
> 
> If you use rawvideo you need to say what it is.
> 
> Works for me with a quick desktop grab test -
> 
> ffmpeg -f x11grab -r 10 -s 128x128  -i :0.0 -f rawvideo - | ffplay -f
> rawvideo -s 128x128 -pix_fmt bgr0 -
> 
> 
> 


Many thanks
I have to add
-f rawvideo - | ffplay -f rawvideo -video_size 720x576 -pixel_format
yuyv422 -
I spend a lot of time but you saved me.

What is frustrating for me is when I have a fix for one issue, I get
another one :-(
If you could help for this
Understanding stats infos
http://ffmpeg-users.933282.n4.nabble.com/Understanding-stats-infos-td4673249.html


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Understanding stats infos

2015-11-29 Thread MrNice


On 29/11/15 10:59, MrNice wrote:
> Hi,
> 
> When I record from v4l2 in debug mode, I get no error message, only
> green lines.
> ./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
> -thread_queue_size 1024 -i alsa_input.pci-_00_14.2.analog-stereo -f
> v4l2 -use_wallclock_as_timestamps 1 -itsoffset 1.69 -channel 1
> -video_size 720x576 -pix_fmt yuyv422 -thread_queue_size 1024 -i
> /dev/video0 -c:a pcm_s16le -channel_layout stereo -c:v ffv1 -level 3 -g
> 1 -aspect 4:3 -pix_fmt yuv422p -top 0 -vsync passthrough
> /Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
> 
> 
> Then when I run the following command on the file I get a lot of same
> errors in red.
> Are these errors recorded in the file or are they generated when reading?
> 

More info
When I record with the above command, I don't get any warning/error
message at the time of recording.
When I run the following command on the generated file
./ffmpeg -i /Store3/Test/filename.mkv -f null /dev/null
I get a lot of red messages
Application provided invalid, non monotonically increasing dts to muxer
in stream 0:

If I remove the last output option: -vsync passthrough
When I record I get a lot of warning messages
Past duration 0.646019 too large
and
Cliping frame in rate conversion by 0.523094
When I run the following command on this file
./ffmpeg -i /Store3/Test/filename.mkv -f null /dev/null
I get NO error message at all

What does the mean?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Command line to show channel label/position

2025-01-29 Thread MrNice

On Jan 28, 2025, at 4:14 PM, MrNice  wrote:

On 28/01/2025 18:26, Carl Zwanzig wrote:

On 1/28/2025 8:18 AM, MrNice wrote:

have an audio file, with MediaInfo I get
Audio
Channel layout   : L R Ls Rs
  > ffmpeg -v error -layouts | awk '/quad /{print $2}'
FL+FR+BL+BR
What is the correct answer?

Both.
Left, assumed to be front (L) = Front Left (FL)
Left surround/side (Ls) = Back Left (BL)
etc

(that's part way down the AudioChannelManipulation page, even farther down is a 
list of the channel names and standard layouts, also in the -layouts output)

z!

___

Are you sure for good Carl?

AFAIK, LS is surround and BL is back/Rear

Please look here

https://mediaarea.net/AudioChannelLayout

They say, depending of standardization;
Left Surround = Ls = CL = SL = Ls (MediaInfo name)
Right Surround = Rs = CR = SR = Rs (MediaInfo name)
Left Rear Surround = Lrs = BL = Lsr = SL = Lb (MediaInfo name)
Right Rear Surround = Rrs = BR = Rsr = Rb (MediaInfo name)


I'm not sure I understand the question, but I believe that "back" channels are only involved if there 
are more than 5 distinct audio signals plus one low frequency signal. By way of explanation, I believe that 5 
distinct audio signals plus one low frequency signal is the configuration commonly referred to as "5.1" 
audio (front left, front right, center, side left, side right, and low frequency). I don't believe that the term 
"5.1" when used to describe an audio standard (summarized as the description of speaker locations listed 
in my previous sentence) specifies any "back' audio signals at all. If you wish to convert 5.1 audio to an 
audio format having more distinct signals or sends, then I think it is up to you to determine how you would like 
to distribute the audio signals to make use of the additional available channels. Did I say anything useful, or 
have I just confused the issue?

LL

___


Thank you for your answer.

The point is that ffmpeg and MediaInfo do not output the same answer for 
the channels positions. Side is not Back particularly in the last 
century with quadrophonic.


Or the information embedded in the file is confusing or one of the two 
programs decipher the embedded info in a wrong way. It could be 
interesting to know what is effectively coded inside the file and as 
well how the 2 programs decipher and output that data to understand the 
difference.


Moreover, to get an accurate knowledge on ffmpeg, it could be 
interesting to copy the table https://mediaarea.net/AudioChannelLayout 
in the ffmpeg documentation and add one column with the corresponding 
ffmpeg output.


MrNice

___
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] Command line to show channel label/position

2025-01-27 Thread MrNice

On Jan 26, 2025, at 11:24 AM, MrNice  wrote:

Hello there,

What is the best command line to get details about channels position/label in a 
multichannel audio file ?



I think that rather than using ffmpeg for this, the "mediainfo" executable might provide 
an easier way. Once I have "mediainfo" correctly installed for my system, I can simply 
run the command,
"mediainfo mymediafile", and see this list of audio channels and their 
disposition among the results for a movie file containing a 5.1 audio stream:

Channel layout  : L R C LFE Ls Rs

More descriptive labels for those might be (relatively): front left, front 
right, front center, low frequency effect, side left, side right (in case that 
is helpful).

The output of "mediainfo" that you would need to examine would likely be much 
shorter if you pointed it toward an audio file. And there are lots of ways to limit that 
output, although I haven't explored that too much.

You can use ffmpeg to manipulate the output as illustrated here (if it helps):
https://trac.ffmpeg.org/wiki/AudioChannelManipulation#a5.1stereo

L. Lee
___
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".



Thank you L. I'll use Mediainfo, I have it installed but I thought 
ffprobe has a command for that.


BTW, could you tell me, How the decoder will sort out the channels to 
send to the right speaker ?

- by the list order, I mean first to FL, second to FR, and so on
- or by the label, and what happen when there is no label or multi mono 
channels ?


___
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] Command line to show channel label/position

2025-01-26 Thread MrNice

Hello there,

What is the best command line to get details about channels 
position/label in a multichannel audio file ?


I tried ffprobe but I get only

channels=6
channel_layout=5.1

not FR, FL, C, LFE, BL ...

BTW what is the best way to name this parameter ?

*ffprobe -show_streams -i 102MJ.flac*
ffprobe version 4.4.4 Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 7 (SUSE Linux)
  configuration: --prefix=/usr --libdir=/usr/lib64 
--shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg 
--extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall 
-D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables 
-fasynchronous-unwind-tables -fstack-clash-protection -g' 
--optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall 
-D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables 
-fasynchronous-unwind-tables -fstack-clash-protection -g' 
--disable-htmlpages --enable-pic --disable-stripping --enable-shared 
--disable-static --enable-gpl --enable-version3 --enable-libsmbclient 
--disable-openssl --enable-avresample --enable-gnutls --enable-ladspa 
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcelt 
--enable-libcdio --enable-libdav1d --enable-libdc1394 --enable-libdrm 
--enable-libfontconfig --enable-libfreetype --enable-libfribidi 
--enable-libgsm --enable-libjack --enable-libmp3lame 
--enable-libopenjpeg --enable-libopenmpt --enable-libopus 
--enable-libpulse --enable-libspeex --enable-libssh --enable-libtheora 
--enable-libtwolame --enable-libvidstab --enable-libvorbis 
--enable-libv4l2 --enable-libvpx --enable-libwebp --enable-libxml2 
--enable-libzimg --enable-libzvbi --enable-vaapi --enable-vdpau 
--enable-version3 --enable-libfdk-aac-dlopen --enable-nonfree 
--enable-libvo-amrwbenc --enable-libx264 --enable-libx265 
--enable-librtmp --enable-libxvid

  libavutil  56. 70.100 / 56. 70.100
  libavcodec 58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter 7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, flac, from '102MJ.flac':
  Metadata:
    encoder : Lavf58.76.100
  Duration: 00:03:01.31, start: 0.00, bitrate: 1388 kb/s
  Stream #0:0: Audio: flac, 44100 Hz, 5.1, s16
[STREAM]
index=0
codec_name=flac
codec_long_name=FLAC (Free Lossless Audio Codec)
profile=unknown
codec_type=audio
codec_tag_string=[0][0][0][0]
codec_tag=0x
sample_fmt=s16
sample_rate=44100
*channels=6
channel_layout=5.1*
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/44100
start_pts=0
start_time=0.00
duration_ts=7995624
duration=181.306667
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=16
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
[/STREAM]

Thanks
___
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] Fwd: Command line to show channel label/position

2025-01-28 Thread MrNice


Thank you L. I'll use Mediainfo, I have it installed but I thought 
ffprobe has a command for that.


BTW, could you tell me, How the decoder will sort out the channels to 
send to the right speaker ?

- by the list order, I mean first to FL, second to FR, and so on
- or by the label, and what happen when there is no label or multi 
mono channels ?


I’m not sure I have an answer for that, but maybe you can use the 
disposition resource page I linked to run some of your own experiments. 
For example, make your own stereo recording of a statement such as “this 
is the left channel” with the right mic turned off. Then use the 
disposition instructions to move and/or copy it to the channel of your 
choice, then audition the results. If you want, and have the necessary 
equipment, you should be able to reassign any existing audio channel to 
any other.


L. Lee
___

I came accross this command. Is it reliable?

ffprobe -v error -show_entries stream=channel_layout -of csv=p=0 
filename.flac

ffmpeg -v error -layouts | awk '/5.1 /{print $2}'

Thanks
___
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] Fwd: Command line to show channel label/position

2025-01-28 Thread MrNice

On 28/01/2025 18:26, Carl Zwanzig wrote:

On 1/28/2025 8:18 AM, MrNice wrote:

have an audio file, with MediaInfo I get
Audio
Channel layout   : L R Ls Rs



 > ffmpeg -v error -layouts | awk '/quad /{print $2}'
FL+FR+BL+BR



What is the correct answer?


Both.
Left, assumed to be front (L) = Front Left (FL)
Left surround/side (Ls) = Back Left (BL)
etc

(that's part way down the AudioChannelManipulation page, even farther 
down is a list of the channel names and standard layouts, also in the 
-layouts output)


z!

___


Are you sure for good Carl?

AFAIK, LS is surround and BL is back/Rear

Please look here

https://mediaarea.net/AudioChannelLayout

They say, depending of standardization;
Left Surround = Ls = CL = SL = Ls (MediaInfo name)
Right Surround = Rs = CR = SR = Rs (MediaInfo name)
Left Rear Surround = Lrs = BL = Lsr = SL = Lb (MediaInfo name)
Right Rear Surround = Rrs = BR = Rsr = Rb (MediaInfo name)

___
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] Fwd: Command line to show channel label/position

2025-01-28 Thread MrNice


Thank you L. I'll use Mediainfo, I have it installed but I thought 
ffprobe has a command for that.


BTW, could you tell me, How the decoder will sort out the channels to 
send to the right speaker ?

- by the list order, I mean first to FL, second to FR, and so on
- or by the label, and what happen when there is no label or multi 
mono channels ?


I’m not sure I have an answer for that, but maybe you can use the 
disposition resource page I linked to run some of your own 
experiments. For example, make your own stereo recording of a 
statement such as “this is the left channel” with the right mic turned 
off. Then use the disposition instructions to move and/or copy it to 
the channel of your choice, then audition the results. If you want, 
and have the necessary equipment, you should be able to reassign any 
existing audio channel to any other.


L. Lee
___

I came accross this command. Is it reliable?

ffprobe -v error -show_entries stream=channel_layout -of csv=p=0 
filename.flac

ffmpeg -v error -layouts | awk '/5.1 /{print $2}'

Thanks
___


I have an audio file, with MediaInfo I get

Audio
Format   : FLAC
Format/Info  : Free Lossless Audio Codec
Duration : 2 min 18 s
Bit rate mode    : Variable
Bit rate : 5 439 kb/s
Channel(s)   : 4 channels
Channel layout   : L R Ls Rs
Sampling rate    : 96.0 kHz
Bit depth    : 24 bits
Compression mode : Lossless

With the above ffprobe command, I get

> ffprobe -v error -show_entries stream=channel_layout -of csv=p=0 
101Be.flac

quad
> ffmpeg -v error -layouts | awk '/quad /{print $2}'
FL+FR+BL+BR

What is the correct answer?


___
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] Command line to show channel label/position

2025-01-29 Thread MrNice


On 29/01/2025 11:26, Paul B Mahol wrote:

For your specific case, one would need to look at flac specification, and
check does ffmpeg follow specification correctly.

On Wed, Jan 29, 2025 at 10:24 AM MrNice  wrote:


On Jan 28, 2025, at 4:14 PM, MrNice  wrote:

On 28/01/2025 18:26, Carl Zwanzig wrote:

On 1/28/2025 8:18 AM, MrNice wrote:

have an audio file, with MediaInfo I get
Audio
Channel layout   : L R Ls Rs
   > ffmpeg -v error -layouts | awk '/quad /{print $2}'
FL+FR+BL+BR
What is the correct answer?

Both.
Left, assumed to be front (L) = Front Left (FL)
Left surround/side (Ls) = Back Left (BL)
etc

(that's part way down the AudioChannelManipulation page, even farther

down is a list of the channel names and standard layouts, also in the
-layouts output)

z!

___

Are you sure for good Carl?

AFAIK, LS is surround and BL is back/Rear

Please look here

https://mediaarea.net/AudioChannelLayout

They say, depending of standardization;
Left Surround = Ls = CL = SL = Ls (MediaInfo name)
Right Surround = Rs = CR = SR = Rs (MediaInfo name)
Left Rear Surround = Lrs = BL = Lsr = SL = Lb (MediaInfo name)
Right Rear Surround = Rrs = BR = Rsr = Rb (MediaInfo name)


I'm not sure I understand the question, but I believe that "back"

channels are only involved if there are more than 5 distinct audio signals
plus one low frequency signal. By way of explanation, I believe that 5
distinct audio signals plus one low frequency signal is the configuration
commonly referred to as "5.1" audio (front left, front right, center, side
left, side right, and low frequency). I don't believe that the term "5.1"
when used to describe an audio standard (summarized as the description of
speaker locations listed in my previous sentence) specifies any "back'
audio signals at all. If you wish to convert 5.1 audio to an audio format
having more distinct signals or sends, then I think it is up to you to
determine how you would like to distribute the audio signals to make use of
the additional available channels. Did I say anything useful, or have I
just confused the issue?

LL

___

Thank you for your answer.

The point is that ffmpeg and MediaInfo do not output the same answer for
the channels positions. Side is not Back particularly in the last
century with quadrophonic.

Or the information embedded in the file is confusing or one of the two
programs decipher the embedded info in a wrong way. It could be
interesting to know what is effectively coded inside the file and as
well how the 2 programs decipher and output that data to understand the
difference.

Moreover, to get an accurate knowledge on ffmpeg, it could be
interesting to copy the table https://mediaarea.net/AudioChannelLayout
in the ffmpeg documentation and add one column with the corresponding
ffmpeg output.

MrNice

___
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".


___


Unfortunately, I am not skilled enough in that matter to go this way.

Is there de developer who could complete the table

https://mediaarea.net/AudioChannelLayout

With the ffmpeg/ffprobe output ?



___
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".