[FFmpeg-user] "ffserver" stream has audio but no video after upgrading

2016-03-30 Thread Guillermo Martinez

Hello Everyone,

Good morning.

I use FFmpeg in my home surveillance system. Prior to upgrading to 
recent versions, I am
using "*FFmpeg 2.4.3*". I use "ffserver" to stream multiplexed video 
stream (from network cameras)
and audio stream (from desktop PC microphone). Using "*FFmpeg 2.4.3*", I 
can successfully
access the streams. Meaning I can see video from the network camera and 
hear audio from

the common microphone.

To illustrate:
ffmpeg -i network_camera1_video_stream -i 
desktop_microphone_audio_stream ---> ffserver
ffmpeg -i network_camera2_video_stream -i 
desktop_microphone_audio_stream ---> ffserver
ffmpeg -i network_camera3_video_stream -i 
desktop_microphone_audio_stream ---> ffserver


*CASE 1: Upgrade to FFmpeg 3.0*
I decided to upgrade to recent versions of FFmpeg. I tried FFmpeg 3.0. 
There is no change in
"ffserver.conf". In the "ffmpeg" command line, I only added 
"*-thread_**queue_size 256*" to fix
the warnings about increasing the thread queue size. The result is that 
there are no streams
accessible (i.e. no video/audio), though I don't see any issue with the 
logs.


*CASE 2: Upgrade to FFmpeg 2.8.6*
I then backtracked and tried "*FFmpeg 2.8.6*". Again, the only 
difference is the added "*-thread_queue_size 256*"
option to fix the warnings. This time, there is audio, but there is no 
video.


The following are the logs for 2.8.6:


*ffserver.conf*
==
HTTPPort 8090
HTTPBindAddress 0.0.0.0
RTSPPort 8554
RTSPBindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1


File /tmp/828222942.ffm
FileMaxSize 500K
ACL allow localhost



Feed 828222942.ffm
AudioBitRate 128
AudioChannels 1
AudioSampleRate 48000
AVOptionAudio flags +global_header
NoVideo



File /tmp/1663648364.ffm
FileMaxSize 500K
ACL allow localhost



Feed 1663648364.ffm
Format mpegts
AudioBitRate 128
AudioChannels 1
AudioSampleRate 48000
AVOptionAudio flags +global_header

==


*# /usr/bin/ffserver -loglevel debug -f ./ffserver.conf*
==
ffserver version 2.8.6 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.7.2 (Sourcery CodeBench Lite 2012.09-62)
  configuration: --enable-cross-compile 
--cross-prefix=/home/marc/ENVIRONMENT/bsp/output/host/usr/bin/i686-pc-linux-gnu- 
--sysroot=/home/marc/ENVIRONMENT/bsp/output/host/usr/i686-buildroot-linux-gnu/sysroot 
--host-cc=/usr/bin/gcc --arch=i686 --target-os=linux 
--extra-cflags=-fPIC --enable-static --enable-shared --prefix=/usr 
--enable-avfilter --disable-doc --enable-gpl --disable-nonfree 
--enable-ffmpeg --disable-ffplay --enable-ffserver --disable-postproc 
--enable-swscale --enable-indevs --enable-indev=alsa --enable-outdevs 
--enable-pthreads --enable-zlib --disable-armv6 --disable-armv6t2

  libavutil  54. 31.100 / 54. 31.100
  libavcodec 56. 60.100 / 56. 60.100
  libavformat56. 40.101 / 56. 40.101
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 40.101 /  5. 40.101
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
[ffm @ 0x94c1e00] Format ffm probed with size=2048 and score=101
[NULL @ 0x94c3680] Setting entry with key 'b' to value '128000'
[NULL @ 0x94c3680] Setting entry with key 'ac' to value '1'
[NULL @ 0x94c3680] Setting entry with key 'ar' to value '48000'
[NULL @ 0x94c3680] Setting entry with key 'flags' to value '+global_header'
[AVIOContext @ 0x94b8be0] Statistics: 32768 bytes read, 0 seeks
[ffm @ 0x94c1e00] Format ffm probed with size=2048 and score=101
[NULL @ 0x94c3680] Setting entry with key 'b' to value '128000'
[NULL @ 0x94c3680] Setting entry with key 'ac' to value '1'
[NULL @ 0x94c3680] Setting entry with key 'ar' to value '48000'
[NULL @ 0x94c3680] Setting entry with key 'flags' to value '+global_header'
[AVIOContext @ 0x94b8be0] Statistics: 32768 bytes read, 0 seeks

 AUDIO INITIALIZING 

[ffm @ 0x94c8520] Format ffm probed with size=2048 and score=101
[NULL @ 0x94c9da0] Setting entry with key 'b' to value '128000'
[NULL @ 0x94c9da0] Setting entry with key 'ac' to value '1'
[NULL @ 0x94c9da0] Setting entry with key 'ar' to value '48000'
[NULL @ 0x94c9da0] Setting entry with key 'flags' to value '+global_header'
writing recommended configuration: 
b=128000,ac=1,ar=48000,flags=+global_header

[AVIOContext @ 0x94b8be0] Statistics: 40960 bytes read, 2 seeks
[NULL @ 0x94c9da0] Setting entry with key 'b' to value '128000'
[NULL @ 0x94c9da0] Setting entry with key 'flags' to value '0x0040'
[NULL @ 0x94c9da0] Setting entry with key 'ar' to value '48000'
[NULL @ 0x94c9da0] Setting entry with key 'ac' to value '1'
[NULL @ 0x94c9da0] Setting entry with key 'frame_size' to value '1152'
[NULL @ 0x94c9da0] 

[FFmpeg-user] "ffserver" stream has audio but no video after upgrading

2016-03-30 Thread Guillermo Martinez

Hello Everyone,

Good morning.

I use FFmpeg in my home surveillance system. Prior to upgrading to 
recent versions, I am
using "*FFmpeg 2.4.3*". I use "ffserver" to stream multiplexed video 
stream (from network cameras)
and audio stream (from desktop PC microphone). Using "*FFmpeg 2.4.3*", I 
can successfully
access the streams. Meaning I can see video from the network camera and 
hear audio from

the common microphone.

To illustrate:
ffmpeg -i network_camera1_video_stream -i 
desktop_microphone_audio_stream ---> ffserver
ffmpeg -i network_camera2_video_stream -i 
desktop_microphone_audio_stream ---> ffserver
ffmpeg -i network_camera3_video_stream -i 
desktop_microphone_audio_stream ---> ffserver


*CASE 1: Upgrade to FFmpeg 3.0*
I decided to upgrade to recent versions of FFmpeg. I tried FFmpeg 3.0. 
There is no change in
"ffserver.conf". In the "ffmpeg" command line, I only added 
"*-thread_**queue_size 256*" to fix
the warnings about increasing the thread queue size. The result is that 
there are no streams
accessible (i.e. no video/audio), though I don't see any issue with the 
logs.


*CASE 2: Upgrade to FFmpeg 2.8.6*
I then backtracked and tried "*FFmpeg 2.8.6*". Again, the only 
difference is the added "*-thread_queue_size 256*"
option to fix the warnings. This time, there is audio, but there is no 
video.


The following are the logs for 2.8.6:


*ffserver.conf*
==
HTTPPort 8090
HTTPBindAddress 0.0.0.0
RTSPPort 8554
RTSPBindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1


File /tmp/828222942.ffm
FileMaxSize 500K
ACL allow localhost



Feed 828222942.ffm
AudioBitRate 128
AudioChannels 1
AudioSampleRate 48000
AVOptionAudio flags +global_header
NoVideo



File /tmp/1663648364.ffm
FileMaxSize 500K
ACL allow localhost



Feed 1663648364.ffm
Format mpegts
AudioBitRate 128
AudioChannels 1
AudioSampleRate 48000
AVOptionAudio flags +global_header

==


*# /usr/bin/ffserver -loglevel debug -f ./ffserver.conf*
==
ffserver version 2.8.6 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.7.2 (Sourcery CodeBench Lite 2012.09-62)
  configuration: --enable-cross-compile 
--cross-prefix=/home/marc/ENVIRONMENT/bsp/output/host/usr/bin/i686-pc-linux-gnu- 
--sysroot=/home/marc/ENVIRONMENT/bsp/output/host/usr/i686-buildroot-linux-gnu/sysroot 
--host-cc=/usr/bin/gcc --arch=i686 --target-os=linux 
--extra-cflags=-fPIC --enable-static --enable-shared --prefix=/usr 
--enable-avfilter --disable-doc --enable-gpl --disable-nonfree 
--enable-ffmpeg --disable-ffplay --enable-ffserver --disable-postproc 
--enable-swscale --enable-indevs --enable-indev=alsa --enable-outdevs 
--enable-pthreads --enable-zlib --disable-armv6 --disable-armv6t2

  libavutil  54. 31.100 / 54. 31.100
  libavcodec 56. 60.100 / 56. 60.100
  libavformat56. 40.101 / 56. 40.101
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 40.101 /  5. 40.101
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
[ffm @ 0x94c1e00] Format ffm probed with size=2048 and score=101
[NULL @ 0x94c3680] Setting entry with key 'b' to value '128000'
[NULL @ 0x94c3680] Setting entry with key 'ac' to value '1'
[NULL @ 0x94c3680] Setting entry with key 'ar' to value '48000'
[NULL @ 0x94c3680] Setting entry with key 'flags' to value '+global_header'
[AVIOContext @ 0x94b8be0] Statistics: 32768 bytes read, 0 seeks
[ffm @ 0x94c1e00] Format ffm probed with size=2048 and score=101
[NULL @ 0x94c3680] Setting entry with key 'b' to value '128000'
[NULL @ 0x94c3680] Setting entry with key 'ac' to value '1'
[NULL @ 0x94c3680] Setting entry with key 'ar' to value '48000'
[NULL @ 0x94c3680] Setting entry with key 'flags' to value '+global_header'
[AVIOContext @ 0x94b8be0] Statistics: 32768 bytes read, 0 seeks

 AUDIO INITIALIZING 

[ffm @ 0x94c8520] Format ffm probed with size=2048 and score=101
[NULL @ 0x94c9da0] Setting entry with key 'b' to value '128000'
[NULL @ 0x94c9da0] Setting entry with key 'ac' to value '1'
[NULL @ 0x94c9da0] Setting entry with key 'ar' to value '48000'
[NULL @ 0x94c9da0] Setting entry with key 'flags' to value '+global_header'
writing recommended configuration: 
b=128000,ac=1,ar=48000,flags=+global_header

[AVIOContext @ 0x94b8be0] Statistics: 40960 bytes read, 2 seeks
[NULL @ 0x94c9da0] Setting entry with key 'b' to value '128000'
[NULL @ 0x94c9da0] Setting entry with key 'flags' to value '0x0040'
[NULL @ 0x94c9da0] Setting entry with key 'ar' to value '48000'
[NULL @ 0x94c9da0] Setting entry with key 'ac' to value '1'
[NULL @ 0x94c9da0] Setting entry with key 'frame_size' to value '1152'
[NULL @ 0x94c9da0] 

Re: [FFmpeg-user] [FFMPEG] Audio/Video Syncing

2016-01-26 Thread Guillermo Martinez

Hi Everyone,

Good morning.

I would like to follow-up if there are other solutions I do based on the
logs and information I have provided? Thanks!

Regards,

Guillermo

On 1/15/2016 4:27 PM, Guillermo Martinez wrote:

Hi Carl,

Good afternoon.

Thank you very much for the reply.

On 1/13/2016 9:49 PM, Carl Eugen Hoyos wrote:

Guillermo Martinez <94dlve1izy52e5t  gmail.com> writes:

ffmpeg -y -ihttp://192.168.0.11:8090/VIDEO_CAM1.mpg  
-itsoffset 1.0 -ihttp://192.168.0.11:8090/AUDIO.mp2  
-map 0:0 -map 1:0 test.mp4

Complete, uncut console output missing.
Sorry about that. The following are console outputs from the client 
with and without the "*itsoffset*" option:

==
*1. **ffmpeg -y -i **http://192.168.0.11:8090/VIDEO_CAM1.mpg**-i 
**http://192.168.0.11:8090/AUDIO.mp2**-map 0:0 -map 0:0 -t 15 test.mp4 
2> ffmpeg_client_without_itsoffset.txt*

- without the "itsoffset" option
- 
https://www.dropbox.com/s/hfo2newv7x4o12t/ffmpeg_client_without_itsoffset.txt?dl=0


***2. **ffmpeg -y -i 
**http://192.168.0.11:8090/VIDEO_CAM1.mpg**-itsoffset 1.0 -i 
**http://192.168.0.11:8090/AUDIO.mp2**-map 0:0 -map 0:0 -t 15 test.mp4 
2> ffmpeg_client_with_itsoffset.txt*

- with the "itsoffset" option
- 
https://www.dropbox.com/s/dirfkb3yndwtjni/ffmpeg_client_with_itsoffset.txt?dl=0

==

I would also like to share my "*ffserver.conf*" and "*input ffmpeg 
commands*"

==
*1. ffserver.conf
* https://www.dropbox.com/s/cf3kgyfimq6dgcr/ffserver.conf?dl=0*
*
*2. ffmpeg input commands (to ffserver)*
https://www.dropbox.com/s/mdl5gufzuc59wmz/start.ffmpeg.sh?dl=0
==

Hope this helps in getting further insight.

Unfortunately, I suspect your http sources do not provide timestamps, 
so there is no easy solution;-( 
I see. The stream that seems to always start at *dts=0* is the audio 
stream.


Please refer to the following outputs of ffprobe:
==
*1. ffprobe -i http://192.168.0.11:8090:AUDIO.mp2 -show_frames*
- https://www.dropbox.com/s/xb5t88rc3vdyc0y/ffprobe_audio.txt?dl=0
- pkt_dts and pkt_pts always start at 0

*2. ffprobe -i http://192.168.0.11:8090:VIDEO_CAM1.mpg -show_frames*
- https://www.dropbox.com/s/ywxgznv8xjbqozj/ffprobe_video.txt?dl=0
- pkt_dts and pkt_pts always start non-zero
==

I think that the solution is to add timestamp to the audio stream. But 
I already tried
using the "*use_wallclock_as_timestamp*" option in ffmpeg audio feed. 
Nothing happened.

Is there any other way to do this?

I am very sorry for the inconvenience. I am not much of a programmer, 
but more
of an enthusiast. I am using FFmpeg in my home for personal security 
and surveillance.


Regards,

Guillermo Martinez


Carl Eugen

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






---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] [FFMPEG] Audio/Video Syncing

2016-01-15 Thread Guillermo Martinez

Hi Carl,

Good afternoon.

Thank you very much for the reply.

On 1/13/2016 9:49 PM, Carl Eugen Hoyos wrote:

Guillermo Martinez <94dlve1izy52e5t  gmail.com> writes:

ffmpeg -y -ihttp://192.168.0.11:8090/VIDEO_CAM1.mpg  
-itsoffset 1.0 -ihttp://192.168.0.11:8090/AUDIO.mp2  
-map 0:0 -map 1:0 test.mp4

Complete, uncut console output missing.
Sorry about that. The following are console outputs from the client with 
and without the "*itsoffset*" option:

==
*1. **ffmpeg -y -i **http://192.168.0.11:8090/VIDEO_CAM1.mpg**-i 
**http://192.168.0.11:8090/AUDIO.mp2**-map 0:0 -map 0:0 -t 15 test.mp4 
2> ffmpeg_client_without_itsoffset.txt*

- without the "itsoffset" option
- 
https://www.dropbox.com/s/hfo2newv7x4o12t/ffmpeg_client_without_itsoffset.txt?dl=0


***2. **ffmpeg -y -i 
**http://192.168.0.11:8090/VIDEO_CAM1.mpg**-itsoffset 1.0 -i 
**http://192.168.0.11:8090/AUDIO.mp2**-map 0:0 -map 0:0 -t 15 test.mp4 
2> ffmpeg_client_with_itsoffset.txt*

- with the "itsoffset" option
- 
https://www.dropbox.com/s/dirfkb3yndwtjni/ffmpeg_client_with_itsoffset.txt?dl=0

==

I would also like to share my "*ffserver.conf*" and "*input ffmpeg 
commands*"

==
*1. ffserver.conf
* https://www.dropbox.com/s/cf3kgyfimq6dgcr/ffserver.conf?dl=0*
*
*2. ffmpeg input commands (to ffserver)*
https://www.dropbox.com/s/mdl5gufzuc59wmz/start.ffmpeg.sh?dl=0
==

Hope this helps in getting further insight.

Unfortunately, I suspect your http sources do not provide timestamps, 
so there is no easy solution;-( 

I see. The stream that seems to always start at *dts=0* is the audio stream.

Please refer to the following outputs of ffprobe:
==
*1. ffprobe -i http://192.168.0.11:8090:AUDIO.mp2 -show_frames*
- https://www.dropbox.com/s/xb5t88rc3vdyc0y/ffprobe_audio.txt?dl=0
- pkt_dts and pkt_pts always start at 0

*2. ffprobe -i http://192.168.0.11:8090:VIDEO_CAM1.mpg -show_frames*
- https://www.dropbox.com/s/ywxgznv8xjbqozj/ffprobe_video.txt?dl=0
- pkt_dts and pkt_pts always start non-zero
==

I think that the solution is to add timestamp to the audio stream. But I 
already tried
using the "*use_wallclock_as_timestamp*" option in ffmpeg audio feed. 
Nothing happened.

Is there any other way to do this?

I am very sorry for the inconvenience. I am not much of a programmer, 
but more
of an enthusiast. I am using FFmpeg in my home for personal security and 
surveillance.


Regards,

Guillermo Martinez


Carl Eugen

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




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user