Re: video re-encoding to suit mobile device ?
Owen Townend <[email protected]> Fri, 4 Nov 2011 09:35:20 +1100
| Newsgroups | gmane.org.user-groups.slug.chat |
|---|---|
| Message-ID | <CAB+pQ4nV_4_kQnRB9zbQ1+jwB-eLfwVO-j6A8Qqp1ukhvHx5-g@mail.gmail.com> |
On 7 October 2011 08:42, Voytek Eymont <[email protected]> wrote: > I have a PVR that records TV as a .ts file, apparently it's a raw video > stream, it's around 2GB for 60 minutes news (non-HD) broadcast, I'd like > to re-encode to a smaller file size suitable for playing on a 4" mobile > phone, as well as 10" tablet, either streaming or from file on the device= . > > target devices are: > 800x1280 pixels,(~149 ppi pixel density) > 540 x 960 pixels, (~275 ppi pixel density) > > is ffmpeg and/or mencoder what is needed ? > > what options should I be using, I'm trying like (what I've found in some > tutorials): > > ffmpeg -i movie.ts -ab 128 -b 10000 movie.mpg > > mencoder movie.ts -oac mp3lame -lameopts cbr:mode=3D2:br=3D96 -af > resample=3D44100 -srate 44100 -ofps 20 -ovc lavc -lavcopts > vcodec=3Dmpeg4:mbd=3D2:cbp:trell:vbitrate=3D300 -vf scale=3D960:540 -ffou= rcc XVID > -o movie1.mpeg > > ffmpeg identifies .ts as: > > Stream #0.0[0xa2]: Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR > 16:9], 10000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc > Stream #0.1[0x53](eng): Audio: mp2, 48000 Hz, 2 channels, s16, 192 kb/s > Stream #0.2[0x2a](eng): Subtitle: 0x0006 > Stream #0.3[0x1388]: Data: 0x000b > > mencoder says: > > TS file format detected. > VIDEO MPEG2(pid=3D162) AUDIO MPA(pid=3D83) SUB Teletext(pid=3D42) =C2=A0P= ROGRAM N. 770 > VIDEO: =C2=A0MPEG2 =C2=A0720x576 =C2=A0(aspect 3) =C2=A025.000 fps =C2=A0= 10000.0 kbps (1250.0 kbyte/s) > [V] filefmt:29 =C2=A0fourcc:0x10000002 =C2=A0size:720x576 =C2=A0fps:25.00= 0 =C2=A0ftime:=3D0.0400 > The easiest way I've found to encode .ts TV recordings for my phone is via HandBrake. It has a bunch of presets particularly for Apple devices, but those formats and sizes should also be ok to play on Android or Windows phones or tablets. It's available for most distros and has both a gui and command line interfa= ce. It can be a point and click operation or you can tinker with the details if= you particularly want or need to. Also, if you do tinker in the gui, one of the tabs will give you the matching command line so you could batch it in the future. Get it from: http://handbrake.fr/downloads.php Cheers, Owen. -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html