[FFmpeg-user] Trying to create Transport Stream (mpegts) having multiple programs embedded

S Kilian iskilian at hotmail.com
Fri Apr 6 16:27:10 CEST 2012


 
Henk, 
 
Oh thanks. I was to focused on the getting the service id to index. Change my -vcodec from "copy" to "mpeg2video -r 30000/1001" so the frame rates would be proper.
 
I wonder how difficult it would be to index the service ID when it encounters a new video stream.

 - Steve 
 
 
Command:
bin/ffmpeg.exe -i ../video-input/Finding-Nemo-full.mpeg -i ../video-input/Shane.mpeg -i ../video-input/avatar-wide.mpeg \
-vcodec mpeg2video -r 30000/1001 -acodec copy -map 0:v -map 0:6 \
-vcodec mpeg2video -r 30000/1001 -acodec copy -map 1:v -map 1:1 \
-vcodec mpeg2video -r 30000/1001 -acodec copy -map 2:v -map 2:9 \
-y -t 12 -mpegts_service_id 3 -muxrate 19392636 -f mpegts z-output.ts
 
 
Result:
bin/ffmpeg.exe -i z-output.ts
Input #0, mpegts, from 'z-output.ts':
  Duration: 00:00:11.97, start: 1.400000, bitrate: 19379 kb/s
  Program 3
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 720x480 [SAR 8:9 DAR 4:3], 104857 kb/
s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x101]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), s16, 448 kb/s
 
<<< this is where Program 4 should be >>>

    Stream #0:2[0x102]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 720x480 [SAR 8:9 DAR 4:3], 104857 kb/
s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:3[0x103]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, s16, 192 kb/s
 
<<< this is where Program 5 should be >>>

    Stream #0:4[0x104]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 720x480 [SAR 32:27 DAR 16:9], 104857
kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:5[0x105]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), s16, 448 kb/s
 


> 
> This part:
> Stream #1:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 8:9 DAR 4:3], 9800 kb/s, 23.98 fps, 59.94 tbr, 9
> 0k tbn, 59.94 tbc
> 
> Says it afaik. Your video-streams have different frame-rates and can't be in the same ts afaik.
> 
> On Apr 6, 2012, at 6:01 AM, S Kilian <iskilian at hotmail.com> wrote:
> 
> > Stream #1:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 8:9 DAR 4:3], 9800 kb/s, 23.98 fps, 59.94 tbr, 9
> > 0k tbn, 59.94 tbc
> 		 	   		  


More information about the ffmpeg-user mailing list