[FFmpeg-trac] #4793(undetermined:new): ffmpeg does not work with mpeg video

FFmpeg trac at avcodec.org
Fri Aug 21 21:47:39 CEST 2015


#4793: ffmpeg does not work with mpeg video
-------------------------------------+-------------------------------------
             Reporter:  illumilore   |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 when setting ffserver to have mpeg output, ffmpeg will not function.


 ~/src/ffmpeg/ffmpeg -f pulse -i default -f video4linux2 -input_format
 mjpeg -s 960x720 -r 10 -i /dev/video0 -acodec copy -vcodec copy -map 0:a
 -map 1:v http://127.0.0.1:8090/cam.ffm -map 0:a -map 1:v -vcodec mjpeg
 -acodec copy -f segment -segment_time 3600 -segment_atclocktime 1
 -reset_timestamps 1 -r 5 -s 960x720 -crf 40 -vf
 "drawtext='fontfile=/usr/share/fonts/truetype/DejaVuSans.ttf:fontcolor=white:fontsize=30:x=1:y=2:shadowx=1:shadowy=1:text=%{localtime\:%Y-%m-%d
 %H\\\\\:%M\\\\\:%S}'" -strftime 1 "/media/cam/%Y-%m-%d_%H-%M.avi"

 ffmpeg version N-72844-g2f1dd4a Copyright (c) 2000-2015 the FFmpeg
 developers
   built with gcc 4.8 (SUSE Linux)
   configuration: --enable-libfreetype --enable-libfontconfig --enable-
 libpulse --enable-gpl --enable-libvpx --enable-libx264
   libavutil      54. 27.100 / 54. 27.100
   libavcodec     56. 41.100 / 56. 41.100
   libavformat    56. 36.100 / 56. 36.100
   libavdevice    56.  4.100 / 56.  4.100
   libavfilter     5. 16.101 /  5. 16.101
   libswscale      3.  1.101 /  3.  1.101
   libswresample   1.  2.100 /  1.  2.100
   libpostproc    53.  3.100 / 53.  3.100
 Guessed Channel Layout for  Input Stream #0.0 : stereo
 Input #0, pulse, from 'default':
   Duration: N/A, start: 1440186267.001362, bitrate: 1536 kb/s
     Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
 Input #1, video4linux2,v4l2, from '/dev/video0':
   Duration: N/A, start: 335025.470183, bitrate: N/A
     Stream #1:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown),
 960x720, -1 kb/s, 10 fps, 10 tbr, 1000k tbn, 1000k tbc
 [swscaler @ 0x2acdb20] deprecated pixel format used, make sure you did set
 range correctly
 [swscaler @ 0x2b40b60] deprecated pixel format used, make sure you did set
 range correctly
 [mpeg1video @ 0x2b007e0] MPEG1/2 does not support 10/1 fps
 Output #0, ffm, to 'http://127.0.0.1:8090/cam.ffm':
   Metadata:
     creation_time   : now
     Stream #0:0: Audio: mp2, 44100 Hz, mono, s16, 32 kb/s
     Metadata:
       encoder         : Lavc56.41.100 mp2
     Stream #0:1: Video: mpeg1video, none, 160x128, q=2-31, 64 kb/s, 10
 fps, 10 tbc
     Metadata:
       encoder         : Lavc56.41.100 mpeg1video
     Stream #0:2: Video: mjpeg, none, 960x720, q=1-5, 64 kb/s, 10 fps, 2
 tbc
     Metadata:
       encoder         : Lavc56.41.100 mjpeg
     Stream #0:3: Video: mjpeg, none, 640x480, q=10-20, 64 kb/s, 10 fps, 2
 tbc
     Metadata:
       encoder         : Lavc56.41.100 mjpeg
 Output #1, segment, to '/media/cam/%Y-%m-%d_%H-%M.avi':
     Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
     Stream #1:1: Video: mjpeg, none, q=2-31, 128 kb/s, 5 fps
     Metadata:
       encoder         : Lavc56.41.100 mjpeg
 Stream mapping:
   Stream #0:0 -> #0:0 (pcm_s16le (native) -> mp2 (native))
   Stream #1:0 -> #0:1 (mjpeg (native) -> mpeg1video (native))
   Stream #1:0 -> #0:2 (mjpeg (native) -> mjpeg (native))
   Stream #1:0 -> #0:3 (mjpeg (native) -> mjpeg (native))
   Stream #0:0 -> #1:0 (copy)
   Stream #1:0 -> #1:1 (mjpeg (native) -> mjpeg (native))
 Error while opening encoder for output stream #0:1 - maybe incorrect
 parameters such as bit_rate, rate, width or height
 <Stream test1.mpg>
 # coming from live feed 'feed1'
 Feed cam.ffm

 Format mpeg

 # Bitrate for the audio stream. Codecs usually support only a few
 # different bitrates.
 AudioBitRate 32

 # Number of audio channels: 1 = mono, 2 = stereo
 AudioChannels 1

 # Sampling frequency for audio. When using low bitrates, you should
 # lower this frequency to 22050 or 11025. The supported frequencies
 # depend on the selected audio codec.
 AudioSampleRate 44100

 # Bitrate for the video stream
 VideoBitRate 64

 # Ratecontrol buffer size
 VideoBufferSize 40

 # Number of frames per second
 VideoFrameRate 10

 # Size of the video frame: WxH (default: 160x128)
 # The following abbreviations are defined: sqcif, qcif, cif, 4cif, qqvga,
 # qvga, vga, svga, xga, uxga, qxga, sxga, qsxga, hsxga, wvga, wxga, wsxga,
 # wuxga, woxga, wqsxga, wquxga, whsxga, whuxga, cga, ega, hd480, hd720,
 # hd1080
 VideoSize 160x128

 # Transmit only intra frames (useful for low bitrates, but kills frame
 rate).
 #VideoIntraOnly

 # If non-intra only, an intra frame is transmitted every VideoGopSize
 # frames. Video synchronization can only begin at an intra frame.
 VideoGopSize 12

 # More MPEG-4 parameters
 # VideoHighQuality
 # Video4MotionVector

 # Choose your codecs:
 #AudioCodec mp2
 #VideoCodec mpeg1video

 # Suppress audio
 #NoAudio

 # Suppress video
 #NoVideo

 #VideoQMin 3
 #VideoQMax 31

 # Set this to the number of seconds backwards in time to start. Note that
 # most players will buffer 5-10 seconds of video, and also you need to
 allow
 # for a keyframe to appear in the data stream.
 #Preroll 15

 # ACL:

 # You can allow ranges of addresses (or single addresses)
 #ACL ALLOW <first address>

 # You can deny ranges of addresses (or single addresses)
 #ACL DENY <first address>

 # You can repeat the ACL allow/deny as often as you like. It is on a per
 # stream basis. The first match defines the action. If there are no
 matches,
 # then the default is the inverse of the last ACL statement.
 #
 # Thus 'ACL allow localhost' only allows access from localhost.
 # 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
 # allow everybody else.

 </Stream>

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4793>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list