Re: [FFmpeg-user] For HLS, playlist.m3u8 file skips last segment entry

2014-10-08 Thread Moritz Barsnick
On Wed, Oct 08, 2014 at 13:08:56 +0800, ajay parashar wrote:
 I want to know why this segment out005.ts is not adding to playlist file ? 
 Is it known issue ? or i need to provide some other options to command line.
 
 below is the command that currently i am using
 ffmpeg -i 'udp://226.0.0.1:1234?fifo_size=5overrun_nonfatal=1' 
 -map 0:v:1 -map 0:a:0 -vcodec libx264 -acodec copy -f ssegment 
 -hls_list_size 10 -segment_list playlist.m3u8 -segment_list_flags +live 
 -segment_time 10 out%03d.ts

I tried to reproduce this with testsrc, otherwise using the similar
(video!) properties and arguments as you, and I don't see any issues.
Perhaps you can try with testsrc as well?

Moritz

barsnick@sunshine:~/tmp/ffmpeg_segment_test  ffmpeg -f lavfi -i 
'testsrc=size=704x480:duration=00\\:01\\:02.76' -vcodec libx264 -f ssegment 
-hls_list_size 10 -segment_list playlist.m3u8 -segment_time 10 
-segment_list_flags +live out%03d.ts
ffmpeg version 2.4.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 26 2014 08:47:09 with icc (ICC) 14.0.3 20140422
  configuration: --prefix=/usr/new/tools/video/install/ffmpeg/20140925 
--enable-gpl --enable-version3 --enable-nonfree --disable-shared 
--enable-x11grab --enable-gnutls --enable-libcdio --enable-libfreetype 
--enable-libx264 --enable-libmp3lame --enable-openal --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp 
--enable-libass --enable-libv4l2 --enable-libvidstab --enable-libfdk-aac 
--enable-libsmbclient --cc=icc --cxx=icpc 
--extra-ldflags='-L/usr/new/tools/video/install/x264/current/lib 
-L/usr/new/tools/video/install/fdk-aac/current/lib' 
--extra-cflags='-I/usr/new/tools/video/install/x264/current/include 
-I/usr/new/tools/video/install/fdk-aac/current/include'
  libavutil  54.  7.101 / 54.  7.101
  libavcodec 56.  1.101 / 56.  1.101
  libavformat56.  5.100 / 56.  5.100
  libavdevice56.  1.100 / 56.  1.100
  libavfilter 5.  1.102 /  5.  1.102
  libswscale  3.  1.100 /  3.  1.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  1.100 / 53.  1.100
Input #0, lavfi, from 'testsrc=size=704x480:duration=00\\:01\\:02.76':
  Duration: N/A, start: 0.00, bitrate: N/A
Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 704x480 [SAR 
1:1 DAR 22:15], 25 tbr, 25 tbn, 25 tbc
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0xb562260] using SAR=1/1
[libx264 @ 0xb562260] using cpu capabilities: MMX2 SSE2 Cache64
[libx264 @ 0xb562260] profile High 4:4:4 Predictive, level 3.0, 4:4:4 8-bit
[mpegts @ 0xba2b8a0] Using AVStream.codec.time_base as a timebase hint to the 
muxer is deprecated. Set AVStream.time_base instead.
Output #0, stream_segment,ssegment, to 'out%03d.ts':
  Metadata:
encoder : Lavf56.5.100
Stream #0:0: Video: h264 (libx264), yuv444p, 704x480 [SAR 1:1 DAR 22:15], 
q=-1--1, 25 fps, 25 tbn, 25 tbc
Metadata:
  encoder : Lavc56.1.101 libx264
Stream mapping:
  Stream #0:0 - #0:0 (rawvideo (native) - h264 (libx264))
Press [q] to stop, [?] for help
[swscaler @ 0xb552560] Warning: data is not aligned! This can lead to a 
speedloss
[mpegts @ 0xba2b8a0] Using AVStream.codec.time_base as a timebase hint to the 
muxer is deprecated. Set AVStream.time_base instead.
[mpegts @ 0xbb2f900] Using AVStream.codec.time_base as a timebase hint to the 
muxer is deprecated. Set AVStream.time_base instead.
[mpegts @ 0xbb2f900] Using AVStream.codec.time_base as a timebase hint to the 
muxer is deprecated. Set AVStream.time_base instead.
[mpegts @ 0xbb2f900] Using AVStream.codec.time_base as a timebase hint to the 
muxer is deprecated. Set AVStream.time_base instead.
[mpegts @ 0xbb2f900] Using AVStream.codec.time_base as a timebase hint to the 
muxer is deprecated. Set AVStream.time_base instead.
[mpegts @ 0xbb2f900] Using AVStream.codec.time_base as a timebase hint to the 
muxer is deprecated. Set AVStream.time_base instead.
frame= 1569 fps= 17 q=-1.0 Lsize=N/A time=00:01:02.68 bitrate=N/A
video:523kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing 
overhead: unknown
[libx264 @ 0xb562260] frame I:7 Avg QP:15.55  size:  5746
[libx264 @ 0xb562260] frame P:1562  Avg QP:14.99  size:   317
[libx264 @ 0xb562260] mb I  I16..4: 49.3% 39.9% 10.8%
[libx264 @ 0xb562260] mb P  I16..4:  1.9%  0.8%  0.0%  P16..4:  5.0%  1.7%  
0.1%  0.0%  0.0%skip:90.4%
[libx264 @ 0xb562260] 8x8 transform intra:31.0% inter:86.7%
[libx264 @ 0xb562260] coded y,u,v intra: 1.4% 1.1% 1.1% inter: 0.2% 0.3% 0.2%
[libx264 @ 0xb562260] i16 v,h,dc,p: 77% 10%  0% 13%
[libx264 @ 0xb562260] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 57% 11% 31%  0%  0%  0%  
0%  0%  0%
[libx264 @ 0xb562260] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 41% 17%  1%  1%  1%  
0%  1%  0%
[libx264 @ 0xb562260] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0xb562260] ref P L0: 69.1%  2.2% 21.3%  7.3%
[libx264 @ 0xb562260] 

Re: [FFmpeg-user] For HLS, playlist.m3u8 file skips last segment entry

2014-10-08 Thread ajay parashar


On Wed, Oct 08, 2014 at 13:08:56 +0800, ajay parashar wrote:
 I want to know why this segment out005.ts is not adding to playlist file ? 
 Is it known issue ? or i need to provide some other options to command line.
 
 below is the command that currently i am using
 ffmpeg -i 'udp://226.0.0.1:1234?fifo_size=5overrun_nonfatal=1' 
 -map 0:v:1 -map 0:a:0 -vcodec libx264 -acodec copy -f ssegment 
 -hls_list_size 10 -segment_list playlist.m3u8 -segment_list_flags +live 
 -segment_time 10 out%03d.ts

I tried to reproduce this with testsrc, otherwise using the similar
(video!) properties and arguments as you, and I don't see any issues.
Perhaps you can try with testsrc as well?

Moritz

barsnick@sunshine:~/tmp/ffmpeg_segment_test  ffmpeg -f lavfi -i 
'testsrc=size=704x480:duration=00\\:01\\:02.76' -vcodec libx264 -f ssegment 
-hls_list_size 10 -segment_list playlist.m3u8 -segment_time 10 
-segment_list_flags +live out%03d.ts
ffmpeg version 2.4.git Copyright (c) 2000-2014 the FFmpeg developers

***
testsrc input and even in my case giving local file as input is working well at 
my end. I am facing this issue when i am receiving stream from network.
In my Scenario I am sending UDP stream from machine 1 using VLC and receivng 
this UDP stream  on machine 2 by ffmpeg command. Playlist.m3u8 file  skips last 
segment entry.
Last segment out005.ts is vailable on my machine and it is having valid data 
also ,Please let me know why playlist.m3u8 is skipping last segment entry while 
receiving UDP stream?

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


Re: [FFmpeg-user] For HLS, playlist.m3u8 file skips last segment entry

2014-10-01 Thread ajay parashar





--
On Tue 30 Sep, 2014 10:22 PM IST ajay parashar wrote:






--
On Tue 30 Sep, 2014 6:59 PM IST Claudiu Rad wrote:


On 9/30/2014 4:11 PM, ajay parashar wrote:
 #EXTM3U
 #EXT-X-VERSION:3
 #EXT-X-MEDIA-SEQUENCE:0
 #EXT-X-ALLOW-CACHE:YES
 #EXT-X-TARGETDURATION:17
 #EXTINF:15.015000,
 out000.ts
 #EXTINF:8.341667,
 out001.ts
 #EXTINF:8.341667,
 out002.ts
 #EXTINF:8.341667,
 out003.ts
 #EXTINF:16.68,
 out004.ts


Please let me know why it is not adding last segment in its list?
Ajay

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


Re: [FFmpeg-user] For HLS, playlist.m3u8 file skips last segment entry

2014-09-30 Thread Claudiu Rad


On 9/30/2014 4:11 PM, ajay parashar wrote:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:17
#EXTINF:15.015000,
out000.ts
#EXTINF:8.341667,
out001.ts
#EXTINF:8.341667,
out002.ts
#EXTINF:8.341667,
out003.ts
#EXTINF:16.68,
out004.ts



You should add #EXT-X-ENDLIST for a VOD hls.

***
Should I add ENDLIST tag manually or ffmpeg should do this for user while 
generating playlist.m3u8 file.



Actually, #EXT-X-ENDLIST is not added because you have specified 
-segment_list_flags +live in your ffmpeg command.
If you want to generate a live HLS stream, use +live flag and the tag 
will not be added (like in your example), if you want to generate a VOD 
stream, remove the flag and the tag will be added.


However this won't fix the issue you are reporting that out005.ts 
isn't added to the playlist and I can't help you with that, sorry.

Just wondering: are you sure that out005.ts contains useful data?

--
Claudiu

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


[FFmpeg-user] For HLS, playlist.m3u8 file skips last segment entry

2014-09-29 Thread ajay parashar
Hi,

I am creating HLS segments and playlist file by using below command.
it creates total 6 segment files (out000.ts to out005.ts) but playlist contain 
entry only for first 4 , it always skips out0005.ts
I do not know why it does not deal with last segment file ? 

here is my playlist.m3u8 file contents

==
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:17
#EXTINF:15.015000,
out000.ts
#EXTINF:8.341667,
out001.ts
#EXTINF:8.341667,
out002.ts
#EXTINF:8.341667,
out003.ts
#EXTINF:16.68,
out004.ts


==

ffmpeg -i 'udp://226.0.0.1:1234?fifo_size=5overrun_nonfatal=1' -map 0:v:1 
-map 0:a:0 -vcodec libx264 -acodec copy -f ssegment -hls_list_size 10 
-segment_list playlist.m3u8 -segment_list_flags +live -segment_time 10 
out%03d.ts
ffmpeg version 2.4.1 Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 29 2014 13:53:35 with gcc 4.8.3 (GCC) 20140624 (Red Hat 4.8.3-1)
  configuration: --enable-gpl --enable-libx264 --enable-shared --disable-static 
--disable-stripping
  libavutil  54.  7.100 / 54.  7.100
  libavcodec 56.  1.100 / 56.  1.100
  libavformat56.  4.101 / 56.  4.101
  libavdevice56.  0.100 / 56.  0.100
  libavfilter 5.  1.100 /  5.  1.100
  libswscale  3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  0.100 / 53.  0.100
[mpegts @ 0x1d65e40] PES packet size mismatch
Input #0, mpegts, from 
'udp://226.0.0.1:1234?fifo_size=5overrun_nonfatal=1':
  Duration: N/A, start: 80713.733156, bitrate: 192 kb/s
  Program 1 
Stream #0:0[0x5f](???): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, 
fltp, 192 kb/s
Stream #0:1[0x60]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, 
bt709), 1280x720 [SAR 1:1 DAR 16:9], 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
Stream #0:2[0x61]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, 
smpte170m), 704x480 [SAR 10:11 DAR 4:3], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 
tbc
[libx264 @ 0x1e863e0] using SAR=10/11
[libx264 @ 0x1e863e0] using cpu capabilities: MMX2 SSE2 SSE3 Cache64
[libx264 @ 0x1e863e0] profile High, level 3.0
[mpegts @ 0x1e35740] Using AVStream.codec.time_base as a timebase hint to the 
muxer is deprecated. Set AVStream.time_base instead.
Last message repeated 1 times
Output #0, stream_segment,ssegment, to 'out%03d.ts':
  Metadata:
encoder : Lavf56.4.101
Stream #0:0: Video: h264 (libx264), yuv420p, 704x480 [SAR 10:11 DAR 4:3], 
q=-1--1, 29.97 fps, 29.97 tbn, 29.97 tbc
Metadata:
  encoder : Lavc56.1.100 libx264
Stream #0:1(???): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, 192 kb/s
Stream mapping:
  Stream #0:2 - #0:0 (h264 (native) - h264 (libx264))
  Stream #0:0 - #0:1 (copy)
Press [q] to stop, [?] for help
[stream_segment,ssegment @ 0x1e85dc0] Non-monotonous DTS in output stream 0:1; 
previous: 74880, current: 73459; changing to 74881. This may result in 
incorrect timestamps in the output file.
[mpegts @ 0x1d65e40] DTS 7264406208  7264407506 out of orderN/A dup=38 drop=0  
  
[mpegts @ 0x20dba60] Using AVStream.codec.time_base as a timebase hint to the 
muxer is deprecated. Set AVStream.time_base instead.
Last message repeated 1 times
[mpegts @ 0x21507a0] Using AVStream.codec.time_base as a timebase hint to the 
muxer is deprecated. Set AVStream.time_base instead.
Last message repeated 1 times
[mpegts @ 0x21507a0] Using AVStream.codec.time_base as a timebase hint to the 
muxer is deprecated. Set AVStream.time_base instead.
Last message repeated 1 times
[mpegts @ 0x21507a0] Using AVStream.codec.time_base as a timebase hint to the 
muxer is deprecated. Set AVStream.time_base instead.
Last message repeated 1 times
[mpegts @ 0x21507a0] Using AVStream.codec.time_base as a timebase hint to the 
muxer is deprecated. Set AVStream.time_base instead.
Last message repeated 1 times
frame= 1879 fps= 26 q=29.0 size=N/A time=00:01:02.76 bitrate=N/A dup=38 drop=0  
  



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