LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-22-2009, 02:40 PM   #1
iwannalearn
LQ Newbie
 
Registered: May 2009
Posts: 2

Rep: Reputation: 0
how do you convert .avi or anything to .ts?


I am pulling my hair out trying to get this done, so please please any tips welcome

so i have downloaded a film .avi i need to convert it to dreambox format .ts so i can ftp to dm hdd

i have tried

ffmpeg -i BMW.wmv -vcodec copy -acodec copy -f mpegts BMW.ts

this is the output

xxxxxxxx@desktop:~/Desktop/BMW$ ffmpeg -i BMW.wmv -vcodec copy -acodec copy -f mpegts BMW.ts
FFmpeg version 0.5-svn17737+3:0.svn20090303-1ubuntu6, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-version=svn17737+3:0.svn20090303-1ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-armvfp --disable-neon --disable-altivec --disable-vis --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Apr 10 2009 23:18:41, gcc: 4.3.3

Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001)
Input #0, asf, from 'BMW.wmv':
Duration: 00:04:49.74, start: 3.000000, bitrate: 1346 kb/s
Stream #0.0: Audio: wmav2, 44100 Hz, stereo, s16, 128 kb/s
Stream #0.1: Video: wmv2, yuv420p, 720x300, 1177 kb/s, 29.97 tbr, 1k tbn, 1k tbc
Output #0, mpegts, to 'BMW.ts':
Stream #0.0: Video: wmv2, yuv420p, 720x300, q=2-31, 1177 kb/s, 90k tbn, 1k tbc
Stream #0.1: Audio: wmav2, 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Stream #0.0 -> #0.1
Press [q] to stop encoding
[mpegts @ 0x9d0c9a0]dts < pcr, TS is invalid
frame= 3281 fps=2134 q=-1.0 size= 20857kB time=109.05 bitrate=1566.8kbits/s frame= 5234 fps=2569 q=-1.0 size= 28574kB time=173.97 bitrate=1345.5kbits/s frame= 6615 fps=2607 q=-1.0 size= 37258kB time=220.31 bitrate=1385.4kbits/s frame= 8028 fps=2641 q=-1.0 size= 45500kB time=267.35 bitrate=1394.2kbits/s frame= 8765 fps=2547 q=-1.0 Lsize= 51563kB time=292.43 bitrate=1444.5kbits/s
video:41781kB audio:4581kB global headers:0kB muxing overhead 11.216906%

my tv is 16.9 if this helps

thanks
 
Old 05-22-2009, 03:08 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 25,827

Rep: Reputation: 7761Reputation: 7761Reputation: 7761Reputation: 7761Reputation: 7761Reputation: 7761Reputation: 7761Reputation: 7761Reputation: 7761Reputation: 7761Reputation: 7761
Quote:
Originally Posted by iwannalearn View Post
I am pulling my hair out trying to get this done, so please please any tips welcome

so i have downloaded a film .avi i need to convert it to dreambox format .ts so i can ftp to dm hdd

i have tried

ffmpeg -i BMW.wmv -vcodec copy -acodec copy -f mpegts BMW.ts

this is the output

xxxxxxxx@desktop:~/Desktop/BMW$ ffmpeg -i BMW.wmv -vcodec copy -acodec copy -f mpegts BMW.ts
FFmpeg version 0.5-svn17737+3:0.svn20090303-1ubuntu6, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-version=svn17737+3:0.svn20090303-1ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-armvfp --disable-neon --disable-altivec --disable-vis --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Apr 10 2009 23:18:41, gcc: 4.3.3

Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001)
Input #0, asf, from 'BMW.wmv':
Duration: 00:04:49.74, start: 3.000000, bitrate: 1346 kb/s
Stream #0.0: Audio: wmav2, 44100 Hz, stereo, s16, 128 kb/s
Stream #0.1: Video: wmv2, yuv420p, 720x300, 1177 kb/s, 29.97 tbr, 1k tbn, 1k tbc
Output #0, mpegts, to 'BMW.ts':
Stream #0.0: Video: wmv2, yuv420p, 720x300, q=2-31, 1177 kb/s, 90k tbn, 1k tbc
Stream #0.1: Audio: wmav2, 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Stream #0.0 -> #0.1
Press [q] to stop encoding
[mpegts @ 0x9d0c9a0]dts < pcr, TS is invalid
frame= 3281 fps=2134 q=-1.0 size= 20857kB time=109.05 bitrate=1566.8kbits/s frame= 5234 fps=2569 q=-1.0 size= 28574kB time=173.97 bitrate=1345.5kbits/s frame= 6615 fps=2607 q=-1.0 size= 37258kB time=220.31 bitrate=1385.4kbits/s frame= 8028 fps=2641 q=-1.0 size= 45500kB time=267.35 bitrate=1394.2kbits/s frame= 8765 fps=2547 q=-1.0 Lsize= 51563kB time=292.43 bitrate=1444.5kbits/s
video:41781kB audio:4581kB global headers:0kB muxing overhead 11.216906%

my tv is 16.9 if this helps

thanks
Hmm...the .ts is a new one for me. From what I read, it appears to be a 'stream container' (transport stream or ".TS"), wrapped around an MPEG file.

Try to convert the .WMV to an MPEG2 file (you appear to be comfortable with ffmpeg, so I'm not going there.. ), then try this:

Code:
mencoder -of mpeg -ovc copy -oac copy -o BMW.mpg BMW.ts
That'll just put a 'wrapper' around the stream, and does no encoding. Give it a shot....
 
Old 05-22-2009, 07:04 PM   #3
soleilarw
Member
 
Registered: Apr 2009
Posts: 107

Rep: Reputation: 19
I would also be interested to know if that did work.

Linux Archive

Last edited by soleilarw; 06-18-2009 at 04:11 AM.
 
Old 05-22-2009, 08:33 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681
Quote:
ffmpeg -i BMW.wmv -vcodec copy -acodec copy -f mpegts BMW.ts
The codec used for a wmv container will be wrong. You are trying to copy the video stream as is to an mpeg container.
There is no .ts format extension listed in "ffmpeg -formats". What is dm hdd?

According to this web site, .ts is for mpeg2 transport streams. So use "-vcodec mpeg2video -f mpegts". If using -y BMW.ts doesn't work, you may need to use BMW.mpg and rename it afterwards. Look on the site's instructions on the bit rates they accept.

---

Using Google I found out that you are talking about a PVR. I was thinking it was a web site you were uploading to.
You may be able to send mpeg files. I don't know where the .ts extension comes from. The spec sheet I read says it will play mpeg2 and mp4 files.

You may also want to resize and pad the video so it is a legal 16/9 format. If you use the "-aspect 16:9" argument, ffmpeg may adjust the pixel aspect ratio. Maybe this would be enough.

Last edited by jschiwal; 05-22-2009 at 08:44 PM.
 
Old 05-23-2009, 12:46 PM   #5
iwannalearn
LQ Newbie
 
Registered: May 2009
Posts: 2

Original Poster
Rep: Reputation: 0
ok here is how it works well

i just tested

ffmpeg -y -threads 2 -i "input.avi" -ab 128k -b 2500k -r 25 -maxrate 8000k -bufsize 1000k -vcodec mpeg2video -s 4cif -acodec mp2 -map 0:0 -map 0:1 "output.ts"

with thanks to
Jose Catre-Vandis

Regards
 
Old 03-30-2017, 12:52 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 25,827

Rep: Reputation: 7761Reputation: 7761Reputation: 7761Reputation: 7761Reputation: 7761Reputation: 7761Reputation: 7761Reputation: 7761Reputation: 7761Reputation: 7761Reputation: 7761
Quote:
Originally Posted by keenbeen View Post
I recommend Avdshare Video Converter which can batch Convert AVI to TS to Convert TS to AVI.
And I recommend against advertising in the forums against rules. And that's a Mac and Windows-only product, so posting it here does nothing to help the original poster with their question.

Thread reported.
 
Old 03-30-2017, 11:49 PM   #7
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,136
Blog Entries: 1

Rep: Reputation: 1845Reputation: 1845Reputation: 1845Reputation: 1845Reputation: 1845Reputation: 1845Reputation: 1845Reputation: 1845Reputation: 1845Reputation: 1845Reputation: 1845
Quote:
Originally Posted by TB0ne View Post
Hmm...the .ts is a new one for me. From what I read, it appears to be a 'stream container' (transport stream or ".TS"), wrapped around an MPEG file.
I don't think any "containing" is involved. "Dreambox" is used as a sort of a generic term within the DVB FTA satellite community. All three of my satellite receivers record files with a .ts suffix. Some can be played directly by VLC or SMplayer, while others can't without first migrating them into a common container format.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert from avi to DVD gabsik Linux - General 4 12-18-2008 01:28 PM
Gui that convert AVI to AVI DivX, with telling final avi target final size ? frenchn00b Linux - General 5 03-02-2008 05:37 AM
Convert avi to mp3 dexim Linux - Software 13 10-06-2006 03:30 AM
Convert picture to AVI General Linux - Software 1 03-04-2006 07:01 PM
convert avi to mpg jbogins Linux - Software 1 12-28-2003 09:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration