interesting..
I tried the following:
vlc transcodes a live stream to a h264/aac output file (stream.ts)
then:
Code: Select all
ffmpeg -i http://127.0.0.1:1234/stream.ts -vcodec copy -acodec copy -f flv /dev/stdout
but get the following error:
Code: Select all
Input #0, mpegts, from 'http://127.0.0.1:1234/stream.ts':
Duration: N/A, start: 6464.352889, bitrate: N/A
Program 1
Stream #0.0[0x44]: Audio: mpeg4aac
Stream #0.1[0x45]: Video: h264, yuv420p, 768x576 [PAR 1:1 DAR 4:3], 25.00 tb(r)
File '/dev/stdout' already exists. Overwrite ? [y/N] y
Output #0, flv, to '/dev/stdout':
Stream #0.0: Video: libx264, yuv420p, 768x576 [PAR 0:1 DAR 0:1], q=2-31, 25.00 tb(c)
Stream #0.1: Audio: libfaac
Stream mapping:
Stream #0.1 -> #0.0
Stream #0.0 -> #0.1
[flv @ 0x7fedad09a040]sample rate not set
so where and how to set the "sample rate" ?
try to use acodec mp3 in vlc
this is my ffmpeg log
[h264 @ 0x1defdb0]no frame!
[h264 @ 0x1dee470]non-existing PPS referenced
[h264 @ 0x1dee470]decode_slice_header error
[h264 @ 0x1dee470]no frame!
[h264 @ 0x1df0480]non-existing PPS referenced
[h264 @ 0x1df0480]decode_slice_header error
[h264 @ 0x1df0480]no frame!
[h264 @ 0x1df0480]non-existing PPS referenced
[h264 @ 0x1df0480]decode_slice_header error
[h264 @ 0x1df0480]no frame!
[h264 @ 0x1defdb0]non-existing PPS referenced
[h264 @ 0x1defdb0]decode_slice_header error
[h264 @ 0x1defdb0]no frame!
[h264 @ 0x1defdb0]non-existing PPS referenced
[h264 @ 0x1defdb0]decode_slice_header error
[h264 @ 0x1defdb0]no frame!
[h264 @ 0x1dee470]non-existing PPS referenced
[h264 @ 0x1dee470]decode_slice_header error
[h264 @ 0x1dee470]no frame!
[h264 @ 0x1df0480]non-existing PPS referenced
[h264 @ 0x1df0480]decode_slice_header error
[h264 @ 0x1df0480]no frame!
[h264 @ 0x1defdb0]non-existing PPS referenced
[h264 @ 0x1defdb0]decode_slice_header error
[h264 @ 0x1defdb0]no frame!
Input #0, mpegts, from '
http://localhost:8081/5af669c683f372bd09a2c0c6f4b11244':
Duration: N/A, start: 30641.584033, bitrate: 128 kb/s
Program 1
Stream #0.0[0x44]: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s
Stream #0.1[0x45]: Video: h264, yuv420p, 640x480, 25.00 tb(r)
Stream #0.2[0x46]: Video: h264, yuv420p, 176x144, 10.00 tb(r)
Stream #0.3[0x47]: Video: h264, yuv420p, 320x240, 15.00 tb(r)
Output #0, flv, to 'pipe:':
Stream #0.0: Video: libx264, yuv420p, 640x480, q=2-31, 25.00 tb(c)
Stream #0.1: Audio: libmp3lame, 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0.1 -> #0.0 [sync #0.0]
Stream #0.0 -> #0.1 [sync #0.1]
Press [q] to stop encoding
frame= 390 fps= 31 q=-1.0 size= 693kB time=16.37 bitrate= 347.0kbits/s