I have a .ts file (Download files here: http://dropcanvas.com/2gmsg/1).
I want to split this video while I expect ALL other properties remain same including pts time.
Here is what I try to achieve this:
ffmpeg -ss 0.000 -i sample.ts -y -c copy -t 3 splitted.ts
Expected start time: 94678.950389
New start time: 1.402367
I expect the above command should only take first 3 seconds of the .ts file and all other stuff to stay same. I've seen copyts and copytb options from the documentation but I wasn't able to use them.
So how do I do this?
Thank you
Here are the logs for copyts. It creates a 0 byte splitted.ts file:
ffmpeg -ss 0:00:00 -i sample.ts -to 00:00:03 -y -c copy -copyts splitted.ts
ffmpeg version 3.0 Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 7.0.0 (clang-700.0.72)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-libvorbis --enable-libvpx --enable-libass --enable-ffplay --enable-libfdk-aac --enable-libopus --enable-libx265 --enable-nonfree --enable-vda
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
[NULL # 0x7fafac02fc00] start time for stream 2 is not set in estimate_timings_from_pts
Input #0, mpegts, from 'sample.ts':
Duration: 00:00:10.07, start: 94678.950389, bitrate: 934 kb/s
Program 1
Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 854x480 [SAR 1280:1281 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 140 kb/s
Stream #0:2[0x102]: Data: timed_id3 (ID3 / 0x20334449)
Output #0, mpegts, to 'splitted.ts':
Metadata:
encoder : Lavf57.25.100
Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 854x480 [SAR 1280:1281 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, 140 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=-1.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
This works for me
ffmpeg -seek_timestamp 1 -ss 94678.950389 -i sample.ts -y -c copy -copyts -to 94681.950389 -muxdelay 0 splitted.ts
Your original command can work if you use the frames flag.
ffmpeg -ss 0.000 -i sample.ts -y -c copy -copyts -muxdelay 0 -vframes 90 splitted.ts
Where 90 represents amount of frames in t seconds.
Related
Demuxing
I am demuxing TS segments into audio and video as follows.
ffmpeg -y -i input.ts -vcodec copy -an output_video.ts
ffmpeg -y -i input.ts -acodec copy -vn output_audio.aac
Inspecting Input
The start_pts and start_time on input.ts are as shown below. I was able to inspect these values using ffprobe -show_streams -print_format json input.ts
"start_pts": 8306558438,
"start_time": "92295.093756",
Inspecting output video
The output .ts has some default start_pts and start_time values as shown below. These were also obtained using the same ffprobe command as indicated above.
"start_pts": 126000,
"start_time": "1.400000",
Inspecting output audio
The same ffprobe command on output_audio.aac shows that the output aac has invalid codec_tag and codec_tag_string as shown below. The start_pts and start_time are not present in the output_audio.aac.
"codec_tag_string": "[0][0][0][0]", (should have been [15][0][0][0])
"codec_tag": "0x0000", (should have been 0xf000)
Questions
Wondering if this difference in the start_pts, start_time, codec_tag is expected?
If it is expected, what can I do to ensure that the all of these parameters get retained on the output?
If it is not expected, is there some more information I can share to track this down?
Note
There were other outputs that I found inconsistent in the ffprobe command for the output_audio.aac like duration etc.. I shared what I thought are most valuable at this point. If required I can share complete outputs from all of the above executions.
[EDIT 07/30/2018 - 08:00 MST]
logs for ffmpeg -y -i input.ts -vcodec copy -an output_video.ts -acodec copy -vn output_audio.aacare as shown below.
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-ffplay --enable-frei0r --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-librtmp --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.3.0/include/openjpeg-2.3 --enable-nonfree
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
[mpegts # 0x7f88ed803000] start time for stream 0 is not set in estimate_timings_from_pts
Input #0, mpegts, from 'i7h9456s_media_46185.ts':
Duration: 00:00:06.05, start: 86216.852667, bitrate: 2898 kb/s
Program 1
Stream #0:0[0x102]: Data: timed_id3 (ID3 / 0x20334449)
Stream #0:1[0x100]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m, progressive), 640x360 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:2[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 190 kb/s
Output #0, mpegts, to '../output_video.ts':
Metadata:
encoder : Lavf58.12.100
Stream #0:0: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m, progressive), 640x360 [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
Output #1, adts, to '../output_audio.aac':
Metadata:
encoder : Lavf58.12.100
Stream #1:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 190 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:2 -> #1:0 (copy)
Press [q] to stop, [?] for help
frame= 180 fps=0.0 q=-1.0 Lsize= 2088kB time=00:00:06.03 bitrate=2833.8kbits/s speed= 904x
video:1918kB audio:142kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.349750%
All the differences are expected. FFmpeg removes input timestamp offset unless set otherwise. The MPEG-TS muxer also adds a timestamp offset.
You can preserve source timestamps when remuxing TS, and also avoid the muxer's offset, like this,
ffmpeg -y -copyts -i input.ts -vcodec copy -an -muxdelay 0 -muxpreload 0 output_video.ts
As .aac is a raw ADTS stream, there is no codec tag string present. This is expected. Mux to .m4a or .mka or a similar container if tags are needed.
I'm trying to capture a screenshot from a udp stream using ffmpeg in a Ubuntu 14.04 System.
Following is the command
ffmpeg -y -i udp_ip -vframes 1 -q:v 1 test.png
But the image captured is of very poor resolution and I observed a lag while taking the screenshot.
Please suggest a best tool or a way to take a screenshot in the fastest way and also of the best image resolution possible.
edit:
log files
ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libtheora --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab --enable-libwavpack --enable-nvenc
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
[mpeg2video # 0x390cc60] Invalid frame dimensions 0x0.
Last message repeated 7 times
Input #0, mpegts, from 'udp://#xxx.xx.xx.xx:xxxx':
Duration: N/A, start: 144.130744, bitrate: 4128 kb/s
Program 1
Metadata:
service_name : Program-1
service_provider: Encoder
Stream #0:0[0x42]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 16:15 DAR 4:3], 4000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x43]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video (native) -> png (native))
Press [q] to stop, [?] for help
Output #0, image2, to 'player.png':
Metadata:
encoder : Lavf57.71.100
Stream #0:0: Video: png, rgb24, 720x576 [SAR 16:15 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc57.89.100 png
frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A dup=1 drop=1 speed=0.729x
video:777kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Since, this seems to be an issue of aspect ratio, and not quality, per se, use
ffmpeg -y -i udp_ip -vf scale=iw*sar:ih,setsar=1 -vframes 1 -q:v 1 test.png
The scale filter rescales the video to square pixels. The SAR filter isn't strictly necessary but in case the PNG muxer writes that data, better to reset it.
From
-t duration (input/output)
When used as an input option (before -i), limit the duration of data read from the input file.
When used as an output option (before an output url), stop writing the output after its duration reaches duration.
So this should yield a 1-minute file with timestamps starting at 1:49, right?
ffmpeg -y -copyts -ss 1:49 -i ~/Videos/input.mkv -c copy -t 1:00 timing-1m49s.mkv
ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7 (SUSE Linux)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -g' --disable-htmlpages --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --disable-openssl --enable-avresample --enable-libcdio --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcelt --enable-libcdio --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-netcdf --enable-vaapi --enable-vdpau --enable-libfdk_aac --enable-nonfree --enable-libmp3lame --enable-libtwolame --enable-libx264 --enable-libx265 --enable-libxvid
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
Input #0, matroska,webm, from '/home/ariel/Videos/input.mkv':
Metadata:
encoder : libebml v0.7.7 + libmatroska v0.8.0
creation_time : 2006-07-20T03:07:03.000000Z
Duration: 00:23:57.06, start: 0.000000, bitrate: 1983 kb/s
Stream #0:0: Video: h264 (High), yuv420p(progressive), 720x480, SAR 37:30 DAR 37:20, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)
Stream #0:1(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default)
Stream #0:2(jpn): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:3(eng): Subtitle: dvd_subtitle, 720x480 (default)
Metadata:
title : English Audio
Stream #0:4(eng): Subtitle: dvd_subtitle, 720x480
Metadata:
title : Japanese Audio
Output #0, matroska, to 'timing-1m49s.mkv':
Metadata:
encoder : Lavf57.71.100
Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(progressive), 720x480 [SAR 37:30 DAR 37:20], q=2-31, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc (default)
Stream #0:1(eng): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 192 kb/s (default)
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=-1.0 Lsize= 1kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Wrong. It outputs a file with no frames:
-rwxrwx--- 1 root users 805 Jul 30 01:36 timing-1m49s.mkv
I have to specify -t 1:49 or more, and e.g. -t 1:55 produces a 6-second file that starts at 0:00 and according to the metadata should last 1:55.
I arrived at this point trying to extract a clip and add subtitles in the same command, but this minimal case looks to me contrary to the documentation.
Yes, the -t used as output option looks at the timestamps, which usually start at zero. Except for cases like these when -copyts is used. Use -t as input option:
ffmpeg -y -copyts -ss 1:49 -t 1:00 -i ~/Videos/input.mkv -c copy timing-1m49s.mkv
I have two video streams from which I'd like to take one frame of each, both of them are RTSP. I'm using the same FFMPEG instruction for both of them but changing the URL of the stream, the first one works but the second one throws the error:
method SETUP failed: 455 Method Not Valid In This State
Can anyone tell me what could be the reason for this error and how to solve it?
WORKING
ffmpeg -ss 1 -i rtsp://streamreader:trudat55#69.84.126.216:88/videoMain -an -vcodec mjpeg -vframes 1 -aspect 16:9 -q:v 2 -y test.jpg
ffmpeg version 2.8.2 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (Debian 4.9.2-10)
configuration: --enable-gpl --enable-avresample --enable-libopencore-amrnb --enable-libx264 --enable-libxvid --enable-postproc --enable-version3 --enable-shared --enable-pic --extra-ldexeflags=-pie
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
[rtsp # 0x55a60a0a7420] UDP timeout, retrying with TCP
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://streamreader:password#69.84.126.216:88/videoMain':
Metadata:
title : IP Camera Video
comment : videoMain
Duration: N/A, start: 0.200044, bitrate: N/A
Stream #0:0: Video: h264 (Baseline), yuv420p, 640x480, 50 tbr, 90k tbn, 180k tbc
Stream #0:1: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s
[swscaler # 0x55a60a102460] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'test.jpg':
Metadata:
title : IP Camera Video
comment : videoMain
encoder : Lavf56.40.101
Stream #0:0: Video: mjpeg, yuvj420p(pc), 640x480 [SAR 4:3 DAR 16:9], q=2-31, 200 kb/s, 50 fps, 50 tbn, 50 tbc
Metadata:
encoder : Lavc56.60.100 mjpeg
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
frame= 1 fps=0.5 q=2.0 Lsize=N/A time=00:00:00.02 bitrate=N/A dup=1 drop=1
video:66kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
NOT WORKING
ffmpeg -ss 1 -i rtsp://camaras.corredorautomotriz.cl:554/live.sdp -an -vcodec mjpeg -vframes 1 -aspect 16:9 -q:v 2 -y test.jpg
ffmpeg version 2.8.2 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (Debian 4.9.2-10)
configuration: --enable-gpl --enable-avresample --enable-libopencore-amrnb --enable-libx264 --enable-libxvid --enable-postproc --enable-version3 --enable-shared --enable-pic --extra-ldexeflags=-pie
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
[rtsp # 0x55b98f2de420] UDP timeout, retrying with TCP
[rtsp # 0x55b98f2de420] method SETUP failed: 455 Method Not Valid In This State
[rtsp # 0x55b98f2de420] Could not find codec parameters for stream 0 (Video: mjpeg, none(bt470bg/unknown/unknown)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, rtsp, from 'rtsp://camaras.corredorautomotriz.cl:554/live.sdp':
Metadata:
title : RTSP server
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mjpeg, none(bt470bg/unknown/unknown), 90k tbr, 90k tbn, 90k tbc
Stream #0:1: Data: none
Output #0, image2, to 'test.jpg':
Output file #0 does not contain any stream
I found that if I specify that the protocol is TCP with the instruction -rtsp_transport tcp then i don't get an error:
ffmpeg -ss 5 -rtsp_transport tcp -i rtsp://camaras.corredorautomotriz.cl:554/live.sdp -s 640x480 -aspect 16:9 -b:v 800k -r 24 video.flv
But I would still like to know the reason and solution of the problem I got before, because I am not sure I can use this parameter. Anyone knows?
Thanks
As I see in your output, ffmpeg failed to determine input stream type in the second case (rtsp://camaras.corredorautomotriz.cl:554/live.sdp).
I checked it, and it got me mpeg4:
Input #0, rtsp, from 'rtsp://camaras.corredorautomotriz.cl:554/live.sdp':
Metadata:
title : RTSP server
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mpeg4 (Simple Profile), yuv420p, 720x480 [SAR 1:1 DAR 3:2], 30 tbr, 30k tbn
Thus possibly you compiled ffmpeg without mpeg4 decoder (or with broken decoder).
I have multiple streaming sources that need to combined and re-streamed as a single source.
My sources are:
A local low rate RTP audio stream
A camera
I need to redistribute the combined stream (via UDP multicast) across the local network.
The problem I am seeing is that periodically ffmpeg appears to lock up and stop processing the combination after an indeterminate amount of time (sometimes as little as 15 min sometimes almost an hour). However if I redirect the streams independently (audio or video only) there appears to be no problem and the run indefinitely.
Command
ffmpeg -f rtp -i rtp://127.0.0.1:6666 -f video4linux2 -standard NTSC -s 704x480 -i /dev/video1 -strict experimental -vcodec libx264 -acodec ac3 -preset ultrafast -r 3 -g 3 -keyint_min 6 -x264opts "keyint=6:min-keyint=6:no-scenecut" -b:v 200k -ac 1 -b:a 64k -f mpegts udp://225.1.1.15:30000
Output
ffmpeg version 2.5.1- http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2014 the FFmpeg developers
built on Dec 18 2014 09:06:26 with gcc 4.8 (Debian 4.8.3-19)
configuration: --enable-gpl --enable-version3 --disable-shared --disable- debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable- libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx -- enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc -- enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus -- disable-ffserver --enable-libass --enable-gnutls --cc=gcc-4.8
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 13.100 / 56. 13.100
libavformat 56. 15.102 / 56. 15.102
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
[rtp # 0xb61abe0] Guessing on RTP content - if not received properly you need an SDP file describing it
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, rtp, from 'rtp://127.0.0.1:6666':
Duration: N/A, start: 0.000000, bitrate: 64 kb/s
Stream #0:0: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s
Input #1, video4linux2,v4l2, from '/dev/video1':
Duration: N/A, start: 1424887596.039777, bitrate: 162039 kb/s
Stream #1:0: Video: rawvideo (YUY2 / 0x32595559`enter code here`), yuyv422, 704x480, 162039 kb/s, 29.97 fps, 29.97 tbr, 1000k tbn, 1000k tbc
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 # 0xb61f900] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 # 0xb61f900] profile High 4:2:2, level 2.2, 4:2:2 8-bit
Output #0, mpegts, to 'udp://225.1.1.15:30000':
Metadata:
encoder : Lavf56.15.102
Stream #0:0: Video: h264 (libx264), yuv422p, 704x480, q=-1--1, 200 kb/s, 3 fps, 90k tbn, 3 tbc
Metadata:
encoder : Lavc56.13.100 libx264
Stream #0:1: Audio: ac3, 8000 Hz, mono, fltp, 64 kb/s
Metadata:
encoder : Lavc56.13.100 ac3
Stream mapping:
Stream #1:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (pcm_mulaw (native) -> ac3 (native))
Press [q] to stop, [?] for help
frame= 5 fps=0.0 q=12.0 size= 0kB time=00:00:00.33 bitrate= 0.0kbits/s dup=0 drop=12
Turns out the only way I was able to get the streams to run for an extended period was to split them into two independent streams.