Friends, I am using ffmpeg to pull out selections from a larger - master file. these are mpg2 ~ 20 min that i am pulling many items ~ :40 sec each. I am using the command ffmpeg -i 0112.mpg -vcodec copy -acodec copy -ss 00:00:09 -t 0:00:31 0112-03.mpg the resultant file seems 100% fine. but if i analyze it with media info i find an odd diffrence here is the master General #0 Complete name : D:\VidC_05_shr\rider_test\0112.mpg Format : MPEG-2 Program Format/Family : MPEG-2 File size : 1.28 GiB PlayTime : 18mn 9s Bit rate : 10.1 Mbps here is the sub part General #0 Complete name : D:\VidC_05_shr\rider_test\0112-03.mpg Format : MPEG-1 Program Format/Family : MPEG-1 File size : 18.9 MiB PlayTime : 30s 163ms Bit rate : 5261 Kbps ---------------------------------------------- Q- so why is the sub clip seen as Format MPEG-1 , Format/Family MPEG-1? as you can see i am doing -vcodec copy -acodec copy , and the substance of the file IS ok. Is this a header thing? my end use may be to make dvds here is the report from mediaInfo in total from both the master file--------------------------------------- General #0 Complete name : D:\VidC_05_shr\rider_test\0112.mpg Format : MPEG-2 Program Format/Family : MPEG-2 File size : 1.28 GiB PlayTime : 18mn 9s Bit rate : 10.1 Mbps Video #0 Codec : MPEG-2 Video Codec/Family : MPEG-V Codec profile : Main at Main Codec settings, Matrix : Standard PlayTime : 18mn 9s Bit rate mode : CBR Bit rate : 9158 Kbps Nominal bit rate : 5000 Kbps Width : 720 pixels Height : 480 pixels Display Aspect ratio : 4/3 Frame rate : 29.970 fps Standard : NTSC Chroma : 4:2:0 Interlacement : Progressive Bits/(Pixel*Frame) : 0.483 Audio #0 Codec : MPEG-1 Audio layer 2 PlayTime : 18mn 9s Bit rate mode : CBR Bit rate : 224 Kbps Channel(s) : 2 channels Sampling rate : 48.0 KHz Resolution : 16 bits Menu #0 Codec : DVD-Video ----------------------------------------( the sub clip General #0 Complete name : D:\VidC_05_shr\rider_test\0112-03.mpg Format : MPEG-1 Program Format/Family : MPEG-1 File size : 18.9 MiB PlayTime : 30s 163ms Bit rate : 5261 Kbps Video #0 Codec : MPEG-2 Video Codec/Family : MPEG-V Codec profile : Main at Main Codec settings, Matrix : Standard PlayTime : 30s 163ms Bit rate mode : CBR Bit rate : 4672 Kbps Nominal bit rate : 5000 Kbps Width : 720 pixels Height : 480 pixels Display Aspect ratio : 4/3 Frame rate : 29.970 fps Standard : NTSC Chroma : 4:2:0 Interlacement : Progressive Bits/(Pixel*Frame) : 0.483 Audio #0 Codec : MPEG-1 Audio layer 2 PlayTime : 29s 952ms Bit rate mode : CBR Bit rate : 224 Kbps Channel(s) : 2 channels Sampling rate : 48.0 KHz Resolution : 16 bits Video0 delay : -131ms thanks much! jim s
Date: Wed, 17 Mar 2010 11:37:22 -0400 From: Jim Shupert <jshupert at pps-inc.com> Sender: ffmpeg-user-bounces at mplayerhq.hu
Friends,
I am using ffmpeg to pull out selections from a larger - master file. these are mpg2 ~ 20 min that i am pulling many items ~ :40 sec each.
I am using the command
ffmpeg -i 0112.mpg -vcodec copy -acodec copy -ss 00:00:09 -t 0:00:31 0112-03.mpg
the resultant file seems 100% fine. but if i analyze it with media info i find an odd diffrence
here is the master
General #0 Complete name : D:\VidC_05_shr\rider_test\0112.mpg Format : MPEG-2 Program Format/Family : MPEG-2 File size : 1.28 GiB PlayTime : 18mn 9s Bit rate : 10.1 Mbps
here is the sub part
General #0 Complete name : D:\VidC_05_shr\rider_test\0112-03.mpg Format : MPEG-1 Program Format/Family : MPEG-1 File size : 18.9 MiB PlayTime : 30s 163ms Bit rate : 5261 Kbps
---------------------------------------------- Q- so why is the sub clip seen as Format MPEG-1 , Format/Family MPEG-1? as you can see i am doing -vcodec copy -acodec copy , and the substance of the file IS ok. Is this a header thing? my end use may be to make dvds
[mediainfo reports elided] I doubt this is really the problem, but you command is probably not what you want. Options are processed in the order seen, do you probably want: ffmpeg -ss 00:00:09 -t 0:00:31 -i 0112.mpg -vcodec copy -acodec copy 0112-03.mpg I have done this many times to mpeg-2 streams and I have never had the issue you are seeing, but, while your command order would behave incorrectly, I don't understand why it would have the effect you are seeing. Still, extracting the desired portion of the stream after the codec has processed it might cause some poorly tested bits of code to be run. It will also be MUCH slower ad the entire fine will be "copied" before the desired section is selected, or so I would expect. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman at es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751
Kevin Oberman wrote:
Date: Wed, 17 Mar 2010 11:37:22 -0400 From: Jim Shupert <jshupert at pps-inc.com> Sender: ffmpeg-user-bounces at mplayerhq.hu
Friends,
I am using ffmpeg to pull out selections from a larger - master file. these are mpg2 ~ 20 min that i am pulling many items ~ :40 sec each.
I am using the command
ffmpeg -i 0112.mpg -vcodec copy -acodec copy -ss 00:00:09 -t 0:00:31 0112-03.mpg
the resultant file seems 100% fine.
[mediainfo reports elided]
I doubt this is really the problem, but you command is probably not what you want. Options are processed in the order seen, do you probably want: ffmpeg -ss 00:00:09 -t 0:00:31 -i 0112.mpg -vcodec copy -acodec copy 0112-03.mpg
I have done this many times to mpeg-2 streams and I have never had the issue you are seeing, but, while your command order would behave incorrectly, I don't understand why it would have the effect you are seeing. Still, extracting the desired portion of the stream after the codec has processed it might cause some poorly tested bits of code to be run. It will also be MUCH slower ad the entire fine will be "copied" before the desired section is selected, or so I would expect.
Thanks , that sounds like good advice I will use it -- i *think the effct I am seeing is more of a header thing than the 'true' file - stream ...thing... i appreciate the word - have a great day! js
Jim Shupert wrote:
Friends,
I am using ffmpeg to pull out selections from a larger - master file. these are mpg2 ~ 20 min that i am pulling many items ~ :40 sec each.
I am using the command
ffmpeg -i 0112.mpg -vcodec copy -acodec copy -ss 00:00:09 -t 0:00:31 0112-03.mpg
the resultant file seems 100% fine. but if i analyze it with media info i find an odd diffrence
.....
got It ! just add target ntsc-dvd , as this ffmpeg -i 0112.mpg -target ntsc-dvd -vcodec copy -acodec copy -ss 00:01:13 -t 0:00:30 0112-03d.mpg gotta love ffmpeg!
Hi Jim, On 03/17/2010 10:45 AM, Jim Shupert wrote:
Jim Shupert wrote:
Friends,
I am using ffmpeg to pull out selections from a larger - master file. these are mpg2 ~ 20 min that i am pulling many items ~ :40 sec each.
I am using the command
ffmpeg -i 0112.mpg -vcodec copy -acodec copy -ss 00:00:09 -t 0:00:31 0112-03.mpg
the resultant file seems 100% fine. but if i analyze it with media info i find an odd diffrence
.....
got It ! just add target ntsc-dvd , as this
ffmpeg -i 0112.mpg -target ntsc-dvd -vcodec copy -acodec copy -ss 00:01:13 -t 0:00:30 0112-03d.mpg
gotta love ffmpeg!
Just add -f vob before <file.mpg> -- Baptiste COUDURIER Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA FFmpeg maintainer http://www.ffmpeg.org
On Thu, 18 Mar 2010 04:15:20 Jim Shupert wrote:
Jim Shupert wrote:
Friends,
I am using ffmpeg to pull out selections from a larger - master file. these are mpg2 ~ 20 min that i am pulling many items ~ :40 sec each.
I am using the command
ffmpeg -i 0112.mpg -vcodec copy -acodec copy -ss 00:00:09 -t 0:00:31 0112-03.mpg
the resultant file seems 100% fine. but if i analyze it with media info i find an odd diffrence
.....
got It ! just add target ntsc-dvd , as this
ffmpeg -i 0112.mpg -target ntsc-dvd -vcodec copy -acodec copy -ss 00:01:13 -t 0:00:30 0112-03d.mpg
gotta love ffmpeg! _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Again, move the -ss/-t commands *before* the -i; otherwise ffmpeg parses the entire file before writing out only the selected portion. By putting -ss/-t first, it will seek to -ss, read only -t duration and write it out immediately. -- =================================================== Rodney Baker VK5ZTV rodney.baker at iinet.net.au ===================================================
participants (4)
-
baptiste.coudurier@gmail.com -
jshupert@pps-inc.com -
oberman@es.net -
rodney.baker@iinet.net.au