[FFmpeg-trac] #7804(undetermined:new): ffmpeg exit code incorrect

FFmpeg trac at avcodec.org
Sat Mar 23 08:27:04 EET 2019


#7804: ffmpeg exit code incorrect
-------------------------------------+-------------------------------------
             Reporter:  razvan       |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  git-master   |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by razvan):

 ****
 if I give ffmpeg a incorrect input url
         ffmpeg -i ​http://.../livestream_a/playlist.m3u8 <<<< incorrect
         ffmpeg -i http://.../livestream_ao/playlist.m3u8 <<< this is the
 correct one

 which is not found on the streaming server then ffmpeg report
 "HTTP error 404 Not Found"
 and exit code is 1
 I think this is correct as ffmpeg completes with an error,
 so exit code !=0

 command and output
 -------------------

 ffmpeg started on 2019-03-23 at 08:19:24
 Report written to "/home/raz/radio.log"
 Command line:
 ./ffmpeg -hide_banner -user_agent "VLC/3.0.6 LibVLC/3.0.6" -i
 http://.../livestream_a/playlist.m3u8 -y -nostats -c copy -bsf:a
 aac_adtstoasc /home/raz/radio.aac
 [http @ 0x562df80] HTTP error 404 Not Found
 http://.../livestream_a/playlist.m3u8: Server returned 404 Not Found

 ffmpeg exit code=1


 ****
 if input url is correct and it starts reading it and so on (save the
 stream for example),
 and after a while, the server return again "HTTP error 404 Not Found" for
 some chunk
 then ffmpeg exit with code 0.
 This I cannot reproduce anytime as it depends on the streaming server to
 have a glitch of some sort


 ffmpeg started on 2019-03-22 at 14:51:00
 Report written to "/home/raz/radio-0.log"
 Command line:
 ./ffmpeg -hide_banner -user_agent "VLC/3.0.6 LibVLC/3.0.6" -i
 http://.../livestream_ao/playlist.m3u8 -y -nostats -c copy -bsf:a
 aac_adtstoasc /home/raz/radio-0.aac
 [hls,applehttp @ 0x6e0f6c0] Opening
 'http://.../livestream_ao/chunklist_w222613001.m3u8' for reading
 [hls,applehttp @ 0x6e0f6c0] Opening
 'http://.../livestream_ao/media_w222613001_15345.aac' for reading
 [hls,applehttp @ 0x6e0f6c0] Opening
 'http://.../livestream_ao/media_w222613001_15346.aac' for reading
 Input #0, hls,applehttp, from 'http://.../livestream_ao/playlist.m3u8':
   Duration: N/A, start: 88660.092678, bitrate: 84 kb/s
   Program 0
     Metadata:
       variant_bitrate : 132811
     Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp, 84 kb/s
     Metadata:
       variant_bitrate : 132811
       id3v2_priv.com.apple.streaming.transportStreamTimestamp:
 \x00\x00\x00\x01\xdb\x9c\x1b\xd5
 Output #0, adts, to '/home/raz/radio-0.aac':
   Metadata:
     encoder         : Lavf58.26.101
     Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp, 84 kb/s
     Metadata:
       variant_bitrate : 132811
       id3v2_priv.com.apple.streaming.transportStreamTimestamp:
 \x00\x00\x00\x01\xdb\x9c\x1b\xd5
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
 Press [q] to stop, [?] for help
 [http @ 0x6e1b500] Opening
 'http://.../livestream_ao/media_w222613001_15347.aac' for reading
 [http @ 0x6e181c0] Opening
 'http://.../livestream_ao/chunklist_w222613001.m3u8' for reading
 [hls,applehttp @ 0x6e0f6c0] Opening
 'http://.../livestream_ao/chunklist_w222613001.m3u8' for reading
 [http @ 0x6e1b500] Opening
 'http://.../livestream_ao/media_w222613001_15348.aac' for reading
 [hls,applehttp @ 0x6e0f6c0] Opening
 'http://.../livestream_ao/media_w222613001_15348.aac' for reading
 [http @ 0x6e6e1c0] Opening
 'http://.../livestream_ao/chunklist_w222613001.m3u8' for reading
 [hls,applehttp @ 0x6e0f6c0] Opening
 'http://.../livestream_ao/chunklist_w222613001.m3u8' for reading
 [http @ 0x6e1b440] Opening
 'http://.../livestream_ao/media_w222613001_15349.aac' for reading
 [hls,applehttp @ 0x6e0f6c0] Opening
 'http://.../livestream_ao/media_w222613001_15349.aac' for reading
 [http @ 0x6e18140] Opening
 'http://.../livestream_ao/chunklist_w222613001.m3u8' for reading
 [hls,applehttp @ 0x6e0f6c0] Opening
 'http://.../livestream_ao/chunklist_w222613001.m3u8' for reading
 [http @ 0x6e5f8c0] Opening
 'http://.../livestream_ao/media_w222613001_15350.aac' for reading
 [hls,applehttp @ 0x6e0f6c0] Opening
 'http://.../livestream_ao/media_w222613001_15350.aac' for reading
 [http @ 0x6e18180] Opening
 'http://.../livestream_ao/chunklist_w222613001.m3u8' for reading
 [hls,applehttp @ 0x6e0f6c0] Opening
 'http://.../livestream_ao/chunklist_w222613001.m3u8' for reading

 - after some time of running fine with output as above
 the streaming server seems to have a glitch of some sort

 [http @ 0x6e5f8c0] Opening
 'http://.../livestream_ao/chunklist_w222613001.m3u8' for reading
 [hls,applehttp @ 0x6e0f6c0] Opening
 'http://.../livestream_ao/chunklist_w222613001.m3u8' for reading
 [http @ 0x6e18100] Opening
 'http://.../livestream_ao/media_w222613001_15571.aac' for reading
 [hls,applehttp @ 0x6e0f6c0] Opening
 'http://.../livestream_ao/media_w222613001_15571.aac' for reading
 [http @ 0x6e6c0c0] Opening
 'http://.../livestream_ao/chunklist_w222613001.m3u8' for reading
 [hls,applehttp @ 0x6e0f6c0] Opening
 'http://.../livestream_ao/chunklist_w222613001.m3u8' for reading
 [http @ 0x6e70600] HTTP error 404 Not Found
 [hls,applehttp @ 0x6e0f6c0] Failed to reload playlist 0
 [hls,applehttp @ 0x6e0f6c0] Opening
 'http://.../livestream_ao/chunklist_w222613001.m3u8' for reading
 [http @ 0x6e19dc0] HTTP error 404 Not Found
 [hls,applehttp @ 0x6e0f6c0] Failed to reload playlist 0
 size=   36208kB time=00:37:49.95 bitrate= 130.7kbits/s speed=   1x
 video:0kB audio:35539kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 1.880420%


 -----
 ffmpeg exit code=0

 I think this is incorrect because ffmpeg ended with an error,
 so it should return something other then 0.

 Thanks

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7804#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list