[FFmpeg-user] How to capture an RTMP stream

2015-07-24 Thread Deron
I'm trying to record some of this stream: 
rtmp://cp258849.live.edgefcs.net/live/SonLife0616@327662


VLC will play this, so I thought it would be easy :-)

ffmpeg -i "rtmp://cp258849.live.edgefcs.net/live/SonLife0616@327662" 
-rtmp_live live test.mp4


ffmpeg version N-73907-gc169243 Copyright (c) 2000-2015 the FFmpeg 
developers

  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
  configuration: --enable-shared --enable-gpl --enable-nonfree 
--enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libvorbis 
--enable-libfaac --enable-libopenjpeg --enable-librtmp

  libavutil  54. 28.100 / 54. 28.100
  libavcodec 56. 50.101 / 56. 50.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
Closing connection: NetStream.Play.StreamNotFound
rtmp://cp258849.live.edgefcs.net/live/SonLife0616@327662: Unknown error 
occurred



Where can I learn more about how to decipher the RTMP url into parts 
that ffmpeg needs?


Thanks,

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


Re: [FFmpeg-user] How to capture an RTMP stream

2015-07-25 Thread Deron

On 7/25/15 6:02 AM, Moritz Barsnick wrote:

On Sat, Jul 25, 2015 at 11:52:56 +, Carl Eugen Hoyos wrote:

But you could test without "--enable-librtmp".

Is it possible to choose different protocol handlers at runtime, as it
is with decoders (analog to the choice of "mp3" vs. "mp3float" using
"-c:v" as inpt option)? Or does using librtmp totally disable ffmpeg's
native implementation?

(Indeed, my librtmp doesn't seem to like this URL, shown by trying with
rtmpdump. But I'm not the original poster. ;-))

Moritz



Well, my rtmpdump _does_ work. It claims to be v2.4 and I was able to 
get the stream and pipe it to ffmpeg. Inelegant, but it works. Sadly, 
the audio/video is out of sync by about 75ms. Just enough to be annoying.


What can I do to help track down the problem? Is the interest only in 
the native solution (try without librtmp) or ??


Side question: With the sync problem, I've used -itsoffset (and mapping 
of course) in the past to fix sync issues, but that obviously won't help 
if I don't have the streams split _before_ it gets to ffmpeg. Any solution?


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


Re: [FFmpeg-user] How to capture an RTMP stream

2015-07-25 Thread Deron

On 7/25/15 9:57 AM, Carl Eugen Hoyos wrote:

Deron  pagestream.org> writes:


Well, my rtmpdump _does_ work. It claims to be v2.4 and I was able to
get the stream and pipe it to ffmpeg. Inelegant, but it works. Sadly,
the audio/video is out of sync by about 75ms. Just enough to be annoying.

Does the same desync exist with FFmpeg?

Carl Eugen



I would have to get ffmpeg to work to begin with to test that. Should I 
try ffmpeg without librtmp?


It could be the stream source itself for all I know, but I would still 
need to adjust sync someplace along the food chain if so. I was just 
wondering if there was some unexplored option to adjust audio sync in 
this case within ffmpeg.


Thanks for everyone's time,

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


[FFmpeg-user] Over length file

2015-09-02 Thread Deron
I have several files that when I try and cut out a chunk of it, I get a 
file that is 100+ seconds longer than I asked for.


It appears to be related to the subtitle stream. If I generate the 
original without the subtitle stream, then I get the file segment I ask 
for. If it contains the subtitle, it get something 100+ seconds longer 
than I ask for. What could I do to correct this or determine more 
specifically what the problem is?


Deron



ffmpeg  -i "/work/disk1/HD-IFYL1081.mp4" -map 0 -ss 58.908909 -t 
1175.709106 -c:v libx264 -preset veryfast -qp 0 -ac 2 -ar 48000 -c:s 
mov_text -y "/work/disk1/HD-IFYL1081 A.mp4"


ffmpeg version N-71957-g5f2b4a2 Copyright (c) 2000-2015 the FFmpeg 
developers

  built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --enable-shared --enable-gpl --enable-nonfree 
--enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libvorbis 
--enable-libfaac --enable-libopenjpeg --enable-librtmp

  libavutil  54. 23.101 / 54. 23.101
  libavcodec 56. 37.102 / 56. 37.102
  libavformat56. 32.100 / 56. 32.100
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 16.101 /  5. 16.101
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/work/disk1/HD-IFYL1081.mp4':
  Metadata:
major_brand : isom
minor_version   : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.32.100
  Duration: 00:29:31.80, start: 0.021333, bitrate: 64906 kb/s
Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 
0x31637661), yuv422p, 1280x720 [SAR 1:1 DAR 16:9], 64775 kb/s, 59.94 
fps, 59.94 tbr, 11988 tbn, 119.88 tbc (default)

Metadata:
  handler_name: VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 
stereo, fltp, 124 kb/s (default)

Metadata:
  handler_name: SoundHandler
Stream #0:2(und): Subtitle: mov_text (tx3g / 0x67337874), 1280x720, 
0 kb/s (default)

Metadata:
  handler_name: SubtitleHandler
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0xa85e40] using SAR=1/1
[libx264 @ 0xa85e40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0xa85e40] profile High 4:4:4 Predictive, level 3.2, 4:2:2 8-bit
[libx264 @ 0xa85e40] 264 - core 146 r2538 121396c - H.264/MPEG-4 AVC 
codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - 
options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=2 
psy=0 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 
deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=48 
lookahead_threads=5 sliced_threads=0 nr=0 decimate=1 interlaced=0 
bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=250 
keyint_min=25 scenecut=40 intra_refresh=0 rc=cqp mbtree=0 qp=0

Output #0, mp4, to '/work/disk1/HD-IFYL1081 A.mp4':
  Metadata:
major_brand : isom
minor_version   : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.32.100
Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), 
yuv422p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 59.94 fps, 11988 tbn, 
59.94 tbc (default)

Metadata:
  handler_name: VideoHandler
  encoder : Lavc56.37.102 libx264
Stream #0:1(und): Audio: aac (libfaac) ([64][0][0][0] / 0x0040), 
48000 Hz, stereo, s16, 128 kb/s (default)

Metadata:
  handler_name: SoundHandler
  encoder : Lavc56.37.102 libfaac
Stream #0:2(und): Subtitle: mov_text ([8][0][0][0] / 0x0008), 
1280x720 (default)

Metadata:
  handler_name: SubtitleHandler
  encoder : Lavc56.37.102 mov_text
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> aac (libfaac))
  Stream #0:2 -> #0:2 (mov_text (native) -> mov_text (native))
Press [q] to stop, [?] for help
frame=70473 fps=258 q=-1.0 Lsize=10888940kB time=00:19:35.72 
bitrate=75869.9kbits/s
video:10868826kB audio:18364kB subtitle:22kB other streams:0kB global 
headers:0kB muxing overhead: 0.015869%

[libx264 @ 0xa85e40] frame I:356   Avg QP: 0.00  size:368826
[libx264 @ 0xa85e40] frame P:70117 Avg QP: 0.00  size:156857
[libx264 @ 0xa85e40] mb I  I16..4: 74.5%  0.0% 25.5%
[libx264 @ 0xa85e40] mb P  I16..4: 23.7%  0.0%  1.0%  P16..4: 21.4% 
3.1%  2.7%  0.0%  0.0%skip:48.1%

[libx264 @ 0xa85e40] 8x8 transform intra:0.0% inter:0.0%
[libx264 @ 0xa85e40] coded y,uvDC,uvAC intra: 77.0% 73.5% 73.4% inter: 
33.8% 32.3% 32.3%

[libx264 @ 0xa85e40] i16 v,h,dc,p: 65% 34%  0%  0%
[libx264 @ 0xa85e40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 39% 36%  3%  3% 6%  
4%  4%  3%  2%

[libx264 @ 0xa85e40] i8c dc,h,v,p: 27% 30% 44%  0%
[libx264 @ 0xa85e40] Weighted P-Frames: Y:0.5% UV:0.4%
[libx264 @ 0xa85e40] kb/s:75729.76


and now you can 

Re: [FFmpeg-user] Over length file

2015-09-06 Thread Deron

On 9/2/15 8:44 PM, Deron wrote:
I have several files that when I try and cut out a chunk of it, I get 
a file that is 100+ seconds longer than I asked for.


It appears to be related to the subtitle stream. If I generate the 
original without the subtitle stream, then I get the file segment I 
ask for. If it contains the subtitle, it get something 100+ seconds 
longer than I ask for. What could I do to correct this or determine 
more specifically what the problem is?


Deron



The problem boiled down to a subtitle entries that held for over 2 
minutes. I corrected the original srts and all is well(?)


Should ffmpeg have cut in the middle of the subtitle? Should I create a 
bug entry?


Deron

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


[FFmpeg-user] Decklink CC Output

2015-09-10 Thread Deron
Has anyone looked into adding closed caption (CEA-708) output to the 
Decklink driver? I have most of the documentation necessary, but am 
missing the SMPTE 333 (SMPTE 333M-1999) documentation needed. Otherwise, 
has anyone captured VANC data to figure out how 708 gets put into the 
VANC data for output?


Thanks,

Deron

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


Re: [FFmpeg-user] Decklink input buffer overrun

2015-09-23 Thread Deron

On 9/23/15 1:47 PM, Flávio Pontes wrote:

Hi,

I need to stream the 2 inputs from a DeckLink Duo card in FHD.
So far I could compile ffmpeg with decklink support and capture one input
at a time without problems.

When I try to capture from the 2 inputs I start getting the following
message repeatedly on both terminals:
[decklink @ 0x32287e0] Decklink input buffer overrun!

I use these commands in the terminals:

/opt/ffmpeg_build/bin/ffmpeg -f decklink -re -i 'DeckLink SDI (1)@7' -g 90
-s hd1080 -profile:v baseline -pix_fmt yuv420p -preset veryfast -c:v
libx264 -b:v 2000k -bufsize 1400k -minrate 2000k -maxrate 2000k -c:a
libfdk_aac -b:a 96k -threads 4 -f flv rtmp://10.12.20.62/myapp/tvines

/opt/ffmpeg_build/bin/ffmpeg -f decklink -re -i 'DeckLink SDI (2)@7' -g 90
-s hd1080 -profile:v baseline -pix_fmt yuv420p -preset veryfast -c:v
libx264 -b:v 2000k -bufsize 1400k -minrate 2000k -maxrate 2000k -c:a
libfdk_aac -b:a 96k -threads 4 -f flv rtmp://10.12.20.62/myapp/tvescola

I tried many combinations but couldn't get it to work.
I wonder if the input buffer is shared between the 2 inputs.
Is there any way to set an input buffer size independently for each command?

Thx in advance!
Flávio.




My first thought was you are simply not keeping up. Are you positive 
your computer can process these two streams at the same time?


I've not tried to capture from a Duo, but I've captured two streams 
simultaneously from a Quad using other software. Since you are running 
two independent copies of ffmpeg, I don't think there is a shared 
internal buffer to increase. Hopefully you will get some more useful 
advice from others.


Deron


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


Re: [FFmpeg-user] Export Subtitles live from HD-SDI

2015-10-07 Thread Deron

On 10/7/15 7:05 AM, florian.he...@rbb-online.de wrote:

Hello everyone,

i'm working on a project where we want to livestream one TV-Program with
MPEG-DASH. There for we need seperate subtitles. The encoder gets the
signal over HD-SDI wich supports embedded subtitles in Teletext with SMPTE
2031.
Our capturecard will be a Blackmagic Decklink Duo wich supports VANC-Data.


I know that ffmpeg can extract closed captions from files. But what about
Livesignals like from SDI-Signals?
Thank you,
Florian



I am currently trying to get the decklink card to output CEA-708 closed 
captioning, so I can tell you a little about what I know so far. The 
current driver does not support capture or playback of VANC/closed 
captioning. The capture does support 10bit as I recall, which is the 
first thing you would need just to be able to capture the VANC. I don't 
know anything about SMPTE 2031, but at the very least you would need to 
ask for the correct DID/SDID for SMPTE 2013 and then place that data in 
a Teletext stream. That would require a patch to the current ffmpeg.


When/if I get this output to work, I would certainly be willing to try 
my hand at creating a patch for this. I wish someone out there had a 
decklink card that could capture live tv in North America. Having some 
real world data to look at would make creating the CEA 708 output easier...


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


Re: [FFmpeg-user] Export Subtitles live from HD-SDI

2015-10-08 Thread Deron

On 10/7/15 1:40 PM, Florian Hesse wrote:

Are you sure its a problem by the driver? The Blackmagic productpage
says VANC is supported and as far as i know they developed the drivers?
There just seems to be a problem with some lines below the SDI switching
points https://forum.blackmagicdesign.com/viewtopic.php?f=12&t=32029
Do you know if it works with dectek-cards and drivers?


I'm not sure if you are asking me or someone else, but I'll do my best 
to answer.


VANC is just a means by which Ancillary data can be sent in a SDI 
stream. That data can be all kinds of things, including audio, closed 
captioning, camera control, or private data between devices. The 
Blackmagik Decklink drivers support the capture and play of this data.


The ffmpeg decklink driver sends no VANC data, makes no connections to a 
subtitle stream, and does not support 10bit YUV which using the VANC 
requires. It is not really a "problem", in that support has never been 
added. Not a bug, but a design choice.


The choice of outgoing VANC lines for CC does not mater much. It only 
maters if you are capturing VANC and some other device is putting it on 
one of those lines mentioned in your link in which case it sounds like 
you would need the Decklink Extreme card. Do you know what line your 
device is putting the VANC on?


Deron

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


[FFmpeg-user] Best way to stream to remote server

2015-11-03 Thread Deron
I'm outputting HLS (with a couple different bit rates) to a local drive 
for viewing. However, now I need to move it to a remote server with more 
bandwidth (but less processing power). I know I can use ftp from within 
ffmpeg to save to the remote network drive, and I could also use sshfs 
to do it (and would prefer something a bit more secure anyway) but I'm 
wondering if anyone has recommendation on most efficient way. Can sshfs 
keep up (yes, the bandwidth is not a problem), does ftp cause problems?


Thanks for any thoughts,

Deron

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


[FFmpeg-user] Loosing "sync" between HLS streams

2016-01-10 Thread Deron
I'm using ffmpeg to generate an HLS stream from a tv tuner capture card, 
and while it generates the sub-streams nicely, it seems that the two 
streams get out of sync pretty quickly for some stations. What I mean by 
that is the segments numbers (and the EXT-X-MEDIA-SEQUENCE) differ. When 
the iPhone decides to switch from one to the other, it will "hang" for 
several seconds before resuming. It seems (hard to reproduce because it 
almost always gets out of sync) shows that it doesn't do that when the 
EXT-X-MEDIA-SEQUENCE is the same between the sub-streams.


The test command is:

ffmpeg -f lavfi -i 
movie=/dev/dvb/adapter3/dvr0:f=mpegts:s=dv+da[out0+subcc][out1] 
-force_key_frames expr:gte(t,n_forced*2) -c:v libx264 -vprofile baseline 
-vf scale=1280:720 -s 1280x720 -aspect 1280:720 -pix_fmt yuv420p -r 30 
-preset veryfast -b:v 1200k -c:a libfaac -ar 48000 -ac 2 -async 2 -af 
volume=volume=11dB -flags:a -global_header -f hls -hls_time 2 
-hls_list_size 10 -hls_wrap 2 -hls_flags delete_segments 
-hls_segment_filename /var/www/html/stream/wfgc/v.mid.%d.ts -y 
/var/www/html/stream/wfgc/v.mid.m3u8 -force_key_frames 
expr:gte(t,n_forced*2) -c:v libx264 -vprofile baseline -vf scale=640:360 
-s 640x360 -aspect 640:360 -pix_fmt yuv420p -r 30 -preset veryfast -b:v 
200k -c:a libfaac -b:a 50k -ar 24000 -ac 1 -async 2 -af 
volume=volume=11dB -flags:a -global_header -f hls -hls_time 2 
-hls_list_size 10 -hls_wrap 2000 -hls_flags delete_segments 
-hls_segment_filename /var/www/html/stream/wfgc/v.portrait.%d.ts -y 
/var/www/html/stream/wfgc/v.portrait.m3u8


I can provide console output, but I've not seen anything useful after 
piles of output.


I'm guessing that chopping into 2 second segments, then passing to be 
scale/encode in two sub-streams (instead of two sub-streams chopping 
into 2 second segments) would solve the problem but I don't know of any 
way to do that except write an libav* app?


Any suggestions?

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


Re: [FFmpeg-user] Loosing "sync" between HLS streams

2016-02-13 Thread Deron

On 1/10/16 4:29 PM, Deron wrote:
I'm using ffmpeg to generate an HLS stream from a tv tuner capture 
card, and while it generates the sub-streams nicely, it seems that the 
two streams get out of sync pretty quickly for some stations. What I 
mean by that is the segments numbers (and the EXT-X-MEDIA-SEQUENCE) 
differ. When the iPhone decides to switch from one to the other, it 
will "hang" for several seconds before resuming.


The test command is:

ffmpeg -f lavfi -i 
movie=/dev/dvb/adapter3/dvr0:f=mpegts:s=dv+da[out0+subcc][out1] 
-force_key_frames expr:gte(t,n_forced*2) -c:v libx264 -vprofile 
baseline -vf scale=1280:720 -s 1280x720 -aspect 1280:720 -pix_fmt 
yuv420p -r 30 -preset veryfast -b:v 1200k -c:a libfaac -ar 48000 -ac 2 
-async 2 -af volume=volume=11dB -flags:a -global_header -f hls 
-hls_time 2 -hls_list_size 10 -hls_wrap 2 -hls_flags 
delete_segments -hls_segment_filename 
/var/www/html/stream/wfgc/v.mid.%d.ts -y 
/var/www/html/stream/wfgc/v.mid.m3u8 -force_key_frames 
expr:gte(t,n_forced*2) -c:v libx264 -vprofile baseline -vf 
scale=640:360 -s 640x360 -aspect 640:360 -pix_fmt yuv420p -r 30 
-preset veryfast -b:v 200k -c:a libfaac -b:a 50k -ar 24000 -ac 1 
-async 2 -af volume=volume=11dB -flags:a -global_header -f hls 
-hls_time 2 -hls_list_size 10 -hls_wrap 2000 -hls_flags 
delete_segments -hls_segment_filename 
/var/www/html/stream/wfgc/v.portrait.%d.ts -y 
/var/www/html/stream/wfgc/v.portrait.m3u8


I can provide console output, but I've not seen anything useful after 
piles of output.


I'm guessing that chopping into 2 second segments, then passing to be 
scale/encode in two sub-streams (instead of two sub-streams chopping 
into 2 second segments) would solve the problem but I don't know of 
any way to do that except write an libav* app?


Any suggestions?

Deron


No replies, so maybe I can ask a more specific question that someone has 
an answer for.


Right now, I presume the above command does something like this (and 
that force_key_frames is for some reason choosing different places 
between the two process paths)


input stream --->  [force_key_frames] [scale] etc [segment] -> output1
 |-->  [force_key_frames] [scale] etc [segment] -> output2

Is there some way to cause this instead:

input stream [force_key_frames] ---> [scale] etc [segment] -> output1
|--> [scale] etc [segment] -> output2

Or better yet:

input stream [force_key_frames] [segment] ---> [scale] etc -> output1
      |--> [scale] etc -> output2

?

Thanks!

Deron

--
Happy Trails,
Deron Kazmaier   de...@dogstarkennel.com
KD0AYO  Western South Dakota
Dog Star Kennel http://www.dogstarkennel.com
--- Racing AKC Sepp-Star Seppala Siberian Husky Sled Dogs

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


[FFmpeg-user] How to put SCTE-35 markers in a video

2016-10-28 Thread Deron

Hello,
I see the latest patches for SCTE-35 insertion into HLS (even if the 
important parts are not applied yet), but how do I actually generate an 
mpegts with SCTE-35 markers?


Thanks,

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

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

[FFmpeg-user] Need info on ATSC3 stream capture going wrong

2019-04-14 Thread Deron
Hello, this is a really strange one for me that is way outside my 
understanding. I've been using ffmpeg to stream tv shows and I've run 
across a TV station I can not capture! The symptoms are after 12:55 or 
so minutes the audio goes silent in the output, and shortly after that 
ffmpeg quits. This works with some 40 other tv channels!


I had to bump up the loglevel to 90(!) to see something that might 
explain this. Obviously 13 minutes of loglevel 90 is a huge amount of 
output, so I'm hoping I have identified the important part and make it 
obviously enough that someone might have some guidance on what is wrong. 
What appears to happen is some audio timestamp drift error is noticed, 
compensation is applied that perhaps has a math sign error, a whole lot 
of silence is inserted, the incoming data is ignored because of that 
silence, and the input buffer is overflowed.


Happy to provide complete uncut console data, but it is 50mb! Hopefully 
this is enough that someone can guide me to a solution!


Thanks,

Deron


Command (without proper shell quoting because it is not issued from the 
shell):


ffmpeg -loglevel 90 -f lavfi -i 
movie=/dev/dvb/adapter0/dvr0:f=mpegts:s=dv+da[out0+subcc][out1] 
-force_key_frames expr:gte(t,n_forced*2) -c:v libx264 -profile:v high 
-level:v 4.0 -vf scale=1280:720 -s 1280x720 -aspect 1280:720 -pix_fmt 
yuv420p -r 30 -preset veryfast -b:v 1200k -c:a libfdk_aac -cutoff 18000 
-b:a 128k -ar 48000 -ac 2 -async 2 -flags:a -global_header -af 
volume=volume=10.000dB:precision=float -f hls -hls_time 2 -hls_list_size 
10 -hls_wrap 99 -hls_flags delete_segments -hls_segment_filename 
/var/www/html/stream/v.mid.%06d.ts -y /var/www/html/stream/v.mid.m3u8 
-sn -force_key_frames expr:gte(t,n_forced*2) -c:v libx264 -profile:v 
high -level:v 4.0 -vf scale=640:360 -s 640x360 -aspect 640:360 -pix_fmt 
yuv420p -r 30 -preset veryfast -b:v 200k -c:a libfdk_aac -profile:a 
aac_he -cutoff 18000 -b:a 96k -ar 44100 -ac 1 -flags:a -global_header 
-af volume=volume=10.000dB:precision=float -f hls -hls_time 2 
-hls_list_size 10 -hls_wrap 99 -hls_flags delete_segments 
-hls_segment_filename /var/www/html/stream/v.portrait.%06d.ts -y 
/var/www/html/stream/v.portrait.m3u8 -sn -vn -c:a libfdk_aac -profile:a 
aac_he -cutoff 18000 -b:a 96k -ar 44100 -ac 2 -flags:a -global_header 
-af volume=volume=10.000dB:precision=float -f hls -hls_time 2 
-hls_list_size 10 -hls_wrap 99 -hls_flags delete_segments 
-hls_segment_filename /var/www/html/stream/a.hi.%06d.ts -y 
/var/www/html/stream/a.hi.m3u8 -sn -vn -c:a libfdk_aac -profile:a aac_he 
-cutoff 18000 -b:a 60k -ar 32000 -ac 1 -flags:a -global_header -af 
volume=volume=10.000dB:precision=float -f hls -hls_time 2 -hls_list_size 
10 -hls_wrap 99 -hls_flags delete_segments -hls_segment_filename 
/var/www/html/stream/a.low.%06d.ts -y /var/www/html/stream/a.low.m3u8 
-vf scale=426:240 -s 426x240 -aspect 426:240 -f image2 -vf fps=fps=2 -y 
/var/www/html/stream/t.%06d.jpg -vn -map a:0 -c:a pcm_s16le -ar 48000 
-ac 2 -f stream_segment -segment_time 2 -segment_format s16le -y 
/var/www/html/stream/a.loudness.%06d.pcm



ffmpeg version N-93562-g3e10223385 Copyright (c) 2000-2019 the FFmpeg 
developers

  built with gcc 7 (Ubuntu 7.2.0-8ubuntu3)
  configuration: --enable-shared --enable-gpl --enable-nonfree 
--enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libvorbis 
--enable-libfdk-aac --disable-stripping

  libavutil  56. 26.100 / 56. 26.100
  libavcodec 58. 50.100 / 58. 50.100
  libavformat    58. 27.102 / 58. 27.102
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter 7. 48.100 /  7. 48.100
  libswscale  5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100

< ... snip ...>

[graph_1_aresample_in_0_1 @ 0x56452dc9ad00] [SWR @ 0x56452dc9b600] 
compensating audio timestamp drift:-0.001021 compensation:-2 in:48000
[graph_1_aresample_in_0_1 @ 0x56452dc9ad00] [SWR @ 0x56452dc9b600] Using 
fltp internally between filters
[graph_3_aresample_in_0_1 @ 0x56452dc5e480] [SWR @ 0x56452ddb9600] 
compensating audio timestamp drift:-0.001021 compensation:-2 in:48000
[graph_3_aresample_in_0_1 @ 0x56452dc5e480] [SWR @ 0x56452ddb9600] Using 
fltp internally between filters
[graph_4_aresample_in_0_1 @ 0x56452dda0380] [SWR @ 0x56452dda1080] 
compensating audio timestamp drift:-0.001021 compensation:-2 in:48000
[graph_4_aresample_in_0_1 @ 0x56452dda0380] [SWR @ 0x56452dda1080] Using 
fltp internally between filters
[graph_5_aresample_in_0_1 @ 0x56452f0c9200] [SWR @ 0x56452f0c9c40] 
compensating audio timestamp drift:-0.001021 compensation:-2 in:48000
[graph_5_aresample_in_0_1 @ 0x56452f0c9200] [SWR @ 0x56452f0c9c40] Using 
fltp internally between filters
[graph_7_aresample_in_0_1 @ 0x56452f18a740] [SWR @ 0x56452f18b180] 
compensating audio timestamp drift:-0.001021 compensation:-2 in:48000
[graph_7_aresample_in_0_1 @ 0x56452f18a740] [SWR @ 0x56452f18b180] Using 
fltp inter

Re: [FFmpeg-user] Need info on ATSC3 stream capture going wrong

2019-04-17 Thread Deron

On 4/14/19 10:42 AM, Carl Zwanzig wrote:

On 4/14/2019 7:14 AM, Deron wrote:
What appears to happen is some audio timestamp drift error is 
noticed, compensation is applied that perhaps has a math sign error, 
a whole lot of silence is inserted, the incoming data is ignored 
because of that silence, and the input buffer is overflowed.


I wonder, and this is just a WAG, if that stream has enough 
uncorrected bit errors spread around that the demux/decoder can't 
figure out where the data blocks start and then picks a likely spot 
that's wrong. Can you pick out the error stats for different channels 
and compare them?


z! 


Could errors in the data stream produce such repeatable results?

I don't know how accurate azap's status is, but I see no uncorrected 
blocks and reported signal strength is perfect.


status 1f | signal  | snr 0130 | ber  | unc  | 
FE_HAS_LOCK
status 1f | signal  | snr 012a | ber  | unc  | 
FE_HAS_LOCK
status 1f | signal  | snr 012a | ber  | unc  | 
FE_HAS_LOCK


Here is some other station's output that do not suffer this problem.

status 1f | signal  | snr 0143 | ber  | unc  | 
FE_HAS_LOCK
status 1f | signal  | snr 0143 | ber  | unc  | 
FE_HAS_LOCK
status 1f | signal  | snr 0147 | ber  | unc  | 
FE_HAS_LOCK




status 1f | signal eb84 | snr 00e3 | ber  | unc  | 
FE_HAS_LOCK
status 1f | signal eb84 | snr 00e8 | ber  | unc  | 
FE_HAS_LOCK
status 1f | signal eb84 | snr 00e8 | ber  | unc  | 
FE_HAS_LOCK




status 1f | signal  | snr 0140 | ber  | unc  | 
FE_HAS_LOCK
status 1f | signal  | snr 0140 | ber  | unc  | 
FE_HAS_LOCK
status 1f | signal  | snr 0140 | ber  | unc  | 
FE_HAS_LOCK


...

status 1f | signal  | snr 0117 | ber  | unc  | 
FE_HAS_LOCK
status 1f | signal  | snr 0116 | ber  | unc  | 
FE_HAS_LOCK
status 1f | signal  | snr 0119 | ber  | unc  | 
FE_HAS_LOCK


Thanks for your WAG. Anyone with another?

Deron

___
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] Need info on ATSC3 stream capture going wrong

2019-04-18 Thread Deron
Hello, this is a really strange one for me that is way outside my 
understanding. I've been using ffmpeg to stream tv shows and I've run 
across a TV station I can not capture! The symptoms are after 12:55 or 
so minutes the audio goes silent in the output, and shortly after that 
ffmpeg quits. This works with some 40 other tv channels!




I've managed to narrow down my problem to -async. Put simply, these 
commands work:


   ffmpeg -i "/dev/dvb/adapter5/dvr0" -y out.ts

   ffmpeg -i "/dev/dvb/adapter5/dvr0" -async 1 -y out.ts

and this does not:

   ffmpeg -i "/dev/dvb/adapter5/dvr0" -async 2000 -y out.ts

And I get similar output from my previous report:

[graph_1_aresample_in_0_0 @ 0x563ce00fa0c0] [SWR @ 0x563ce063a8c0] 
compensating audio timestamp drift:-0.001021 compensation:-49 in:48000
[graph_1_aresample_in_0_0 @ 0x563ce00fa0c0] [SWR @ 0x563ce063a8c0] Using 
fltp internally between filters
[graph_1_aresample_in_0_0 @ 0x563ce00fa0c0] [SWR @ 0x563ce063a8c0] 
adding 16384 audio samples of silence
[graph_1_aresample_in_0_0 @ 0x563ce00fa0c0] [SWR @ 0x563ce063a8c0] 
adding 15312 audio samples of silence

/dev/dvb/adapter5/dvr0: Value too large for defined data type
[out_0_1 @ 0x563ce00f9d40] EOF on sink link out_0_1:default.
/dev/dvb/adapter5/dvr0: Value too large for defined data type
[out_0_0 @ 0x563ce05928c0] EOF on sink link out_0_0:default.
No more output streams to write to, finishing.

Looking for some ideas on the nature of my problem. The log output that 
talks about "compensating audio timestamp drift" clearly gets it -49 
value as number of samples needed to compensate for the drift (-.001021 
seconds * 48000 samples/second = -49 samples). So why does it try to add 
16384 + 15312 samples? Is that it can only compensate in a positive 
direction (it should be dropping 49 samples not inserting 49)?


Thanks for any help,

Deron


___
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] How to generate h.264 raw data

2014-09-25 Thread Deron
Is it possible to output just raw h.264 data? Better yet, both AnnexB 
and AVCC? Or is there a simple muxer that I can use that won't be so 
hard to look through to see the h.264?


I tried

ffmpeg -i "test.avi" -c:v libx264 -bsf h264_mp4toannexb -f h264 -an -y 
"test.h264"


But the data it generated did not look correct, as far as I understand 
it (which is what I am trying to learn, so my understanding is very 
limited!).


Thanks,
Deron

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


Re: [FFmpeg-user] How to generate h.264 raw data

2014-09-25 Thread Deron

On 9/25/14 10:39 AM, Carl Eugen Hoyos wrote:

Deron  pagestream.org> writes:


I tried

ffmpeg -i "test.avi" -c:v libx264 -bsf h264_mp4toannexb
-f h264 -an -y "test.h264"

Why did you add h264_mp4toannexb?
Did you try without?

(Note that you do not have to specify -an, -f h264 and
-vcodec libx264 if your output filename ends on ".h264".)

Carl Eugen




As you might expect, I tried lots of different options. Looking at the 
output again, it looks like my problem is interpreting the hex dump. It 
appears that it put it into 16 bit intel words which is why nothing 
looked right.


 0100 6467 etc instead of

00 00 00 01 67 64

Which makes a whole lot more sense to me. Sorry for the noise, and thanks!

Last question, is it possible to dump avcc/mp4 stream? The opposite of 
h264_mp4toannexb?


Deron

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


[FFmpeg-user] Multithreaded multioutput problem

2015-01-23 Thread Deron
I would like to generate 4 different HLS (sub)streams from a single DVB 
capture, but ffmpeg fails to keep up with more than 2. Yes, I have the 
CPU power and I'm writing to a ram disk (or SSD, doesn't matter). I have 
a dual tuner capture card and can generate two different HLS substreams 
per tuner (total of 4) with plenty of CPU left to burn.


I would guess it is some kind of thread limit but I can't seem to get 
past it. Any suggestions? Below is an example command and output. If I 
cut out one of the outputs, it works fine.


Thanks for your suggestions!

Deron

ffmpeg -f mpegts -i /dev/dvb/adapter0/dvr0 -c:v libx264 -vf 
scale=1280:720 -s 1280x720 -aspect 1280:720 -pix_fmt yuv420p -r 29.97 
-preset veryfast -b:v 2400k -c:a libfaac -ar 48000 -ac 2 -async 2 -f hls 
-hls_time 2 -hls_list_size 10 -hls_wrap 20 -y 
"/var/www/html/stream/WPBF/wpbf.hi.m3u8" -c:v libx264 -vf scale=1280:720 
-s 1280x720 -aspect 1280:720 -pix_fmt yuv420p -r 29.97 -preset veryfast 
-b:v 1200k -c:a libfaac -ar 48000 -ac 2 -async 2 -f hls -hls_time 2 
-hls_list_size 10 -hls_wrap 20 -y 
"/var/www/html/stream/WPBF/wpbf.mid.m3u8" -c:v libx264 -vf 
scale=1280:720 -s 1280x720 -aspect 1280:720 -pix_fmt yuv420p -r 29.97 
-preset veryfast -b:v 600k -c:a libfaac -ar 48000 -ac 2 -async 2 -f hls 
-hls_time 2 -hls_list_size 10 -hls_wrap 20 -y 
"/var/www/html/stream/WPBF/wpbf.low.m3u8" -vn -c:a libfaac -b:a 30k -ar 
24000 -ac 1  -f hls -hls_time 2 -hls_list_size 10 -hls_wrap 20 -y 
"/var/www/html/stream/WPBF/wpbf.a.m3u8"



ffmpeg version N-69206-g4b46ce8 Copyright (c) 2000-2015 the FFmpeg 
developers

  built on Jan 22 2015 18:39:59 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --enable-shared --enable-gpl --enable-nonfree 
--enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libvorbis 
--enable-libfaac --enable-libopenjpeg

  libavutil  54. 17.100 / 54. 17.100
  libavcodec 56. 20.100 / 56. 20.100
  libavformat56. 19.100 / 56. 19.100
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5.  8.101 /  5.  8.101
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  3.100 / 53.  3.100
[mpeg2video @ 0x1c430a0] Invalid frame dimensions 0x0.
Input #0, mpegts, from '/dev/dvb/adapter0/dvr0':
  Duration: N/A, start: 94543.371178, bitrate: N/A
Stream #0:0[0x31]: Video: mpeg2video (Main), yuv420p(tv), 1920x1080 
[SAR 1:1 DAR 16:9], max. 24000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 
59.94 tbc

Stream #0:1[0x34]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
-async is forwarded to lavfi similarly to -af 
aresample=async=2:min_hard_comp=0.10:first_pts=0.

Last message repeated 3 times
[libx264 @ 0x1db48a0] using SAR=1/1
[libx264 @ 0x1db48a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x1db48a0] profile High, level 3.1
[libx264 @ 0x1c4b780] using SAR=1/1
[libx264 @ 0x1c4b780] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x1c4b780] profile High, level 3.1
[libx264 @ 0x1c4f400] using SAR=1/1
[libx264 @ 0x1c4f400] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x1c4f400] profile High, level 3.1
Output #0, hls, to '/var/www/html/stream/WPBF/wpbf.hi.m3u8':
  Metadata:
encoder : Lavf56.19.100
Stream #0:0: Video: h264 (libx264), yuv420p, 1280x720 [SAR 1:1 DAR 
16:9], q=-1--1, 2400 kb/s, 29.97 fps, 90k tbn, 29.97 tbc

Metadata:
  encoder : Lavc56.20.100 libx264
Stream #0:1: Audio: aac (libfaac), 48000 Hz, stereo, s16, 128 kb/s
Metadata:
  encoder : Lavc56.20.100 libfaac
Output #1, hls, to '/var/www/html/stream/WPBF/wpbf.mid.m3u8':
  Metadata:
encoder : Lavf56.19.100
Stream #1:0: Video: h264 (libx264), yuv420p, 1280x720 [SAR 1:1 DAR 
16:9], q=-1--1, 1200 kb/s, 29.97 fps, 90k tbn, 29.97 tbc

Metadata:
  encoder : Lavc56.20.100 libx264
Stream #1:1: Audio: aac (libfaac), 48000 Hz, stereo, s16, 128 kb/s
Metadata:
  encoder : Lavc56.20.100 libfaac
Output #2, hls, to '/var/www/html/stream/WPBF/wpbf.low.m3u8':
  Metadata:
encoder : Lavf56.19.100
Stream #2:0: Video: h264 (libx264), yuv420p, 1280x720 [SAR 1:1 DAR 
16:9], q=-1--1, 600 kb/s, 29.97 fps, 90k tbn, 29.97 tbc

Metadata:
  encoder : Lavc56.20.100 libx264
Stream #2:1: Audio: aac (libfaac), 48000 Hz, stereo, s16, 128 kb/s
Metadata:
  encoder : Lavc56.20.100 libfaac
Output #3, hls, to '/var/www/html/stream/WPBF/wpbf.a.m3u8':
  Metadata:
encoder : Lavf56.19.100
Stream #3:0: Audio: aac (libfaac), 24000 Hz, mono, s16, 30 kb/s
Metadata:
  encoder : Lavc56.20.100 libfaac
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (ac3 (native) -> aac (libfaac))
  Stream #0:0 -> #1:0 (mpeg2video (native) -> h264 (

Re: [FFmpeg-user] Multithreaded multioutput problem

2015-01-23 Thread Deron

On 1/23/15 9:28 AM, Deron wrote:
I would like to generate 4 different HLS (sub)streams from a single 
DVB capture, but ffmpeg fails to keep up with more than 2. Yes, I have 
the CPU power and I'm writing to a ram disk (or SSD, doesn't matter). 
I have a dual tuner capture card and can generate two different HLS 
substreams per tuner (total of 4) with plenty of CPU left to burn.


I would guess it is some kind of thread limit but I can't seem to get 
past it. Any suggestions? Below is an example command and output. If I 
cut out one of the outputs, it works fine.


Thanks for your suggestions!

Deron



Reading this, I obviously did not make the problem very clear.

I am trying to do this (simplified):

ffmpeg -i "/dev/dvb/adapter0/dvr0" -b:v 2400k "hi.m3u8" -b:v 1200k 
"med.m3u8" -b:v 600k "low.m3u8" -vn "audio.m3u8"


And it fails with: /dev/dvb/adapter0/dvr0: Value too large for defined 
data type


But if I remove any 2 outputs like:

ffmpeg -i "/dev/dvb/adapter0/dvr0" -b:v 2400k "hi.m3u8" -vn "audio.m3u8"

It works. I can see fps is very close (not sure if it is a because of 
HLS working in "real time" or some thread limitation), but cpu usage is 
very light.


Since I have 2 adapters, I can actually run

ffmpeg -i "/dev/dvb/adapter0/dvr0" -b:v 2400k "hi.m3u8" -b:v 1200k 
"med.m3u8"

ffmpeg -i "/dev/dvb/adapter1/dvr0" -b:v 600k "low.m3u8" -vn "audio.m3u8"

And that runs fine (again with light cpu usage). Obviously a threading 
issue. What can I do to fix this?


Thanks,

Deron



ffmpeg -f mpegts -i /dev/dvb/adapter0/dvr0 -c:v libx264 -vf 
scale=1280:720 -s 1280x720 -aspect 1280:720 -pix_fmt yuv420p -r 29.97 
-preset veryfast -b:v 2400k -c:a libfaac -ar 48000 -ac 2 -async 2 -f 
hls -hls_time 2 -hls_list_size 10 -hls_wrap 20 -y 
"/var/www/html/stream/WPBF/wpbf.hi.m3u8" -c:v libx264 -vf 
scale=1280:720 -s 1280x720 -aspect 1280:720 -pix_fmt yuv420p -r 29.97 
-preset veryfast -b:v 1200k -c:a libfaac -ar 48000 -ac 2 -async 2 -f 
hls -hls_time 2 -hls_list_size 10 -hls_wrap 20 -y 
"/var/www/html/stream/WPBF/wpbf.mid.m3u8" -c:v libx264 -vf 
scale=1280:720 -s 1280x720 -aspect 1280:720 -pix_fmt yuv420p -r 29.97 
-preset veryfast -b:v 600k -c:a libfaac -ar 48000 -ac 2 -async 2 -f 
hls -hls_time 2 -hls_list_size 10 -hls_wrap 20 -y 
"/var/www/html/stream/WPBF/wpbf.low.m3u8" -vn -c:a libfaac -b:a 30k 
-ar 24000 -ac 1  -f hls -hls_time 2 -hls_list_size 10 -hls_wrap 20 -y 
"/var/www/html/stream/WPBF/wpbf.a.m3u8"



ffmpeg version N-69206-g4b46ce8 Copyright (c) 2000-2015 the FFmpeg 
developers

  built on Jan 22 2015 18:39:59 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --enable-shared --enable-gpl --enable-nonfree 
--enable-libxvid --enable-libx264 --enable-libmp3lame 
--enable-libvorbis --enable-libfaac --enable-libopenjpeg

  libavutil  54. 17.100 / 54. 17.100
  libavcodec 56. 20.100 / 56. 20.100
  libavformat56. 19.100 / 56. 19.100
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5.  8.101 /  5.  8.101
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  3.100 / 53.  3.100
[mpeg2video @ 0x1c430a0] Invalid frame dimensions 0x0.
Input #0, mpegts, from '/dev/dvb/adapter0/dvr0':
  Duration: N/A, start: 94543.371178, bitrate: N/A
Stream #0:0[0x31]: Video: mpeg2video (Main), yuv420p(tv), 
1920x1080 [SAR 1:1 DAR 16:9], max. 24000 kb/s, 29.97 fps, 29.97 tbr, 
90k tbn, 59.94 tbc

Stream #0:1[0x34]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
-async is forwarded to lavfi similarly to -af 
aresample=async=2:min_hard_comp=0.10:first_pts=0.

Last message repeated 3 times
[libx264 @ 0x1db48a0] using SAR=1/1
[libx264 @ 0x1db48a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 
SSE4.2 AVX

[libx264 @ 0x1db48a0] profile High, level 3.1
[libx264 @ 0x1c4b780] using SAR=1/1
[libx264 @ 0x1c4b780] using cpu capabilities: MMX2 SSE2Fast SSSE3 
SSE4.2 AVX

[libx264 @ 0x1c4b780] profile High, level 3.1
[libx264 @ 0x1c4f400] using SAR=1/1
[libx264 @ 0x1c4f400] using cpu capabilities: MMX2 SSE2Fast SSSE3 
SSE4.2 AVX

[libx264 @ 0x1c4f400] profile High, level 3.1
Output #0, hls, to '/var/www/html/stream/WPBF/wpbf.hi.m3u8':
  Metadata:
encoder : Lavf56.19.100
Stream #0:0: Video: h264 (libx264), yuv420p, 1280x720 [SAR 1:1 DAR 
16:9], q=-1--1, 2400 kb/s, 29.97 fps, 90k tbn, 29.97 tbc

Metadata:
  encoder : Lavc56.20.100 libx264
Stream #0:1: Audio: aac (libfaac), 48000 Hz, stereo, s16, 128 kb/s
Metadata:
  encoder : Lavc56.20.100 libfaac
Output #1, hls, to '/var/www/html/stream/WPBF/wpbf.mid.m3u8':
  Metadata:
encoder : Lavf56.19.100
Stream #1:0: Video: h264 (libx264), yuv420p, 1280x720 [SAR 1:1 DAR 
16:9], q=-1--1, 1200 kb/s, 29.97 fps, 90k tbn, 

Re: [FFmpeg-user] Multithreaded multioutput problem

2015-01-25 Thread Deron

On 1/23/15 2:30 PM, Deron wrote:

On 1/23/15 9:28 AM, Deron wrote:
I would like to generate 4 different HLS (sub)streams from a single 
DVB capture, but ffmpeg fails to keep up with more than 2. Yes, I 
have the CPU power and I'm writing to a ram disk (or SSD, doesn't 
matter). I have a dual tuner capture card and can generate two 
different HLS substreams per tuner (total of 4) with plenty of CPU 
left to burn.


I would guess it is some kind of thread limit but I can't seem to get 
past it. Any suggestions? Below is an example command and output. If 
I cut out one of the outputs, it works fine.


Thanks for your suggestions!

Deron



Reading this, I obviously did not make the problem very clear.

I am trying to do this (simplified):

ffmpeg -i "/dev/dvb/adapter0/dvr0" -b:v 2400k "hi.m3u8" -b:v 1200k 
"med.m3u8" -b:v 600k "low.m3u8" -vn "audio.m3u8"


And it fails with: /dev/dvb/adapter0/dvr0: Value too large for defined 
data type


But if I remove any 2 outputs like:

ffmpeg -i "/dev/dvb/adapter0/dvr0" -b:v 2400k "hi.m3u8" -vn "audio.m3u8"

It works. I can see fps is very close (not sure if it is a because of 
HLS working in "real time" or some thread limitation), but cpu usage 
is very light.


Since I have 2 adapters, I can actually run

ffmpeg -i "/dev/dvb/adapter0/dvr0" -b:v 2400k "hi.m3u8" -b:v 1200k 
"med.m3u8"

ffmpeg -i "/dev/dvb/adapter1/dvr0" -b:v 600k "low.m3u8" -vn "audio.m3u8"

And that runs fine (again with light cpu usage). Obviously a threading 
issue. What can I do to fix this?


To further complicate maters, I tried copying 10 minutes of data to a 
file using:


cp /dev/dvb/adapter0/dvr0 data.ts

and then

ffmpeg -i data.ts -b:v 2400k "hi.m3u8" -b:v 1200k "med.m3u8" -b:v 600k 
"low.m3u8" -vn "audio.m3u8"


Which works. In fact, I can run 8 copies of this at the same time and it 
still runs faster than real time on this computer.


where

ffmpeg -i "/dev/dvb/adapter0/dvr0" -b:v 2400k "hi.m3u8" -b:v 1200k 
"med.m3u8" -b:v 600k "low.m3u8" -vn "audio.m3u8"


and

ffmpeg -i "/dev/dvb/adapter0/dvr0" -b:v 2400k "hi.m3u8" -b:v 1200k 
"med.m3u8"


Fails as above (and below) with: /dev/dvb/adapter0/dvr0: Value too large 
for defined data type


and

ffmpeg -i "/dev/dvb/adapter0/dvr0" -b:v 2400k "hi.m3u8" -vn "audio.m3u8"

Works.

Does anyone have an idea on what could be causing this grief? What is 
kicking out this message? Could it be simply that ffmpeg can't get going 
fast enough and the dvb device is loosing initial data?? Ie, the first 
frame takes too long?


Thanks,

Deron




Thanks,

Deron



ffmpeg -f mpegts -i /dev/dvb/adapter0/dvr0 -c:v libx264 -vf 
scale=1280:720 -s 1280x720 -aspect 1280:720 -pix_fmt yuv420p -r 29.97 
-preset veryfast -b:v 2400k -c:a libfaac -ar 48000 -ac 2 -async 2 -f 
hls -hls_time 2 -hls_list_size 10 -hls_wrap 20 -y 
"/var/www/html/stream/WPBF/wpbf.hi.m3u8" -c:v libx264 -vf 
scale=1280:720 -s 1280x720 -aspect 1280:720 -pix_fmt yuv420p -r 29.97 
-preset veryfast -b:v 1200k -c:a libfaac -ar 48000 -ac 2 -async 2 -f 
hls -hls_time 2 -hls_list_size 10 -hls_wrap 20 -y 
"/var/www/html/stream/WPBF/wpbf.mid.m3u8" -c:v libx264 -vf 
scale=1280:720 -s 1280x720 -aspect 1280:720 -pix_fmt yuv420p -r 29.97 
-preset veryfast -b:v 600k -c:a libfaac -ar 48000 -ac 2 -async 2 -f 
hls -hls_time 2 -hls_list_size 10 -hls_wrap 20 -y 
"/var/www/html/stream/WPBF/wpbf.low.m3u8" -vn -c:a libfaac -b:a 30k 
-ar 24000 -ac 1  -f hls -hls_time 2 -hls_list_size 10 -hls_wrap 20 -y 
"/var/www/html/stream/WPBF/wpbf.a.m3u8"



ffmpeg version N-69206-g4b46ce8 Copyright (c) 2000-2015 the FFmpeg 
developers

  built on Jan 22 2015 18:39:59 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --enable-shared --enable-gpl --enable-nonfree 
--enable-libxvid --enable-libx264 --enable-libmp3lame 
--enable-libvorbis --enable-libfaac --enable-libopenjpeg

  libavutil  54. 17.100 / 54. 17.100
  libavcodec 56. 20.100 / 56. 20.100
  libavformat56. 19.100 / 56. 19.100
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5.  8.101 /  5.  8.101
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  3.100 / 53.  3.100
[mpeg2video @ 0x1c430a0] Invalid frame dimensions 0x0.
Input #0, mpegts, from '/dev/dvb/adapter0/dvr0':
  Duration: N/A, start: 94543.371178, bitrate: N/A
Stream #0:0[0x31]: Video: mpeg2video (Main), yuv420p(tv), 
1920x1080 [SAR 1:1 DAR 16:9], max. 24000 kb/s, 29.97 fps, 29.97 tbr, 
90k tbn, 59.94 tbc

Stream #0:1[0x34]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
-async is forwarded to lavfi similarly to -af 
aresample=async=2:min_hard_comp=0.10

[FFmpeg-user] Troubles segmenting WebVTT

2015-02-07 Thread Deron
I'm trying to capture ATSC with a tuner card and stream it out via HLS. 
I've got it more or less working, and now I would like to try my hand 
and streaming out closed captioning in WebVTT utilizing the eia 608 demuxer.


First, I captured 10 minutes of video to my HD. Then I used:

ffmpeg -f lavfi -i "movie=WPEC.ts[out0+subcc]" -map s WPEC.vtt

which generated a good .vtt file and then

ffmpeg -i WPEC.vtt -f segment -segment_time 10 -segment_format webvtt 
-scodec copy WPEC-%05d.vtt


to generate segments 0 to 00038 and it works just fine.

However,

ffmpeg -f lavfi -i "movie=WPEC.ts[out0+subcc]" -map s -f segment 
-segment_time 10 -segment_format webvtt WPEC-%05d.vtt


fails to generate segments. What it generates is just one segment named 
WPEC-0.vtt.


What am I doing wrong?

Deron

Complete uncut output:

# ffmpeg -f lavfi -i "movie=WPEC.ts[out0+subcc]" -map s -f segment 
-segment_time 10 -segment_format webvtt WPEC-%05d.vtt


ffmpeg version N-69558-g7f02fcd Copyright (c) 2000-2015 the FFmpeg 
developers

  built with gcc 4.9.1 (Ubuntu 4.9.1-16ubuntu6)
  configuration: --enable-shared --enable-gpl --enable-nonfree 
--enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libvorbis 
--enable-libfaac --enable-libopenjpeg

  libavutil  54. 18.100 / 54. 18.100
  libavcodec 56. 21.102 / 56. 21.102
  libavformat56. 19.100 / 56. 19.100
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5.  9.103 /  5.  9.103
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  3.100 / 53.  3.100
[mpeg2video @ 0x1961bc0] Invalid frame dimensions 0x0.
Last message repeated 24 times
[mpegts @ 0x195eb80] PES packet size mismatch
Input #0, lavfi, from 'movie=WPEC.ts[out0+subcc]':
  Duration: N/A, start: 16458.590289, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 
1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc

Stream #0:1: Subtitle: eia_608
Output #0, segment, to 'WPEC-%05d.vtt':
  Metadata:
encoder : Lavf56.19.100
Stream #0:0: Subtitle: webvtt
Metadata:
  encoder : Lavc56.21.102 webvtt
Stream mapping:
  Stream #0:1 -> #0:0 (eia_608 (cc_dec) -> webvtt (native))
Press [q] to stop, [?] for help
[mpeg2video @ 0x1961bc0] invalid cbp -1 at 113 46
[mpeg2video @ 0x1961bc0] Warning MVs not available
[mpeg2video @ 0x1961bc0] concealing 2640 DC, 2640 AC, 2640 MV errors in 
B frame

size=N/A time=00:06:23.48 bitrate=N/A
video:0kB audio:0kB subtitle:2kB other streams:0kB global headers:0kB 
muxing overhead: unknown


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


Re: [FFmpeg-user] Troubles segmenting WebVTT

2015-02-10 Thread Deron

On 2/10/15 3:20 AM, Stefano Sabatini wrote:

On date Saturday 2015-02-07 22:15:58 -0700, Deron wrote:

I'm trying to capture ATSC with a tuner card and stream it out via
HLS. I've got it more or less working, and now I would like to try
my hand and streaming out closed captioning in WebVTT utilizing the
eia 608 demuxer.

First, I captured 10 minutes of video to my HD. Then I used:

ffmpeg -f lavfi -i "movie=WPEC.ts[out0+subcc]" -map s WPEC.vtt

which generated a good .vtt file and then

ffmpeg -i WPEC.vtt -f segment -segment_time 10 -segment_format
webvtt -scodec copy WPEC-%05d.vtt

to generate segments 0 to 00038 and it works just fine.

However,

ffmpeg -f lavfi -i "movie=WPEC.ts[out0+subcc]" -map s -f segment
-segment_time 10 -segment_format webvtt WPEC-%05d.vtt

fails to generate segments. What it generates is just one segment
named WPEC-0.vtt.

What am I doing wrong?

Deron

Complete uncut output:

# ffmpeg -f lavfi -i "movie=WPEC.ts[out0+subcc]" -map s -f segment
-segment_time 10 -segment_format webvtt WPEC-%05d.vtt

Use -loglevel debug, segment will generate log messages showing the
input PTSs. Also, are you sure you have many key-frames in your input
file?



I can't imagine how PTS or i-frames can be defined in a .vtt ? But I'm 
certainly looking for understanding! In a private email, Anshul 
Maheshwari suggested that it was incomplete in his WebVTT implementation 
and he hopes to get it resolved some day. I've started trying to just 
trace along to figure out what it is doing but it is a large amount of 
stuff to absorb at once. I wanted to learn more about HLS, so I'm not 
apposed to trying to solve the problem if it needs to be.


Thanks for your input,

Deron


ffmpeg -loglevel debug -f lavfi -i "movie=WPEC.ts[out0+subcc]" -map s -f 
segment -segment_time 10 -segment_format webvtt WPEC-%05d.vtt


ffmpeg version N-69558-g7f02fcd Copyright (c) 2000-2015 the FFmpeg 
developers

  built with gcc 4.9.1 (Ubuntu 4.9.1-16ubuntu6)
  configuration: --enable-shared --enable-gpl --enable-nonfree 
--enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libvorbis 
--enable-libfaac --enable-libopenjpeg

  libavutil  54. 18.100 / 54. 18.100
  libavcodec 56. 21.102 / 56. 21.102
  libavformat56. 19.100 / 56. 19.100
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5.  9.103 /  5.  9.103
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  3.100 / 53.  3.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging 
level) with argument 'debug'.
Reading option '-f' ... matched as option 'f' (force format) with 
argument 'lavfi'.
Reading option '-i' ... matched as input file with argument 
'movie=WPEC.ts[out0+subcc]'.
Reading option '-map' ... matched as option 'map' (set input stream 
mapping) with argument 's'.
Reading option '-f' ... matched as option 'f' (force format) with 
argument 'segment'.
Reading option '-segment_time' ... matched as AVOption 'segment_time' 
with argument '10'.
Reading option '-segment_format' ... matched as AVOption 
'segment_format' with argument 'webvtt'.

Reading option 'WPEC-%05d.vtt' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file movie=WPEC.ts[out0+subcc].
Applying option f (force format) with argument lavfi.
Successfully parsed a group of options.
Opening an input file: movie=WPEC.ts[out0+subcc].
detected 32 logical cores
[Parsed_movie_0 @ 0xf4a8e0] Setting 'filename' to value 'WPEC.ts'
[mpegts @ 0xf4ab80] Format mpegts probed with size=2048 and score=100
[mpegts @ 0xf4ab80] Before avformat_find_stream_info() pos: 0 bytes 
read:5013504 seeks:1

[mpegts @ 0xf4ab80] stream=0 stream_type=0 pid=31 prog_reg_desc=
[mpegts @ 0xf4ab80] stream=1 stream_type=0 pid=34 prog_reg_desc=
[mpegts @ 0xf4ab80] probing stream 0 pp:2500
[mpegts @ 0xf4ab80] Probe with size=56014, packets=1 detected ico with 
score=25

[mpegts @ 0xf4ab80] probing stream 0 pp:2499
[mpegts @ 0xf4ab80] Probe with size=112027, packets=2 detected ico with 
score=25

[mpegts @ 0xf4ab80] probing stream 0 pp:2498
[mpegts @ 0xf4ab80] Probe with size=168053, packets=3 detected ico with 
score=25

[mpegts @ 0xf4ab80] probing stream 0 pp:2497
[mpegts @ 0xf4ab80] probing stream 1 pp:2500
[mpegts @ 0xf4ab80] Probe with size=7680, packets=1 detected ac3 with 
score=51

[mpegts @ 0xf4ab80] probed stream 1
[mpegts @ 0xf4ab80] probing stream 0 pp:2496
[mpegts @ 0xf4ab80] Probe with size=280096, packets=5 detected

[FFmpeg-user] How to get only audio from "rawvideo" stream

2015-02-25 Thread Deron
I'm trying to generate a number of HLS streams from a single source 
including using the new webvtt for cc.


The following command:

ffmpeg -i test.ts -vn -f hls -hls_segment_filename "a.%d.ts" -y "a.m3u8"

Works as expected, but

ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" -vn -sn -f hls 
-hls_segment_filename "a.%d.ts" -y "a.m3u8"


Fails with:

ffmpeg version N-70148-g418be7c Copyright (c) 2000-2015 the FFmpeg 
developers

  built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --enable-shared --enable-gpl --enable-nonfree 
--enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libvorbis 
--enable-libfaac --enable-libopenjpeg

  libavutil  54. 19.100 / 54. 19.100
  libavcodec 56. 26.100 / 56. 26.100
  libavformat56. 23.104 / 56. 23.104
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 11.101 /  5. 11.101
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  3.100 / 53.  3.100
[mpeg2video @ 0x1c777a0] Invalid frame dimensions 0x0.
Last message repeated 35 times
Input #0, lavfi, from 'movie=test.ts[out0+subcc]':
  Duration: N/A, start: 9602.931211, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 
1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc

Stream #0:1: Subtitle: eia_608
Output #0, hls, to 'a.m3u8':
Output file #0 does not contain any stream

I get that I surpressed the video stream, and the audio is merged with 
it. How do I get it out without changing the input? I ultimately need to 
generate multiple streams including cc from a single input, so I can't 
remove cc from the input.


Thanks,

Deron

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


Re: [FFmpeg-user] How to get only audio from "rawvideo" stream

2015-02-25 Thread Deron

On 2/25/15 11:00 AM, Deron wrote:
I'm trying to generate a number of HLS streams from a single source 
including using the new webvtt for cc.


The following command:

ffmpeg -i test.ts -vn -f hls -hls_segment_filename "a.%d.ts" -y "a.m3u8"

Works as expected, but

ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" -vn -sn -f hls 
-hls_segment_filename "a.%d.ts" -y "a.m3u8"


Fails with:
Input #0, lavfi, from 'movie=test.ts[out0+subcc]':
  Duration: N/A, start: 9602.931211, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 
1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc

Stream #0:1: Subtitle: eia_608
Output #0, hls, to 'a.m3u8':
Output file #0 does not contain any stream

I get that I surpressed the video stream, and the audio is merged with 
it. How do I get it out without changing the input? I ultimately need 
to generate multiple streams including cc from a single input, so I 
can't remove cc from the input.


Thanks,

Deron 


After playing with this for several more hours, I'm no closer than 
before. Simplified, what I need is to turn:


ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" ...

Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 
1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc

Stream #0:1: Subtitle: eia_608

Into something like this:

Stream #0:0[0x31]: Video: mpeg2video (Main), yuv420p(tv), 1920x1080 
[SAR 1:1 DAR 16:9], max. 24000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 
59.94 tbc

Stream #0:1[0x34]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream #0:2: Subtitle: eia_608

Is there some filter or method to break that rawvideo stream into 
independent video and audio streams?? The ultimate goal is to have a 
single command that does something like:


ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" parameters> "video.hi.m3u8"  "video.low.m3u8" 
 "audio.m3u8"


Thanks,

Deron

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


Re: [FFmpeg-user] How to get only audio from "rawvideo" stream

2015-02-27 Thread Deron

On 2/25/15 3:58 PM, Deron wrote:

On 2/25/15 11:00 AM, Deron wrote:
I'm trying to generate a number of HLS streams from a single source 
including using the new webvtt for cc.


The following command:

ffmpeg -i test.ts -vn -f hls -hls_segment_filename "a.%d.ts" -y "a.m3u8"

Works as expected, but

ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" -vn -sn -f hls 
-hls_segment_filename "a.%d.ts" -y "a.m3u8"


Fails with:
Input #0, lavfi, from 'movie=test.ts[out0+subcc]':
  Duration: N/A, start: 9602.931211, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 
1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc

Stream #0:1: Subtitle: eia_608
Output #0, hls, to 'a.m3u8':
Output file #0 does not contain any stream

I get that I surpressed the video stream, and the audio is merged 
with it. How do I get it out without changing the input? I ultimately 
need to generate multiple streams including cc from a single input, 
so I can't remove cc from the input.


Thanks,

Deron 


Well, I decided that I didn't need the audio only stream if it was going 
to be this much trouble. As it turns out, someone could have saved me 
the aggravation and told me that the audio was not available at all and 
not "merged with the video" as I presumed. I thought it was a bit 
strange, but what do I know? I can't imagine why the audio would be dropped.


As it turns out, "movie=test.ts[out0+subcc]" generates a rawvideo 
stream. No audio.


So what happens to the audio, and how do I get it??? What good is 
subtitles if I loose the audio?


Thanks,

Deron

ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" test.avi
ffmpeg version N-70148-g418be7c Copyright (c) 2000-2015 the FFmpeg 
developers

  built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --enable-shared --enable-gpl --enable-nonfree 
--enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libvorbis 
--enable-libfaac --enable-libopenjpeg --enable-librtmp --enable-libx265 
--disable-stripping

  libavutil  54. 19.100 / 54. 19.100
  libavcodec 56. 26.100 / 56. 26.100
  libavformat56. 23.104 / 56. 23.104
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 11.101 /  5. 11.101
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  3.100 / 53.  3.100
Input #0, lavfi, from 'movie=test.ts[out0+subcc]':
  Duration: N/A, start: 2.117867, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720 
[SAR 1:1 DAR 16:9], 59.94 fps, 59.94 tbr, 90k tbn, 90k tbc

Stream #0:1: Subtitle: eia_608
Output #0, avi, to 'test.avi':
  Metadata:
ISFT: Lavf56.23.104
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1280x720 
[SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 59.94 fps, 59.94 tbn, 59.94 tbc

Metadata:
  encoder : Lavc56.26.100 mpeg4
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
frame=13086 fps=327 q=31.0 Lsize=   46145kB time=00:03:38.31 
bitrate=1731.5kbits/s
video:45826kB audio:0kB subtitle:0kB other streams:0kB global 
headers:0kB muxing overhead: 0.695515%



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


Re: [FFmpeg-user] How to get only audio from "rawvideo" stream

2015-02-27 Thread Deron

On 2/27/15 10:01 AM, Nicolas George wrote:

Le nonidi 9 ventôse, an  CCXXIII, Deron a écrit :

>> As it turns out, "movie=test.ts[out0+subcc]" generates a rawvideo
>> stream. No audio.
>>
>> So what happens to the audio, and how do I get it??? What good is
>> subtitles if I loose the audio?
>
> Have you considered reading the fine documentation?

No, I have not. I just type random letters on the keyboard until I get 
the results I want. Is that wrong?



http://ffmpeg.org/ffmpeg-filters.html#movie-1


I don't know ffmpeg like the back of my hand, so what may be obvious to 
you is not to me. For those who might encounter this same problem, this 
is what I managed to decipher:


"movie=test.ts:s=dv+da[out0+subcc][out1]"

If a better/proper method exists, please let me know. The use of s= was 
relatively obvious and tried before, but the pads usage was not. Only by 
the assumption that is must be possible did I get it to work after 
randomly made choices.


Thanks for your time (truly),

Deron

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


Re: [FFmpeg-user] Multithreaded multioutput problem

2015-04-20 Thread Deron
Another user has contacted me with the exact same problem hoping that I 
stumbled on a solution for the below problem. I did not, so I am adding 
some more extensive log output in hopes that someone might recongize the 
source of the problem.


Thanks,

Deron

On 1/25/15 8:41 AM, Deron wrote:

On 1/23/15 2:30 PM, Deron wrote:

On 1/23/15 9:28 AM, Deron wrote:
I would like to generate 4 different HLS (sub)streams from a single 
DVB capture, but ffmpeg fails to keep up with more than 2. Yes, I 
have the CPU power and I'm writing to a ram disk (or SSD, doesn't 
matter). I have a dual tuner capture card and can generate two 
different HLS substreams per tuner (total of 4) with plenty of CPU 
left to burn.


I would guess it is some kind of thread limit but I can't seem to 
get past it. Any suggestions? Below is an example command and 
output. If I cut out one of the outputs, it works fine.


Thanks for your suggestions!

Deron



Reading this, I obviously did not make the problem very clear.

I am trying to do this (simplified):

ffmpeg -i "/dev/dvb/adapter0/dvr0" -b:v 2400k "hi.m3u8" -b:v 1200k 
"med.m3u8" -b:v 600k "low.m3u8" -vn "audio.m3u8"


And it fails with: /dev/dvb/adapter0/dvr0: Value too large for 
defined data type


But if I remove any 2 outputs like:

ffmpeg -i "/dev/dvb/adapter0/dvr0" -b:v 2400k "hi.m3u8" -vn "audio.m3u8"

It works. I can see fps is very close (not sure if it is a because of 
HLS working in "real time" or some thread limitation), but cpu usage 
is very light.


Since I have 2 adapters, I can actually run

ffmpeg -i "/dev/dvb/adapter0/dvr0" -b:v 2400k "hi.m3u8" -b:v 1200k 
"med.m3u8"

ffmpeg -i "/dev/dvb/adapter1/dvr0" -b:v 600k "low.m3u8" -vn "audio.m3u8"

And that runs fine (again with light cpu usage). Obviously a 
threading issue. What can I do to fix this?


To further complicate maters, I tried copying 10 minutes of data to a 
file using:


cp /dev/dvb/adapter0/dvr0 data.ts

and then

ffmpeg -i data.ts -b:v 2400k "hi.m3u8" -b:v 1200k "med.m3u8" -b:v 600k 
"low.m3u8" -vn "audio.m3u8"


Which works. In fact, I can run 8 copies of this at the same time and 
it still runs faster than real time on this computer.


where

ffmpeg -i "/dev/dvb/adapter0/dvr0" -b:v 2400k "hi.m3u8" -b:v 1200k 
"med.m3u8" -b:v 600k "low.m3u8" -vn "audio.m3u8"


and

ffmpeg -i "/dev/dvb/adapter0/dvr0" -b:v 2400k "hi.m3u8" -b:v 1200k 
"med.m3u8"


Fails as above (and below) with: /dev/dvb/adapter0/dvr0: Value too 
large for defined data type


and

ffmpeg -i "/dev/dvb/adapter0/dvr0" -b:v 2400k "hi.m3u8" -vn "audio.m3u8"

Works.

Does anyone have an idea on what could be causing this grief? What is 
kicking out this message? Could it be simply that ffmpeg can't get 
going fast enough and the dvb device is loosing initial data?? Ie, the 
first frame takes too long?


Thanks,

Deron


The below fails with (in about 15 seconds):

movie=/dev/dvb/adapter6/dvr0:f=mpegts:s=dv+da[out0+subcc][out1]: Value 
too large for defined data type


The data around the error is:

libx264 @ 0x25d77a0] frame= 123 QP=14.82 NAL=2 Slice:P Poc:6 I:20   
P:1028 SKIP:2552 size=5107 bytes

*** 1 dup!
[libx264 @ 0x25d77a0] scene cut at 174 Icost:2049115 Pcost:2006553 
ratio:0.0208 bias:0.1387 gop:54 (imb:3186 pmb:168)
[libx264 @ 0x246aca0] frame= 122 QP=21.41 NAL=2 Slice:P Poc:4 I:233  
P:2646 SKIP:721  size=20496 bytes
[libx264 @ 0x246aca0] frame= 123 QP=22.14 NAL=2 Slice:P Poc:6 I:26   
P:541  SKIP:3033 size=2346 bytes
movie=/dev/dvb/adapter6/dvr0:f=mpegts:s=dv+da[out0+subcc][out1]: Value 
too large for defined data type
[libx264 @ 0x246aca0] scene cut at 174 Icost:2049115 Pcost:2006553 
ratio:0.0208 bias:0.1387 gop:54 (imb:3186 pmb:168)

[AVIOContext @ 0x27d36e0] Statistics: 0 seeks, 2 writeouts


Any suggestions?

Deron



ffmpeg -loglevel 30 -f lavfi -i 
movie=/dev/dvb/adapter6/dvr0:f=mpegts:s=dv+da[out0+subcc][out1] 
-force_key_frames expr:gte\(t,n_forced*2\) -c:v libx264 -vf 
scale=1280:720 -s 1280x720 -aspect 1280:720 -pix_fmt yuv420p -r 59.94 
-preset veryfast -b:v 1200k -c:a libfaac -ar 48000 -ac 2 -af 
volume=volume=11dB -flags:a -global_header -f hls -hls_time 2 
-hls_allow_cache 0 -hls_list_size 10 -hls_wrap 2 -hls_flags 
delete_segments -hls_segment_filename 
/var/www/html/stream/test/v.mid.%d.ts -y 
/var/www/html/stream/test/v.mid.m3u8 -force_key_frames 
expr:gte\(t,n_forced*2\) -sn -c:v libx264 -vf scale=1280:720 -s 1280x720 
-aspect 1280:720 -pix_fmt yuv420p -r 59.94 -preset veryfast -b:v 600k 
-c:a libfaac -ar 48000 -ac 2 -af volume=volume=11dB -flags:a 
-global_header -f hls -hls_time 2 -hls_allow_cache 0 -hls_list_size 10 
-hls_wrap 2 -hls_flags delete_segments -hls_segment_filename 
/var/

Re: [FFmpeg-user] Multithreaded multioutput problem

2015-04-20 Thread Deron

On 4/20/15 1:48 PM, Marton Balint wrote:

On Mon, 20 Apr 2015, Deron wrote:

Another user has contacted me with the exact same problem hoping that 
I stumbled on a solution for the below problem. I did not, so I am 
adding some more extensive log output in hopes that someone might 
recongize the source of the problem.




I have also experienced this problem. Depending on your use case you 
can face a similar situation with only one input and one output as 
well and a few cores. There is no buffering between the various stages 
of the ffmpeg encoder/filter/decoder pipeline, so even if the stages 
by themselves are multi threaded, you won't be able to scale up, 
because passing data between the stages is done in a single thread.


Or at least that is what I think is going on. So as far as I know you 
can only scale up properly by running multiple ffmpeg instances. E.g: 
create a multicast and encode that.


Regards,
Marton



What would be the best way to solve this then? I'm not sure I understand 
what you mean by multicast. Having multiple ffmpeg's decoding the same 
original mpegts input would be pretty slow. Is there some way to have 
ffmpeg output a multicast that is in a faster/raw format?


Seems like more overhead and more ways for it to go wrong.

Thanks for your input,

Deron

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


Re: [FFmpeg-user] Multithreaded multioutput problem

2015-04-20 Thread Deron

On 4/20/15 4:22 PM, Marton Balint wrote:


On Mon, 20 Apr 2015, Deron wrote:


On 4/20/15 1:48 PM, Marton Balint wrote:

On Mon, 20 Apr 2015, Deron wrote:

Another user has contacted me with the exact same problem hoping 
that I stumbled on a solution for the below problem. I did not, so 
I am adding some more extensive log output in hopes that someone 
might recongize the source of the problem.




I have also experienced this problem. Depending on your use case you 
can face a similar situation with only one input and one output as 
well and a few cores. There is no buffering between the various 
stages of the ffmpeg encoder/filter/decoder pipeline, so even if the 
stages by themselves are multi threaded, you won't be able to scale 
up, because passing data between the stages is done in a single thread.


Or at least that is what I think is going on. So as far as I know 
you can only scale up properly by running multiple ffmpeg instances. 
E.g: create a multicast and encode that.


Regards,
Marton



What would be the best way to solve this then? I'm not sure I 
understand what you mean by multicast. Having multiple ffmpeg's 
decoding the same original mpegts input would be pretty slow.


If that overhead is unacceptable, then I don't see any other way. You 
wrote you had plenty of free CPU :)


Speaking of CPU and having been away from the problem for many weeks, I 
forget about the important part. The encoding process for the data runs 
at better than real time (nearly 2x) when pulling from a file instead of 
the /dvb device. So I don't think that this is thread bound for me but 
something else.


I'm still missing a piece of the puzzle. Something else is causing me grief.

Thanks for the help,

Deron

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


Re: [FFmpeg-user] Multithreaded multioutput problem

2015-05-02 Thread Deron

On 4/21/15 2:51 AM, Marton Balint wrote:



On Mon, 20 Apr 2015, Deron wrote:


On 4/20/15 4:22 PM, Marton Balint wrote:


On Mon, 20 Apr 2015, Deron wrote:


On 4/20/15 1:48 PM, Marton Balint wrote:

On Mon, 20 Apr 2015, Deron wrote:

Another user has contacted me with the exact same problem hoping 
that I stumbled on a solution for the below problem. I did not, 
so I am adding some more extensive log output in hopes that 
someone might recongize the source of the problem.




I have also experienced this problem. Depending on your use case 
you can face a similar situation with only one input and one 
output as well and a few cores. There is no buffering between the 
various stages of the ffmpeg encoder/filter/decoder pipeline, so 
even if the stages by themselves are multi threaded, you won't be 
able to scale up, because passing data between the stages is done 
in a single thread.


Or at least that is what I think is going on. So as far as I know 
you can only scale up properly by running multiple ffmpeg 
instances. E.g: create a multicast and encode that.


Regards,
Marton



What would be the best way to solve this then? I'm not sure I 
understand what you mean by multicast. Having multiple ffmpeg's 
decoding the same original mpegts input would be pretty slow.


If that overhead is unacceptable, then I don't see any other way. 
You wrote you had plenty of free CPU :)


Speaking of CPU and having been away from the problem for many weeks, 
I forget about the important part. The encoding process for the data 
runs at better than real time (nearly 2x) when pulling from a file 
instead of the /dvb device. So I don't think that this is thread 
bound for me but something else.


I'm still missing a piece of the puzzle. Something else is causing me 
grief.




In that case have you tried using the threaded input read support of 
ffmpeg? You have to specify more than one inputs (add an extra dummy 
input source) and play with -thread_queue_size option.


Regards,
Ma 



I've resolved this problem and would like to report my solution. The 
error evidently was coming from some part of azap/dvb device. When I 
increased the buffer size as per http://panteltje.com/panteltje/dvd/ the 
problem went away. I can now capture and encode 6 channels 
simultaneously, outputting 2 video,1 audio, and images for each on this 
computer. I presume the problem was simply that setup time in ffmpeg 
increased enough that it (temporarily) exceeded real time encoding and 
overflowed the buffer between azap and ffmpeg.


I've considering writing an azap-like input module for ffmpeg. I'm sure 
this is generally frowned on, but in this case I see a couple of 
advantages. One is obviously this problem with too small a buffer. The 
other is when interference causes the stream to be degraded, ffmpeg will 
start consuming huge amounts of cpu until it actually freezes up the 
computer. Since azap knows when the signal tanks, it would appear to me 
it could deal with the encoding issue if it had access into the encoder 
itself. Maybe some way exists already to deal with it, or ffmpeg should 
simply be made more robust to deal with this problem?


Anyway, thanks for the help!

Deron

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


[FFmpeg-user] Past duration too large

2015-05-21 Thread Deron
I am encoding live video streams and generally it works well. The most 
common error in the logs seems to be something like:


Past duration 0.77 too large


I can get hundreds of them in a row, or even thousands. Can anyone shed 
light on what conditions can actually causes this error to be generated? 
What does it mean?


Thanks!

Deron

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


[FFmpeg-user] decklink output crashing

2015-05-23 Thread Deron
I decided to give the built in decklink output a test today and about 
2/3 of the files I try and play cause it to crash. I'm hoping I'm just 
missing some vital parameter. I've included uncut console output from 
running under gdb.


Deron


ffmpeg -i "/work/THE AUTO CHANNEL/ACTIVE SPOTS/spot Chrysler 200 Miggy 
60.wmv"  -vf scale=1280:720 -vol 19  -vsync 1 -c:v rawvideo -pix_fmt 
uyvy422 -s 1280x720 -r 6/1001 -c:a pcm_s16le -ar 48000 -ac 2 -f 
decklink "DeckLink HD Extreme 3D+"



[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
ffmpeg version N-72309-gde0d3fe Copyright (c) 2000-2015 the FFmpeg 
developers

  built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --enable-shared --enable-gpl --enable-nonfree 
--enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libvorbis 
--enable-libfaac --enable-libopenjpeg --enable-librtmp --enable-decklink 
--disable-stripping

  libavutil  54. 23.101 / 54. 23.101
  libavcodec 56. 40.100 / 56. 40.100
  libavformat56. 33.101 / 56. 33.101
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 16.101 /  5. 16.101
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  3.100 / 53.  3.100
[wmv3 @ 0x653720] Extra data: 8 bits left, value: 0
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, asf, from '/work/THE AUTO CHANNEL/ACTIVE SPOTS/spot Chrysler 
200 Miggy 60.wmv':

  Metadata:
SfOriginalFPS   : 299700
WMFSDKVersion   : 12.0.7601.17514
WMFSDKNeeded: 0.0.0.
IsVBR   : 0
DeviceConformanceTemplate: MP@HL
  Duration: 00:01:00.03, start: 0.00, bitrate: 12984 kb/s
Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, 2 
channels, fltp, 192 kb/s
Stream #0:1(eng): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 
1440x1080, 16585 kb/s, SAR 4:3 DAR 16:9, 29.97 fps, 29.97 tbr, 1k tbn, 
1k tbc

[New Thread 0x7230a700 (LWP 43163)]
[New Thread 0x71b09700 (LWP 43164)]
[New Thread 0x71308700 (LWP 43165)]
[New Thread 0x70b07700 (LWP 43166)]
[New Thread 0x70306700 (LWP 43167)]
[New Thread 0x7fffefb05700 (LWP 43168)]
[New Thread 0x7fffef304700 (LWP 43169)]
[New Thread 0x7fffeeb03700 (LWP 43170)]
[New Thread 0x7fffee302700 (LWP 43171)]
[New Thread 0x7fffedb01700 (LWP 43172)]
[New Thread 0x7fffed300700 (LWP 43173)]
[New Thread 0x7fffecaff700 (LWP 43174)]
[New Thread 0x7fffec2fe700 (LWP 43175)]
[New Thread 0x7fffebafd700 (LWP 43176)]
[New Thread 0x7fffeb2fc700 (LWP 43177)]
[New Thread 0x7fffeaafb700 (LWP 43178)]
[New Thread 0x7fffea2fa700 (LWP 43179)]
[New Thread 0x7fffe9af9700 (LWP 43180)]
[New Thread 0x7fffe92f8700 (LWP 43181)]
[New Thread 0x7fffe8af7700 (LWP 43182)]
[New Thread 0x7fffe82f6700 (LWP 43183)]
[New Thread 0x7fffe7af5700 (LWP 43184)]
[New Thread 0x7fffe72f4700 (LWP 43185)]
[New Thread 0x7fffe6af3700 (LWP 43186)]
[New Thread 0x7fffe62f2700 (LWP 43187)]
[New Thread 0x7fffe5af1700 (LWP 43188)]
[New Thread 0x7fffe52f0700 (LWP 43189)]
[New Thread 0x7fffe4aef700 (LWP 43190)]
[New Thread 0x7fffe42ee700 (LWP 43191)]
[New Thread 0x7fffe3aed700 (LWP 43192)]
[New Thread 0x7fffe32ec700 (LWP 43193)]
[New Thread 0x7fffe2aeb700 (LWP 43194)]
[New Thread 0x7fffe22ea700 (LWP 43195)]
[New Thread 0x7fffe1ae9700 (LWP 43196)]
[New Thread 0x7fffe12e8700 (LWP 43197)]
[New Thread 0x7fffe0ae7700 (LWP 43198)]
[New Thread 0x7fffe02e6700 (LWP 43199)]
[New Thread 0x7fffdfae5700 (LWP 43200)]
[New Thread 0x7fffdf2e4700 (LWP 43201)]
[New Thread 0x7fffdeae3700 (LWP 43202)]
[New Thread 0x7fffde2e2700 (LWP 43203)]
[New Thread 0x7fffddae1700 (LWP 43204)]
[New Thread 0x7fffdd2e0700 (LWP 43205)]
[New Thread 0x7fffdcadf700 (LWP 43206)]
[New Thread 0x7fffdc2de700 (LWP 43207)]
[New Thread 0x7fffdbadd700 (LWP 43208)]
[New Thread 0x7fffdb2dc700 (LWP 43209)]
[New Thread 0x7fffdaadb700 (LWP 43210)]
[New Thread 0x7fffda2da700 (LWP 43211)]
[New Thread 0x7fffd9ad9700 (LWP 43212)]
[New Thread 0x7fffd92d8700 (LWP 43213)]
[New Thread 0x7fffd8ad7700 (LWP 43214)]
[New Thread 0x7fffd82d6700 (LWP 43215)]
[New Thread 0x7fffd7ad5700 (LWP 43216)]
[New Thread 0x7fffd72d4700 (LWP 43217)]
[New Thread 0x7fffd6ad3700 (LWP 43218)]
[New Thread 0x7fffd62d2700 (LWP 43219)]
[New Thread 0x7fffd5ad1700 (LWP 43220)]
[New Thread 0x7fffd52d0700 (LWP 43221)]
[New Thread 0x7fffd4acf700 (LWP 43222)]
[New Thread 0x7fffd42ce700 (LWP 43223)]
[New Thread 0x7fffd3acd700 (LWP 43224)]
[New Thread 0x7fffd32cc700 (LWP 43225)]
[New Thread 0x7fffd2acb700 (LWP 43226)]
[New Thread 0x7fffd22ca700 (LWP 43227)]
[New Thread 0x7fffd1ac9700 (LWP 43228)]
-vol has been deprecated. Use the volume audio filter instead.
-vol is forwarded to lavfi similarly to -af volume=0.074219.
[wmv3 @ 0x67e1a0] Extra data: 8 bits left, value: 0
[New Thread 0x7fffd053a700 (LWP 43229)]
[New Thread 0x7fffcfd39700 (LWP 43230)]
[decklink @ 0x674cc0] Found Decklink mode 1280 x 720 with rat