Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, is there anybody who can help me with video encoding? I want to encode video to MPEG-TS with null packet (PID 0x1fff). Anybody know how to do this? Is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2011
    Posts
    7

    ffmpeg encoding mpegts


    Hi,
    is there anybody who can help me with video encoding? I want to encode video to MPEG-TS with null packet (PID 0x1fff). Anybody know how to do this? Is it possible?

    My current command:

    ffmpeg -i audio.mp2 -i video.mpg -s 720x576 -minrate 3200k -maxrate 3200k -bufsize 3200k -vcodec libx264 -vpre libx264-iptv -acodec copy -r 25 -f mpegts out.mpg

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,508
    What do you mean by MPEG-TS? Do you mean that you want the file in a format acceptable for a DVD or do you mean an mpeg transport stream? If the latter, here is the documentation from the ffmpeg manual:

    Code:
    14.5 mpegts
    
    MPEG transport stream muxer.
    
    This muxer implements ISO 13818-1 and part of ETSI EN 300 468.
    
    The muxer options are:
    
    ‘-mpegts_original_network_id number’
    Set the original_network_id (default 0x0001). This is unique identifier of a network in DVB. Its main use is in the unique identification of a service through the path Original_Network_ID, Transport_Stream_ID.
    
    ‘-mpegts_transport_stream_id number’
    Set the transport_stream_id (default 0x0001). This identifies a transponder in DVB.
    
    ‘-mpegts_service_id number’
    Set the service_id (default 0x0001) also known as program in DVB.
    
    ‘-mpegts_pmt_start_pid number’
    Set the first PID for PMT (default 0x1000, max 0x1f00).
    
    ‘-mpegts_start_pid number’
    Set the first PID for data packets (default 0x0100, max 0x0f00).
    
    The recognized metadata settings in mpegts muxer are service_provider and service_name. If they are not set the default for service_provider is "FFmpeg" and the default for service_name is "Service01".
    
     	
    ffmpeg -i file.mpg -acodec copy -vcodec copy \
         -mpegts_original_network_id 0x1122 \
         -mpegts_transport_stream_id 0x3344 \
         -mpegts_service_id 0x5566 \
         -mpegts_pmt_start_pid 0x1500 \
         -mpegts_start_pid 0x150 \
         -metadata service_provider="Some provider" \
         -metadata service_name="Some Channel" \
         -y out.ts
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Jul 2011
    Posts
    7
    Thank you for reply. Now I have another problem. I want to mux two files: video.h264 (720x576, 25fps, 2.5Mbps CBR) and audio.mp2 (192kbps, 48kHZ) to MPEGTS 3.2Mbps CBR.

    Mediainfo information from out.ts file muxed with tsMuxeR:

    Overall bit rate : 3 200 Kbps
    Maximum Overall bit rate : 35.5 Mbps

    I need to mux it with CBR. Second thing is NIT table. I want to set only PAT and PMT nothing else.

    Please help.

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,508
    Well, that's beyond what I do with ffmpeg - I wouldn't consider myself an ffmpeg "expert", more an enlightened novice!
    Anyway, go to the ffmpeg web site to access the full documentation or user forums for more help with this: FFmpeg
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •