Recherche avancée

Médias (2)

Mot : - Tags -/documentation

Autres articles (66)

Sur d’autres sites (14161)

  • -use_wallclock_as_timestamps adds delay in live stream

    2 novembre 2020, par Arikael

    We have a livestream (MPEG-TS with RTP), which we currently, for testing purposes, replay with tcpreplay.

    


    Our mpeg-ts stream consists of 4 streams (codec details omitted for brevity).

    


    Stream #0:2: Video: h264
Stream #0:1: Audio: mp2
Stream #0:4: Data: bin_data ([6][0][0][0] / 0x0006)
Strean #0:3: Data: bin_data (FBID / 0x4494246)
Stream #0:0: Data: klv (KLVA / 0x41564C4B)


    


    Sometimes the stream indexes are different (like audio stream being stream 0 and so on, I don't know if thats normal behavior)

    


    What we currently try is just to get the stream and copy it with ffmpeg, like

    


    ffmpeg -nostdin -hide_banner -i rtp://239.0.0.2:3000 -map 0 -codec copy -f rtp_mpegts rtp://239.0.0.1:2000`


    


    This leads to the error Application provided invalid, non monotonically incereasing dts to muxer in stream 0: [NUMBER] >= 0

    


    It always says stream 0 no matter what stream 0 contains.

    


    if I add use_wallclock_as_timestamps it works but adds a delay (compared to a video directly streamed from 239.0.0.2:3000 of 10seconds which are never caught up.

    


    If I set the output format to mpegts instead of rpt_mpegts it works as expected, the same I if don't map the KLVA and FBID stream.

    


    Is this behavior expected (because of wallclock) or what can I do to either use_wallclock_as_timestamps without delay or get rid of the error above ?

    


  • whether it takes long time for convert flv to MP4 using ffmpeg from server

    29 décembre 2016, par Firman Firdaus

    I want to convert a flv file to mp4. I use with a basic command like this :

    ffmpeg -i /var/www/html/rawmedia/d2cb9f152f27d9beb4a15d61e177fa22.flv /var/www/html/media/new.mp4

    The command above has result 0 B mp4.
    I read for My reference for this in this link,
    there is a very simple and basic I think.
    So I try the command above for testing php vibe command like this :

    ffmpeg -i /var/www/html/rawmedia/d2cb9f152f27d9beb4a15d61e177fa22.flv -vcodec libx264 -s 640x360 -threads 4 -movflags faststart /var/www/html/media/test4.mp4

    I got that command from PHPVIBE for convert other format file except mp4.
    So I got a result just the same as like first command that still 0 B mp4.
    But the Output of the second command give me like this

    Incompatible sample format 's16' for codec 'aac', auto-selecting format 'flt'
    [libx264 @ 0xcebde0] using cpu capabilities: none!
    [libx264 @ 0xcebde0] profile High, level 3.0
    [libx264 @ 0xcebde0] 264 - core 120 r2151 a3f4407 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=4 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [NULL @ 0xd5f1a0] Codec is experimental but experimental codecs are not enabled, see -strict -2
    Output #0, mp4, to '/var/www/html/media/test4.mp4':
     Metadata:
       starttime       : 0
       totalduration   : 57
       totaldatarate   : 353
       bytelength      : 2535814
       canseekontime   : true
       sourcedata      : B0AFCE7F5HH1428394559963956
       purl            :
       pmsg            :
       Stream #0:0: Video: h264, yuv420p, 640x360, q=-1--1, 90k tbn, 30 tbc
       Stream #0:1: Audio: none, 22050 Hz, stereo, flt, 128 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (flv -> libx264)
     Stream #0:1 -> #0:1 (mp3 -> aac)
    Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height

    Output give me some information that test.mp4 have bytelength      : 2535814.
    But I still have 0B mp4 converted result until now. Is there taking a time or I was wrong with the command. But especially my first command very basic and still get zero byte result.

  • Having trouble streaming video with FFmpeg over TCP on Windows [closed]

    8 mars 2024, par Tharunkumar Ampolu

    I'm trying to stream a video using FFmpeg over TCP on a Windows system. I'm using the following command

    


    ffmpeg -i video.mp4 -f mpegts tcp://192.168.24.3:2000?listen



    


    However, I encounter the following errors :

    


    Error opening output tcp ://192.168.24.3:2000 ?listen : Error number -10049 occurred
Error opening output file tcp ://192.168.24.3:2000 ?listen.
Error opening output files : Error number -10049 occurred

    


    I attempted to stream the video using the specified FFmpeg command.
I provided the command and the input file (video.mp4).
However, the command resulted in errors related to opening the output file for streaming.

    


    I expected the FFmpeg command to successfully stream the video over TCP to the specified address and port (192.168.24.3:2000).
I expected the command to run without errors and for the video stream to be accessible at the specified destination.